diff options
author | Karl Berry <karl@freefriends.org> | 2025-02-17 20:44:09 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2025-02-17 20:44:09 +0000 |
commit | 15a10a3fceadab6fb73898934ca5cc3cc768f7f8 (patch) | |
tree | dee845ab691c2c110c84be458171e301497edada /Master/texmf-dist/source/latex | |
parent | 702af305f67534a66aa84af41e1b4901eeb164e9 (diff) |
tagpdf (17feb25)
git-svn-id: svn://tug.org/texlive/trunk@74065 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex')
12 files changed, 268 insertions, 324 deletions
diff --git a/Master/texmf-dist/source/latex/tagpdf/tagpdf-backend.dtx b/Master/texmf-dist/source/latex/tagpdf/tagpdf-backend.dtx index e6c9e8d39e8..9ad3b8e3591 100644 --- a/Master/texmf-dist/source/latex/tagpdf/tagpdf-backend.dtx +++ b/Master/texmf-dist/source/latex/tagpdf/tagpdf-backend.dtx @@ -47,13 +47,13 @@ % }^^A % } % -% \date{Version 0.99l, released 2025-01-12} +% \date{Version 0.99m, released 2025-02-17} % \maketitle % \begin{implementation} % \begin{macrocode} %<@@=tag> %<*luatex> -\ProvidesExplFile {tagpdf-luatex.def} {2025-01-12} {0.99l} +\ProvidesExplFile {tagpdf-luatex.def} {2025-02-17} {0.99m} {tagpdf~driver~for~luatex} % \end{macrocode} % \section{Loading the lua} @@ -174,8 +174,8 @@ local ProvidesLuaModule = { name = "tagpdf", - version = "0.99l", --TAGVERSION - date = "2025-01-12", --TAGDATE + version = "0.99m", --TAGVERSION + date = "2025-02-17", --TAGDATE description = "tagpdf lua code", license = "The LATEX Project Public License 1.3c" } diff --git a/Master/texmf-dist/source/latex/tagpdf/tagpdf-checks.dtx b/Master/texmf-dist/source/latex/tagpdf/tagpdf-checks.dtx index 7258d91d685..cb9ea0cae51 100644 --- a/Master/texmf-dist/source/latex/tagpdf/tagpdf-checks.dtx +++ b/Master/texmf-dist/source/latex/tagpdf/tagpdf-checks.dtx @@ -48,7 +48,7 @@ % }^^A % } % -% \date{Version 0.99l, released 2025-01-12} +% \date{Version 0.99m, released 2025-02-17} % \maketitle % \begin{documentation} % \section{Commands} @@ -331,7 +331,7 @@ % \begin{macrocode} %<@@=tag> %<*header> -\ProvidesExplPackage {tagpdf-checks-code} {2025-01-12} {0.99l} +\ProvidesExplPackage {tagpdf-checks-code} {2025-02-17} {0.99m} {part of tagpdf - code related to checks, conditionals, debugging and messages} %</header> % \end{macrocode} @@ -350,7 +350,7 @@ % \begin{macro}{mc-tag-missing} % If the tag is missing % \begin{macrocode} -\msg_new:nnn { tag } {mc-tag-missing} { required~tag~missing~-~mcid~#1 } +\msg_new:nnn { tag } {mc-tag-missing} { MC-tag~missing;~#1~used~instead~-~mcid~#2 } % \end{macrocode} % \end{macro} % \begin{macro}{mc-label-unknown} @@ -869,18 +869,23 @@ % \end{macrocode} % \end{macro} % \begin{macro}{\@@_check_mc_tag:N} -% This checks if the mc has a (known) tag. +% This checks if the mc has a (known) tag, if it is empty +% (e.g. if due to a call to the output routine, see issue https://github.com/latex3/tagpdf/issues/111) +% then we fall back to the structure name. % \begin{macrocode} \cs_new_protected:Npn \@@_check_mc_tag:N #1 %#1 is var with a tag name in it { - \tl_if_empty:NT #1 + \tl_if_empty:NTF #1 { - \msg_error:nne { tag } {mc-tag-missing} { \@@_get_mc_abs_cnt: } + \tl_set:No #1 { \g_@@_struct_tag_tl } + \msg_info:nnee { tag } {mc-tag-missing} { \g_@@_struct_tag_tl }{ \@@_get_mc_abs_cnt: } + } + { + \prop_if_in:NoF \g_@@_role_tags_NS_prop {#1} + { + \msg_warning:nne { tag } {role-unknown-tag} {#1} + } } - \prop_if_in:NoF \g_@@_role_tags_NS_prop {#1} - { - \msg_warning:nne { tag } {role-unknown-tag} {#1} - } } % \end{macrocode} % \end{macro} diff --git a/Master/texmf-dist/source/latex/tagpdf/tagpdf-data.dtx b/Master/texmf-dist/source/latex/tagpdf/tagpdf-data.dtx index a3a10ee4fe1..f9994ab90dc 100644 --- a/Master/texmf-dist/source/latex/tagpdf/tagpdf-data.dtx +++ b/Master/texmf-dist/source/latex/tagpdf/tagpdf-data.dtx @@ -47,7 +47,7 @@ % }^^A % } % -% \date{Version 0.99l, released 2025-01-12} +% \date{Version 0.99m, released 2025-02-17} % \maketitle % \begin{documentation} % This files contains a various data files which are read in @@ -61,7 +61,7 @@ % latex-lab has also a namespace module, which takes precedence! % \begin{macrocode} %<*ns-latex> -%% \ProvidesExplFile {tagpdf-ns-latex.def} {2025-01-12} {0.99l} +%% \ProvidesExplFile {tagpdf-ns-latex.def} {2025-02-17} {0.99m} %% {latex} {https://www.latex-project.org/ns/dflt}{} title, Title, pdf2, part, Title, pdf2, @@ -93,7 +93,7 @@ text, P, pdf2, % It is bound to change % \begin{macrocode} %<*ns-latex-book> -%% \ProvidesExplFile {tagpdf-ns-latex-book.def} {2025-01-12} {0.99l} +%% \ProvidesExplFile {tagpdf-ns-latex-book.def} {2025-02-17} {0.99m} %% {latex-book} {https://www.latex-project.org/ns/book}{} chapter, H1,pdf2, section, H2,pdf2, @@ -107,7 +107,7 @@ subparagraph, H6,pdf2, % \section{The pdf namespace data} % \begin{macrocode} %<*ns-pdf> -%% \ProvidesExplFile {tagpdf-ns-pdf.def} {2025-01-12} {0.99l} +%% \ProvidesExplFile {tagpdf-ns-pdf.def} {2025-02-17} {0.99m} %% {pdf} {http://iso.org/pdf/ssn}{} StructTreeRoot,StructTreeRoot,pdf,D, Document,Document,pdf,D, @@ -175,7 +175,7 @@ Strong,Span,pdf,I, % \section{The pdf 2.0 namespace data} % \begin{macrocode} %<*ns-pdf2> -%% \ProvidesExplFile {tagpdf-ns-pdf2.def} {2025-01-12} {0.99l} +%% \ProvidesExplFile {tagpdf-ns-pdf2.def} {2025-02-17} {0.99m} %% {pdf2} {http://iso.org/pdf2/ssn}{} StructTreeRoot,StructTreeRoot,pdf2,D, Document,Document,pdf2,D, @@ -232,7 +232,7 @@ Strong,Strong,pdf2,I, % \section{The mathml namespace data} % \begin{macrocode} %<*ns-mathml> -%% \ProvidesExplFile {tagpdf-ns-mathml.def} {2025-01-12} {0.99l} +%% \ProvidesExplFile {tagpdf-ns-mathml.def} {2025-02-17} {0.99m} % {mathml}{http://www.w3.org/1998/Math/MathML}{} abs,abs,mathml, and,and,mathml, @@ -467,7 +467,7 @@ xor,xor,mathml, % This will perhaps change in future. % \begin{macrocode} %<*parent-child> -%% \ProvidesExplFile {tagpdf-parent-child.csv} {2025-01-12} {0.99l} +%% \ProvidesExplFile {tagpdf-parent-child.csv} {2025-02-17} {0.99m} ,,,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,∅,∅ @@ -522,7 +522,7 @@ MC,both,---,∅,∅,∅,∅,∅,∅,0..n,‡,∅,∅,∅,0..n,0..n,0..n,0..n,0.. % This will perhaps change in future. % \begin{macrocode} %<*parent-child-2> -%% \ProvidesExplFile {tagpdf-parent-child-2.csv} {2025-01-12} {0.99l} +%% \ProvidesExplFile {tagpdf-parent-child-2.csv} {2025-02-17} {0.99m} ,,,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/source/latex/tagpdf/tagpdf-mc-generic.dtx b/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-generic.dtx index 8b819a1d2f3..bbf2fac691b 100644 --- a/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-generic.dtx +++ b/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-generic.dtx @@ -46,7 +46,7 @@ % }^^A % } % -% \date{Version 0.99l, released 2025-01-12} +% \date{Version 0.99m, released 2025-02-17} % \maketitle % \begin{documentation} % \end{documentation} @@ -55,11 +55,11 @@ % \begin{macrocode} %<@@=tag> %<*generic> -\ProvidesExplPackage {tagpdf-mc-code-generic} {2025-01-12} {0.99l} +\ProvidesExplPackage {tagpdf-mc-code-generic} {2025-02-17} {0.99m} {part of tagpdf - code related to marking chunks - generic mode} %</generic> %<*debug> -\ProvidesExplPackage {tagpdf-debug-generic} {2025-01-12} {0.99l} +\ProvidesExplPackage {tagpdf-debug-generic} {2025-02-17} {0.99m} {part of tagpdf - debugging code related to marking chunks - generic mode} %</debug> % \end{macrocode} @@ -544,89 +544,22 @@ % We also define a wrapper around the low-level command as luamode will need % something different. % \begin{macrocode} -\bool_if:NTF\g_@@_delayed_shipout_bool - { - \hook_gput_code:nnn {shipout/before}{tagpdf}{ \flag_clear:n { @@/mcid } } - \cs_set_protected:Npn \@@_mc_bdc_mcid:nn #1 #2 - { - \int_gincr:N \c@g_@@_MCID_abs_int - \@@_property_record:eV - { - mcid-\int_use:N \c@g_@@_MCID_abs_int - } - \c_@@_property_mc_clist - \@@_mc_bdc_shipout:ee - {#1} - { - /MCID~\flag_height:n { @@/mcid } - \flag_raise:n { @@/mcid }~ #2 - } - } - } -% \end{macrocode} -% if the engine is too old, we have to revert to earlier method. -% \begin{macrocode} - { - \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 } - \@@_prop_new:N \g_@@_MCID_byabspage_prop - \int_new:N \g_@@_MCID_tmp_bypage_int - \cs_generate_variant:Nn \@@_mc_bdc:nn {ne} -% \end{macrocode} -% revert the attribute: -% \begin{macrocode} - \property_gset:nnnn {tagmcid } { now } - {0} { \int_use:N \g_@@_MCID_tmp_bypage_int } - \cs_new_protected:Npn \@@_mc_bdc_mcid:nn #1 #2 +\hook_gput_code:nnn {shipout/before}{tagpdf}{ \flag_clear:n { @@/mcid } } +\cs_set_protected:Npn \@@_mc_bdc_mcid:nn #1 #2 + { + \int_gincr:N \c@g_@@_MCID_abs_int + \@@_property_record:eV { - \int_gincr:N \c@g_@@_MCID_abs_int - \tl_set:Ne \l_@@_mc_ref_abspage_tl - { - \property_ref:enn %3 args - { - mcid-\int_use:N \c@g_@@_MCID_abs_int - } - { tagabspage } - {-1} - } - \prop_get:NoNTF - \g_@@_MCID_byabspage_prop - { - \l_@@_mc_ref_abspage_tl - } - \l_@@_mc_tmpa_tl - { - %key already present, use value for MCID and add 1 for the next - \int_gset:Nn \g_@@_MCID_tmp_bypage_int { \l_@@_mc_tmpa_tl } - \@@_prop_gput:Nee - \g_@@_MCID_byabspage_prop - { \l_@@_mc_ref_abspage_tl } - { \int_eval:n {\l_@@_mc_tmpa_tl +1} } - } - { - %key not present, set MCID to 0 and insert 1 - \int_gzero:N \g_@@_MCID_tmp_bypage_int - \@@_prop_gput:Nee - \g_@@_MCID_byabspage_prop - { \l_@@_mc_ref_abspage_tl } - {1} - } - \@@_property_record:eV - { - mcid-\int_use:N \c@g_@@_MCID_abs_int - } - \c_@@_property_mc_clist - \@@_mc_bdc:ne - {#1} - { /MCID~\int_eval:n { \g_@@_MCID_tmp_bypage_int }~ \exp_not:n { #2 } } - } - } + mcid-\int_use:N \c@g_@@_MCID_abs_int + } + \c_@@_property_mc_clist + \@@_mc_bdc_shipout:ee + {#1} + { + /MCID~\flag_height:n { @@/mcid } + \flag_raise:n { @@/mcid }~ #2 + } + } \cs_new_protected:Npn \@@_mc_bdc_mcid:n #1 { \@@_mc_bdc_mcid:nn {#1} {} diff --git a/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-luacode.dtx b/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-luacode.dtx index fac3dac0d62..f73b578b216 100644 --- a/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-luacode.dtx +++ b/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-luacode.dtx @@ -46,7 +46,7 @@ % }^^A % } % -% \date{Version 0.99l, released 2025-01-12} +% \date{Version 0.99m, released 2025-02-17} % \maketitle % \begin{implementation} % The code is split into three parts: code shared by all engines, @@ -86,11 +86,11 @@ % \begin{macrocode} %<@@=tag> %<*luamode> -\ProvidesExplPackage {tagpdf-mc-code-lua} {2025-01-12} {0.99l} +\ProvidesExplPackage {tagpdf-mc-code-lua} {2025-02-17} {0.99m} {tagpdf - mc code only for the luamode } %</luamode> %<*debug> -\ProvidesExplPackage {tagpdf-debug-lua} {2025-01-12} {0.99l} +\ProvidesExplPackage {tagpdf-debug-lua} {2025-02-17} {0.99m} {part of tagpdf - debugging code related to marking chunks - lua mode} %</debug> % \end{macrocode} diff --git a/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-shared.dtx b/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-shared.dtx index 7eff1a6ecae..b375d33bd45 100644 --- a/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-shared.dtx +++ b/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-shared.dtx @@ -46,7 +46,7 @@ % }^^A % } % -% \date{Version 0.99l, released 2025-01-12} +% \date{Version 0.99m, released 2025-02-17} % \maketitle % \begin{documentation} % \section{Public Commands} @@ -207,7 +207,7 @@ % \begin{macrocode} %<@@=tag> %<*header> -\ProvidesExplPackage {tagpdf-mc-code-shared} {2025-01-12} {0.99l} +\ProvidesExplPackage {tagpdf-mc-code-shared} {2025-02-17} {0.99m} {part of tagpdf - code related to marking chunks - code shared by generic and luamode } %</header> diff --git a/Master/texmf-dist/source/latex/tagpdf/tagpdf-roles.dtx b/Master/texmf-dist/source/latex/tagpdf/tagpdf-roles.dtx index e2909d96fa5..7b66026ea01 100644 --- a/Master/texmf-dist/source/latex/tagpdf/tagpdf-roles.dtx +++ b/Master/texmf-dist/source/latex/tagpdf/tagpdf-roles.dtx @@ -46,7 +46,7 @@ % }^^A % } % -% \date{Version 0.99l, released 2025-01-12} +% \date{Version 0.99m, released 2025-02-17} % \maketitle % \begin{documentation} % \begin{function} @@ -98,7 +98,7 @@ % \begin{macrocode} %<@@=tag> %<*header> -\ProvidesExplPackage {tagpdf-roles-code} {2025-01-12} {0.99l} +\ProvidesExplPackage {tagpdf-roles-code} {2025-02-17} {0.99m} {part of tagpdf - code related to roles and structure names} %</header> % \end{macrocode} diff --git a/Master/texmf-dist/source/latex/tagpdf/tagpdf-space.dtx b/Master/texmf-dist/source/latex/tagpdf/tagpdf-space.dtx index bed83d1124b..dfcc45fc04e 100644 --- a/Master/texmf-dist/source/latex/tagpdf/tagpdf-space.dtx +++ b/Master/texmf-dist/source/latex/tagpdf/tagpdf-space.dtx @@ -46,7 +46,7 @@ % }^^A % } % -% \date{Version 0.99l, released 2025-01-12} +% \date{Version 0.99m, released 2025-02-17} % \maketitle % \begin{documentation} % \begin{function}{activate/space (setup-key),interwordspace (deprecated)} @@ -66,7 +66,7 @@ % \begin{macrocode} %<@@=tag> %<*header> -\ProvidesExplPackage {tagpdf-space-code} {2025-01-12} {0.99l} +\ProvidesExplPackage {tagpdf-space-code} {2025-02-17} {0.99m} {part of tagpdf - code related to real space chars} %</header> % \end{macrocode} diff --git a/Master/texmf-dist/source/latex/tagpdf/tagpdf-struct.dtx b/Master/texmf-dist/source/latex/tagpdf/tagpdf-struct.dtx index c966f972b2e..418619eae1f 100644 --- a/Master/texmf-dist/source/latex/tagpdf/tagpdf-struct.dtx +++ b/Master/texmf-dist/source/latex/tagpdf/tagpdf-struct.dtx @@ -47,7 +47,7 @@ % }^^A % } % -% \date{Version 0.99l, released 2025-01-12} +% \date{Version 0.99m, released 2025-02-17} % \maketitle % \begin{documentation} % \section{Public Commands} @@ -308,7 +308,7 @@ % \begin{macrocode} %<@@=tag> %<*header> -\ProvidesExplPackage {tagpdf-struct-code} {2025-01-12} {0.99l} +\ProvidesExplPackage {tagpdf-struct-code} {2025-02-17} {0.99m} {part of tagpdf - code related to storing structure} %</header> % \end{macrocode} @@ -878,7 +878,7 @@ % \begin{macrocode} \cs_new_protected:Npn \@@_struct_fill_kid_key:n #1 %#1 is the struct num { - \bool_if:NF\g_@@_mode_lua_bool + \bool_if:NF \g_@@_mode_lua_bool { \seq_clear:N \l_@@_tmpa_seq \seq_map_inline:cn { g_@@_struct_kids_#1_seq } @@ -904,7 +904,7 @@ { % in this case we need a special command in % luamode to get the array right. See issue #13 - \bool_if:NTF\g_@@_mode_lua_bool + \sys_if_engine_luatex:TF { \@@_struct_exchange_kid_command:c {g_@@_struct_kids_#1_seq} @@ -1229,7 +1229,8 @@ % actualtext, % lang, % ref, -% E +% E, +% phoneme % } % \begin{macrocode} \keys_define:nn { @@ / struct } @@ -1320,6 +1321,21 @@ { <\l_@@_tmpa_str>} } }, + phoneme .code:n = % ActualText property + { + \tl_if_empty:oF{#1} + { + \str_set_convert:Noon + \l_@@_tmpa_str + { #1 } + { default } + { utf16/hex } + \@@_struct_prop_gput:nne + { \int_use:N \c@g_@@_struct_abs_int } + { Phoneme } + { <\l_@@_tmpa_str>} + } + }, lang .code:n = % Lang property { \@@_struct_prop_gput:nne @@ -2118,7 +2134,7 @@ % \section{Attributes and attribute classes} % \begin{macrocode} %<*header> -\ProvidesExplPackage {tagpdf-attr-code} {2025-01-12} {0.99l} +\ProvidesExplPackage {tagpdf-attr-code} {2025-02-17} {0.99m} {part of tagpdf - code related to attributes and attribute classes} %</header> % \end{macrocode} diff --git a/Master/texmf-dist/source/latex/tagpdf/tagpdf-tree.dtx b/Master/texmf-dist/source/latex/tagpdf/tagpdf-tree.dtx index f8d03e99fa2..381b97f1d9a 100644 --- a/Master/texmf-dist/source/latex/tagpdf/tagpdf-tree.dtx +++ b/Master/texmf-dist/source/latex/tagpdf/tagpdf-tree.dtx @@ -47,13 +47,13 @@ % }^^A % } % -% \date{Version 0.99l, released 2025-01-12} +% \date{Version 0.99m, released 2025-02-17} % \maketitle % \begin{implementation} % \begin{macrocode} %<@@=tag> %<*header> -\ProvidesExplPackage {tagpdf-tree-code} {2025-01-12} {0.99l} +\ProvidesExplPackage {tagpdf-tree-code} {2025-02-17} {0.99m} {part of tagpdf - code related to writing trees and dictionaries to the pdf} %</header> % \end{macrocode} diff --git a/Master/texmf-dist/source/latex/tagpdf/tagpdf-user.dtx b/Master/texmf-dist/source/latex/tagpdf/tagpdf-user.dtx index aa17c83a8f5..5ce90ab47a0 100644 --- a/Master/texmf-dist/source/latex/tagpdf/tagpdf-user.dtx +++ b/Master/texmf-dist/source/latex/tagpdf/tagpdf-user.dtx @@ -47,7 +47,7 @@ % }^^A % } % -% \date{Version 0.99l, released 2025-01-12} +% \date{Version 0.99m, released 2025-02-17} % \maketitle % \begin{documentation} % \section{Setup commands} @@ -164,7 +164,7 @@ % |debug/structures| = \meta{structure number} % \end{syntax} % This key is available only if the tagpdf-debug package is loaded -% and shows all structures starting with the one with the number +% and shows all structures starting with the one with the number % given by the key. % \end{function} @@ -195,13 +195,13 @@ % \begin{syntax} % |para/tagging| = |true|\verb+|+|false|\\ % |debug/show=para|\\ -% |debug/show=paraOff| +% |debug/show=paraOff| % \end{syntax} % The |para/tagging| key can be used in |\tagpdfsetup| and enable/disables tagging % of paragraphics. % |debug/show=para| puts small colored numbers at the begin and end of a paragraph. % This is meant as a debugging help. The number are boxes and have a (tiny) height, -% so they can affect typesetting. +% so they can affect typesetting. % \end{function} % % \begin{function}{\tagpdfparaOn,\tagpdfparaOff} @@ -259,9 +259,9 @@ % { Contents } % { (ref) } % \end{verbatim} -% +% % \section{Socket support} -% +% % \begin{function}{\tag_socket_use:n,\tag_socket_use:nnn,\UseTaggingSocket} % \begin{syntax} % \cs{tag_socket_use:n} \Arg{socket name}\\ @@ -273,7 +273,7 @@ % \cs{UseTaggingSocket} \Arg{socket name} \Arg{socket argument} \Arg{socket argument}\\ % \end{syntax} % \end{function} -% +% % Given that we sometimes have to suspend tagging, it would be fairly % inefficient to put different plugs into these sockets whenever that % happens. We therefore offer \cs{UseTaggingSocket} which is like @@ -290,8 +290,8 @@ % instead of changing the plugs of the tagging support sockets back and forth. % % Usually, these sockets have (beside the default plug defined for every socket) -% one additional plug defined and directly assigned. This plug is used when -% tagging is active. +% one additional plug defined and directly assigned. This plug is used when +% tagging is active. % There may be more plugs, e.g., tagging with special debugging or special behaviour % depending on the class or PDF version etc., but right now it is usually just on or off. % @@ -304,14 +304,14 @@ % \cs{UseSocket} directly, but in this case the socket remains active % if e.g. \cs{SuspendTagging} is in force. There may be reasons for doing % that but in general we expect to always use \cs{UseTaggingSocket}. -% +% % For special cases like in some \cs{halign} contexts we need a fully expandable % version of the commend. For these cases, \cs{UseExpandableTaggingSocket} can be % used. To allow being expandable, it does not output any debugging information % if \cs{DebugSocketsOn} is in effect and therefore should be avoided whenever possible. % % The L3 programming layer versions \cs{tag_socket_use_expandable:n}, \cs{tag_socket_use:n}, and -% \cs{tag_socket_use:nn}, \cs{tag_socket_use:nnn} +% \cs{tag_socket_use:nn}, \cs{tag_socket_use:nnn} % are slightly more efficient than % \cs{UseTaggingSocket} because they do not have to determine how % many arguments the socket takes when disabling it. @@ -322,7 +322,7 @@ % \begin{macrocode} %<@@=tag> %<*header> -\ProvidesExplPackage {tagpdf-user} {2025-01-12} {0.99l} +\ProvidesExplPackage {tagpdf-user} {2025-02-17} {0.99m} {tagpdf - user commands} %</header> % \end{macrocode} @@ -347,11 +347,11 @@ %<base>\cs_new_protected:Npn\tag_tool:n #1 {} %<base>\cs_set_eq:NN\tagtool\tag_tool:n %<*package> -\cs_set_protected:Npn\tag_tool:n #1 +\cs_set_protected:Npn\tag_tool:n #1 { - \tag_if_active:T { \keys_set:nn {tag / tool}{#1} } + \tag_if_active:T { \keys_set:nn {tag / tool}{#1} } } -\cs_set_eq:NN\tagtool\tag_tool:n +\cs_set_eq:NN\tagtool\tag_tool:n %</package> % \end{macrocode} % \end{macro} @@ -448,7 +448,7 @@ % \end{macrocode} % % \begin{macrocode} -\cs_set_protected:Npn \tag_socket_use:nn #1#2 +\cs_set_protected:Npn \tag_socket_use:nn #1#2 { \bool_if:NT \l_@@_active_socket_bool { \socket_use:nn {tagsupport/#1} {#2} } @@ -456,7 +456,7 @@ % \end{macrocode} % % \begin{macrocode} -\cs_set_protected:Npn \tag_socket_use:nnn #1#2#3 +\cs_set_protected:Npn \tag_socket_use:nnn #1#2#3 { \bool_if:NTF \l_@@_active_socket_bool { \socket_use:nnn {tagsupport/#1} {#2} {#3} } @@ -464,14 +464,14 @@ } % \end{macrocode} % \begin{macrocode} -\cs_set:Npn \tag_socket_use_expandable:n #1 +\cs_set:Npn \tag_socket_use_expandable:n #1 { \bool_if:NT \l_@@_active_socket_bool { \socket_use_expandable:n {tagsupport/#1} } } % \end{macrocode} % \begin{macrocode} -\cs_set_protected:Npn \UseTaggingSocket #1 +\cs_set_protected:Npn \UseTaggingSocket #1 { \bool_if:NTF \l_@@_active_socket_bool { \socket_use:nw {tagsupport/#1} } @@ -493,7 +493,7 @@ % \end{macrocode} % \begin{macrocode} -\cs_set:Npn \UseExpandableTaggingSocket #1 +\cs_set:Npn \UseExpandableTaggingSocket #1 { \bool_if:NTF \l_@@_active_socket_bool { \socket_use_expandable:nw {tagsupport/#1} } @@ -512,7 +512,7 @@ \ERRORusetaggingsocket } } -%</package> +%</package> % \end{macrocode} % \end{macro} % @@ -540,7 +540,7 @@ { mc-data .code:n = { - \sys_if_engine_luatex:T + \bool_if:NT \g_@@_mode_lua_bool { \lua_now:e{ltx.@@.trace.show_all_mc_data(#1,\@@_get_mc_abs_cnt:,0)} } @@ -556,60 +556,57 @@ \keys_define:nn { @@ / show } { mc-current .code:n = { - \bool_if:NTF \g_@@_mode_lua_bool - { - \sys_if_engine_luatex:T - { - \int_compare:nNnTF - { -2147483647 } - = - { - \lua_now:e - { - tex.print - (tex.getattribute - (luatexbase.attributes.g_@@_mc_cnt_attr)) - } - } - { - \lua_now:e - { - ltx.@@.trace.log - ( - "mc-current:~no~MC~open,~current~abscnt - =\@@_get_mc_abs_cnt:" - ,0 - ) - texio.write_nl("") - } - } - { - \lua_now:e - { - ltx.@@.trace.log - ( - "mc-current:~abscnt=\@@_get_mc_abs_cnt:==" - .. - tex.getattribute(luatexbase.attributes.g_@@_mc_cnt_attr) - .. - "~=>tag=" - .. - tostring - (ltx.@@.func.get_tag_from - (tex.getattribute - (luatexbase.attributes.g_@@_mc_type_attr))) - .. - "=" - .. - tex.getattribute - (luatexbase.attributes.g_@@_mc_type_attr) - ,0 - ) - texio.write_nl("") - } - } - } - } + \bool_if:NTF \g_@@_mode_lua_bool + { + \int_compare:nNnTF + { -2147483647 } + = + { + \lua_now:e + { + tex.print + (tex.getattribute + (luatexbase.attributes.g_@@_mc_cnt_attr)) + } + } + { + \lua_now:e + { + ltx.@@.trace.log + ( + "mc-current:~no~MC~open,~current~abscnt + =\@@_get_mc_abs_cnt:" + ,0 + ) + texio.write_nl("") + } + } + { + \lua_now:e + { + ltx.@@.trace.log + ( + "mc-current:~abscnt=\@@_get_mc_abs_cnt:==" + .. + tex.getattribute(luatexbase.attributes.g_@@_mc_cnt_attr) + .. + "~=>tag=" + .. + tostring + (ltx.@@.func.get_tag_from + (tex.getattribute + (luatexbase.attributes.g_@@_mc_type_attr))) + .. + "=" + .. + tex.getattribute + (luatexbase.attributes.g_@@_mc_type_attr) + ,0 + ) + texio.write_nl("") + } + } + } { \msg_note:nn{ tag }{ mc-current } } @@ -676,44 +673,44 @@ ,struct-stack / show .code:n = \seq_show:N \g_@@_struct_tag_stack_seq ,struct-stack .default:n = show } -%</package> +%</package> % \end{macrocode} % \end{macro} % \begin{macro}{debug/structures (show-key)} % The following key is available only if the tagpdf-debug package is loaded -% and shows all structures starting with the one with the number +% and shows all structures starting with the one with the number % given by the key. % \begin{macrocode} %<*debug> \keys_define:nn { @@ / show } { - ,debug/structures .code:n = + ,debug/structures .code:n = { \int_step_inline:nnn{#1}{\c@g_@@_struct_abs_int} { - \msg_term:nneeee + \msg_term:nneeee { tag/debug } { show-struct } { ##1 } - { - \prop_map_function:cN - {g_@@_struct_debug_##1_prop} - \msg_show_item_unbraced:nn + { + \prop_map_function:cN + {g_@@_struct_debug_##1_prop} + \msg_show_item_unbraced:nn } { } { } - \msg_term:nneeee + \msg_term:nneeee { tag/debug } { show-kids } { ##1 } - { - \seq_map_function:cN - {g_@@_struct_debug_kids_##1_seq} + { + \seq_map_function:cN + {g_@@_struct_debug_kids_##1_seq} \msg_show_item_unbraced:n } - { } { } + { } { } } - } + } ,debug/structures .default:n = 1 } -%</debug> +%</debug> % \end{macrocode} % \end{macro} % @@ -723,7 +720,7 @@ % or do a first step to apply tagpdf commands to document commands. % This part should be regularly revisited to check if the code should go to a % better place or can be improved. -% +% % \begin{macrocode} %<*package> % \end{macrocode} @@ -737,26 +734,26 @@ \hook_gput_code:nnn{tagpdf/finish/before}{tagpdf}{\tagstructend} \keys_define:nn { @@ / setup} - { - activate/socket .bool_set:N = \l_@@_active_socket_bool, + { + activate/socket .bool_set:N = \l_@@_active_socket_bool, activate .code:n = { \keys_set:nn { @@ / setup } { activate/mc,activate/tree,activate/struct,activate/socket } - \tl_gset:Nn\g_@@_root_default_tl {#1} + \tl_gset:Nn\g_@@_root_default_tl {#1} }, activate .default:n = Document } - + % \end{macrocode} % \end{macro} -% +% % \subsection{Structure destinations} % Since TeXlive 2022 pdftex and luatex offer support for structure destinations % and the pdfmanagement has backend support for. We activate them if % structures are actually created. -% Structure destinations are actually PDF 2.0 only but they don't harm in -% older PDF and can improve html export. +% Structure destinations are actually PDF 2.0 only but they don't harm in +% older PDF and can improve html export. % \begin{macrocode} \AddToHook{begindocument/before} { @@ -764,7 +761,7 @@ { \g_@@_active_struct_dest_bool } { \g_@@_active_struct_bool } { - \tl_set:Nn \l_pdf_current_structure_destination_tl + \tl_set:Nn \l_pdf_current_structure_destination_tl { {@@/struct}{\g_@@_struct_stack_current_tl }} \pdf_activate_indexed_structure_destination: } @@ -776,14 +773,14 @@ % We need a luatex variant for |\pdffakespace|. This should probably go into % the kernel at some time. We also provide a no-op version for dvi mode % \begin{macrocode} -\sys_if_engine_luatex:T +\bool_if:NT \g_@@_mode_lua_bool { \NewDocumentCommand\pdffakespace { } { \@@_fakespace: } } -\providecommand\pdffakespace{} +\providecommand\pdffakespace{} % \end{macrocode} % \end{macro} % @@ -833,7 +830,7 @@ % \begin{macrocode} \tl_if_exist:NF \l_@@_para_attr_class_tl {\tl_new:N \l_@@_para_attr_class_tl } -\tl_new:N \l_@@_para_main_attr_class_tl +\tl_new:N \l_@@_para_main_attr_class_tl % \end{macrocode} % \end{macro} @@ -845,7 +842,7 @@ % \@@_gincr_para_end_int: % } % The global para counter should be set through commands so -% that \cs{tag_stop:} can stop them. +% that \cs{tag_stop:} can stop them. % \begin{macrocode} \cs_new_protected:Npn \@@_gincr_para_main_begin_int: { @@ -884,7 +881,7 @@ \cs_set_protected:Npn \@@_gincr_para_end_int: { \int_gincr:N \g_@@_para_end_int - } + } } \cs_new_protected:Npn \@@_stop_para_ints: { @@ -892,46 +889,21 @@ \cs_set_eq:NN \@@_gincr_para_begin_int: \prg_do_nothing: \cs_set_eq:NN \@@_gincr_para_main_end_int: \prg_do_nothing: \cs_set_eq:NN \@@_gincr_para_end_int: \prg_do_nothing: - } + } % \end{macrocode} % \end{macro} % -% We want to be able to inspect the current para main structure, so +% We want to be able to inspect the current para main structure, so % we need a command to store its structure number % \begin{macro}{\@@_para_main_store_struct:} % \begin{macrocode} -\cs_new:Npn \@@_para_main_store_struct: +\cs_new:Npn \@@_para_main_store_struct: { - \tl_gset:Ne \g_@@_para_main_struct_tl {\int_use:N \c@g_@@_struct_abs_int } + \tl_gset:Ne \g_@@_para_main_struct_tl {\int_use:N \c@g_@@_struct_abs_int } } % \end{macrocode} % \end{macro} -% TEMPORARY FIX (2023-11-17). Until latex-lab is updated we must adapt a sec command: -% \begin{macrocode} -\AddToHook{package/latex-lab-testphase-sec/after} - { - \cs_set_protected:Npn \@kernel@tag@hangfrom #1 - { - \tagstructbegin{tag=\l_@@_para_tag_tl} - \@@_gincr_para_begin_int: - \tagstructbegin{tag=Lbl} - \setbox\@tempboxa - \hbox - { - \bool_lazy_and:nnT - {\tag_if_active_p:} - {\g_@@_mode_lua_bool} - {\tagmcbegin{tag=Lbl}} - {#1} - } - \tag_suspend:n{hangfrom} - \hangindent \wd\@tempboxa\noindent - \tag_resume:n{hangfrom} - \tagmcbegin{}\box\@tempboxa\tagmcend\tagstructend\tagmcbegin{} - } - } -% \end{macrocode} -% and one temporary adaptions for the block module: +% temporary adaption for the block module: % \begin{macrocode} \AddToHook{package/latex-lab-testphase-block/after} { @@ -939,8 +911,7 @@ { \tl_set:Nn \l_@@_para_attr_class_tl { \l_tag_para_attr_class_tl } } -} - +} % \end{macrocode} %\begin{macro} % { @@ -957,14 +928,14 @@ % paratagging-show (deprecated), % paratag (deprecated), % } -% These keys enable/disable locally paratagging. +% These keys enable/disable locally paratagging. % Paragraphs are typically tagged with two structure: A main structure % around the whole paragraph, and inner structures around the various chunks. % Debugging can be -% activated locally with |debug/show=para|, this can affect the typesetting +% activated locally with |debug/show=para|, this can affect the typesetting % as the small numbers % are boxes and they have a (small) height. Debugging can be deactivated -% with |debug/show=paraOff| +% with |debug/show=paraOff| % The |para/tag| key sets the tag used by % the inner structure, |para/maintag| the tag of the outer structure, % both can also be changed with |\tag_tool:n| @@ -978,7 +949,7 @@ para/maintag .tl_set:N = \l_@@_para_main_tag_tl, para/flattened .bool_set:N = \l_@@_para_flattened_bool } -\keys_define:nn { tag / tool} +\keys_define:nn { tag / tool} { para/tagging .bool_set:N = \l_@@_para_bool, para/tag .tl_set:N = \l_@@_para_tag_tl, @@ -994,7 +965,7 @@ paratagging-show .bool_set:N = \l_@@_para_show_bool, paratag .tl_set:N = \l_@@_para_tag_tl } -\keys_define:nn { tag / tool} +\keys_define:nn { tag / tool} { para .bool_set:N = \l_@@_para_bool, paratag .tl_set:N = \l_@@_para_tag_tl, @@ -1003,13 +974,13 @@ } % \end{macrocode} % \end{macro} -% Helper command for debugging: +% Helper command for debugging: % \begin{macrocode} -\cs_new_protected:Npn \@@_check_para_begin_show:nn #1 #2 +\cs_new_protected:Npn \@@_check_para_begin_show:nn #1 #2 %#1 color, #2 prefix { \bool_if:NT \l_@@_para_show_bool - { + { \tag_mc_begin:n{artifact} \llap{\color_select:n{#1}\tiny#2\int_use:N\g_@@_para_begin_int\ } \tag_mc_end: @@ -1020,7 +991,7 @@ %#1 color, #2 prefix { \bool_if:NT \l_@@_para_show_bool - { + { \tag_mc_begin:n{artifact} \rlap{\color_select:n{#1}\tiny\ #2\int_use:N\g_@@_para_end_int} \tag_mc_end: @@ -1036,7 +1007,7 @@ % It is possible that we will need more variants, so % we setup a socket so that the code can be easily switched. % This code should move into lttagging, so we add a test for -% the transition. +% the transition. % \begin{macrocode} \str_if_exist:cF { l__socket_tagsupport/para/begin_plug_str } { @@ -1054,13 +1025,13 @@ { tag=\l_@@_para_main_tag_tl, } - \@@_para_main_store_struct: + \@@_para_main_store_struct: } \@@_gincr_para_begin_int: \tag_struct_begin:n {tag=\l_@@_para_tag_tl} \@@_check_para_begin_show:nn {green}{} \tag_mc_begin:n {} - } + } } \socket_new_plug:nnn{tagsupport/para/begin}{block} { @@ -1080,7 +1051,7 @@ tag=\l_@@_para_main_tag_tl, attribute-class=\l_@@_para_main_attr_class_tl, } - \@@_para_main_store_struct: + \@@_para_main_store_struct: } } \@@_gincr_para_begin_int: @@ -1090,10 +1061,10 @@ tag=\l_@@_para_tag_tl ,attribute-class=\l_@@_para_attr_class_tl } - \@@_check_para_begin_show:nn {green}{\PARALABEL} + \@@_check_para_begin_show:nn {green}{\PARALABEL} \tag_mc_begin:n {} } - } + } } % \end{macrocode} % there was no real difference between the original and @@ -1114,7 +1085,7 @@ \@@_gincr_para_main_end_int: \tag_struct_end: } - } + } } } % \end{macrocode} @@ -1161,7 +1132,7 @@ \tag_if_active:F { \msg_redirect_name:nnn { tag } { para-hook-count-wrong } { warning } - } + } \int_compare:nNnF {\g_@@_para_main_begin_int}={\g_@@_para_main_end_int} { \msg_error:nneee @@ -1179,51 +1150,55 @@ {\int_use:N\g_@@_para_begin_int} {\int_use:N\g_@@_para_end_int} {text} - } + } } % \end{macrocode} +% \subsection{output routine stuff} % We need at least the new-or-1 code. -% In generic mode we also must insert the code to finish the MC-chunks +% In generic mode we also must insert the code to finish the MC-chunks +% This part here can go in June 2025 % \begin{macrocode} \@ifpackageloaded{footmisc} {\PackageWarning{tagpdf}{tagpdf~has~been~loaded~too~late!}} % {\RequirePackage{latex-lab-testphase-new-or-1}} - + \AddToHook{begindocument/before} { - \providecommand\@kernel@tagsupport@@@@makecol{} - \providecommand\@kernel@before@cclv{} \bool_if:NF \g_@@_mode_lua_bool { \cs_if_exist:NT \@kernel@before@footins { \tl_put_right:Nn \@kernel@before@footins { \tag_mc_add_missing_to_stream:Nn \footins {footnote} } - \tl_put_right:Nn \@kernel@before@cclv - { - \@@_check_typeout_v:n {====>~In~\token_to_str:N \@makecol\c_space_tl\the\c@page} - \tag_mc_add_missing_to_stream:Nn \@cclv {main} - } \tl_put_right:Nn \@kernel@tagsupport@@@@makecol { \@@_check_typeout_v:n {====>~In~\token_to_str:N \@makecol\c_space_tl\the\c@page} \tag_mc_add_missing_to_stream:Nn \@outputbox {main} - } - \tl_if_exist:NT \@mult@ptagging@hook - { - \tl_put_right:Nn \@mult@ptagging@hook - { - \@@_check_typeout_v:n {====>~In~\string\page@sofar} - \process@cols\mult@firstbox - { - \tag_mc_add_missing_to_stream:Nn \count@ {multicol} - } - \tag_mc_add_missing_to_stream:Nn \mult@rightbox {multicol} - } - } + } } } } + +% \end{macrocode} +% If the new OR is there, we use it +% \begin{macrocode} +\str_if_exist:cT { l__socket_tagsupport/build/column/outputbox_plug_str } + { + \NewSocketPlug{tagsupport/build/column/outputbox}{tagpdf} + { + \@@_check_typeout_v:n { ====>~In~\token_to_str:N \@makecol + \c_space_tl\the\c@page } + \tag_mc_add_missing_to_stream:Nn \@outputbox {main} + } + \NewSocketPlug{tagsupport/build/column/footins}{tagpdf} + { \tag_mc_add_missing_to_stream:Nn \footins {footnote} } + + \bool_if:NF \g_@@_mode_lua_bool + { + \AssignSocketPlug{tagsupport/build/column/outputbox}{tagpdf} + \AssignSocketPlug{tagsupport/build/column/footins}{tagpdf} + } + } %</package> % \end{macrocode} % \begin{macro} @@ -1265,7 +1240,7 @@ % \end{macrocode} % \end{macro} % \subsection{Language support} -% +% % With the following key the lang variable is set. All structures in the current group will % then set this lang variable. % \begin{macro}{test/lang (setup-key)} @@ -1287,7 +1262,9 @@ \cs_new_protected:Npn\@@_hook_kernel_after_head:{} \cs_new_protected:Npn\@@_hook_kernel_before_foot:{} \cs_new_protected:Npn\@@_hook_kernel_after_foot:{} - +% \end{macrocode} +% This can go once the new OR is active (June 2025) +% \begin{macrocode} \AddToHook{begindocument} { \cs_if_exist:NT \@kernel@before@head @@ -1298,7 +1275,31 @@ \tl_put_left:Nn \@kernel@after@foot {\@@_hook_kernel_after_foot:} } } - +% \end{macrocode} +% If the new page sockets exist, we use them. +% \begin{macrocode} +\str_if_exist:cT { l__socket_tagsupport/build/page/footer_plug_str } + { + \NewSocketPlug{tagsupport/build/page/header}{tagpdf} + { + \@@_hook_kernel_before_head: + #2 + \@@_hook_kernel_after_head: + } + + \AssignSocketPlug{tagsupport/build/page/header}{tagpdf} + \NewSocketPlug{tagsupport/build/page/footer}{tagpdf} + { + \@@_hook_kernel_before_foot: + #2 + \@@_hook_kernel_after_foot: + } + \AssignSocketPlug{tagsupport/build/page/footer}{tagpdf} + } + +% \end{macrocode} +% +% \begin{macrocode} \bool_new:N \g_@@_saved_in_mc_bool \cs_new_protected:Npn \@@_exclude_headfoot_begin: { diff --git a/Master/texmf-dist/source/latex/tagpdf/tagpdf.dtx b/Master/texmf-dist/source/latex/tagpdf/tagpdf.dtx index 4f7e2c0c40f..6c3b7d0ce54 100644 --- a/Master/texmf-dist/source/latex/tagpdf/tagpdf.dtx +++ b/Master/texmf-dist/source/latex/tagpdf/tagpdf.dtx @@ -47,7 +47,7 @@ % }^^A % } % -% \date{Version 0.99l, released 2025-01-12} +% \date{Version 0.99m, released 2025-02-17} % \maketitle% % % \begin{documentation} @@ -153,7 +153,7 @@ % \begin{macrocode} %<@@=tag> %<*package> -\ProvidesExplPackage {tagpdf} {2025-01-12} {0.99l} +\ProvidesExplPackage {tagpdf} {2025-02-17} {0.99m} { LaTeX kernel code for PDF tagging } \bool_if:nF @@ -179,7 +179,7 @@ % \end{macrocode} %<*debug> % \begin{macrocode} -\ProvidesExplPackage {tagpdf-debug} {2025-01-12} {0.99l} +\ProvidesExplPackage {tagpdf-debug} {2025-02-17} {0.99m} { debug code for tagpdf } \@ifpackageloaded{tagpdf}{}{\PackageWarning{tagpdf-debug}{tagpdf~not~loaded,~quitting}\endinput} % \end{macrocode} @@ -202,29 +202,18 @@ % we define a base package with dummy functions % \begin{macrocode} %<*base> -\ProvidesExplPackage {tagpdf-base} {2025-01-12} {0.99l} +\ProvidesExplPackage {tagpdf-base} {2025-02-17} {0.99m} {part of tagpdf - provide base, no-op versions of the user commands } %</base> % \end{macrocode} %\section{Package options} -% There are only two documented options to switch for luatex between generic and luamode, -% TODO try to get rid of them. -% The option \texttt{disabledelayedshipout} is only temporary to be able to debug -% problem with the new shipout keyword if needed. +% The boolean is kept for now for compability, can go in 2026. % \begin{macrocode} %<*package> -\bool_new:N\g_@@_mode_lua_bool -\bool_new:N\g_@@_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_@@_delayed_shipout_bool - } -\DeclareOption {luamode} { \sys_if_engine_luatex:T { \bool_gset_true:N \g_@@_mode_lua_bool } } -\DeclareOption {genericmode}{ \bool_gset_false:N\g_@@_mode_lua_bool } -\DeclareOption {disabledelayedshipout}{ \bool_gset_false:N\g_@@_delayed_shipout_bool } -\ExecuteOptions{luamode} +\bool_new:N\g_@@_mode_lua_bool +\sys_if_engine_luatex:T {\bool_gset_true:N \g_@@_mode_lua_bool} +\DeclareOption {luamode} { } +\DeclareOption {genericmode}{ } \ProcessOptions % \end{macrocode} % \section{Packages} |