summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2023-04-25 19:36:46 +0000
committerKarl Berry <karl@freefriends.org>2023-04-25 19:36:46 +0000
commitcfae1961fa7c807ca4d715b7ce2893a383f0473f (patch)
tree5186d5630326a06e7d3c0a7cc254f6fadd652cfe /Master/texmf-dist/source/latex
parente171c7dd42a02b488d853c3efe0c895d3c4836d5 (diff)
tagpdf (25apr23)
git-svn-id: svn://tug.org/texlive/trunk@66937 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex')
-rw-r--r--Master/texmf-dist/source/latex/tagpdf/tagpdf-backend.dtx8
-rw-r--r--Master/texmf-dist/source/latex/tagpdf/tagpdf-checks.dtx6
-rw-r--r--Master/texmf-dist/source/latex/tagpdf/tagpdf-data.dtx402
-rw-r--r--Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-generic.dtx48
-rw-r--r--Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-luacode.dtx94
-rw-r--r--Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-shared.dtx8
-rw-r--r--Master/texmf-dist/source/latex/tagpdf/tagpdf-roles.dtx142
-rw-r--r--Master/texmf-dist/source/latex/tagpdf/tagpdf-space.dtx4
-rw-r--r--Master/texmf-dist/source/latex/tagpdf/tagpdf-struct.dtx147
-rw-r--r--Master/texmf-dist/source/latex/tagpdf/tagpdf-tree.dtx4
-rw-r--r--Master/texmf-dist/source/latex/tagpdf/tagpdf-user.dtx4
-rw-r--r--Master/texmf-dist/source/latex/tagpdf/tagpdf.dtx6
12 files changed, 472 insertions, 401 deletions
diff --git a/Master/texmf-dist/source/latex/tagpdf/tagpdf-backend.dtx b/Master/texmf-dist/source/latex/tagpdf/tagpdf-backend.dtx
index 9c947ca0b3a..76019355288 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.98e, released 2023-03-07}
+% \date{Version 0.98f, released 2023-04-24}
% \maketitle
% \begin{implementation}
% \begin{macrocode}
%<@@=tag>
%<*luatex>
-\ProvidesExplFile {tagpdf-luatex.def} {2023-03-07} {0.98e}
+\ProvidesExplFile {tagpdf-luatex.def} {2023-04-24} {0.98f}
{tagpdf~driver~for~luatex}
% \end{macrocode}
% \section{Loading the lua}
@@ -158,8 +158,8 @@
local ProvidesLuaModule = {
name = "tagpdf",
- version = "0.98e", --TAGVERSION
- date = "2023-03-07", --TAGDATE
+ version = "0.98f", --TAGVERSION
+ date = "2023-04-24", --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 2eba24c8892..acabf29f971 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.98e, released 2023-03-07}
+% \date{Version 0.98f, released 2023-04-24}
% \maketitle
% \begin{documentation}
% \section{Commands}
@@ -295,7 +295,7 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-checks-code} {2023-03-07} {0.98e}
+\ProvidesExplPackage {tagpdf-checks-code} {2023-04-24} {0.98f}
{part of tagpdf - code related to checks, conditionals, debugging and messages}
%</header>
% \end{macrocode}
@@ -441,7 +441,7 @@
% parent tags.
% \begin{macrocode}
\msg_new:nnn { tag } {role-parent-child}
- { The~rule~between~parent~'#1'~\\and~child~'#2'~is~#3}
+ { Rule~'#1'~-->~'#2'~is~#3}
% \end{macrocode}
% \end{macro}
% \begin{macro}{role-parent-child}
diff --git a/Master/texmf-dist/source/latex/tagpdf/tagpdf-data.dtx b/Master/texmf-dist/source/latex/tagpdf/tagpdf-data.dtx
index 77c08c16028..fbdf89360ec 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.98e, released 2023-03-07}
+% \date{Version 0.98f, released 2023-04-24}
% \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} {2023-03-07} {0.98e}
+%% \ProvidesExplFile {tagpdf-ns-latex.def} {2023-04-24} {0.98f}
%% {latex} {https://www.latex-project.org/ns/dflt/2022}{}
title, Title, pdf2,
part, Title, pdf2,
@@ -92,7 +92,7 @@ text, P, pdf2,
% It is bound to change
% \begin{macrocode}
%<*ns-latex-book>
-%% \ProvidesExplFile {tagpdf-ns-latex-book.def} {2023-03-07} {0.98e}
+%% \ProvidesExplFile {tagpdf-ns-latex-book.def} {2023-04-24} {0.98f}
%% {latex-book} {https://www.latex-project.org/ns/book/2022}{}
chapter, H1,pdf2,
section, H2,pdf2,
@@ -108,7 +108,7 @@ subparagraph, H6,pdf2,
% It is bound to change a lot!
% \begin{macrocode}
%<*ns-latex-inline>
-%% \ProvidesExplFile {tagpdf-ns-latex-inline.def} {2023-03-07} {0.98e}
+%% \ProvidesExplFile {tagpdf-ns-latex-inline.def} {2023-04-24} {0.98f}
%% {latex-inline} {https://www.latex-project.org/ns/inline/2022}{}
chapter, Span, pdf2,
section, Span, pdf2,
@@ -122,7 +122,7 @@ P, Span, pdf2,
% \section{The pdf namespace data}
% \begin{macrocode}
%<*ns-pdf>
-%% \ProvidesExplFile {tagpdf-ns-pdf.def} {2023-03-07} {0.98e}
+%% \ProvidesExplFile {tagpdf-ns-pdf.def} {2023-04-24} {0.98f}
%% {pdf} {http://iso.org/pdf/ssn}{}
StructTreeRoot,StructTreeRoot,pdf,D,
Document,Document,pdf,D,
@@ -162,7 +162,7 @@ RT,RT,pdf,I,
Warichu,Warichu,pdf,I,
WT,WT,pdf,I,
WP,WP,pdf,I,
-Artifact,Artifact,pdf,GBI,
+Artifact,NonStruct,pdf,GBI,
Art,Art,pdf,,G, % only pdf, types unclear, needs correction later
BlockQuote,BlockQuote,pdf,G, %or GB?
TOC,TOC,pdf,G,
@@ -190,7 +190,7 @@ Strong,Span,pdf,I,
% \section{The pdf 2.0 namespace data}
% \begin{macrocode}
%<*ns-pdf2>
-%% \ProvidesExplFile {tagpdf-ns-pdf2.def} {2023-03-07} {0.98e}
+%% \ProvidesExplFile {tagpdf-ns-pdf2.def} {2023-04-24} {0.98f}
%% {pdf2} {http://iso.org/pdf2/ssn}{}
Document,Document,pdf2,D,
Part,Part,pdf2,G,
@@ -246,199 +246,199 @@ Strong,Strong,pdf2,I,
% \section{The mathml namespace data}
% \begin{macrocode}
%<*ns-mathml>
-%% \ProvidesExplFile {tagpdf-ns-mathml.def} {2023-03-07} {0.98e}
+%% \ProvidesExplFile {tagpdf-ns-mathml.def} {2023-04-24} {0.98f}
% {mathml}{http://www.w3.org/1998/Math/MathML}{}
-abs,,,
-and,,,
-annotation,,,
-apply,,,
-approx,,,
-arccos,,,
-arccosh,,,
-arccot,,,
-arccoth,,,
-arccsc,,,
-arccsch,,,
-arcsec,,,
-arcsech,,,
-arcsin,,,
-arcsinh,,,
-arctan,,,
-arctanh,,,
-arg,,,
-bind,,,
-bvar,,,
-card,,,
-cartesianproduct,,,
-cbytes,,,
-ceiling,,,
-cerror,,,
-ci,,,
-cn,,,
-codomain,,,
-complexes,,,
-compose,,,
-condition,,,
-conjugate,,,
-cos,,,
-cosh,,,
-cot,,,
-coth,,,
-cs,,,
-csc,,,
-csch,,,
-csymbol,,,
-curl,,,
-declare,,,
-degree,,,
-determinant,,,
-diff,,,
-divergence,,,
-divide,,,
-domain,,,
-domainofapplication,,,
-emptyset,,,
-eq,,,
-equivalent,,,
-eulergamma,,,
-exists,,,
-exp,,,
-exponentiale,,,
-factorial,,,
-factorof,,,
-false,,,
-floor,,,
-fn,,,
-forall,,,
-gcd,,,
-geq,,,
-grad,,,
-gt,,,
-ident,,,
-image,,,
-imaginary,,,
-imaginaryi,,,
-implies,,,
-in,,,
-infinity,,,
-int,,,
-integers,,,
-intersect,,,
-interval,,,
-inverse,,,
-lambda,,,
-laplacian,,,
-lcm,,,
-leq,,,
-limit,,,
-ln,,,
-log,,,
-logbase,,,
-lowlimit,,,
-lt,,,
-maction,,,
-maligngroup,,,
-malignmark,,,
-math,,,
-matrix,,,
-matrixrow,,,
-max,,,
-mean,,,
-median,,,
-menclose,,,
-merror,,,
-mfenced,,,
-mfrac,,,
-mglyph,,,
-mi,,,
-min,,,
-minus,,,
-mlabeledtr,,,
-mlongdiv,,,
-mmultiscripts,,,
-mn,,,
-mo,,,
-mode,,,
-moment,,,
-momentabout,,,
-mover,,,
-mpadded,,,
-mphantom,,,
-mprescripts,,,
-mroot,,,
-mrow,,,
-ms,,,
-mscarries,,,
-mscarry,,,
-msgroup,,,
-msline,,,
-mspace,,,
-msqrt,,,
-msrow,,,
-mstack,,,
-mstyle,,,
-msub,,,
-msubsup,,,
-msup,,,
-mtable,,,
-mtd,,,
-mtext,,,
-mtr,,,
-munder,,,
-munderover,,,
-naturalnumbers,,,
-neq,,,
-none,,,
-not,,,
-notanumber,,,
-notin,,,
-notprsubset,,,
-notsubset,,,
-or,,,
-otherwise,,,
-outerproduct,,,
-partialdiff,,,
-pi,,,
-piece,,,
-piecewise,,,
-plus,,,
-power,,,
-primes,,,
-product,,,
-prsubset,,,
-quotient,,,
-rationals,,,
-real,,,
-reals,,,
-reln,,,
-rem,,,
-root,,,
-scalarproduct,,,
-sdev,,,
-sec,,,
-sech,,,
-selector,,,
-semantics,,,
-sep,,,
-set,,,
-setdiff,,,
-share,,,
-sin,,,
-sinh,,,
-subset,,,
-sum,,,
-tan,,,
-tanh,,,
-tendsto,,,
-times,,,
-transpose,,,
-true,,,
-union,,,
-uplimit,,,
-variance,,,
-vector,,,
-vectorproduct,,,
-xor,,,
+abs,abs,mathml,
+and,and,mathml,
+annotation,annotation,mathml,
+apply,apply,mathml,
+approx,approx,mathml,
+arccos,arccos,mathml,
+arccosh,arccosh,mathml,
+arccot,arccot,mathml,
+arccoth,arccoth,mathml,
+arccsc,arccsc,mathml,
+arccsch,arccsch,mathml,
+arcsec,arcsec,mathml,
+arcsech,arcsech,mathml,
+arcsin,arcsin,mathml,
+arcsinh,arcsinh,mathml,
+arctan,arctan,mathml,
+arctanh,arctanh,mathml,
+arg,arg,mathml,
+bind,bind,mathml,
+bvar,bvar,mathml,
+card,card,mathml,
+cartesianproduct,cartesianproduct,mathml,
+cbytes,cbytes,mathml,
+ceiling,ceiling,mathml,
+cerror,cerror,mathml,
+ci,ci,mathml,
+cn,cn,mathml,
+codomain,codomain,mathml,
+complexes,complexes,mathml,
+compose,compose,mathml,
+condition,condition,mathml,
+conjugate,conjugate,mathml,
+cos,cos,mathml,
+cosh,cosh,mathml,
+cot,cot,mathml,
+coth,coth,mathml,
+cs,cs,mathml,
+csc,csc,mathml,
+csch,csch,mathml,
+csymbol,csymbol,mathml,
+curl,curl,mathml,
+declare,declare,mathml,
+degree,degree,mathml,
+determinant,determinant,mathml,
+diff,diff,mathml,
+divergence,divergence,mathml,
+divide,divide,mathml,
+domain,domain,mathml,
+domainofapplication,domainofapplication,mathml,
+emptyset,emptyset,mathml,
+eq,eq,mathml,
+equivalent,equivalent,mathml,
+eulergamma,eulergamma,mathml,
+exists,exists,mathml,
+exp,exp,mathml,
+exponentiale,exponentiale,mathml,
+factorial,factorial,mathml,
+factorof,factorof,mathml,
+false,false,mathml,
+floor,floor,mathml,
+fn,fn,mathml,
+forall,forall,mathml,
+gcd,gcd,mathml,
+geq,geq,mathml,
+grad,grad,mathml,
+gt,gt,mathml,
+ident,ident,mathml,
+image,image,mathml,
+imaginary,imaginary,mathml,
+imaginaryi,imaginaryi,mathml,
+implies,implies,mathml,
+in,in,mathml,
+infinity,infinity,mathml,
+int,int,mathml,
+integers,integers,mathml,
+intersect,intersect,mathml,
+interval,interval,mathml,
+inverse,inverse,mathml,
+lambda,lambda,mathml,
+laplacian,laplacian,mathml,
+lcm,lcm,mathml,
+leq,leq,mathml,
+limit,limit,mathml,
+ln,ln,mathml,
+log,log,mathml,
+logbase,logbase,mathml,
+lowlimit,lowlimit,mathml,
+lt,lt,mathml,
+maction,maction,mathml,
+maligngroup,maligngroup,mathml,
+malignmark,malignmark,mathml,
+math,math,mathml,
+matrix,matrix,mathml,
+matrixrow,matrixrow,mathml,
+max,max,mathml,
+mean,mean,mathml,
+median,median,mathml,
+menclose,menclose,mathml,
+merror,merror,mathml,
+mfenced,mfenced,mathml,
+mfrac,mfrac,mathml,
+mglyph,mglyph,mathml,
+mi,mi,mathml,
+min,min,mathml,
+minus,minus,mathml,
+mlabeledtr,mlabeledtr,mathml,
+mlongdiv,mlongdiv,mathml,
+mmultiscripts,mmultiscripts,mathml,
+mn,mn,mathml,
+mo,mo,mathml,
+mode,mode,mathml,
+moment,moment,mathml,
+momentabout,momentabout,mathml,
+mover,mover,mathml,
+mpadded,mpadded,mathml,
+mphantom,mphantom,mathml,
+mprescripts,mprescripts,mathml,
+mroot,mroot,mathml,
+mrow,mrow,mathml,
+ms,ms,mathml,
+mscarries,mscarries,mathml,
+mscarry,mscarry,mathml,
+msgroup,msgroup,mathml,
+msline,msline,mathml,
+mspace,mspace,mathml,
+msqrt,msqrt,mathml,
+msrow,msrow,mathml,
+mstack,mstack,mathml,
+mstyle,mstyle,mathml,
+msub,msub,mathml,
+msubsup,msubsup,mathml,
+msup,msup,mathml,
+mtable,mtable,mathml,
+mtd,mtd,mathml,
+mtext,mtext,mathml,
+mtr,mtr,mathml,
+munder,munder,mathml,
+munderover,munderover,mathml,
+naturalnumbers,naturalnumbers,mathml,
+neq,neq,mathml,
+none,none,mathml,
+not,not,mathml,
+notanumber,notanumber,mathml,
+notin,notin,mathml,
+notprsubset,notprsubset,mathml,
+notsubset,notsubset,mathml,
+or,or,mathml,
+otherwise,otherwise,mathml,
+outerproduct,outerproduct,mathml,
+partialdiff,partialdiff,mathml,
+pi,pi,mathml,
+piece,piece,mathml,
+piecewise,piecewise,mathml,
+plus,plus,mathml,
+power,power,mathml,
+primes,primes,mathml,
+product,product,mathml,
+prsubset,prsubset,mathml,
+quotient,quotient,mathml,
+rationals,rationals,mathml,
+real,real,mathml,
+reals,reals,mathml,
+reln,reln,mathml,
+rem,rem,mathml,
+root,root,mathml,
+scalarproduct,scalarproduct,mathml,
+sdev,sdev,mathml,
+sec,sec,mathml,
+sech,sech,mathml,
+selector,selector,mathml,
+semantics,semantics,mathml,
+sep,sep,mathml,
+set,set,mathml,
+setdiff,setdiff,mathml,
+share,share,mathml,
+sin,sin,mathml,
+sinh,sinh,mathml,
+subset,subset,mathml,
+sum,sum,mathml,
+tan,tan,mathml,
+tanh,tanh,mathml,
+tendsto,tendsto,mathml,
+times,times,mathml,
+transpose,transpose,mathml,
+true,true,mathml,
+union,union,mathml,
+uplimit,uplimit,mathml,
+variance,variance,mathml,
+vector,vector,mathml,
+vectorproduct,vectorproduct,mathml,
+xor,xor,mathml,
%</ns-mathml>
% \end{macrocode}
% \section{Rule naming}
@@ -481,7 +481,7 @@ xor,,,
% This will perhaps change in future.
% \begin{macrocode}
%<*parent-child>
-%% \ProvidesExplFile {tagpdf-parent-child.csv} {2023-03-07} {0.98e}
+%% \ProvidesExplFile {tagpdf-parent-child.csv} {2023-04-24} {0.98f}
,,,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,∅,∅
@@ -536,7 +536,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} {2023-03-07} {0.98e}
+%% \ProvidesExplFile {tagpdf-parent-child-2.csv} {2023-04-24} {0.98f}
,,,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 e2973a593b5..a7b129f2d33 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.98e, released 2023-03-07}
+% \date{Version 0.98f, released 2023-04-24}
% \maketitle
% \begin{documentation}
% \end{documentation}
@@ -55,11 +55,11 @@
% \begin{macrocode}
%<@@=tag>
%<*generic>
-\ProvidesExplPackage {tagpdf-mc-code-generic} {2023-03-07} {0.98e}
+\ProvidesExplPackage {tagpdf-mc-code-generic} {2023-04-24} {0.98f}
{part of tagpdf - code related to marking chunks - generic mode}
%</generic>
%<*debug>
-\ProvidesExplPackage {tagpdf-debug-generic} {2023-03-07} {0.98e}
+\ProvidesExplPackage {tagpdf-debug-generic} {2023-04-24} {0.98f}
{part of tagpdf - debugging code related to marking chunks - generic mode}
%</debug>
% \end{macrocode}
@@ -708,22 +708,29 @@
}
\bool_if:NF \l_@@_mc_key_stash_bool
{
- \exp_args:NV\@@_struct_get_tag_info:nNN
+ \exp_args:NV\@@_struct_get_parentrole:nNN
\g_@@_struct_stack_current_tl
- \l_@@_tmpa_tl
- \l_@@_tmpb_tl
+ \l_@@_get_parent_tmpa_tl
+ \l_@@_get_parent_tmpb_tl
\@@_check_parent_child:VVnnN
- \l_@@_tmpa_tl \l_@@_tmpb_tl
- {MC}{}
- \l_@@_parent_child_check_tl
+ \l_@@_get_parent_tmpa_tl
+ \l_@@_get_parent_tmpb_tl
+ {MC}{}
+ \l_@@_parent_child_check_tl
\int_compare:nNnT {\l_@@_parent_child_check_tl}<{0}
{
+ \prop_get:cnN
+ { g_@@_struct_ \g_@@_struct_stack_current_tl _prop}
+ {S}
+ \l_@@_tmpa_tl
\msg_warning:nnxxx
{ tag }
{role-parent-child}
- { \g_@@_struct_tag_tl/\g_@@_struct_tag_NS_tl }
- { MC~(=~real content) }
- { 'not~allowed'. }
+ { \l_@@_get_parent_tmpa_tl/\l_@@_get_parent_tmpb_tl }
+ { MC~(real content) }
+ { not~allowed~
+ (struct~\g_@@_struct_stack_current_tl,~\l_@@_tmpa_tl)
+ }
}
\@@_mc_handle_stash:x { \int_use:N \c@g_@@_MCID_abs_int }
}
@@ -805,13 +812,16 @@
alttext .meta:n = {alt=#1},
actualtext .code:n = % ActualText property
{
- \str_set_convert:Noon
- \l_@@_tmpa_str
- { #1 }
- { default }
- { utf16/hex }
- \tl_put_right:Nn \l_@@_mc_key_properties_tl { /ActualText~< }
- \tl_put_right:No \l_@@_mc_key_properties_tl { \l_@@_tmpa_str>~ }
+ \tl_if_empty:oF{#1}
+ {
+ \str_set_convert:Noon
+ \l_@@_tmpa_str
+ { #1 }
+ { default }
+ { utf16/hex }
+ \tl_put_right:Nn \l_@@_mc_key_properties_tl { /ActualText~< }
+ \tl_put_right:No \l_@@_mc_key_properties_tl { \l_@@_tmpa_str>~ }
+ }
},
label .tl_set:N = \l_@@_mc_key_label_tl,
artifact .code:n =
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 8e006f6c5b3..08460ad418a 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.98e, released 2023-03-07}
+% \date{Version 0.98f, released 2023-04-24}
% \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} {2023-03-07} {0.98e}
+\ProvidesExplPackage {tagpdf-mc-code-lua} {2023-04-24} {0.98f}
{tagpdf - mc code only for the luamode }
%</luamode>
% \end{macrocode}
@@ -323,22 +323,30 @@
% if not stashed record the absolute number
\bool_if:NF \l_@@_mc_key_stash_bool
{
- \exp_args:NV\@@_struct_get_tag_info:nNN
- \g_@@_struct_stack_current_tl
- \l_@@_tmpa_tl
- \l_@@_tmpb_tl
+ \exp_args:NV\@@_struct_get_parentrole:nNN
+ \g_@@_struct_stack_current_tl
+ \l_@@_get_parent_tmpa_tl
+ \l_@@_get_parent_tmpb_tl
\@@_check_parent_child:VVnnN
- \l_@@_tmpa_tl \l_@@_tmpb_tl
- {MC}{}
- \l_@@_parent_child_check_tl
+ \l_@@_get_parent_tmpa_tl
+ \l_@@_get_parent_tmpb_tl
+ {MC}{}
+ \l_@@_parent_child_check_tl
\int_compare:nNnT {\l_@@_parent_child_check_tl}<{0}
{
+ \prop_get:cnN
+ { g_@@_struct_ \g_@@_struct_stack_current_tl _prop}
+ {S}
+ \l_@@_tmpa_tl
\msg_warning:nnxxx
{ tag }
{role-parent-child}
- { \g_@@_struct_tag_tl/\g_@@_struct_tag_NS_tl }
- { MC~(=~real content) }
- { 'not~allowed'. }
+ { \l_@@_get_parent_tmpa_tl/\l_@@_get_parent_tmpb_tl }
+ { MC~(real content) }
+ {
+ not~allowed~
+ (struct~\g_@@_struct_stack_current_tl,~\l_@@_tmpa_tl)
+ }
}
\@@_mc_handle_stash:x { \@@_get_mc_abs_cnt: }
}
@@ -408,40 +416,46 @@
},
alt .code:n = % Alt property
{
- \str_set_convert:Noon
- \l_@@_tmpa_str
- { #1 }
- { default }
- { utf16/hex }
- \tl_put_right:Nn \l_@@_mc_key_properties_tl { /Alt~< }
- \tl_put_right:No \l_@@_mc_key_properties_tl { \l_@@_tmpa_str>~ }
- \lua_now:e
+ \tl_if_empty:oF{#1}
{
- ltx.@@.func.store_mc_data
- (
- \@@_get_mc_abs_cnt:,"alt","/Alt~<\str_use:N \l_@@_tmpa_str>"
- )
- }
+ \str_set_convert:Noon
+ \l_@@_tmpa_str
+ { #1 }
+ { default }
+ { utf16/hex }
+ \tl_put_right:Nn \l_@@_mc_key_properties_tl { /Alt~< }
+ \tl_put_right:No \l_@@_mc_key_properties_tl { \l_@@_tmpa_str>~ }
+ \lua_now:e
+ {
+ ltx.@@.func.store_mc_data
+ (
+ \@@_get_mc_abs_cnt:,"alt","/Alt~<\str_use:N \l_@@_tmpa_str>"
+ )
+ }
+ }
},
alttext .meta:n = {alt=#1},
actualtext .code:n = % Alt property
{
- \str_set_convert:Noon
- \l_@@_tmpa_str
- { #1 }
- { default }
- { utf16/hex }
- \tl_put_right:Nn \l_@@_mc_key_properties_tl { /Alt~< }
- \tl_put_right:No \l_@@_mc_key_properties_tl { \l_@@_tmpa_str>~ }
- \lua_now:e
+ \tl_if_empty:oF{#1}
{
- ltx.@@.func.store_mc_data
- (
- \@@_get_mc_abs_cnt:,
- "actualtext",
- "/ActualText~<\str_use:N \l_@@_tmpa_str>"
- )
- }
+ \str_set_convert:Noon
+ \l_@@_tmpa_str
+ { #1 }
+ { default }
+ { utf16/hex }
+ \tl_put_right:Nn \l_@@_mc_key_properties_tl { /Alt~< }
+ \tl_put_right:No \l_@@_mc_key_properties_tl { \l_@@_tmpa_str>~ }
+ \lua_now:e
+ {
+ ltx.@@.func.store_mc_data
+ (
+ \@@_get_mc_abs_cnt:,
+ "actualtext",
+ "/ActualText~<\str_use:N \l_@@_tmpa_str>"
+ )
+ }
+ }
},
label .code:n =
{
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 300eb1ee3b1..fb2dcb19961 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.98e, released 2023-03-07}
+% \date{Version 0.98f, released 2023-04-24}
% \maketitle
% \begin{documentation}
% \section{Public Commands}
@@ -144,14 +144,14 @@
% \begin{function}{alt (mc-key)}
% This key inserts an \texttt{/Alt} value in the property dictionary of the BDC operator.
% The value is handled as verbatim string, commands are not expanded.
-% The value will be expanded first once.
+% The value will be expanded first once. If it is empty, nothing will happen.
% \end{function}
%
% \begin{function}{actualtext (mc-key)}
% This key inserts an \texttt{/ActualText} value in the property dictionary
% of the BDC operator. The value is handled as verbatim string,
% commands are not expanded.
-% The value will be expanded first once.
+% The value will be expanded first once. If it is empty, nothing will happen.
% \end{function}
%
% \begin{function}{label (mc-key)}
@@ -174,7 +174,7 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-mc-code-shared} {2023-03-07} {0.98e}
+\ProvidesExplPackage {tagpdf-mc-code-shared} {2023-04-24} {0.98f}
{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 07598ca1484..89216c5f881 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.98e, released 2023-03-07}
+% \date{Version 0.98f, released 2023-04-24}
% \maketitle
% \begin{documentation}
% \begin{function}
@@ -98,7 +98,7 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-roles-code} {2023-03-07} {0.98e}
+\ProvidesExplPackage {tagpdf-roles-code} {2023-04-24} {0.98f}
{part of tagpdf - code related to roles and structure names}
%</header>
% \end{macrocode}
@@ -476,18 +476,19 @@
% 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{macro}{\@@_role_get:nnNN}
% \begin{macrocode}
\pdf_version_compare:NnT < {2.0}
{
- \cs_new:Npn \@@_role_get:nnN #1#2#3
+ \cs_new:Npn \@@_role_get:nnNN #1#2#3#4 %#1 tag, #2 NS, #3 tlvar which hold the role tag #4 empty
{
\prop_get:NnNF \g_@@_role_rolemap_prop {#1}#3
{
- \tl_set:Nn #3 {#1}
+ \tl_set:Nn #3 {#1}
}
+ \tl_set:Nn #4 {}
}
- \cs_generate_variant:Nn \@@_role_get:nnN {VVN}
+ \cs_generate_variant:Nn \@@_role_get:nnNN {VVNN}
}
% \end{macrocode}
@@ -548,21 +549,26 @@
% 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{macro}{\@@_role_get:nnNN}
% \begin{macrocode}
\pdf_version_compare:NnF < {2.0}
{
- \cs_new:Npn \@@_role_get:nnN #1#2#3
+ \cs_new:Npn \@@_role_get:nnNN #1#2#3#4
+ %#1 tag, #2 NS,
+ %#3 tlvar which hold the role tag
+ %#4 tlvar which hold the name of the target NS
{
- \prop_get:cnNTF {g_@@_role_NS_#2_prop} {#1}\l_@@_get_tmpc_tl
+ \prop_get:cnNTF {g_@@_role_NS_#2_prop} {#1}\l_@@_tmpa_tl
{
- \tl_set:Nx #3 {\exp_last_unbraced:NV\use_i:nn \l_@@_get_tmpc_tl}
+ \tl_set:Nx #3 {\exp_last_unbraced:NV\use_i:nn \l_@@_tmpa_tl}
+ \tl_set:Nx #4 {\exp_last_unbraced:NV\use_ii:nn \l_@@_tmpa_tl}
}
{
\tl_set:Nn #3 {#1}
+ \tl_set:Nn #4 {#2}
}
}
- \cs_generate_variant:Nn \@@_role_get:nnN {VVN}
+ \cs_generate_variant:Nn \@@_role_get:nnNN {VVNN}
}
% \end{macrocode}
% \end{macro}
@@ -857,26 +863,22 @@
%
% \subsubsection{Retrieving the parent-child rule}
%
-% \begin{macro}{\l_@@_role_real_parent_tl}
-% Part, Div and NonStruct have no own rules, instead
-% the parent(s) have to be inspected. To store this real parent
-% we use this tlvar
-% \begin{macrocode}
-\tl_new:N \l_@@_role_real_parent_tl
-% \end{macrocode}
-% \end{macro}
%
-% \begin{macro}{\@@_role_get_parent_child_rule:nnN}
+% \begin{macro}{\@@_role_get_parent_child_rule:nnnN}
% This command retrieves the rule (as a number) and stores it in the tl-var.
+% It assumes that the tag in \#1 is a standard tag after role mapping
+% for which a rule exist and is \emph{not} one of Part, Div, NonStruct
+% as the real parent has already been identified.
+% \#3 can be used to pass along data about the original tags
+% and is only used in messages.
+%
% TODO check temporary variables. Check if the tl-var should be fix.
-% The arguments should be standard tags for which a rule exist and
-% role mapping should have already be done.
% \begin{macrocode}
\tl_new:N \l_@@_parent_child_check_tl
-\cs_new_protected:Npn \@@_role_get_parent_child_rule:nnN #1 #2 #3
- % #1 parent (string) #2 child (string) #3 tl for state
- {
- \tl_set:Nn \l_@@_role_real_parent_tl {#1}
+\cs_new_protected:Npn \@@_role_get_parent_child_rule:nnnN #1 #2 #3 #4
+ % #1 parent (string) #2 child (string) #3 text for messages (eg. about Div or Rolemapping)
+ % #4 tl for state
+ {
% \end{macrocode}
%
% \begin{macrocode}
@@ -889,40 +891,24 @@
% \end{macrocode}
% Get the rule from the intarray
% \begin{macrocode}
- \tl_set:Nx#3
+ \tl_set:Nx#4
{
\intarray_item:Nn
\g_@@_role_parent_child_intarray
{\l_@@_tmpa_tl\l_@@_tmpb_tl}
}
% \end{macrocode}
-% If the state is ‡ we have to check the parents from the stack and
-% use the first which is not Part, Div or NonStruct
+% If the state is ‡ something is wrong ...
% \begin{macrocode}
\int_compare:nNnT
- {#3} = {\prop_item:Nn\c_@@_role_rules_prop{‡}}
- {
- \seq_set_eq:NN \l_@@_role_tmpa_seq \g_@@_struct_tag_stack_seq
+ {#4} = {\prop_item:Nn\c_@@_role_rules_prop{‡}}
+ {
+ %warn ?
% \end{macrocode}
% we must take the current child from the stack if is already there,
% depending on location the check is called, this could also remove the
% parent, but that is ok too.
% \begin{macrocode}
- \seq_pop_left:NN \l_@@_role_tmpa_seq\l_@@_get_tmpc_tl
- \seq_map_inline:Nn\l_@@_role_tmpa_seq
- {
- \tl_set:Nx\l_@@_tmpa_tl { \use_ii:nn ##1 }
- \exp_args:Nne
- \str_if_in:nnF {-Part-Div-NonStruct-}{-\l_@@_tmpa_tl-}
- {
- \tl_set:Nn\l_@@_role_real_parent_tl {##1}
- \int_zero:N\l_@@_tmpa_int
- \exp_args:NV
- \@@_role_get_parent_child_rule:nnN \l_@@_tmpa_tl{#2}#3
- \int_set:Nn\l_@@_tmpa_int{1}
- \seq_map_break:
- }
- }
}
% \end{macrocode}
% This is the message, this can perhaps go into debug mode.
@@ -930,7 +916,7 @@
\group_begin:
\int_compare:nNnT {\l_@@_tmpa_int*\l_@@_loglevel_int} > { 0 }
{
- \prop_get:NVNF\c_@@_role_rules_num_prop #3 \l_@@_tmpa_tl
+ \prop_get:NVNF\c_@@_role_rules_num_prop #4 \l_@@_tmpa_tl
{
\tl_set:Nn \l_@@_tmpa_tl {unknown}
}
@@ -938,43 +924,18 @@
\msg_note:nnxxx
{ tag }
{ role-parent-child }
- { #1
- \tl_if_eq:NNTF\l_@@_tmpb_tl\l_@@_role_real_parent_tl
- {
- \bool_lazy_and:nnT
- {
- \prop_if_in_p:Nn \l_@@_role_debug_prop {parent}
- }
- {
- !\str_if_eq_p:ee {#1}{\prop_item:Nn\l_@@_role_debug_prop {parent}}
- }
- {
- \c_space_tl (from~\prop_item:Nn\l_@@_role_debug_prop {parent})
- }
- }
- {
- \c_space_tl(inherited~from~\l_@@_role_real_parent_tl)
- }
- }
+ { #1 }
+ { #2 }
{
- #2
- \bool_lazy_and:nnT
- {
- \prop_if_in_p:Nn \l_@@_role_debug_prop {child}
- }
- {
- !\str_if_eq_p:ee {#2}{\prop_item:Nn\l_@@_role_debug_prop {child}}
- }
- {
- \c_space_tl (from~\prop_item:Nn\l_@@_role_debug_prop {child})
- }
- }
- { '#3~(\l_@@_tmpa_tl)' }
+ #4~(='\l_@@_tmpa_tl')
+ \iow_newline:
+ #3
+ }
}
\group_end:
}
{
- \tl_set:Nn#3 {0}
+ \tl_set:Nn#4 {0}
\msg_warning:nnxxx
{ tag }
{role-parent-child}
@@ -983,13 +944,15 @@
{ unknown! }
}
}
-\cs_generate_variant:Nn\@@_role_get_parent_child_rule:nnN {VVN}
+\cs_generate_variant:Nn\@@_role_get_parent_child_rule:nnnN {VVVN,VVnN}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{@@_check_parent_child:nnnnN}
-% This is the main command.
-% It has to retrieve the standard tags for a comparison.
+% This commands translates rolemaps its arguments and then
+% calls \cs{@@_role_get_parent_child_rule:nnnN}.
+% It does not try to resolve inheritation of \texttt{Div} etc but
+% instead warns that the rule can not be detected in this case.
% In pdf 2.0 the name spaces of the tags are relevant, so we
% have arguments for them, but in pdf <2.0 they are ignored and can
% be left empty.
@@ -997,6 +960,7 @@
\pdf_version_compare:NnTF < {2.0}
{
\cs_new_protected:Npn \@@_check_parent_child:nnnnN #1 #2 #3 #4 #5
+ %#1 parent tag,#2 NS, #3 child tag, #4 NS, #5 tl var
{
% \end{macrocode}
% for debugging messages we store the arguments.
@@ -1037,7 +1001,10 @@
{ ! \quark_if_no_value_p:N \l_@@_tmpa_tl }
{ ! \quark_if_no_value_p:N \l_@@_tmpb_tl }
{
- \@@_role_get_parent_child_rule:VVN \l_@@_tmpa_tl \l_@@_tmpb_tl #5
+ \@@_role_get_parent_child_rule:VVnN
+ \l_@@_tmpa_tl \l_@@_tmpb_tl
+ {Rolemapped~from:~'#1'~-->~'#3'}
+ #5
}
{
\tl_set:Nn #5 {0}
@@ -1148,7 +1115,10 @@
{ ! \quark_if_no_value_p:N \l_@@_tmpa_tl }
{ ! \quark_if_no_value_p:N \l_@@_tmpb_tl }
{
- \@@_role_get_parent_child_rule:VVN \l_@@_tmpa_tl \l_@@_tmpb_tl #5
+ \@@_role_get_parent_child_rule:VVnN
+ \l_@@_tmpa_tl \l_@@_tmpb_tl
+ {Rolemapped~from~'#1/#2'~-->~'#3\str_if_empty:nF{#4}{/#4}'}
+ #5
}
{
\tl_set:Nn #5 {0}
@@ -1174,7 +1144,7 @@
\prg_set_protected_conditional:Npnn \tag_check_child:nn #1 #2 {T,F,TF}
{
\seq_get:NN\g_@@_struct_stack_seq\l_@@_tmpa_tl
- \@@_struct_get_tag_info:eNN
+ \@@_struct_get_parentrole:eNN
{\l_@@_tmpa_tl}
\l_@@_get_parent_tmpa_tl
\l_@@_get_parent_tmpb_tl
diff --git a/Master/texmf-dist/source/latex/tagpdf/tagpdf-space.dtx b/Master/texmf-dist/source/latex/tagpdf/tagpdf-space.dtx
index bbcb91bff19..946887b06b6 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.98e, released 2023-03-07}
+% \date{Version 0.98f, released 2023-04-24}
% \maketitle
% \begin{documentation}
% \begin{function}{interwordspace (setup-key)}
@@ -64,7 +64,7 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-space-code} {2023-03-07} {0.98e}
+\ProvidesExplPackage {tagpdf-space-code} {2023-04-24} {0.98f}
{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 796ecf34e49..6d4d14fb89f 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.98e, released 2023-03-07}
+% \date{Version 0.98f, released 2023-04-24}
% \maketitle
% \begin{documentation}
% \section{Public Commands}
@@ -152,12 +152,12 @@
% \begin{function}{alt (struct-key)}
% This key inserts an \texttt{/Alt} value in the dictionary of structure object.
% The value is handled as verbatim string and hex encoded.
-% The value will be expanded first once.
+% The value will be expanded first once. If it is empty, nothing will happen.
% \end{function}
% \begin{function}{actualtext (struct-key)}
% This key inserts an \texttt{/ActualText} value in the dictionary of structure object.
% The value is handled as verbatim string and hex encoded.
-% The value will be expanded first once.
+% The value will be expanded first once. If it is empty, nothing will happen.
% \end{function}
% \begin{function}{lang (struct-key)}
% This key allows to set the language for a structure element. The value should be a bcp-identifier,
@@ -247,7 +247,7 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-struct-code} {2023-03-07} {0.98e}
+\ProvidesExplPackage {tagpdf-struct-code} {2023-04-24} {0.98f}
{part of tagpdf - code related to storing structure}
%</header>
% \end{macrocode}
@@ -393,11 +393,16 @@
% \end{variable}
%
% \subsection{Variables used by the keys}
-% \begin{variable}{\g_@@_struct_tag_tl,\g_@@_struct_tag_NS_tl}
+% \begin{variable}{\g_@@_struct_tag_tl,\g_@@_struct_tag_NS_tl,
+% \l_@@_struct_roletag_tl,\g_@@_struct_roletag_NS_tl}
% Use by the tag key to store the tag and the namespace.
+% The role tag variables will hold locally rolemapping info needed
+% for the parent-child checks
% \begin{macrocode}
\tl_new:N \g_@@_struct_tag_tl
\tl_new:N \g_@@_struct_tag_NS_tl
+\tl_new:N \l_@@_struct_roletag_tl
+\tl_new:N \l_@@_struct_roletag_NS_tl
% \end{macrocode}
% \end{variable}
% \begin{variable}{\l_@@_struct_key_label_tl}
@@ -501,6 +506,16 @@
{ S }
{ \pdf_name_from_unicode_e:n {StructTreeRoot} }
+\@@_prop_gput:cnx
+ { g_@@_struct_0_prop }
+ { rolemap }
+ { {StructTreeRoot}{pdf} }
+
+\@@_prop_gput:cnx
+ { g_@@_struct_0_prop }
+ { parentrole }
+ { {StructTreeRoot}{pdf} }
+
\prop_gput:Nnn \g_@@_struct_tag_NS_prop {0}{{StructTreeRoot}{pdf}}
% \end{macrocode}
% Namespaces are pdf 2.0 but it doesn't harm
@@ -571,13 +586,17 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\@@_struct_get_tag_info:nNN}
-% We also need a way to get the tag info back from parent structures.
+% \begin{macro}{\@@_struct_get_parentrole:nNN}
+% We also need a way to get the tag info needed for parent child
+% check from parent structures.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_struct_get_tag_info:nNN #1 #2 #3
+\cs_new_protected:Npn \@@_struct_get_parentrole:nNN #1 #2 #3
%#1 struct num, #2 tlvar for tag , #3 tlvar for NS
{
- \prop_get:NnNTF \g_@@_struct_tag_NS_prop {#1}\l_@@_get_tmpc_tl
+ \prop_get:cnNTF
+ { g_@@_struct_#1_prop }
+ { parentrole }
+ \l_@@_get_tmpc_tl
{
\tl_set:Nx #2{\exp_last_unbraced:NV\use_i:nn \l_@@_get_tmpc_tl}
\tl_set:Nx #3{\exp_last_unbraced:NV\use_ii:nn \l_@@_get_tmpc_tl}
@@ -587,7 +606,7 @@
\tl_clear:N#3
}
}
-\cs_generate_variant:Nn\@@_struct_get_tag_info:nNN {eNN}
+\cs_generate_variant:Nn\@@_struct_get_parentrole:nNN {eNN}
% \end{macrocode}
% \end{macro}
% \subsection{Handlings kids}
@@ -1022,28 +1041,34 @@
},
alt .code:n = % Alt property
{
- \str_set_convert:Noon
- \l_@@_tmpa_str
- { #1 }
- { default }
- { utf16/hex }
- \@@_prop_gput:cnx
- { g_@@_struct_\int_eval:n {\c@g_@@_struct_abs_int}_prop }
- { Alt }
- { <\l_@@_tmpa_str> }
+ \tl_if_empty:oF{#1}
+ {
+ \str_set_convert:Noon
+ \l_@@_tmpa_str
+ { #1 }
+ { default }
+ { utf16/hex }
+ \@@_prop_gput:cnx
+ { g_@@_struct_\int_eval:n {\c@g_@@_struct_abs_int}_prop }
+ { Alt }
+ { <\l_@@_tmpa_str> }
+ }
},
alttext .meta:n = {alt=#1},
actualtext .code:n = % ActualText property
{
- \str_set_convert:Noon
- \l_@@_tmpa_str
- { #1 }
- { default }
- { utf16/hex }
- \@@_prop_gput:cnx
- { g_@@_struct_\int_eval:n {\c@g_@@_struct_abs_int}_prop }
- { ActualText }
- { <\l_@@_tmpa_str>}
+ \tl_if_empty:oF{#1}
+ {
+ \str_set_convert:Noon
+ \l_@@_tmpa_str
+ { #1 }
+ { default }
+ { utf16/hex }
+ \@@_prop_gput:cnx
+ { g_@@_struct_\int_eval:n {\c@g_@@_struct_abs_int}_prop }
+ { ActualText }
+ { <\l_@@_tmpa_str>}
+ }
},
lang .code:n = % Lang property
{
@@ -1306,12 +1331,57 @@
}
}
\seq_gpush:NV \g_@@_struct_stack_seq \c@g_@@_struct_abs_int
- \@@_role_get:VVN
+ \@@_role_get:VVNN
\g_@@_struct_tag_tl
\g_@@_struct_tag_NS_tl
- \l_@@_get_tmpc_tl
+ \l_@@_struct_roletag_tl
+ \l_@@_struct_roletag_NS_tl
+% \end{macrocode}
+% to target role and role NS
+% \begin{macrocode}
+ \@@_prop_gput:cnx
+ { g_@@_struct_\int_eval:n {\c@g_@@_struct_abs_int}_prop }
+ { rolemap }
+ {
+ {\l_@@_struct_roletag_tl}{\l_@@_struct_roletag_NS_tl}
+ }
+% \end{macrocode}
+% we also store which role to use for parent/child test. If the role is
+% one of Part, Div, NonStruct we have to retrieve it from the parent.
+% If the structure is stashed, this must be updated!
+% \begin{macrocode}
+ \str_case:VnTF \l_@@_struct_roletag_tl
+ {
+ {Part} {}
+ {Div} {}
+ {NonStruct} {}
+ }
+ {
+ \prop_get:cnNT
+ { g_@@_struct_ \l_@@_struct_stack_parent_tmpa_tl _prop }
+ { parentrole }
+ \l_@@_get_tmpc_tl
+ {
+ \@@_prop_gput:cno
+ { g_@@_struct_\int_eval:n {\c@g_@@_struct_abs_int}_prop }
+ { parentrole }
+ {
+ \l_@@_get_tmpc_tl
+ }
+ }
+ }
+ {
+ \@@_prop_gput:cnx
+ { g_@@_struct_\int_eval:n {\c@g_@@_struct_abs_int}_prop }
+ { parentrole }
+ {
+ {\l_@@_struct_roletag_tl}{\l_@@_struct_roletag_NS_tl}
+ }
+ }
+% \end{macrocode}
+% \begin{macrocode}
\seq_gpush:Nx \g_@@_struct_tag_stack_seq
- {{\g_@@_struct_tag_tl}{\l_@@_get_tmpc_tl}}
+ {{\g_@@_struct_tag_tl}{\l_@@_struct_roletag_tl}}
\tl_gset:NV \g_@@_struct_stack_current_tl \c@g_@@_struct_abs_int
%\seq_show:N \g_@@_struct_stack_seq
\bool_if:NF
@@ -1322,7 +1392,7 @@
% if the structure is actually used here, so it is guarded by the stash boolean.
% For now we ignore the namespace!
% \begin{macrocode}
- \@@_struct_get_tag_info:eNN
+ \@@_struct_get_parentrole:eNN
{\l_@@_struct_stack_parent_tmpa_tl}
\l_@@_get_parent_tmpa_tl
\l_@@_get_parent_tmpb_tl
@@ -1334,12 +1404,19 @@
\l_@@_parent_child_check_tl
\int_compare:nNnT {\l_@@_parent_child_check_tl}<0
{
+ \prop_get:cnN
+ { g_@@_struct_ \l_@@_struct_stack_parent_tmpa_tl _prop}
+ {S}
+ \l_@@_tmpa_tl
\msg_warning:nnxxx
{ tag }
{role-parent-child}
{ \l_@@_get_parent_tmpa_tl/\l_@@_get_parent_tmpb_tl }
{ \g_@@_struct_tag_tl/\g_@@_struct_tag_NS_tl }
- { not~allowed~(struct~\g_@@_struct_stack_current_tl) }
+ { not~allowed~
+ (struct~\l_@@_struct_stack_parent_tmpa_tl,~\l_@@_tmpa_tl
+ \c_space_tl-->~struct~\int_eval:n {\c@g_@@_struct_abs_int})
+ }
\cs_set_eq:NN \l_@@_role_remap_tag_tl \g_@@_struct_tag_tl
\cs_set_eq:NN \l_@@_role_remap_NS_tl \g_@@_struct_tag_NS_tl
\@@_role_remap:
@@ -1445,7 +1522,7 @@
% tag info for the child, while the data for the parent is in
% the global tl-vars:
% \begin{macrocode}
- \@@_struct_get_tag_info:eNN
+ \@@_struct_get_parentrole:eNN
{\__tag_ref_value:enn{tagpdfstruct-#1}{tagstruct}{0}}
\l_@@_tmpa_tl
\l_@@_tmpb_tl
@@ -1566,7 +1643,7 @@
% \section{Attributes and attribute classes}
% \begin{macrocode}
%<*header>
-\ProvidesExplPackage {tagpdf-attr-code} {2023-03-07} {0.98e}
+\ProvidesExplPackage {tagpdf-attr-code} {2023-04-24} {0.98f}
{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 c682386fc22..4692689ff31 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.98e, released 2023-03-07}
+% \date{Version 0.98f, released 2023-04-24}
% \maketitle
% \begin{implementation}
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-tree-code} {2023-03-07} {0.98e}
+\ProvidesExplPackage {tagpdf-tree-code} {2023-04-24} {0.98f}
{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 5b1534be044..9df99ecda23 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.98e, released 2023-03-07}
+% \date{Version 0.98f, released 2023-04-24}
% \maketitle
% \begin{documentation}
% \section{Setup commands}
@@ -250,7 +250,7 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-user} {2023-03-07} {0.98e}
+\ProvidesExplPackage {tagpdf-user} {2023-04-24} {0.98f}
{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 ab81e9573a2..0ce62a89844 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} {2023-03-07} {0.98e}
+\ProvidesExplPackage {tagpdf} {2023-04-24} {0.98f}
{ A package to experiment with pdf tagging }
\bool_if:nF
@@ -118,7 +118,7 @@
% \end{macrocode}
%<*debug>
% \begin{macrocode}
-\ProvidesExplPackage {tagpdf-debug} {2023-03-07} {0.98e}
+\ProvidesExplPackage {tagpdf-debug} {2023-04-24} {0.98f}
{ debug code for tagpdf }
\@ifpackageloaded{tagpdf}{}{\PackageWarning{tagpdf-debug}{tagpdf~not~loaded,~quitting}\endinput}
% \end{macrocode}
@@ -141,7 +141,7 @@
% we define a base package with dummy functions
% \begin{macrocode}
%<*base>
-\ProvidesExplPackage {tagpdf-base} {2023-03-07} {0.98e}
+\ProvidesExplPackage {tagpdf-base} {2023-04-24} {0.98f}
{part of tagpdf - provide base, no-op versions of the user commands }
%</base>
% \end{macrocode}