[latex3-commits] [latex3/tagpdf] develop: ignore empty AFinline (14237f1)
github at latex-project.org
github at latex-project.org
Thu Nov 23 19:32:01 CET 2023
Repository : https://github.com/latex3/tagpdf
On branch : develop
Link : https://github.com/latex3/tagpdf/commit/14237f14c514fab256259bf0d55d1e6a2dfe7447
>---------------------------------------------------------------
commit 14237f14c514fab256259bf0d55d1e6a2dfe7447
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date: Thu Nov 23 19:32:01 2023 +0100
ignore empty AFinline
>---------------------------------------------------------------
14237f14c514fab256259bf0d55d1e6a2dfe7447
CHANGELOG.md | 2 +-
tagpdf-struct.dtx | 41 ++++++++++++++++++++++-------------------
2 files changed, 23 insertions(+), 20 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index efdbb81..65e2b58 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,7 +8,7 @@ this project uses date-based 'snapshot' version identifiers.
## [Unreleased]
### Changed
- - ignore AFref key with empty value.
+ - ignore AFref, AFinline-key with empty value.
- Documentation changes
## [2023-11-19]
diff --git a/tagpdf-struct.dtx b/tagpdf-struct.dtx
index 35d3cae..f255ca5 100644
--- a/tagpdf-struct.dtx
+++ b/tagpdf-struct.dtx
@@ -1225,25 +1225,28 @@
\cs_new_protected:Npn \@@_struct_add_inline_AF:nn #1 #2
% #1 content, #2 extension
{
- \group_begin:
- \int_gincr:N \g_@@_struct_AFobj_int
- \pdffile_embed_stream:neN
- {#1}
- {tag-AFfile\int_use:N\g_@@_struct_AFobj_int.#2}
- \l_@@_tmpa_tl
- \@@_struct_add_AF:ee
- { \int_use:N \c at g_@@_struct_abs_int }
- { \l_@@_tmpa_tl }
- \@@_struct_prop_gput:nne
- { \int_use:N \c at g_@@_struct_abs_int }
- { AF }
- {
- [
- \tl_use:c
- { g_@@_struct_\int_eval:n {\c at g_@@_struct_abs_int}_AF_tl }
- ]
- }
- \group_end:
+ \tl_if_empty:nF{#1}
+ {
+ \group_begin:
+ \int_gincr:N \g_@@_struct_AFobj_int
+ \pdffile_embed_stream:neN
+ {#1}
+ {tag-AFfile\int_use:N\g_@@_struct_AFobj_int.#2}
+ \l_@@_tmpa_tl
+ \@@_struct_add_AF:ee
+ { \int_use:N \c at g_@@_struct_abs_int }
+ { \l_@@_tmpa_tl }
+ \@@_struct_prop_gput:nne
+ { \int_use:N \c at g_@@_struct_abs_int }
+ { AF }
+ {
+ [
+ \tl_use:c
+ { g_@@_struct_\int_eval:n {\c at g_@@_struct_abs_int}_AF_tl }
+ ]
+ }
+ \group_end:
+ }
}
\cs_generate_variant:Nn \@@_struct_add_inline_AF:nn {on}
More information about the latex3-commits
mailing list.