summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/tagpdf/tagpdf.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/tagpdf/tagpdf.sty')
-rw-r--r--Master/texmf-dist/tex/latex/tagpdf/tagpdf.sty38
1 files changed, 26 insertions, 12 deletions
diff --git a/Master/texmf-dist/tex/latex/tagpdf/tagpdf.sty b/Master/texmf-dist/tex/latex/tagpdf/tagpdf.sty
index d021f6d303c..1688cdf6478 100644
--- a/Master/texmf-dist/tex/latex/tagpdf/tagpdf.sty
+++ b/Master/texmf-dist/tex/latex/tagpdf/tagpdf.sty
@@ -28,7 +28,7 @@
%% and all files in that bundle must be distributed together.
%%
%% File: tagpdf.dtx
-\ProvidesExplPackage {tagpdf} {2024-04-12} {0.99b}
+\ProvidesExplPackage {tagpdf} {2024-06-20} {0.99c}
{ A package to experiment with pdf tagging }
\bool_if:nF
@@ -925,6 +925,7 @@
{
\l__tag_tmpa_tl
}
+ \prop_gput:cnn { g__tag_struct_1_prop } {S}{ /StructTreeRoot }
}
\cs_new_protected:Npn \__tag_tree_write_structelements:
{
@@ -1547,19 +1548,31 @@
{
\hook_gput_code:nnn {begindocument}{tagpdf}
{
- \cs_if_exist:NT \chapter
- {
- \prop_map_inline:cn{g__tag_role_NS_latex-book_prop}
- {
- \__tag_role_add_tag:ne {#1}{\use_i:nn #2\c_empty_tl\c_empty_tl}
- }
- }
+ \bool_lazy_and:nnT
+ {
+ \cs_if_exist_p:N \chapter
+ }
+ {
+ \cs_if_exist_p:N \c@chapter
+ }
+ {
+ \prop_map_inline:cn{g__tag_role_NS_latex-book_prop}
+ {
+ \__tag_role_add_tag:ne {#1}{\use_i:nn #2\c_empty_tl\c_empty_tl}
+ }
+ }
}
}
{
\hook_gput_code:nnn {begindocument}{tagpdf}
{
- \cs_if_exist:NT \chapter
+ \bool_lazy_and:nnT
+ {
+ \cs_if_exist_p:N \chapter
+ }
+ {
+ \cs_if_exist_p:N \c@chapter
+ }
{
\prop_map_inline:cn{g__tag_role_NS_latex-book_prop}
{
@@ -1972,7 +1985,7 @@
T, %title, value in () or <>
Lang, %language
Alt, % value in () or <>
- E, % abreviation
+ E, % abbreviation
ActualText,
AF, %pdf 2.0, array of dict, associated files
NS, %pdf 2.0, dict, namespace
@@ -2008,7 +2021,7 @@
\__tag_prop_gput:cnn
{ g__tag_struct_#1_prop }{#2}{#3}
}
-\cs_generate_variant:Nn \__tag_struct_prop_gput:nnn {nne,nee,nno}
+\cs_generate_variant:Nn \__tag_struct_prop_gput:nnn {onn,nne,nee,nno}
\tl_gset:Nn \g__tag_struct_stack_current_tl {1}
\cs_new:Npn \__tag_pdf_name_e:n #1{\pdf_name_from_unicode_e:n{#1}}
@@ -2239,7 +2252,7 @@
}
}
-\cs_new_protected:Npn \__tag_struct_get_dict_content:nN #1 #2 %#1: stucture num
+\cs_new_protected:Npn \__tag_struct_get_dict_content:nN #1 #2 %#1: structure num
{
\tl_clear:N #2
\prop_map_inline:cn { g__tag_struct_#1_prop }
@@ -2717,6 +2730,7 @@
{ g__tag_struct_ \l__tag_struct_stack_parent_tmpa_tl _prop}
{S}
\l__tag_tmpa_tl
+ \quark_if_no_value:NT\l__tag_tmpa_tl{\tl_set:Nn \l__tag_tmpa_tl{UNKNOWN}}
\msg_warning:nneee
{ tag }
{role-parent-child}