diff options
author | Karl Berry <karl@freefriends.org> | 2023-08-31 21:42:02 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2023-08-31 21:42:02 +0000 |
commit | 4868aaa64ec256810c21024031a5b881f5bb94ad (patch) | |
tree | 9ce9e47a06651fdd7a2dd12e4cf0d68173a82c8e /Master/texmf-dist/tex/latex | |
parent | 92e212c571b21030c6e8a7cae6211e1c0702255d (diff) |
tagpdf (31aug23)
git-svn-id: svn://tug.org/texlive/trunk@68128 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
18 files changed, 327 insertions, 75 deletions
diff --git a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-base.sty b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-base.sty index 4b226bc1810..c026c9924ca 100644 --- a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-base.sty +++ b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-base.sty @@ -25,7 +25,7 @@ %% and all files in that bundle must be distributed together. %% %% File: tagpdf.dtx -\ProvidesExplPackage {tagpdf-base} {2023-08-04} {0.98k} +\ProvidesExplPackage {tagpdf-base} {2023-08-30} {0.98l} {part of tagpdf - provide base, no-op versions of the user commands } \AddToHook{begindocument} { diff --git a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-debug-generic.sty b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-debug-generic.sty index a193d2a06e7..87ef709e170 100644 --- a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-debug-generic.sty +++ b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-debug-generic.sty @@ -19,7 +19,7 @@ %% and all files in that bundle must be distributed together. %% %% File: tagpdf-mc-generic.dtx -\ProvidesExplPackage {tagpdf-debug-generic} {2023-08-04} {0.98k} +\ProvidesExplPackage {tagpdf-debug-generic} {2023-08-30} {0.98l} {part of tagpdf - debugging code related to marking chunks - generic mode} \cs_set_protected:Npn \tag_mc_begin:n #1 %#1 keyval { @@ -47,7 +47,7 @@ \tl_if_empty:NF {\l__tag_mc_key_label_tl} { \exp_args:NV - \__tag_mc_handle_mc_label:n \l__tag_mc_key_label_tl + \__tag_mc_handle_mc_label:e \l__tag_mc_key_label_tl } \bool_if:NF \l__tag_mc_key_stash_bool { diff --git a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-debug-lua.sty b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-debug-lua.sty index 262e2bdca24..5e5c76cf37c 100644 --- a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-debug-lua.sty +++ b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-debug-lua.sty @@ -19,6 +19,35 @@ %% and all files in that bundle must be distributed together. %% %% File: tagpdf-mc-luacode.dtx +\ProvidesExplPackage {tagpdf-debug-lua} {2023-08-30} {0.98l} + {part of tagpdf - debugging code related to marking chunks - lua mode} +\cs_set_protected:Npn \__tag_mc_handle_stash:n #1 %1 mcidnum + { + \__tag_check_mc_used:n { #1 } + \seq_gput_right:cn % Don't fill a lua table due to the command in the item, + % so use the kernel command + { g__tag_struct_kids_\g__tag_struct_stack_current_tl _seq } + { + \__tag_mc_insert_mcid_kids:n {#1}% + } + \seq_gput_right:cn % Don't fill a lua table due to the command in the item, + % so use the kernel command + { g__tag_struct_debug_kids_\g__tag_struct_stack_current_tl _seq } + { + MC~#1% + } + \lua_now:e + { + ltx.__tag.func.store_struct_mcabs + ( + \g__tag_struct_stack_current_tl,#1 + ) + } + \prop_gput:Nxx + \g__tag_mc_parenttree_prop + { #1 } + { \g__tag_struct_stack_current_tl } + } %% %% %% End of file `tagpdf-debug-lua.sty'. diff --git a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-debug.sty b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-debug.sty index 776162fba6d..8cfd07c1274 100644 --- a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-debug.sty +++ b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-debug.sty @@ -26,7 +26,7 @@ %% and all files in that bundle must be distributed together. %% %% File: tagpdf.dtx -\ProvidesExplPackage {tagpdf-debug} {2023-08-04} {0.98k} +\ProvidesExplPackage {tagpdf-debug} {2023-08-30} {0.98l} { debug code for tagpdf } \@ifpackageloaded{tagpdf}{}{\PackageWarning{tagpdf-debug}{tagpdf~not~loaded,~quitting}\endinput} \prop_gput:Nnn \g_msg_module_type_prop { tag / debug} {} @@ -41,6 +41,24 @@ \RequirePackage {tagpdf-debug-generic} % } %% File: tagpdf-checks.dtx +\msg_new:nnn { tag/debug } { show-struct } + { + =========================\\ + The~structure~#1~ + \tl_if_empty:nTF {#2} + { is~empty \\>~ . } + { contains: #2 } + \\ + } +\msg_new:nnn { tag/debug } { show-kids } + { + The~structure~has~the~following~kids: + \tl_if_empty:nTF {#2} + { \\>~ NONE } + { #2 } + \\ + ========================= + } \msg_new:nnn { tag / debug } {mc-begin} { MC~begin~#1~with~options:~\tl_to_str:n{#2}~[\msg_line_context:] } \msg_new:nnn { tag / debug } {mc-end} { MC~end~#1~[\msg_line_context:] } @@ -138,11 +156,95 @@ +\keys_define:nn { __tag / show } + { + ,debug/structures .code:n = + { + \int_step_inline:nnn{#1}{\c@g__tag_struct_abs_int} + { + \msg_term:nnxxxx + { tag/debug } { show-struct } + { ##1 } + { + \prop_map_function:cN + {g__tag_struct_debug_##1_prop} + \msg_show_item_unbraced:nn + } + { } { } + \msg_term:nnxxxx + { tag/debug } { show-kids } + { ##1 } + { + \seq_map_function:cN + {g__tag_struct_debug_kids_##1_seq} + \msg_show_item_unbraced:n + } + { } { } + } + } + ,debug/structures .default:n = 0 + } %% File: tagpdf-mc-shared.dtx %% File: tagpdf-tree.dtx %% File: tagpdf-roles.dtx %% File: tagpdf-struct.dtx +\prop_new:c { g__tag_struct_debug_0_prop } +\prop_gset_eq:cc + { g__tag_struct_debug_0_prop } + { g__tag_struct_0_prop } +\prop_gremove:cn { g__tag_struct_debug_0_prop }{Namespaces} +\seq_new:c { g__tag_struct_debug_kids_0_seq } +\cs_set_protected:Npn \__tag_struct_kid_mc_gput_right:nn #1 #2 %#1 structure num, #2 MCID absnum% + { + \__tag_seq_gput_right:cx + { g__tag_struct_kids_#1_seq } + { + \__tag_struct_mcid_dict:n {#2} + } + \seq_gput_right:cn + { g__tag_struct_debug_kids_#1_seq } + { + MC~#2 + } + \__tag_seq_gput_right:cn + { g__tag_struct_kids_#1_seq } + { + \prop_item:Nn \g__tag_struct_cont_mc_prop {#2} + } + } +\cs_set_protected:Npn\__tag_struct_kid_struct_gput_right:nn #1 #2 %#1 num of parent struct, #2 kid struct + { + \__tag_seq_gput_right:cx + { g__tag_struct_kids_#1_seq } + { + \pdf_object_ref:n { __tag/struct/#2 } + } + \seq_gput_right:cn + { g__tag_struct_debug_kids_#1_seq } + { + Struct~#2 + } + } + +\cs_set_protected:Npn\__tag_struct_kid_OBJR_gput_right:nnn #1 #2 #3 + { + \pdf_object_unnamed_write:nn + { dict } + { + /Type/OBJR/Obj~#2/Pg~#3 + } + \__tag_seq_gput_right:cx + { g__tag_struct_kids_#1_seq } + { + \pdf_object_ref_last: + } + \seq_gput_right:cx + { g__tag_struct_debug_kids_#1_seq } + { + OBJR~reference + } + } \cs_set_protected:Npn \tag_struct_begin:n #1 %#1 key-val { \__tag_check_if_active_struct:TF @@ -150,8 +252,10 @@ \group_begin: \int_gincr:N \c@g__tag_struct_abs_int \__tag_prop_new:c { g__tag_struct_\int_eval:n { \c@g__tag_struct_abs_int }_prop } + \prop_new:c { g__tag_struct_debug_\int_eval:n {\c@g__tag_struct_abs_int}_prop } \__tag_new_output_prop_handler:n {\int_eval:n { \c@g__tag_struct_abs_int }} \__tag_seq_new:c { g__tag_struct_kids_\int_eval:n { \c@g__tag_struct_abs_int }_seq} + \seq_new:c { g__tag_struct_debug_kids_\int_eval:n {\c@g__tag_struct_abs_int}_seq } \exp_args:Ne \pdf_object_new:n { __tag/struct/\int_eval:n { \c@g__tag_struct_abs_int } } @@ -277,6 +381,24 @@ %\prop_show:c { g__tag_struct_\g__tag_struct_stack_current_tl _prop } %\seq_show:c {g__tag_struct_kids_\l__tag_struct_stack_parent_tmpa_tl _seq} } + \prop_gset_eq:cc + { g__tag_struct_debug_\int_eval:n {\c@g__tag_struct_abs_int}_prop } + { g__tag_struct_\int_eval:n {\c@g__tag_struct_abs_int}_prop } + \prop_gput:cnx + { g__tag_struct_debug_\int_eval:n {\c@g__tag_struct_abs_int}_prop } + { P } + { + \bool_if:NTF \l__tag_struct_elem_stash_bool + {no~parent:~stashed} + { + parent~structure:~\l__tag_struct_stack_parent_tmpa_tl\c_space_tl =~ + \l__tag_get_parent_tmpa_tl + } + } + \prop_gput:cnx + { g__tag_struct_debug_\int_eval:n {\c@g__tag_struct_abs_int}_prop } + { NS } + { \g__tag_struct_tag_NS_tl } %\prop_show:c { g__tag_struct_\g__tag_struct_stack_current_tl _prop } %\seq_show:c {g__tag_struct_kids_\l__tag_struct_stack_parent_tmpa_tl _seq} \__tag_debug_struct_begin_insert:n { #1 } @@ -323,6 +445,67 @@ \__tag_debug_struct_end_check:n{#1} \tag_struct_end: } +\cs_set_protected:Npn \tag_struct_use:n #1 %#1 is the label + { + \__tag_check_if_active_struct:T + { + \prop_if_exist:cTF + { g__tag_struct_\__tag_ref_value:enn{tagpdfstruct-#1}{tagstruct}{unknown}_prop } % + { + \__tag_check_struct_used:n {#1} + %add the label structure as kid to the current structure (can be the root) + \__tag_struct_kid_struct_gput_right:xx + { \g__tag_struct_stack_current_tl } + { \__tag_ref_value:enn{tagpdfstruct-#1}{tagstruct}{0} } + %add the current structure to the labeled one as parents + \__tag_prop_gput:cnx + { g__tag_struct_\__tag_ref_value:enn{tagpdfstruct-#1}{tagstruct}{0}_prop } + { P } + { + \pdf_object_ref:e { __tag/struct/\g__tag_struct_stack_current_tl } + } + \prop_gset_eq:cc + { g__tag_struct_debug_\__tag_ref_value:enn{tagpdfstruct-#1}{tagstruct}{0}_prop } + { g__tag_struct_\__tag_ref_value:enn{tagpdfstruct-#1}{tagstruct}{0}_prop } + \prop_gput:cnx + { g__tag_struct_debug_\__tag_ref_value:enn{tagpdfstruct-#1}{tagstruct}{0}_prop } + { P } + { + parent~structure:~\g__tag_struct_stack_current_tl\c_space_tl=~ + \g__tag_struct_tag_tl + } + \prop_gput:cnx + { g__tag_struct_debug_\int_eval:n {\c@g__tag_struct_abs_int}_prop } + { NS } + { \g__tag_struct_tag_NS_tl } + \__tag_struct_get_parentrole:eNN + {\__tag_ref_value:enn{tagpdfstruct-#1}{tagstruct}{0}} + \l__tag_tmpa_tl + \l__tag_tmpb_tl + \__tag_check_parent_child:VVVVN + \g__tag_struct_tag_tl + \g__tag_struct_tag_NS_tl + \l__tag_tmpa_tl + \l__tag_tmpb_tl + \l__tag_parent_child_check_tl + \int_compare:nNnT {\l__tag_parent_child_check_tl}<0 + { + \cs_set_eq:NN \l__tag_role_remap_tag_tl \g__tag_struct_tag_tl + \cs_set_eq:NN \l__tag_role_remap_NS_tl \g__tag_struct_tag_NS_tl + \__tag_role_remap: + \cs_gset_eq:NN \g__tag_struct_tag_tl \l__tag_role_remap_tag_tl + \cs_gset_eq:NN \g__tag_struct_tag_NS_tl \l__tag_role_remap_NS_tl + \__tag_struct_set_tag_info:eVV + { \int_eval:n {\c@g__tag_struct_abs_int} } + \g__tag_struct_tag_tl + \g__tag_struct_tag_NS_tl + } + } + { + \msg_warning:nnn{ tag }{struct-label-unknown}{#1} + } + } + } %% File: tagpdf-space.dtx %% diff --git a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-luatex.def b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-luatex.def index f04dcf18ccd..5c0351d1fa0 100644 --- a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-luatex.def +++ b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-luatex.def @@ -19,7 +19,7 @@ %% and all files in that bundle must be distributed together. %% %% File: tagpdf-backend.dtx -\ProvidesExplFile {tagpdf-luatex.def} {2023-08-04} {0.98k} +\ProvidesExplFile {tagpdf-luatex.def} {2023-08-30} {0.98l} {tagpdf~driver~for~luatex} { \fontencoding{TU}\fontfamily{lmr}\fontseries{m}\fontshape{n}\fontsize{10pt}{10pt}\selectfont diff --git a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-generic.sty b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-generic.sty index 9df31cb0252..d7d065980bd 100644 --- a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-generic.sty +++ b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-generic.sty @@ -19,10 +19,8 @@ %% and all files in that bundle must be distributed together. %% %% File: tagpdf-mc-generic.dtx -\ProvidesExplPackage {tagpdf-mc-code-generic} {2023-08-04} {0.98k} +\ProvidesExplPackage {tagpdf-mc-code-generic} {2023-08-30} {0.98l} {part of tagpdf - code related to marking chunks - generic mode} -\__tag_prop_new:N \g__tag_MCID_byabspage_prop - \tl_new:N \l__tag_mc_ref_abspage_tl \tl_new:N \l__tag_mc_tmpa_tl @@ -246,51 +244,85 @@ \cs_set_eq:NN \__tag_mc_bmc:n \pdf_bmc:n \cs_set_eq:NN \__tag_mc_emc: \pdf_emc: \cs_set_eq:NN \__tag_mc_bdc:nn \pdf_bdc:nn -\cs_generate_variant:Nn \__tag_mc_bdc:nn {nx} -\cs_new_protected:Npn \__tag_mc_bdc_mcid:nn #1 #2 +\cs_set_eq:NN \__tag_mc_bdc_shipout:ee \pdf_bdc_shipout:ee +\bool_if:NTF\g__tag_delayed_shipout_bool { - \int_gincr:N \c@g__tag_MCID_abs_int - \tl_set:Nx \l__tag_mc_ref_abspage_tl + \hook_gput_code:nnn {shipout/before}{tagpdf}{ \flag_clear:n { __tag/mcid } } + \cs_set_protected:Npn \__tag_mc_bdc_mcid:nn #1 #2 { - \__tag_ref_value:enn %3 args + \int_gincr:N \c@g__tag_MCID_abs_int + \__tag_ref_label:en + { + mcid-\int_use:N \c@g__tag_MCID_abs_int + } + {mc} + \__tag_mc_bdc_shipout:ee + {#1} { - mcid-\int_use:N \c@g__tag_MCID_abs_int + /MCID~\flag_height:n { __tag/mcid } + \flag_raise:n { __tag/mcid }~ #2 } - { tagabspage } - {-1} - } - \prop_get:NoNTF - \g__tag_MCID_byabspage_prop - { - \l__tag_mc_ref_abspage_tl } - \l__tag_mc_tmpa_tl - { - %key already present, use value for MCID and add 1 for the next - \int_gset:Nn \g__tag_MCID_tmp_bypage_int { \l__tag_mc_tmpa_tl } - \__tag_prop_gput:Nxx - \g__tag_MCID_byabspage_prop - { \l__tag_mc_ref_abspage_tl } - { \int_eval:n {\l__tag_mc_tmpa_tl +1} } - } - { - %key not present, set MCID to 0 and insert 1 - \int_gzero:N \g__tag_MCID_tmp_bypage_int - \__tag_prop_gput:Nxx - \g__tag_MCID_byabspage_prop - { \l__tag_mc_ref_abspage_tl } - {1} - } - \__tag_ref_label:en - { - mcid-\int_use:N \c@g__tag_MCID_abs_int + } + { + \msg_new:nnn { tagpdf } { old-engine } + { + The~engine~or~the~PDF management~is~too~old or\\ + delayed~shipout~has~been~disabled.\\ + Fast~numbering~of~MC-chunks~not~available.\\ + More~compilations~will~be~needed~in~generic~mode. + } + \msg_warning:nn { tagpdf} { old-engine } + \__tag_prop_new:N \g__tag_MCID_byabspage_prop + \int_new:N \g__tag_MCID_tmp_bypage_int + \cs_generate_variant:Nn \__tag_mc_bdc:nn {nx} + \ref_attribute_gset:nnnn {tagmcid } {0} { now } + { \int_use:N \g__tag_MCID_tmp_bypage_int } + \cs_new_protected:Npn \__tag_mc_bdc_mcid:nn #1 #2 + { + \int_gincr:N \c@g__tag_MCID_abs_int + \tl_set:Nx \l__tag_mc_ref_abspage_tl + { + \__tag_ref_value:enn %3 args + { + mcid-\int_use:N \c@g__tag_MCID_abs_int + } + { tagabspage } + {-1} + } + \prop_get:NoNTF + \g__tag_MCID_byabspage_prop + { + \l__tag_mc_ref_abspage_tl + } + \l__tag_mc_tmpa_tl + { + %key already present, use value for MCID and add 1 for the next + \int_gset:Nn \g__tag_MCID_tmp_bypage_int { \l__tag_mc_tmpa_tl } + \__tag_prop_gput:Nxx + \g__tag_MCID_byabspage_prop + { \l__tag_mc_ref_abspage_tl } + { \int_eval:n {\l__tag_mc_tmpa_tl +1} } + } + { + %key not present, set MCID to 0 and insert 1 + \int_gzero:N \g__tag_MCID_tmp_bypage_int + \__tag_prop_gput:Nxx + \g__tag_MCID_byabspage_prop + { \l__tag_mc_ref_abspage_tl } + {1} + } + \__tag_ref_label:en + { + mcid-\int_use:N \c@g__tag_MCID_abs_int + } + { mc } + \__tag_mc_bdc:nx + {#1} + { /MCID~\int_eval:n { \g__tag_MCID_tmp_bypage_int }~ \exp_not:n { #2 } } } - { mc } - \__tag_mc_bdc:nx - {#1} - { /MCID~\int_eval:n { \g__tag_MCID_tmp_bypage_int }~ \exp_not:n { #2 } } } -\cs_new_protected:Npn \__tag_mc_bdc_mcid:n #1 + \cs_new_protected:Npn \__tag_mc_bdc_mcid:n #1 { \__tag_mc_bdc_mcid:nn {#1} {} } @@ -357,7 +389,7 @@ \tl_if_empty:NF {\l__tag_mc_key_label_tl} { \exp_args:NV - \__tag_mc_handle_mc_label:n \l__tag_mc_key_label_tl + \__tag_mc_handle_mc_label:e \l__tag_mc_key_label_tl } \bool_if:NF \l__tag_mc_key_stash_bool { diff --git a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-lua.sty b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-lua.sty index e9bf3de6c01..1a9936f60c8 100644 --- a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-lua.sty +++ b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-lua.sty @@ -19,7 +19,7 @@ %% and all files in that bundle must be distributed together. %% %% File: tagpdf-mc-luacode.dtx -\ProvidesExplPackage {tagpdf-mc-code-lua} {2023-08-04} {0.98k} +\ProvidesExplPackage {tagpdf-mc-code-lua} {2023-08-30} {0.98l} {tagpdf - mc code only for the luamode } \hook_gput_code:nnn{begindocument}{tagpdf/mc} { @@ -148,7 +148,7 @@ { \lua_now:e {ltx.__tag.func.mc_insert_kids (#1,1) } } -\cs_new:Nn \__tag_mc_handle_stash:n %1 mcidnum +\cs_new_protected:Npn \__tag_mc_handle_stash:n #1 %1 mcidnum { \__tag_check_mc_used:n { #1 } \seq_gput_right:cn % Don't fill a lua table due to the command in the item, @@ -169,7 +169,6 @@ { #1 } { \g__tag_struct_stack_current_tl } } - \cs_generate_variant:Nn \__tag_mc_handle_stash:n { x } \cs_set_protected:Nn \tag_mc_begin:n { @@ -197,7 +196,7 @@ \tl_if_empty:NF {\l__tag_mc_key_label_tl} { \exp_args:NV - \__tag_mc_handle_mc_label:n \l__tag_mc_key_label_tl + \__tag_mc_handle_mc_label:e \l__tag_mc_key_label_tl } % if not stashed record the absolute number \bool_if:NF \l__tag_mc_key_stash_bool diff --git a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex-book.def b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex-book.def index 459fd03eb3a..469d8cd5b89 100644 --- a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex-book.def +++ b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex-book.def @@ -19,7 +19,7 @@ %% and all files in that bundle must be distributed together. %% %% File: tagpdf-data.dtx -%% \ProvidesExplFile {tagpdf-ns-latex-book.def} {2023-08-04} {0.98k} +%% \ProvidesExplFile {tagpdf-ns-latex-book.def} {2023-08-30} {0.98l} %% {latex-book} {https://www.latex-project.org/ns/book/2022}{} chapter, H1,pdf2, section, H2,pdf2, diff --git a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex-inline.def b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex-inline.def index 3db7df0ae8c..c46c4fa6129 100644 --- a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex-inline.def +++ b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex-inline.def @@ -19,7 +19,7 @@ %% and all files in that bundle must be distributed together. %% %% File: tagpdf-data.dtx -%% \ProvidesExplFile {tagpdf-ns-latex-inline.def} {2023-08-04} {0.98k} +%% \ProvidesExplFile {tagpdf-ns-latex-inline.def} {2023-08-30} {0.98l} %% {latex-inline} {https://www.latex-project.org/ns/inline/2022}{} chapter, Span, pdf2, section, Span, pdf2, diff --git a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex.def b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex.def index d91eaa9aa1b..b83a263de52 100644 --- a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex.def +++ b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex.def @@ -19,7 +19,7 @@ %% and all files in that bundle must be distributed together. %% %% File: tagpdf-data.dtx -%% \ProvidesExplFile {tagpdf-ns-latex.def} {2023-08-04} {0.98k} +%% \ProvidesExplFile {tagpdf-ns-latex.def} {2023-08-30} {0.98l} %% {latex} {https://www.latex-project.org/ns/dflt/2022}{} title, Title, pdf2, part, Title, pdf2, diff --git a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-mathml.def b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-mathml.def index d8cb6628363..94a527ac719 100644 --- a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-mathml.def +++ b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-mathml.def @@ -19,7 +19,7 @@ %% and all files in that bundle must be distributed together. %% %% File: tagpdf-data.dtx -%% \ProvidesExplFile {tagpdf-ns-mathml.def} {2023-08-04} {0.98k} +%% \ProvidesExplFile {tagpdf-ns-mathml.def} {2023-08-30} {0.98l} abs,abs,mathml, and,and,mathml, annotation,annotation,mathml, diff --git a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-pdf.def b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-pdf.def index 1fc96153798..dd901d7081a 100644 --- a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-pdf.def +++ b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-pdf.def @@ -19,7 +19,7 @@ %% and all files in that bundle must be distributed together. %% %% File: tagpdf-data.dtx -%% \ProvidesExplFile {tagpdf-ns-pdf.def} {2023-08-04} {0.98k} +%% \ProvidesExplFile {tagpdf-ns-pdf.def} {2023-08-30} {0.98l} %% {pdf} {http://iso.org/pdf/ssn}{} StructTreeRoot,StructTreeRoot,pdf,D, Document,Document,pdf,D, diff --git a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-pdf2.def b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-pdf2.def index 7be798a4141..079675945b6 100644 --- a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-pdf2.def +++ b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-pdf2.def @@ -19,7 +19,7 @@ %% and all files in that bundle must be distributed together. %% %% File: tagpdf-data.dtx -%% \ProvidesExplFile {tagpdf-ns-pdf2.def} {2023-08-04} {0.98k} +%% \ProvidesExplFile {tagpdf-ns-pdf2.def} {2023-08-30} {0.98l} %% {pdf2} {http://iso.org/pdf2/ssn}{} Document,Document,pdf2,D, Part,Part,pdf2,G, diff --git a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-parent-child-2.csv b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-parent-child-2.csv index 6221daffc52..37a3f74a6fb 100644 --- a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-parent-child-2.csv +++ b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-parent-child-2.csv @@ -19,7 +19,7 @@ %% and all files in that bundle must be distributed together. %% %% File: tagpdf-data.dtx -%% \ProvidesExplFile {tagpdf-parent-child-2.csv} {2023-08-04} {0.98k} +%% \ProvidesExplFile {tagpdf-parent-child-2.csv} {2023-08-30} {0.98l} ,,,StructTreeRoot,Document,DocumentFragment,Art,Part,Div,Sect,Aside,BlockQuote,NonStruct,TOC,TOCI,Index,Private,Title,Sub,Quote,Note,Reference,BibEntry,P,Hn,H,Lbl,Code,Em,Strong,Span,Link,Annot,Form,Ruby,RB,RT,RP,Warichu,WT,WP,FENote,L,LI,LBody,Table,TR,TH,TD,THead,TBody,TFoot,Caption,Figure,Formula,math,mathml,Artifact,MC Document,both,document level,1,0..n,0..n,∅,‡,‡,∅,0..n,0..n,‡,∅,∅,∅,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,0..n,∅ DocumentFragment,2.0,document level,∅,0..n,0..n,0..n,‡,‡,0..n,0..n,0..n,‡,∅,∅,∅,0..n,∅,∅,∅,∅*,∅,∅,∅,∅,∅,∅,∅*,∅,∅,∅,∅*,∅*,∅,∅,∅,∅,∅,∅,∅,∅,∅*,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅*,∅,∅,∅,∅,0..n,∅ diff --git a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-parent-child.csv b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-parent-child.csv index 7e08f8ffc95..299d2906184 100644 --- a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-parent-child.csv +++ b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-parent-child.csv @@ -19,7 +19,7 @@ %% and all files in that bundle must be distributed together. %% %% File: tagpdf-data.dtx -%% \ProvidesExplFile {tagpdf-parent-child.csv} {2023-08-04} {0.98k} +%% \ProvidesExplFile {tagpdf-parent-child.csv} {2023-08-30} {0.98l} ,,,StructTreeRoot,Document,Art,Part,Div,Sect,BlockQuote,NonStruct,TOC,TOCI,Index,Private,Quote,Note,Reference,BibEntry,P,Hn,H,Lbl,Code,Span,Link,Annot,Form,Ruby,RB,RT,RP,Warichu,WT,WP,L,LI,LBody,Table,TR,TH,TD,THead,TBody,TFoot,Caption,Figure,Formula,MC Document,both,document level,1,0..n,∅,‡,‡,∅,0..n,‡,∅,∅,∅,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅ Art,1.7,grouping,∅,0..n,∅,‡,‡,0..n,0..n,‡,∅,∅,∅,0..n,∅,0..n,∅,∅,∅,0..1,0..1,∅,∅,∅,0..n,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,0..n,∅,∅,0..n,0..n,∅,∅,∅,0..n,0..n,∅,∅ diff --git a/Master/texmf-dist/tex/latex/tagpdf/tagpdf.lua b/Master/texmf-dist/tex/latex/tagpdf/tagpdf.lua index c71f6d9ad6e..c499499e793 100644 --- a/Master/texmf-dist/tex/latex/tagpdf/tagpdf.lua +++ b/Master/texmf-dist/tex/latex/tagpdf/tagpdf.lua @@ -24,8 +24,8 @@ local ProvidesLuaModule = { name = "tagpdf", - version = "0.98k", --TAGVERSION - date = "2023-08-04", --TAGDATE + version = "0.98l", --TAGVERSION + date = "2023-08-30", --TAGDATE description = "tagpdf lua code", license = "The LATEX Project Public License 1.3c" } diff --git a/Master/texmf-dist/tex/latex/tagpdf/tagpdf.sty b/Master/texmf-dist/tex/latex/tagpdf/tagpdf.sty index c5f1d0afa3d..8a21cf2a4bc 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-08-04} {0.98k} +\ProvidesExplPackage {tagpdf} {2023-08-30} {0.98l} { A package to experiment with pdf tagging } \bool_if:nF @@ -52,8 +52,16 @@ } \prop_gput:Nnn \g_msg_module_name_prop { tag }{ tagpdf } \bool_new:N\g__tag_mode_lua_bool +\bool_new:N\g__tag_delayed_shipout_bool +\bool_lazy_and:nnT + { \bool_if_exist_p:N \l__pdfmanagement_delayed_shipout_bool } + { \l__pdfmanagement_delayed_shipout_bool } + { + \bool_gset_true:N\g__tag_delayed_shipout_bool + } \DeclareOption {luamode} { \sys_if_engine_luatex:T { \bool_gset_true:N \g__tag_mode_lua_bool } } \DeclareOption {genericmode}{ \bool_gset_false:N\g__tag_mode_lua_bool } +\DeclareOption {disabledelayedshipout}{ \bool_gset_false:N\g__tag_delayed_shipout_bool } \ExecuteOptions{luamode} \ProcessOptions \RequirePackage{l3ref-tmp} @@ -124,7 +132,7 @@ \bool_new:N \l__tag_active_struct_bool \bool_set_true:N \l__tag_active_struct_bool \bool_new:N \g__tag_tagunmarked_bool -\prg_generate_conditional_variant:Nnn \pdf_object_if_exist:n {e}{T,F} +\prg_generate_conditional_variant:Nnn \pdf_object_if_exist:n {e}{T,F,TF} \cs_generate_variant:Nn \pdf_object_ref:n {e} \cs_generate_variant:Nn \pdfannot_dict_put:nnn {nnx} \cs_generate_variant:Nn \pdffile_embed_stream:nnn {nxx,oxx} @@ -149,8 +157,11 @@ { \int_use:N \g_shipout_readonly_int } \ref_attribute_gset:nnnn { tagmcabs } {0} { now } { \int_use:N \c@g__tag_MCID_abs_int } -\ref_attribute_gset:nnnn {tagmcid } {0} { now } - { \int_use:N \g__tag_MCID_tmp_bypage_int } + +\flag_new:n { __tag/mcid } +\ref_attribute_gset:nnnn {tagmcid } {0} { shipout } + { \flag_height:n { __tag/mcid } } + \cs_new_protected:Npn \__tag_ref_label:nn #1 #2 %#1 label, #2 name of list mc or struct { \@bsphack @@ -578,7 +589,6 @@ %% File: tagpdf-mc-shared.dtx \cs_new:Npn \__tag_get_mc_abs_cnt: { \int_use:N \c@g__tag_MCID_abs_int } -\int_new:N \g__tag_MCID_tmp_bypage_int \bool_new:N \g__tag_in_mc_bool \__tag_prop_new:N \g__tag_mc_parenttree_prop \seq_new:N \g__tag_mc_stack_seq @@ -589,9 +599,9 @@ \tl_new:N \g__tag_mc_key_tag_tl \tl_new:N \l__tag_mc_key_label_tl \tl_new:N \l__tag_mc_key_properties_tl -\cs_new:Nn \__tag_mc_handle_mc_label:n +\cs_new:Npn \__tag_mc_handle_mc_label:e #1 { - \__tag_ref_label:en{tagpdf-#1}{mc} + \ref_label:en{tagpdf-#1}{tagabspage,tagmcabs} } \cs_new_protected:Npn \__tag_mc_set_label_used:n #1 %#1 labelname { @@ -896,10 +906,13 @@ {% page#1:mcid##1:\l__tag_tmpa_tl :content \tl_put_right:Nx \l__tag_parenttree_content_tl { - \pdf_object_if_exist:eT { __tag/struct/\l__tag_tmpa_tl } + \pdf_object_if_exist:eTF { __tag/struct/\l__tag_tmpa_tl } { \pdf_object_ref:e { __tag/struct/\l__tag_tmpa_tl } } + { + null + } \c_space_tl } } @@ -1904,7 +1917,6 @@ { g__tag_struct_0_prop } { parentrole } { {StructTreeRoot}{pdf} } - \pdf_version_compare:NnF < {2.0} { \__tag_prop_gput:cnx @@ -1992,7 +2004,6 @@ } } \cs_generate_variant:Nn \__tag_struct_kid_mc_gput_right:nn {nx} - \cs_new_protected:Npn\__tag_struct_kid_struct_gput_right:nn #1 #2 %#1 num of parent struct, #2 kid struct { \__tag_seq_gput_right:cx @@ -2000,7 +2011,7 @@ { \pdf_object_ref:n { __tag/struct/#2 } } - } + } \cs_generate_variant:Nn \__tag_struct_kid_struct_gput_right:nn {xx} \cs_new_protected:Npn\__tag_struct_kid_OBJR_gput_right:nnn #1 #2 #3 %#1 num of parent struct, @@ -2018,9 +2029,7 @@ \pdf_object_ref_last: } } - \cs_generate_variant:Nn\__tag_struct_kid_OBJR_gput_right:nnn { xxx } - \cs_new_protected:Npn\__tag_struct_exchange_kid_command:N #1 %#1 = seq var { \seq_gpop_left:NN #1 \l__tag_tmpa_tl diff --git a/Master/texmf-dist/tex/latex/tagpdf/tagpdfdocu-patches.sty b/Master/texmf-dist/tex/latex/tagpdf/tagpdfdocu-patches.sty index 114ac7646b0..af9efe1f754 100644 --- a/Master/texmf-dist/tex/latex/tagpdf/tagpdfdocu-patches.sty +++ b/Master/texmf-dist/tex/latex/tagpdf/tagpdfdocu-patches.sty @@ -1,5 +1,5 @@ %\RequirePackage[enable-debug]{expl3}[2018/06/14] -\ProvidesExplPackage {tagpdfdocu-patches} {2023-08-04} {0.98k} +\ProvidesExplPackage {tagpdfdocu-patches} {2023-08-30} {0.98l} {patches/commands for the tagpdf documentation} \RequirePackage{etoolbox,xpatch} |