diff options
author | Karl Berry <karl@freefriends.org> | 2022-12-29 22:05:47 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2022-12-29 22:05:47 +0000 |
commit | 4138c1f82cf970c8e9dff0b4e65cac5e91c34894 (patch) | |
tree | 0138f1a0f4bd92d71eeb675037434918c2221002 /Master/texmf-dist/source | |
parent | 5edd3fc5719e4712aed9cda07338f371e5eb5a83 (diff) |
tagpdf (29dec22)
git-svn-id: svn://tug.org/texlive/trunk@65398 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source')
12 files changed, 228 insertions, 158 deletions
diff --git a/Master/texmf-dist/source/latex/tagpdf/tagpdf-backend.dtx b/Master/texmf-dist/source/latex/tagpdf/tagpdf-backend.dtx index 47369b519b3..e8fac1f6ecf 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.98, released 2022-12-22} +% \date{Version 0.98a, released 2022-12-22} % \maketitle % \begin{implementation} % \begin{macrocode} %<@@=tag> %<*luatex> -\ProvidesExplFile {tagpdf-luatex.def} {2022-12-22} {0.98} +\ProvidesExplFile {tagpdf-luatex.def} {2022-12-22} {0.98a} {tagpdf~driver~for~luatex} % \end{macrocode} % \section{Loading the lua} @@ -158,7 +158,7 @@ local ProvidesLuaModule = { name = "tagpdf", - version = "0.98", --TAGVERSION + version = "0.98a", --TAGVERSION date = "2022-12-22", --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 52113f348f2..6ec0e6aadc9 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.98, released 2022-12-22} +% \date{Version 0.98a, released 2022-12-22} % \maketitle % \begin{documentation} % \section{Commands} @@ -295,7 +295,7 @@ % \begin{macrocode} %<@@=tag> %<*header> -\ProvidesExplPackage {tagpdf-checks-code} {2022-12-22} {0.98} +\ProvidesExplPackage {tagpdf-checks-code} {2022-12-22} {0.98a} {part of tagpdf - code related to checks, conditionals, debugging and messages} %</header> % \end{macrocode} @@ -546,8 +546,7 @@ % % \subsection{checks for active tagging} % \begin{macro}[TF]{\@@_check_if_active_mc:,\@@_check_if_active_struct:} -% Structures must have a tag, so we check if the S entry is in the property. -% It is an error if this is missing. The argument is a number. +% This checks if mc are active. % \begin{macrocode} \prg_new_conditional:Npnn \@@_check_if_active_mc: {T,F,TF} { diff --git a/Master/texmf-dist/source/latex/tagpdf/tagpdf-data.dtx b/Master/texmf-dist/source/latex/tagpdf/tagpdf-data.dtx index 560856bf28b..379c2114d76 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.98, released 2022-12-22} +% \date{Version 0.98a, released 2022-12-22} % \maketitle % \begin{documentation} % This files contains a various data files which are read in @@ -60,7 +60,7 @@ % It lists the new tag, the rolemap and the namespace of the rolemap. % \begin{macrocode} %<*ns-latex> -%% \ProvidesExplFile {tagpdf-ns-latex.def} {2022-12-22} {0.98} +%% \ProvidesExplFile {tagpdf-ns-latex.def} {2022-12-22} {0.98a} %% {latex} {https://www.latex-project.org/ns/dflt/2022}{} title, Title, pdf2, part, Title, pdf2, @@ -86,7 +86,7 @@ footnotelabel,Lbl, pdf2, % It is bound to change % \begin{macrocode} %<*ns-latex-book> -%% \ProvidesExplFile {tagpdf-ns-latex-book.def} {2022-12-22} {0.98} +%% \ProvidesExplFile {tagpdf-ns-latex-book.def} {2022-12-22} {0.98a} %% {latex-book} {https://www.latex-project.org/ns/book/2022}{} chapter, H1,pdf2, section, H2,pdf2, @@ -102,7 +102,7 @@ subparagraph, H6,pdf2, % It is bound to change a lot! % \begin{macrocode} %<*ns-latex-inline> -%% \ProvidesExplFile {tagpdf-ns-latex-inline.def} {2022-12-22} {0.98} +%% \ProvidesExplFile {tagpdf-ns-latex-inline.def} {2022-12-22} {0.98a} %% {latex-inline} {https://www.latex-project.org/ns/inline/2022}{} chapter, Span, pdf2, section, Span, pdf2, @@ -116,120 +116,131 @@ P, Span, pdf2, % \section{The pdf namespace data} % \begin{macrocode} %<*ns-pdf> -%% \ProvidesExplFile {tagpdf-ns-pdf.def} {2022-12-22} {0.98} +%% \ProvidesExplFile {tagpdf-ns-pdf.def} {2022-12-22} {0.98a} %% {pdf} {http://iso.org/pdf/ssn}{} -StructTreeRoot,,,D, -Document,,,D, -Part,,,G, -Sect,,,G, -Div,,,G, -Caption,,,GB, -NonStruct,,,G, -H,,,B, -H1,,,B, -H2,,,B, -H3,,,B, -H4,,,B, -H5,,,B, -H6,,,B, -P,,,B, -L,,,BI, -LI,,,L, -Lbl,,,I, -LBody,,,L, -Table,,,B, -TR,,,T, -TH,,,T, -TD,,,T, -THead,,,T, -TBody,,,T, -TFoot,,,T, -Span,,,I, -Link,,,GBI, -Annot,,,GBI, -Figure,,,GBI, -Formula,,,GBI, -Form,,,GBI, -Ruby,,,I, -RB,,,I, -RT,,,I, -Warichu,,,I, -WT,,,I, -WP,,,I, -Artifact,,,GBI, -Art,,,,G, % only pdf, types unclear, needs correction later -BlockQuote,,,G, %or GB? -TOC,,,G, -TOCI,,,G, -Index,,,G, -Private,,,G, -Quote,,,I, -Note,,,GBI, % I in reference, but -Reference,,,B, % -BibEntry,,,B, % -Code,,,I, % +StructTreeRoot,StructTreeRoot,pdf,D, +Document,Document,pdf,D, +Part,Part,pdf,G, +Sect,Sect,pdf,G, +Div,Div,pdf,G, +Caption,Caption,pdf,GB, +NonStruct,NonStruct,pdf,G, +H,H,pdf,B, +H1,H1,pdf,B, +H2,H2,pdf,B, +H3,H3,pdf,B, +H4,H4,pdf,B, +H5,H5,pdf,B, +H6,H6,pdf,B, +P,P,pdf,B, +L,L,pdf,BI, +LI,LI,pdf,L, +Lbl,Lbl,pdf,I, +LBody,LBody,pdf,L, +Table,Table,pdf,B, +TR,TR,pdf,T, +TH,TH,pdf,T, +TD,TD,pdf,T, +THead,THead,pdf,T, +TBody,TBody,pdf,T, +TFoot,TFoot,pdf,T, +Span,Span,pdf,I, +Link,Link,pdf,GBI, +Annot,Annot,pdf,GBI, +Figure,Figure,pdf,GBI, +Formula,Formula,pdf,GBI, +Form,Form,pdf,GBI, +Ruby,Ruby,pdf,I, +RB,RB,pdf,I, +RT,RT,pdf,I, +Warichu,Warichu,pdf,I, +WT,WT,pdf,I, +WP,WP,pdf,I, +Artifact,Artifact,pdf,GBI, +Art,Art,pdf,,G, % only pdf, types unclear, needs correction later +BlockQuote,BlockQuote,pdf,G, %or GB? +TOC,TOC,pdf,G, +TOCI,TOCI,pdf,G, +Index,Index,pdf,G, +Private,Private,pdf,G, +Quote,Quote,pdf,I, +Note,Note,pdf,GBI, % I in reference, but +Reference,Reference,pdf,B, % +BibEntry,BibEntry,pdf,B, % +Code,Code,pdf,I, % +DocumentFragment,Art,pdf,D, %from pdf2 +Aside,Note,pdf,G, +H7,H6,pdf,B, +H8,H6,pdf,B, +H9,H6,pdf,B, +H10,H6,pdf,B, +Title,P,pdf,GB, +FENote,Note,pdf,GBI, +Sub,Span,pdf,I, +Em,Span,pdf,I, +Strong,Span,pdf,I, %</ns-pdf> % \end{macrocode} % \section{The pdf 2.0 namespace data} % \begin{macrocode} %<*ns-pdf2> -%% \ProvidesExplFile {tagpdf-ns-pdf2.def} {2022-12-22} {0.98} +%% \ProvidesExplFile {tagpdf-ns-pdf2.def} {2022-12-22} {0.98a} %% {pdf2} {http://iso.org/pdf2/ssn}{} -Document,,,D, -Part,,,G, -Sect,,,G, -Div,,,G, -Caption,,,GB, -NonStruct,,,G, -H,,,B, -H1,,,B, -H2,,,B, -H3,,,B, -H4,,,B, -H5,,,B, -H6,,,B, -P,,,B, -L,,,BI, -LI,,,L, -Lbl,,,I, -LBody,,,L, -Table,,,B, -TR,,,T, -TH,,,T, -TD,,,T, -THead,,,T, -TBody,,,T, -TFoot,,,T, -Span,,,I, -Link,,,GBI, -Annot,,,GBI, -Figure,,,GBI, -Formula,,,GBI, -Form,,,GBI, -Ruby,,,I, -RB,,,I, -RT,,,I, -Warichu,,,I, -WT,,,I, -WP,,,I, -Artifact,,,GBI, -DocumentFragment,Art, pdf,D, %rest only pdf2 -Aside, Note, pdf,G, -H7, H6, pdf,B, -H8, H6, pdf,B, -H9, H6, pdf,B, -H10, H6, pdf,B, -Title, P, pdf,GB, -FENote, Note, pdf,GBI, -Sub, Span, pdf,I, -Em, Span, pdf,I, -Strong, Span, pdf,I, +Document,Document,pdf2,D, +Part,Part,pdf2,G, +Sect,Sect,pdf2,G, +Div,Div,pdf2,G, +Caption,Caption,pdf2,GB, +NonStruct,NonStruct,pdf2,G, +H,H,pdf2,B, +H1,H1,pdf2,B, +H2,H2,pdf2,B, +H3,H3,pdf2,B, +H4,H4,pdf2,B, +H5,H5,pdf2,B, +H6,H6,pdf2,B, +P,P,pdf2,B, +L,L,pdf2,BI, +LI,LI,pdf2,L, +Lbl,Lbl,pdf2,I, +LBody,LBody,pdf2,L, +Table,Table,pdf2,B, +TR,TR,pdf2,T, +TH,TH,pdf2,T, +TD,TD,pdf2,T, +THead,THead,pdf2,T, +TBody,TBody,pdf2,T, +TFoot,TFoot,pdf2,T, +Span,Span,pdf2,I, +Link,Link,pdf2,GBI, +Annot,Annot,pdf2,GBI, +Figure,Figure,pdf2,GBI, +Formula,Formula,pdf2,GBI, +Form,Form,pdf2,GBI, +Ruby,Ruby,pdf2,I, +RB,RB,pdf2,I, +RT,RT,pdf2,I, +Warichu,Warichu,pdf2,I, +WT,WT,pdf2,I, +WP,WP,pdf2,I, +Artifact,Artifact,pdf2,GBI, +DocumentFragment,DocumentFragment,pdf2,D, %rest only pdf2 +Aside,Aside,pdf2,G, +H7,H7,pdf2,B, +H8,H8,pdf2,B, +H9,H9,pdf2,B, +H10,H10,pdf2,B, +Title,Title,pdf2,GB, +FENote,FENote,pdf2,GBI, +Sub,Sub,pdf2,I, +Em,Em,pdf2,I, +Strong,Strong,pdf2,I, %</ns-pdf2> % \end{macrocode} % \section{The mathml namespace data} % \begin{macrocode} %<*ns-mathml> -%% \ProvidesExplFile {tagpdf-ns-mathml.def} {2022-12-22} {0.98} +%% \ProvidesExplFile {tagpdf-ns-mathml.def} {2022-12-22} {0.98a} % {mathml}{http://www.w3.org/1998/Math/MathML}{} abs,,, and,,, @@ -464,7 +475,7 @@ xor,,, % This will perhaps change in future. % \begin{macrocode} %<*parent-child> -%% \ProvidesExplFile {tagpdf-parent-child.csv} {2022-12-22} {0.98} +%% \ProvidesExplFile {tagpdf-parent-child.csv} {2022-12-22} {0.98a} ,,,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,∅,∅ @@ -519,7 +530,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} {2022-12-22} {0.98} +%% \ProvidesExplFile {tagpdf-parent-child-2.csv} {2022-12-22} {0.98a} ,,,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 ea460e01042..573604fa874 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.98, released 2022-12-22} +% \date{Version 0.98a, released 2022-12-22} % \maketitle % \begin{documentation} % \end{documentation} @@ -55,11 +55,11 @@ % \begin{macrocode} %<@@=tag> %<*generic> -\ProvidesExplPackage {tagpdf-mc-code-generic} {2022-12-22} {0.98} +\ProvidesExplPackage {tagpdf-mc-code-generic} {2022-12-22} {0.98a} {part of tagpdf - code related to marking chunks - generic mode} %</generic> %<*debug> -\ProvidesExplPackage {tagpdf-debug-generic} {2022-12-22} {0.98} +\ProvidesExplPackage {tagpdf-debug-generic} {2022-12-22} {0.98a} {part of tagpdf - debugging code related to marking chunks - generic mode} %</debug> % \end{macrocode} 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 ca8645e76ca..6195218abf3 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.98, released 2022-12-22} +% \date{Version 0.98a, released 2022-12-22} % \maketitle % \begin{implementation} % The code is splitted into three parts: code shared by all engines, @@ -86,7 +86,7 @@ % \begin{macrocode} %<@@=tag> %<*luamode> -\ProvidesExplPackage {tagpdf-mc-code-lua} {2022-12-22} {0.98} +\ProvidesExplPackage {tagpdf-mc-code-lua} {2022-12-22} {0.98a} {tagpdf - mc code only for the luamode } %</luamode> % \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 2e49c84725a..66ad8a922ce 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.98, released 2022-12-22} +% \date{Version 0.98a, released 2022-12-22} % \maketitle % \begin{documentation} % \section{Public Commands} @@ -174,7 +174,7 @@ % \begin{macrocode} %<@@=tag> %<*header> -\ProvidesExplPackage {tagpdf-mc-code-shared} {2022-12-22} {0.98} +\ProvidesExplPackage {tagpdf-mc-code-shared} {2022-12-22} {0.98a} {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 b17515882eb..d24fae960e3 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.98, released 2022-12-22} +% \date{Version 0.98a, released 2022-12-22} % \maketitle % \begin{documentation} % \begin{function} @@ -90,7 +90,7 @@ % \begin{macrocode} %<@@=tag> %<*header> -\ProvidesExplPackage {tagpdf-roles-code} {2022-12-22} {0.98} +\ProvidesExplPackage {tagpdf-roles-code} {2022-12-22} {0.98a} {part of tagpdf - code related to roles and structure names} %</header> % \end{macrocode} @@ -464,6 +464,26 @@ \cs_generate_variant:Nn \@@_role_add_tag:nn {VV,ne} % \end{macrocode} % \end{macro} +% +% For the parent-child test we must be able to get the role. +% We use the same number of arguments as for the 2.0 command. +% If there is no role, we assume a standard tag. +% \begin{macro}{\@@_role_get:nnN} +% \begin{macrocode} +\pdf_version_compare:NnT < {2.0} + { + \cs_new:Npn \@@_role_get:nnN #1#2#3 + { + \prop_get:NnNF \g_@@_role_rolemap_prop {#1}#3 + { + \tl_set:Nn #3 {#1} + } + } + \cs_generate_variant:Nn \@@_role_get:nnN {VVN} + } + +% \end{macrocode} +% \end{macro} % \subsubsection{The pdf 2.0 version} % \begin{macro}{\@@_role_add_tag:nnnn} % The pdf 2.0 version takes four arguments: @@ -481,15 +501,21 @@ { \tl_set:Nn\l_@@_tmpa_tl{--UNKNOWN--} } - \@@_role_alloctag:nnV {#1}{#2}\l_@@_tmpa_tl - \pdfdict_gput:nnx {g_@@_role/RoleMapNS_#2_dict}{#1} - { - [ - \pdf_name_from_unicode_e:n{#3} - \c_space_tl - \pdf_object_ref:n {tag/NS/#4} - ] - } + \@@_role_alloctag:nnV {#1}{#2}\l_@@_tmpa_tl +% \end{macrocode} +% Do not remap standard tags. TODO add warning? +% \begin{macrocode} + \tl_if_in:nnF {-pdf-pdf2-mathml-}{-#2-} + { + \pdfdict_gput:nnx {g_@@_role/RoleMapNS_#2_dict}{#1} + { + [ + \pdf_name_from_unicode_e:n{#3} + \c_space_tl + \pdf_object_ref:n {tag/NS/#4} + ] + } + } % \end{macrocode} % We resolve rolemapping recursively so that all targets are stored as standard % tags for the tests. @@ -511,6 +537,28 @@ % \end{macrocode} % \end{macro} % +% For the parent-child test we must be able to get the role. +% We use the same number of arguments as for the <2.0 command (and assume +% that we don't need a name space)% +% \begin{macro}{\@@_role_get:nnN} +% \begin{macrocode} +\pdf_version_compare:NnF < {2.0} + { + \cs_new:Npn \@@_role_get:nnN #1#2#3 + { + \prop_get:cnNTF {g_@@_role_NS_#2_prop} {#1}\l_@@_get_tmpc_tl + { + \tl_set:Nx #3 {\exp_last_unbraced:NV\use_i:nn \l_@@_get_tmpc_tl} + } + { + \tl_set:Nn #3 {#1} + } + } + \cs_generate_variant:Nn \@@_role_get:nnN {VVN} + } +% \end{macrocode} +% \end{macro} +% % \subsection{Helper command to read the data from files} % In this section we setup the helper command to read namespace files. @@ -547,7 +595,7 @@ \tl_set:Nn \l_@@_tmpa_tl {#5} } \@@_role_alloctag:nnV {#2}{#1}\l_@@_tmpa_tl - \tl_if_empty:nF {#3} + \tl_if_eq:nnF {#2}{#3} { \@@_role_add_tag:nn {#2}{#3} } @@ -581,9 +629,9 @@ \bool_lazy_and:nnT { ! \tl_if_empty_p:n {#3} }{! \str_if_eq_p:nn {#1}{pdf2}} { - \@@_role_add_tag:nnnn {#2}{#1}{#3}{#4} - \prop_gput:cnn {g_@@_role_NS_#1_prop} {#2}{{#3}{#4}} + \@@_role_add_tag:nnnn {#2}{#1}{#3}{#4} } + \prop_gput:cnn {g_@@_role_NS_#1_prop} {#2}{{#3}{#4}} } } } @@ -855,11 +903,14 @@ \seq_pop_left:NN \l_@@_role_tmpa_seq\l_@@_get_tmpc_tl \seq_map_inline:Nn\l_@@_role_tmpa_seq { - \tl_if_in:nnF {-Part-Div-NonStruct-}{-##1-} + \tl_set:Nx\l_@@_tmpa_tl { \use_ii:nn ##1 } + \exp_args:Nne + \tl_if_in:nnF {-Part-Div-NonStruct-}{-\l_@@_tmpa_tl-} { \tl_set:Nn\l_@@_role_real_parent_tl {##1} \int_zero:N\l_@@_tmpa_int - \@@_role_get_parent_child_rule:nnN {##1}{#2}#3 + \exp_args:NV + \@@_role_get_parent_child_rule:nnN \l_@@_tmpa_tl{#2}#3 \int_set:Nn\l_@@_tmpa_int{1} \seq_map_break: } diff --git a/Master/texmf-dist/source/latex/tagpdf/tagpdf-space.dtx b/Master/texmf-dist/source/latex/tagpdf/tagpdf-space.dtx index ad5e17ff5b1..26602a96b01 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.98, released 2022-12-22} +% \date{Version 0.98a, released 2022-12-22} % \maketitle % \begin{documentation} % \begin{function}{interwordspace (setup-key)} @@ -64,7 +64,7 @@ % \begin{macrocode} %<@@=tag> %<*header> -\ProvidesExplPackage {tagpdf-space-code} {2022-12-22} {0.98} +\ProvidesExplPackage {tagpdf-space-code} {2022-12-22} {0.98a} {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 6f6d60ba4b9..1299cc10e99 100644 --- a/Master/texmf-dist/source/latex/tagpdf/tagpdf-struct.dtx +++ b/Master/texmf-dist/source/latex/tagpdf/tagpdf-struct.dtx @@ -46,7 +46,7 @@ % }^^A % } % -% \date{Version 0.98, released 2022-12-22} +% \date{Version 0.98a, released 2022-12-22} % \maketitle % \begin{documentation} % \section{Public Commands} @@ -242,7 +242,7 @@ % \begin{macrocode} %<@@=tag> %<*header> -\ProvidesExplPackage {tagpdf-struct-code} {2022-12-22} {0.98} +\ProvidesExplPackage {tagpdf-struct-code} {2022-12-22} {0.98a} {part of tagpdf - code related to storing structure} %</header> % \end{macrocode} @@ -294,7 +294,7 @@ % numbered stack, lets build a tag stack too. % \begin{macrocode} \seq_new:N \g_@@_struct_tag_stack_seq -\seq_gpush:Nn \g_@@_struct_tag_stack_seq {Root} +\seq_gpush:Nn \g_@@_struct_tag_stack_seq {{Root}{StructTreeRoot}} % \end{macrocode} % \end{variable} % @@ -546,7 +546,7 @@ % \end{macrocode} % \end{macro} % -% \begin{macro}{\cc} +% \begin{macro}{\@@_struct_get_tag_info:nNN} % We also need a way to get the tag info back from parent structures. % \begin{macrocode} \cs_new_protected:Npn \@@_struct_get_tag_info:nNN #1 #2 #3 @@ -1226,7 +1226,12 @@ } } \seq_gpush:NV \g_@@_struct_stack_seq \c@g_@@_struct_abs_int - \seq_gpush:NV \g_@@_struct_tag_stack_seq \g_@@_struct_tag_tl + \@@_role_get:VVN + \g_@@_struct_tag_tl + \g_@@_struct_tag_NS_tl + \l_@@_get_tmpc_tl + \seq_gpush:Nx \g_@@_struct_tag_stack_seq + {{\g_@@_struct_tag_tl}{\l_@@_get_tmpc_tl}} \tl_gset:NV \g_@@_struct_stack_current_tl \c@g_@@_struct_abs_int %\seq_show:N \g_@@_struct_stack_seq \bool_if:NF @@ -1314,7 +1319,8 @@ } \seq_get:NNT \g_@@_struct_tag_stack_seq \l_@@_tmpa_tl { - \tl_gset:NV \g_@@_struct_tag_tl \l_@@_tmpa_tl + \tl_gset:Nx \g_@@_struct_tag_tl + { \exp_last_unbraced:NV\use_i:nn \l_@@_tmpa_tl } } %<debug>\@@_debug_struct_end_insert: } @@ -1474,7 +1480,7 @@ % \section{Attributes and attribute classes} % \begin{macrocode} %<*header> -\ProvidesExplPackage {tagpdf-attr-code} {2022-12-22} {0.98} +\ProvidesExplPackage {tagpdf-attr-code} {2022-12-22} {0.98a} {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 ecbd96f04ee..f8c7aa27d75 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.98, released 2022-12-22} +% \date{Version 0.98a, released 2022-12-22} % \maketitle % \begin{implementation} % \begin{macrocode} %<@@=tag> %<*header> -\ProvidesExplPackage {tagpdf-tree-code} {2022-12-22} {0.98} +\ProvidesExplPackage {tagpdf-tree-code} {2022-12-22} {0.98a} {part of tagpdf - code related to writing trees and dictionaries to the pdf} %</header> % \end{macrocode} @@ -348,9 +348,12 @@ { \prop_map_inline:Nn\g_@@_role_rolemap_prop { - \pdfdict_gput:nnx {g_@@_role/RoleMap_dict} - {##1} - {\pdf_name_from_unicode_e:n{##2}} + \tl_if_eq:nnF {##1}{##2} + { + \pdfdict_gput:nnx {g_@@_role/RoleMap_dict} + {##1} + {\pdf_name_from_unicode_e:n{##2}} + } } \pdf_object_write:nnx { @@/tree/rolemap }{dict} { @@ -418,7 +421,7 @@ \cs_new_protected:Npn \@@_tree_write_namespaces: { \pdf_version_compare:NnF < {2.0} - { + { \prop_map_inline:Nn \g_@@_role_NS_prop { \pdfdict_if_empty:nF {g_@@_role/RoleMapNS_##1_dict} diff --git a/Master/texmf-dist/source/latex/tagpdf/tagpdf-user.dtx b/Master/texmf-dist/source/latex/tagpdf/tagpdf-user.dtx index a70c14bb217..a2a0475ccf1 100644 --- a/Master/texmf-dist/source/latex/tagpdf/tagpdf-user.dtx +++ b/Master/texmf-dist/source/latex/tagpdf/tagpdf-user.dtx @@ -46,7 +46,7 @@ % }^^A % } % -% \date{Version 0.98, released 2022-12-22} +% \date{Version 0.98a, released 2022-12-22} % \maketitle % \begin{documentation} % \section{Setup commands} @@ -246,7 +246,7 @@ % \begin{macrocode} %<@@=tag> %<*header> -\ProvidesExplPackage {tagpdf-user} {2022-12-22} {0.98} +\ProvidesExplPackage {tagpdf-user} {2022-12-22} {0.98a} {tagpdf - user commands} %</header> % \end{macrocode} diff --git a/Master/texmf-dist/source/latex/tagpdf/tagpdf.dtx b/Master/texmf-dist/source/latex/tagpdf/tagpdf.dtx index d9550ab7a7f..59795d78a39 100644 --- a/Master/texmf-dist/source/latex/tagpdf/tagpdf.dtx +++ b/Master/texmf-dist/source/latex/tagpdf/tagpdf.dtx @@ -92,7 +92,7 @@ % \begin{macrocode} %<@@=tag> %<*package> -\ProvidesExplPackage {tagpdf} {2022-12-22} {0.98} +\ProvidesExplPackage {tagpdf} {2022-12-22} {0.98a} { A package to experiment with pdf tagging } \bool_if:nF @@ -118,7 +118,7 @@ % \end{macrocode} %<*debug> % \begin{macrocode} -\ProvidesExplPackage {tagpdf-debug} {2022-12-22} {0.98} +\ProvidesExplPackage {tagpdf-debug} {2022-12-22} {0.98a} { debug code for tagpdf } \@ifpackageloaded{tagpdf}{}{\PackageWarning{tagpdf-debug}{tagpdf~not~loaded,~quitting}\endinput} % \end{macrocode} @@ -159,7 +159,7 @@ % \end{macrocode} % \begin{macrocode} %<*base> -\ProvidesExplPackage {tagpdf-base} {2022-12-22} {0.98} +\ProvidesExplPackage {tagpdf-base} {2022-12-22} {0.98a} {part of tagpdf - provide base, no-op versions of the user commands } %</base> % \end{macrocode} |