diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/tagpdf/tagpdf.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/tagpdf/tagpdf.sty | 97 |
1 files changed, 17 insertions, 80 deletions
diff --git a/Master/texmf-dist/tex/latex/tagpdf/tagpdf.sty b/Master/texmf-dist/tex/latex/tagpdf/tagpdf.sty index 910b8cb532e..26eb303b9fe 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} {2023-11-17} {0.98p} +\ProvidesExplPackage {tagpdf} {2023-11-19} {0.98q} { A package to experiment with pdf tagging } \bool_if:nF @@ -64,46 +64,25 @@ \DeclareOption {disabledelayedshipout}{ \bool_gset_false:N\g__tag_delayed_shipout_bool } \ExecuteOptions{luamode} \ProcessOptions -\RequirePackage{l3ref-tmp} \RequirePackage{tagpdf-base} -\cs_if_exist:NTF \property_new:nnnn +\cs_new_protected:Npn \__tag_lastpagelabel: { - \cs_new_protected:Npn \__tag_lastpagelabel: - { - \legacy_if:nT { @filesw } - { - \exp_args:NNne \exp_args:NNe\iow_now:Nn \@auxout - { - \token_to_str:N \new@label@record - {@tag@LastPage} - { - {abspage} { \int_use:N \g_shipout_readonly_int} - {tagmcabs}{ \int_use:N \c@g__tag_MCID_abs_int } - {tagstruct}{\int_use:N \c@g__tag_struct_abs_int } - } - } - } - } - } - { - \cs_new_protected:Npn \__tag_lastpagelabel: - { - \legacy_if:nT { @filesw } - { - \exp_args:NNne \exp_args:NNe\iow_now:Nn \@auxout - { - \token_to_str:N \newlabeldata - {@tag@LastPage} - { - {abspage} { \int_use:N \g_shipout_readonly_int} - {tagmcabs}{ \int_use:N \c@g__tag_MCID_abs_int } - {tagstruct}{\int_use:N \c@g__tag_struct_abs_int } - } - } - } - } + \legacy_if:nT { @filesw } + { + \exp_args:NNne \exp_args:NNe\iow_now:Nn \@auxout + { + \token_to_str:N \new@label@record + {@tag@LastPage} + { + {abspage} { \int_use:N \g_shipout_readonly_int} + {tagmcabs}{ \int_use:N \c@g__tag_MCID_abs_int } + {tagstruct}{\int_use:N \c@g__tag_struct_abs_int } + } + } + } } + \AddToHook{enddocument/afterlastpage} {\__tag_lastpagelabel:} \tl_new:N \l__tag_tmpa_tl @@ -144,8 +123,6 @@ \cs_generate_variant:Nn \seq_set_split:Nnn{Nne} \cs_generate_variant:Nn \str_set_convert:Nnnn {Nonn, Noon, Nnon } \cs_generate_variant:Nn \clist_map_inline:nn {on} -\cs_if_exist:NTF \property_new:nnnn - { \cs_new_eq:NN \__tag_property_new:nnnn \property_new:nnnn \cs_new_eq:NN \__tag_property_gset:nnnn \property_gset:nnnn \cs_new_eq:NN \__tag_property_ref:nnn \property_ref:nnn @@ -156,50 +133,10 @@ \property_record:nn{#1}{#2} \@esphack } - } - { - \cs_new_protected:Npn \__tag_property_new:nnnn #1 #2 #3 #4 - { - \ref_attribute_gset:nnnn {#1}{#3}{#2}{#4} - } - \cs_new_protected:Npn \__tag_property_gset:nnnn #1 #2 #3 #4 - { - \ref_attribute_gset:nnnn {#1}{#3}{#2}{#4} - } - \cs_new:Npn \__tag_property_ref:nnn #1#2#3 - { - \exp_args:Nee - \__ref_value:nnn - { \tl_to_str:n {#1} } { \tl_to_str:n {#2} } {#3} - } - \cs_new:Npn \__ref_value:nnn #1#2#3 - { - \tl_if_exist:cTF { g__ref_label_ #1 _ #2 _tl } - { \tl_use:c { g__ref_label_ #1 _ #2 _tl } } - { - #3 - } - } - \cs_new_eq:NN \__tag_property_ref:nn \ref_value:nn - \cs_new_protected:Npn \__tag_property_record:nn #1#2 - { - \@bsphack - \ref_label:nn {#1}{#2} - \@esphack - } - \providecommand\new@label@record[2]{} - } + \cs_generate_variant:Nn \__tag_property_ref:nnn {enn} \cs_generate_variant:Nn \__tag_property_ref:nn {en} \cs_generate_variant:Nn \__tag_property_record:nn {en,eV} -\cs_new:Npn \__tag_ref_value:enn #1#2#3 - { - \tl_if_exist:cTF { g__ref_label_ #1 _ #2 _tl } - { \tl_use:c { g__ref_label_ #1 _ #2 _tl } } - { - #3 - } - } \cs_new:Npn \__tag_property_ref_lastpage:nn #1 #2 { \__tag_property_ref:nnn {@tag@LastPage}{#1}{#2} |