summaryrefslogtreecommitdiff
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
parente171c7dd42a02b488d853c3efe0c895d3c4836d5 (diff)
tagpdf (25apr23)
git-svn-id: svn://tug.org/texlive/trunk@66937 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/tagpdf/README.md4
-rw-r--r--Master/texmf-dist/doc/latex/tagpdf/tagpdf-code.pdfbin1544550 -> 1547941 bytes
-rw-r--r--Master/texmf-dist/doc/latex/tagpdf/tagpdf-code.tex2
-rw-r--r--Master/texmf-dist/doc/latex/tagpdf/tagpdf.pdfbin1001257 -> 1002803 bytes
-rw-r--r--Master/texmf-dist/doc/latex/tagpdf/tagpdf.tex91
-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
-rw-r--r--Master/texmf-dist/tex/latex/tagpdf/tagpdf-base.sty2
-rw-r--r--Master/texmf-dist/tex/latex/tagpdf/tagpdf-debug-generic.sty27
-rw-r--r--Master/texmf-dist/tex/latex/tagpdf/tagpdf-debug.sty54
-rw-r--r--Master/texmf-dist/tex/latex/tagpdf/tagpdf-luatex.def2
-rw-r--r--Master/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-generic.sty44
-rw-r--r--Master/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-lua.sty90
-rw-r--r--Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex-book.def2
-rw-r--r--Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex-inline.def2
-rw-r--r--Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex.def2
-rw-r--r--Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-mathml.def384
-rw-r--r--Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-pdf.def4
-rw-r--r--Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-pdf2.def2
-rw-r--r--Master/texmf-dist/tex/latex/tagpdf/tagpdf-parent-child-2.csv2
-rw-r--r--Master/texmf-dist/tex/latex/tagpdf/tagpdf-parent-child.csv2
-rw-r--r--Master/texmf-dist/tex/latex/tagpdf/tagpdf.lua4
-rw-r--r--Master/texmf-dist/tex/latex/tagpdf/tagpdf.sty221
-rw-r--r--Master/texmf-dist/tex/latex/tagpdf/tagpdfdocu-patches.sty137
34 files changed, 1119 insertions, 832 deletions
diff --git a/Master/texmf-dist/doc/latex/tagpdf/README.md b/Master/texmf-dist/doc/latex/tagpdf/README.md
index 7b3f9c74a63..334b394fcb2 100644
--- a/Master/texmf-dist/doc/latex/tagpdf/README.md
+++ b/Master/texmf-dist/doc/latex/tagpdf/README.md
@@ -1,6 +1,6 @@
#tagpdf — A package to create tagged pdf
-Packageversion: 0.98e
-Packagedate: 2023/03/07
+Packageversion: 0.98f
+Packagedate: 2023/04/24
Author: Ulrike Fischer
## License
diff --git a/Master/texmf-dist/doc/latex/tagpdf/tagpdf-code.pdf b/Master/texmf-dist/doc/latex/tagpdf/tagpdf-code.pdf
index 9d2b42fe9cf..f37e06b89a1 100644
--- a/Master/texmf-dist/doc/latex/tagpdf/tagpdf-code.pdf
+++ b/Master/texmf-dist/doc/latex/tagpdf/tagpdf-code.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/tagpdf/tagpdf-code.tex b/Master/texmf-dist/doc/latex/tagpdf/tagpdf-code.tex
index 9e71bc1eff9..700a5388124 100644
--- a/Master/texmf-dist/doc/latex/tagpdf/tagpdf-code.tex
+++ b/Master/texmf-dist/doc/latex/tagpdf/tagpdf-code.tex
@@ -23,7 +23,7 @@
for those people who are interested.
\fi
-\DocumentMetadata{}
+\DocumentMetadata{testphase=new-OR}
\documentclass{l3doc}
% The next line is needed so that \GetFileInfo will be able to pick up
diff --git a/Master/texmf-dist/doc/latex/tagpdf/tagpdf.pdf b/Master/texmf-dist/doc/latex/tagpdf/tagpdf.pdf
index 3ae1de58e9d..169a7cbb425 100644
--- a/Master/texmf-dist/doc/latex/tagpdf/tagpdf.pdf
+++ b/Master/texmf-dist/doc/latex/tagpdf/tagpdf.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/tagpdf/tagpdf.tex b/Master/texmf-dist/doc/latex/tagpdf/tagpdf.tex
index 2fe592b0b5c..89b0c73b0ec 100644
--- a/Master/texmf-dist/doc/latex/tagpdf/tagpdf.tex
+++ b/Master/texmf-dist/doc/latex/tagpdf/tagpdf.tex
@@ -10,13 +10,13 @@
\DocumentMetadata
{
% comment the following line to compile an untagged documentation:
- testphase=phase-III,
+ testphase=phase-III,testphase=graphics,
pdfversion=2.0,lang=en-UK,pdfstandard=a-4,
}
\DebugBlocksOff
\makeatletter
-\def\UlrikeFischer@package@version{0.98e}
-\def\UlrikeFischer@package@date{2023-03-07}
+\def\UlrikeFischer@package@version{0.98f}
+\def\UlrikeFischer@package@date{2023-04-24}
\makeatother
\documentclass[DIV=12,parskip=half-,bibliography=totoc,a4paper]{article}
@@ -527,28 +527,17 @@ But even if the documentation passed the tests of the validators: as mentioned
Be aware that to create the tagged version a current lualatex-dev and a current version of the pdfmanagment-testphase package is needed.
\end{tcolorbox}
-\tagpdfparaOff
-\tagstructbegin{tag=Figure,alt=PAC 3
-report,attribute=bbox}\tagmcbegin{tag=Figure}
-\includegraphics{pac3}
-\tagmcend\tagstructend
+\includegraphics[alt=PAC 3 report]{pac3}
-\tagpdfparaOn
\begin{figure}
-\tagpdfparaOff
-\tagstructbegin{tag=Figure,alt={Adobe report},attribute=bbox}%
-\tagmcbegin{}%
-\includegraphics{acrobat}
-\tagmcend
+\includegraphics[alt={Screenshot of Adobe report}]{acrobat}
-\tagstructbegin{tag=Caption}\tagmcbegin{}\caption{Adobe Acrobat complaining
-about the \texttt{Lbl} use}\label{fig:adobe} \tagmcend\tagstructend
-\tagstructend
+\caption{Adobe Acrobat complaining
+about the \texttt{Lbl} use}\label{fig:adobe}\par
-\tagpdfparaOn
\end{figure}
@@ -827,9 +816,9 @@ To tag a \PDF{} three tasks must be carried out:
\end{tcolorbox}
-\tagstructbegin{tag=Caption}\tagmcbegin{tag=Caption} \caption{Schematical
+\caption{Schematical
description of the relation between marked content in the page stream and the
-structure} \tagmcend\tagstructend
+structure}
\end{figure}
@@ -1091,7 +1080,13 @@ The key-val list understands the following keys:
\texttt{tagpdf-}.
\item[\PrintKeyName{alt}]
- This key inserts an \texttt{/Alt} value in the property dictionary of the BDC operator. See section~\ref{sec:alt}. The value is handled as verbatim string, commands are not expanded but the value will be expanded first once (so works like the key \texttt{alttext-o} in previous versions which has been removed).
+ This key inserts an \texttt{/Alt} value in the property dictionary
+ of the BDC operator. See section~\ref{sec:alt}.
+ The value is handled as verbatim string, commands are
+ not expanded but the value will be expanded first once (so works like
+ the key \texttt{alttext-o} in previous versions which has been
+ removed). If the value is empty, nothing will happen.
+
That means that you can do something like in the following listing
and it will insert \verb+\frac{a}{b}+ (hex encoded) in the \PDF{}.
@@ -1108,7 +1103,7 @@ The key-val list understands the following keys:
section~\ref{sec:alt}. The value is handled as verbatim string,
commands are not expanded but the value will be expanded first once
(so works like the key \texttt{actualtext-o} in previous versions
- which has been removed).
+ which has been removed). If the value is empty, nothing will happen.
That means that you can do something like in the following listing and
and it will insert \verb+X+ (hex encoded) in the \PDF{}.
@@ -1121,7 +1116,9 @@ The key-val list understands the following keys:
According to the PDF reference, \texttt{/ActualText} should only be used
on marked content sequence of type Span. This is not enforced by the code
- currently.
+ currently. There is also some discussion going on, if
+ \texttt{/ActualText} can actually be used in a MC dictionary or if it
+ should be in a separate BDC-operator.
\item[\PrintKeyName{raw}] This key allows you to add more entries to the
@@ -1141,25 +1138,6 @@ the command, as the effect of the begin command ends with a new
\verb+\tagmcbegin+ anyway.
-% no longer relevant
-%\begin{tcolorbox}[before upper=\tagpdfparaOn]
-%\minisec{About nesting mc-commands}\label{mc-nesting}
-%
-%\textbf{Attention!}\sidenote{luamode} As mentioned above in luamode it is often possible to omit the \verb+\tagmcend+ command. This basically means that mc-chunks can be nested. But be aware that this can have surprising side effects on the order in the structure.
-%
-%Consider a code like this:
-%
-%
-%\begin{taglstlisting}
-%\tagmcbegin{tag=P} Block 1 {\tagmcbegin{tag=P} Block 2} Block 3 \tagmcend
-%\end{taglstlisting}
-%
-%
-%Block 3 will here get the same id number as Block 1 and be stored in the structure \emph{before} Block 2. The \PDF{} will record the chunks in the order \texttt{Block 1 -- Block 3 -- Block 2}. See also section~\ref{sec:global-local}.
-%
-%\end{tcolorbox}
-
-
\begin{docCommand}[nosep]{tagmcuse}{}\end{docCommand}
\begin{docCommand}{tag_mc_use:n}{}\end{docCommand}
@@ -1258,12 +1236,7 @@ and added as chunk to the document structure. The header and the background code
the \emph{second} page will be marked as artifact. The following figure shows how the tags looks
like.
-\tagpdfparaOff
-\tagstructbegin{tag=Figure,alt=Show tags of examples,attribute=bbox}\tagmcbegin{tag=Figure}
-\includegraphics{global-ex}
-\tagmcend\tagstructend
-
-\tagpdfparaOn
+\includegraphics[alt=Show tags of examples]{global-ex}
It is therefore from now on important to correctly markup such code. Header and footer typically should be
artifacts. The LaTeX kernel hasn't yet suitable hooks around header and footer to allow to automate
@@ -1300,9 +1273,7 @@ the needed code.
\ExplSyntaxOff
\tagmcend\tagstructend
-\tagstructbegin{tag=Caption}\tagmcbegin{tag=Caption}
\caption{Structure needed for a link annotation}\label{fig:linkannot}
-\tagmcend\tagstructend
\end{figure}
@@ -1635,8 +1606,14 @@ The key-val list understands the following keys:
a label on the parent structure and then use
\cs{ref\_value:nn}\verb+{tagpdfstruct-label}{tagstruct}+ to retrieve it.
- \item[\PrintKeyName{alt}]
- This key inserts an \texttt{/Alt} value in the dictionary of structure object, see section~\ref{sec:alt}. The value is handled as verbatim string and hex encoded. The value will be expanded first once (so works like the key \texttt{alttext-o} in previous versions which has been removed). That means that you can do something like this:
+ \item[\PrintKeyName{alt}] This key inserts an \texttt{/Alt} value in the
+ dictionary of structure object, see section~\ref{sec:alt}. The value
+ is handled as verbatim string and hex encoded. The value will be
+ expanded first once (so works like the key \texttt{alttext-o} in
+ previous versions which has been removed). If the value is empty,
+ nothing will happen.
+
+ That means that you can do something like this:
\begin{taglstlisting}
@@ -1650,8 +1627,14 @@ The key-val list understands the following keys:
expanded protect it e.g. with a \verb+\empty+.
- \item[\PrintKeyName{actualtext}]
- This key inserts an \texttt{/ActualText} value in the dictionary of structure object, see section~\ref{sec:alt}. The value is handled as verbatim string, The value will be expanded first once (so works like the key \texttt{alttext-o} in previous versions which has been removed). That means that you can do something like this:
+ \item[\PrintKeyName{actualtext}] This key inserts an \texttt{/ActualText}
+ value in the dictionary of structure object, see
+ section~\ref{sec:alt}. The value is handled as verbatim string. The
+ value will be expanded first once (so works like the key
+ \texttt{alttext-o} in previous versions which has been removed). If
+ the value is empty, nothing will happen.
+
+ That means that you can do something like this:
\begin{taglstlisting}
\newcommand\myactualtext{X}
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}
diff --git a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-base.sty b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-base.sty
index 93139afe872..57fc9d01928 100644
--- a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-base.sty
+++ b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-base.sty
@@ -25,7 +25,7 @@
%% and all files in that bundle must be distributed together.
%%
%% File: tagpdf.dtx
-\ProvidesExplPackage {tagpdf-base} {2023-03-07} {0.98e}
+\ProvidesExplPackage {tagpdf-base} {2023-04-24} {0.98f}
{part of tagpdf - provide base, no-op versions of the user commands }
\AddToHook{begindocument}
{
diff --git a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-debug-generic.sty b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-debug-generic.sty
index bbd7ce6bc32..ac3026f9df7 100644
--- a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-debug-generic.sty
+++ b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-debug-generic.sty
@@ -19,7 +19,7 @@
%% and all files in that bundle must be distributed together.
%%
%% File: tagpdf-mc-generic.dtx
-\ProvidesExplPackage {tagpdf-debug-generic} {2023-03-07} {0.98e}
+\ProvidesExplPackage {tagpdf-debug-generic} {2023-04-24} {0.98f}
{part of tagpdf - debugging code related to marking chunks - generic mode}
\cs_set_protected:Npn \tag_mc_begin:n #1 %#1 keyval
{
@@ -51,22 +51,29 @@
}
\bool_if:NF \l__tag_mc_key_stash_bool
{
- \exp_args:NV\__tag_struct_get_tag_info:nNN
+ \exp_args:NV\__tag_struct_get_parentrole:nNN
\g__tag_struct_stack_current_tl
- \l__tag_tmpa_tl
- \l__tag_tmpb_tl
+ \l__tag_get_parent_tmpa_tl
+ \l__tag_get_parent_tmpb_tl
\__tag_check_parent_child:VVnnN
- \l__tag_tmpa_tl \l__tag_tmpb_tl
- {MC}{}
- \l__tag_parent_child_check_tl
+ \l__tag_get_parent_tmpa_tl
+ \l__tag_get_parent_tmpb_tl
+ {MC}{}
+ \l__tag_parent_child_check_tl
\int_compare:nNnT {\l__tag_parent_child_check_tl}<{0}
{
+ \prop_get:cnN
+ { g__tag_struct_ \g__tag_struct_stack_current_tl _prop}
+ {S}
+ \l__tag_tmpa_tl
\msg_warning:nnxxx
{ tag }
{role-parent-child}
- { \g__tag_struct_tag_tl/\g__tag_struct_tag_NS_tl }
- { MC~(=~real content) }
- { 'not~allowed'. }
+ { \l__tag_get_parent_tmpa_tl/\l__tag_get_parent_tmpb_tl }
+ { MC~(real content) }
+ { not~allowed~
+ (struct~\g__tag_struct_stack_current_tl,~\l__tag_tmpa_tl)
+ }
}
\__tag_mc_handle_stash:x { \int_use:N \c@g__tag_MCID_abs_int }
}
diff --git a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-debug.sty b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-debug.sty
index 0e1b80d35c2..4a258a39660 100644
--- a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-debug.sty
+++ b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-debug.sty
@@ -26,7 +26,7 @@
%% and all files in that bundle must be distributed together.
%%
%% File: tagpdf.dtx
-\ProvidesExplPackage {tagpdf-debug} {2023-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}
\prop_gput:Nnn \g_msg_module_type_prop { tag / debug} {}
@@ -181,18 +181,53 @@
}
}
\seq_gpush:NV \g__tag_struct_stack_seq \c@g__tag_struct_abs_int
- \__tag_role_get:VVN
+ \__tag_role_get:VVNN
\g__tag_struct_tag_tl
\g__tag_struct_tag_NS_tl
- \l__tag_get_tmpc_tl
+ \l__tag_struct_roletag_tl
+ \l__tag_struct_roletag_NS_tl
+ \__tag_prop_gput:cnx
+ { g__tag_struct_\int_eval:n {\c@g__tag_struct_abs_int}_prop }
+ { rolemap }
+ {
+ {\l__tag_struct_roletag_tl}{\l__tag_struct_roletag_NS_tl}
+ }
+ \str_case:VnTF \l__tag_struct_roletag_tl
+ {
+ {Part} {}
+ {Div} {}
+ {NonStruct} {}
+ }
+ {
+ \prop_get:cnNT
+ { g__tag_struct_ \l__tag_struct_stack_parent_tmpa_tl _prop }
+ { parentrole }
+ \l__tag_get_tmpc_tl
+ {
+ \__tag_prop_gput:cno
+ { g__tag_struct_\int_eval:n {\c@g__tag_struct_abs_int}_prop }
+ { parentrole }
+ {
+ \l__tag_get_tmpc_tl
+ }
+ }
+ }
+ {
+ \__tag_prop_gput:cnx
+ { g__tag_struct_\int_eval:n {\c@g__tag_struct_abs_int}_prop }
+ { parentrole }
+ {
+ {\l__tag_struct_roletag_tl}{\l__tag_struct_roletag_NS_tl}
+ }
+ }
\seq_gpush:Nx \g__tag_struct_tag_stack_seq
- {{\g__tag_struct_tag_tl}{\l__tag_get_tmpc_tl}}
+ {{\g__tag_struct_tag_tl}{\l__tag_struct_roletag_tl}}
\tl_gset:NV \g__tag_struct_stack_current_tl \c@g__tag_struct_abs_int
%\seq_show:N \g__tag_struct_stack_seq
\bool_if:NF
\l__tag_struct_elem_stash_bool
{
- \__tag_struct_get_tag_info:eNN
+ \__tag_struct_get_parentrole:eNN
{\l__tag_struct_stack_parent_tmpa_tl}
\l__tag_get_parent_tmpa_tl
\l__tag_get_parent_tmpb_tl
@@ -204,12 +239,19 @@
\l__tag_parent_child_check_tl
\int_compare:nNnT {\l__tag_parent_child_check_tl}<0
{
+ \prop_get:cnN
+ { g__tag_struct_ \l__tag_struct_stack_parent_tmpa_tl _prop}
+ {S}
+ \l__tag_tmpa_tl
\msg_warning:nnxxx
{ tag }
{role-parent-child}
{ \l__tag_get_parent_tmpa_tl/\l__tag_get_parent_tmpb_tl }
{ \g__tag_struct_tag_tl/\g__tag_struct_tag_NS_tl }
- { not~allowed~(struct~\g__tag_struct_stack_current_tl) }
+ { not~allowed~
+ (struct~\l__tag_struct_stack_parent_tmpa_tl,~\l__tag_tmpa_tl
+ \c_space_tl-->~struct~\int_eval:n {\c@g__tag_struct_abs_int})
+ }
\cs_set_eq:NN \l__tag_role_remap_tag_tl \g__tag_struct_tag_tl
\cs_set_eq:NN \l__tag_role_remap_NS_tl \g__tag_struct_tag_NS_tl
\__tag_role_remap:
diff --git a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-luatex.def b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-luatex.def
index cbc9edbe798..ecc291c4db9 100644
--- a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-luatex.def
+++ b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-luatex.def
@@ -19,7 +19,7 @@
%% and all files in that bundle must be distributed together.
%%
%% File: tagpdf-backend.dtx
-\ProvidesExplFile {tagpdf-luatex.def} {2023-03-07} {0.98e}
+\ProvidesExplFile {tagpdf-luatex.def} {2023-04-24} {0.98f}
{tagpdf~driver~for~luatex}
{
\fontencoding{TU}\fontfamily{lmr}\fontseries{m}\fontshape{n}\fontsize{10pt}{10pt}\selectfont
diff --git a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-generic.sty b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-generic.sty
index 2323af69fe8..48ad371d341 100644
--- a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-generic.sty
+++ b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-generic.sty
@@ -19,7 +19,7 @@
%% and all files in that bundle must be distributed together.
%%
%% File: tagpdf-mc-generic.dtx
-\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}
\__tag_prop_new:N \g__tag_MCID_byabspage_prop
@@ -361,22 +361,29 @@
}
\bool_if:NF \l__tag_mc_key_stash_bool
{
- \exp_args:NV\__tag_struct_get_tag_info:nNN
+ \exp_args:NV\__tag_struct_get_parentrole:nNN
\g__tag_struct_stack_current_tl
- \l__tag_tmpa_tl
- \l__tag_tmpb_tl
+ \l__tag_get_parent_tmpa_tl
+ \l__tag_get_parent_tmpb_tl
\__tag_check_parent_child:VVnnN
- \l__tag_tmpa_tl \l__tag_tmpb_tl
- {MC}{}
- \l__tag_parent_child_check_tl
+ \l__tag_get_parent_tmpa_tl
+ \l__tag_get_parent_tmpb_tl
+ {MC}{}
+ \l__tag_parent_child_check_tl
\int_compare:nNnT {\l__tag_parent_child_check_tl}<{0}
{
+ \prop_get:cnN
+ { g__tag_struct_ \g__tag_struct_stack_current_tl _prop}
+ {S}
+ \l__tag_tmpa_tl
\msg_warning:nnxxx
{ tag }
{role-parent-child}
- { \g__tag_struct_tag_tl/\g__tag_struct_tag_NS_tl }
- { MC~(=~real content) }
- { 'not~allowed'. }
+ { \l__tag_get_parent_tmpa_tl/\l__tag_get_parent_tmpb_tl }
+ { MC~(real content) }
+ { not~allowed~
+ (struct~\g__tag_struct_stack_current_tl,~\l__tag_tmpa_tl)
+ }
}
\__tag_mc_handle_stash:x { \int_use:N \c@g__tag_MCID_abs_int }
}
@@ -420,13 +427,16 @@
alttext .meta:n = {alt=#1},
actualtext .code:n = % ActualText property
{
- \str_set_convert:Noon
- \l__tag_tmpa_str
- { #1 }
- { default }
- { utf16/hex }
- \tl_put_right:Nn \l__tag_mc_key_properties_tl { /ActualText~< }
- \tl_put_right:No \l__tag_mc_key_properties_tl { \l__tag_tmpa_str>~ }
+ \tl_if_empty:oF{#1}
+ {
+ \str_set_convert:Noon
+ \l__tag_tmpa_str
+ { #1 }
+ { default }
+ { utf16/hex }
+ \tl_put_right:Nn \l__tag_mc_key_properties_tl { /ActualText~< }
+ \tl_put_right:No \l__tag_mc_key_properties_tl { \l__tag_tmpa_str>~ }
+ }
},
label .tl_set:N = \l__tag_mc_key_label_tl,
artifact .code:n =
diff --git a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-lua.sty b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-lua.sty
index 16fd28a6d1a..f7645eaad5d 100644
--- a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-lua.sty
+++ b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-lua.sty
@@ -19,7 +19,7 @@
%% and all files in that bundle must be distributed together.
%%
%% File: tagpdf-mc-luacode.dtx
-\ProvidesExplPackage {tagpdf-mc-code-lua} {2023-03-07} {0.98e}
+\ProvidesExplPackage {tagpdf-mc-code-lua} {2023-04-24} {0.98f}
{tagpdf - mc code only for the luamode }
\hook_gput_code:nnn{begindocument}{tagpdf/mc}
{
@@ -199,22 +199,30 @@
% if not stashed record the absolute number
\bool_if:NF \l__tag_mc_key_stash_bool
{
- \exp_args:NV\__tag_struct_get_tag_info:nNN
- \g__tag_struct_stack_current_tl
- \l__tag_tmpa_tl
- \l__tag_tmpb_tl
+ \exp_args:NV\__tag_struct_get_parentrole:nNN
+ \g__tag_struct_stack_current_tl
+ \l__tag_get_parent_tmpa_tl
+ \l__tag_get_parent_tmpb_tl
\__tag_check_parent_child:VVnnN
- \l__tag_tmpa_tl \l__tag_tmpb_tl
- {MC}{}
- \l__tag_parent_child_check_tl
+ \l__tag_get_parent_tmpa_tl
+ \l__tag_get_parent_tmpb_tl
+ {MC}{}
+ \l__tag_parent_child_check_tl
\int_compare:nNnT {\l__tag_parent_child_check_tl}<{0}
{
+ \prop_get:cnN
+ { g__tag_struct_ \g__tag_struct_stack_current_tl _prop}
+ {S}
+ \l__tag_tmpa_tl
\msg_warning:nnxxx
{ tag }
{role-parent-child}
- { \g__tag_struct_tag_tl/\g__tag_struct_tag_NS_tl }
- { MC~(=~real content) }
- { 'not~allowed'. }
+ { \l__tag_get_parent_tmpa_tl/\l__tag_get_parent_tmpb_tl }
+ { MC~(real content) }
+ {
+ not~allowed~
+ (struct~\g__tag_struct_stack_current_tl,~\l__tag_tmpa_tl)
+ }
}
\__tag_mc_handle_stash:x { \__tag_get_mc_abs_cnt: }
}
@@ -257,39 +265,45 @@
},
alt .code:n = % Alt property
{
- \str_set_convert:Noon
- \l__tag_tmpa_str
- { #1 }
- { default }
- { utf16/hex }
- \tl_put_right:Nn \l__tag_mc_key_properties_tl { /Alt~< }
- \tl_put_right:No \l__tag_mc_key_properties_tl { \l__tag_tmpa_str>~ }
- \lua_now:e
+ \tl_if_empty:oF{#1}
{
- ltx.__tag.func.store_mc_data
- (
- \__tag_get_mc_abs_cnt:,"alt","/Alt~<\str_use:N \l__tag_tmpa_str>"
- )
- }
+ \str_set_convert:Noon
+ \l__tag_tmpa_str
+ { #1 }
+ { default }
+ { utf16/hex }
+ \tl_put_right:Nn \l__tag_mc_key_properties_tl { /Alt~< }
+ \tl_put_right:No \l__tag_mc_key_properties_tl { \l__tag_tmpa_str>~ }
+ \lua_now:e
+ {
+ ltx.__tag.func.store_mc_data
+ (
+ \__tag_get_mc_abs_cnt:,"alt","/Alt~<\str_use:N \l__tag_tmpa_str>"
+ )
+ }
+ }
},
alttext .meta:n = {alt=#1},
actualtext .code:n = % Alt property
{
- \str_set_convert:Noon
- \l__tag_tmpa_str
- { #1 }
- { default }
- { utf16/hex }
- \tl_put_right:Nn \l__tag_mc_key_properties_tl { /Alt~< }
- \tl_put_right:No \l__tag_mc_key_properties_tl { \l__tag_tmpa_str>~ }
- \lua_now:e
+ \tl_if_empty:oF{#1}
{
- ltx.__tag.func.store_mc_data
- (
- \__tag_get_mc_abs_cnt:,
- "actualtext",
- "/ActualText~<\str_use:N \l__tag_tmpa_str>"
- )
+ \str_set_convert:Noon
+ \l__tag_tmpa_str
+ { #1 }
+ { default }
+ { utf16/hex }
+ \tl_put_right:Nn \l__tag_mc_key_properties_tl { /Alt~< }
+ \tl_put_right:No \l__tag_mc_key_properties_tl { \l__tag_tmpa_str>~ }
+ \lua_now:e
+ {
+ ltx.__tag.func.store_mc_data
+ (
+ \__tag_get_mc_abs_cnt:,
+ "actualtext",
+ "/ActualText~<\str_use:N \l__tag_tmpa_str>"
+ )
+ }
}
},
label .code:n =
diff --git a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex-book.def b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex-book.def
index 3f5f86e580e..774b4a2c36b 100644
--- a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex-book.def
+++ b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex-book.def
@@ -19,7 +19,7 @@
%% and all files in that bundle must be distributed together.
%%
%% File: tagpdf-data.dtx
-%% \ProvidesExplFile {tagpdf-ns-latex-book.def} {2023-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,
diff --git a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex-inline.def b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex-inline.def
index d930a8f97f7..62db669318a 100644
--- a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex-inline.def
+++ b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex-inline.def
@@ -19,7 +19,7 @@
%% and all files in that bundle must be distributed together.
%%
%% File: tagpdf-data.dtx
-%% \ProvidesExplFile {tagpdf-ns-latex-inline.def} {2023-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,
diff --git a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex.def b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex.def
index 7ef10a4bd28..7906edb242c 100644
--- a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex.def
+++ b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex.def
@@ -19,7 +19,7 @@
%% and all files in that bundle must be distributed together.
%%
%% File: tagpdf-data.dtx
-%% \ProvidesExplFile {tagpdf-ns-latex.def} {2023-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,
diff --git a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-mathml.def b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-mathml.def
index 0f04fbbdc04..c61dbab28f3 100644
--- a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-mathml.def
+++ b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-mathml.def
@@ -19,198 +19,198 @@
%% and all files in that bundle must be distributed together.
%%
%% File: tagpdf-data.dtx
-%% \ProvidesExplFile {tagpdf-ns-mathml.def} {2023-03-07} {0.98e}
-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,,,
+%% \ProvidesExplFile {tagpdf-ns-mathml.def} {2023-04-24} {0.98f}
+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,
%%
%%
%% End of file `tagpdf-ns-mathml.def'.
diff --git a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-pdf.def b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-pdf.def
index 7c99f3115aa..5d15b54ad6c 100644
--- a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-pdf.def
+++ b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-pdf.def
@@ -19,7 +19,7 @@
%% and all files in that bundle must be distributed together.
%%
%% File: tagpdf-data.dtx
-%% \ProvidesExplFile {tagpdf-ns-pdf.def} {2023-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,
@@ -59,7 +59,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,
diff --git a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-pdf2.def b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-pdf2.def
index 2edcec9a0ca..723d532d561 100644
--- a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-pdf2.def
+++ b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-pdf2.def
@@ -19,7 +19,7 @@
%% and all files in that bundle must be distributed together.
%%
%% File: tagpdf-data.dtx
-%% \ProvidesExplFile {tagpdf-ns-pdf2.def} {2023-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,
diff --git a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-parent-child-2.csv b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-parent-child-2.csv
index 12b6780f0fe..75a37b33127 100644
--- a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-parent-child-2.csv
+++ b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-parent-child-2.csv
@@ -19,7 +19,7 @@
%% and all files in that bundle must be distributed together.
%%
%% File: tagpdf-data.dtx
-%% \ProvidesExplFile {tagpdf-parent-child-2.csv} {2023-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/tex/latex/tagpdf/tagpdf-parent-child.csv b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-parent-child.csv
index 2312c16a1c2..cebd7efb5b7 100644
--- a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-parent-child.csv
+++ b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-parent-child.csv
@@ -19,7 +19,7 @@
%% and all files in that bundle must be distributed together.
%%
%% File: tagpdf-data.dtx
-%% \ProvidesExplFile {tagpdf-parent-child.csv} {2023-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,∅,∅
diff --git a/Master/texmf-dist/tex/latex/tagpdf/tagpdf.lua b/Master/texmf-dist/tex/latex/tagpdf/tagpdf.lua
index 5e75b67eb3d..9caf5ef2d45 100644
--- a/Master/texmf-dist/tex/latex/tagpdf/tagpdf.lua
+++ b/Master/texmf-dist/tex/latex/tagpdf/tagpdf.lua
@@ -24,8 +24,8 @@
local ProvidesLuaModule = {
name = "tagpdf",
- version = "0.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/tex/latex/tagpdf/tagpdf.sty b/Master/texmf-dist/tex/latex/tagpdf/tagpdf.sty
index 048f96beee2..a67db861360 100644
--- a/Master/texmf-dist/tex/latex/tagpdf/tagpdf.sty
+++ b/Master/texmf-dist/tex/latex/tagpdf/tagpdf.sty
@@ -28,7 +28,7 @@
%% and all files in that bundle must be distributed together.
%%
%% File: tagpdf.dtx
-\ProvidesExplPackage {tagpdf} {2023-03-07} {0.98e}
+\ProvidesExplPackage {tagpdf} {2023-04-24} {0.98f}
{ A package to experiment with pdf tagging }
\bool_if:nF
@@ -303,7 +303,7 @@
\msg_new:nnn { tag } {role-unknown} { role~#1~is~not~known }
\msg_new:nnn { tag } {role-unknown-tag} { tag~#1~is~not~known }
\msg_new:nnn { tag } {role-parent-child}
- { The~rule~between~parent~'#1'~\\and~child~'#2'~is~#3}
+ { Rule~'#1'~-->~'#2'~is~#3}
\msg_new:nnn { tag } {role-remapping}
{ remapping~tag~to~#1 }
\msg_new:nnn { tag } {role-tag} { mapping~tag~#1~to~role~#2 }
@@ -1229,14 +1229,15 @@
\cs_generate_variant:Nn \__tag_role_add_tag:nn {VV,ne}
\pdf_version_compare:NnT < {2.0}
{
- \cs_new:Npn \__tag_role_get:nnN #1#2#3
+ \cs_new:Npn \__tag_role_get:nnNN #1#2#3#4 %#1 tag, #2 NS, #3 tlvar which hold the role tag #4 empty
{
\prop_get:NnNF \g__tag_role_rolemap_prop {#1}#3
{
\tl_set:Nn #3 {#1}
}
+ \tl_set:Nn #4 {}
}
- \cs_generate_variant:Nn \__tag_role_get:nnN {VVN}
+ \cs_generate_variant:Nn \__tag_role_get:nnNN {VVNN}
}
\cs_new_protected:Nn \__tag_role_add_tag:nnnn %tag/namespace/role/namespace
@@ -1279,17 +1280,22 @@
\cs_generate_variant:Nn \__tag_role_add_tag:nnnn {VVVV}
\pdf_version_compare:NnF < {2.0}
{
- \cs_new:Npn \__tag_role_get:nnN #1#2#3
+ \cs_new:Npn \__tag_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__tag_role_NS_#2_prop} {#1}\l__tag_get_tmpc_tl
+ \prop_get:cnNTF {g__tag_role_NS_#2_prop} {#1}\l__tag_tmpa_tl
{
- \tl_set:Nx #3 {\exp_last_unbraced:NV\use_i:nn \l__tag_get_tmpc_tl}
+ \tl_set:Nx #3 {\exp_last_unbraced:NV\use_i:nn \l__tag_tmpa_tl}
+ \tl_set:Nx #4 {\exp_last_unbraced:NV\use_ii:nn \l__tag_tmpa_tl}
}
{
\tl_set:Nn #3 {#1}
+ \tl_set:Nn #4 {#2}
}
}
- \cs_generate_variant:Nn \__tag_role_get:nnN {VVN}
+ \cs_generate_variant:Nn \__tag_role_get:nnNN {VVNN}
}
\bool_new:N\l__tag_role_update_bool
@@ -1479,48 +1485,32 @@
}
\prop_gput:NnV\g__tag_role_index_prop{math}\l__tag_tmpb_tl
}
-\tl_new:N \l__tag_role_real_parent_tl
\tl_new:N \l__tag_parent_child_check_tl
-\cs_new_protected:Npn \__tag_role_get_parent_child_rule:nnN #1 #2 #3
- % #1 parent (string) #2 child (string) #3 tl for state
+\cs_new_protected:Npn \__tag_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
{
- \tl_set:Nn \l__tag_role_real_parent_tl {#1}
\prop_get:NnN \g__tag_role_index_prop{#1}\l__tag_tmpa_tl
\prop_get:NnN \g__tag_role_index_prop{#2}\l__tag_tmpb_tl
\bool_lazy_and:nnTF
{ ! \quark_if_no_value_p:N \l__tag_tmpa_tl }
{ ! \quark_if_no_value_p:N \l__tag_tmpb_tl }
{
- \tl_set:Nx#3
+ \tl_set:Nx#4
{
\intarray_item:Nn
\g__tag_role_parent_child_intarray
{\l__tag_tmpa_tl\l__tag_tmpb_tl}
}
\int_compare:nNnT
- {#3} = {\prop_item:Nn\c__tag_role_rules_prop{‡}}
+ {#4} = {\prop_item:Nn\c__tag_role_rules_prop{‡}}
{
- \seq_set_eq:NN \l__tag_role_tmpa_seq \g__tag_struct_tag_stack_seq
- \seq_pop_left:NN \l__tag_role_tmpa_seq\l__tag_get_tmpc_tl
- \seq_map_inline:Nn\l__tag_role_tmpa_seq
- {
- \tl_set:Nx\l__tag_tmpa_tl { \use_ii:nn ##1 }
- \exp_args:Nne
- \str_if_in:nnF {-Part-Div-NonStruct-}{-\l__tag_tmpa_tl-}
- {
- \tl_set:Nn\l__tag_role_real_parent_tl {##1}
- \int_zero:N\l__tag_tmpa_int
- \exp_args:NV
- \__tag_role_get_parent_child_rule:nnN \l__tag_tmpa_tl{#2}#3
- \int_set:Nn\l__tag_tmpa_int{1}
- \seq_map_break:
- }
- }
+ %warn ?
}
\group_begin:
\int_compare:nNnT {\l__tag_tmpa_int*\l__tag_loglevel_int} > { 0 }
{
- \prop_get:NVNF\c__tag_role_rules_num_prop #3 \l__tag_tmpa_tl
+ \prop_get:NVNF\c__tag_role_rules_num_prop #4 \l__tag_tmpa_tl
{
\tl_set:Nn \l__tag_tmpa_tl {unknown}
}
@@ -1528,43 +1518,18 @@
\msg_note:nnxxx
{ tag }
{ role-parent-child }
- { #1
- \tl_if_eq:NNTF\l__tag_tmpb_tl\l__tag_role_real_parent_tl
- {
- \bool_lazy_and:nnT
- {
- \prop_if_in_p:Nn \l__tag_role_debug_prop {parent}
- }
- {
- !\str_if_eq_p:ee {#1}{\prop_item:Nn\l__tag_role_debug_prop {parent}}
- }
- {
- \c_space_tl (from~\prop_item:Nn\l__tag_role_debug_prop {parent})
- }
- }
- {
- \c_space_tl(inherited~from~\l__tag_role_real_parent_tl)
- }
- }
+ { #1 }
+ { #2 }
{
- #2
- \bool_lazy_and:nnT
- {
- \prop_if_in_p:Nn \l__tag_role_debug_prop {child}
- }
- {
- !\str_if_eq_p:ee {#2}{\prop_item:Nn\l__tag_role_debug_prop {child}}
- }
- {
- \c_space_tl (from~\prop_item:Nn\l__tag_role_debug_prop {child})
- }
+ #4~(='\l__tag_tmpa_tl')
+ \iow_newline:
+ #3
}
- { '#3~(\l__tag_tmpa_tl)' }
}
\group_end:
}
{
- \tl_set:Nn#3 {0}
+ \tl_set:Nn#4 {0}
\msg_warning:nnxxx
{ tag }
{role-parent-child}
@@ -1573,10 +1538,11 @@
{ unknown! }
}
}
-\cs_generate_variant:Nn\__tag_role_get_parent_child_rule:nnN {VVN}
+\cs_generate_variant:Nn\__tag_role_get_parent_child_rule:nnnN {VVVN,VVnN}
\pdf_version_compare:NnTF < {2.0}
{
\cs_new_protected:Npn \__tag_check_parent_child:nnnnN #1 #2 #3 #4 #5
+ %#1 parent tag,#2 NS, #3 child tag, #4 NS, #5 tl var
{
\prop_put:Nnn \l__tag_role_debug_prop {parent} {#1}
\prop_put:Nnn \l__tag_role_debug_prop {child} {#3}
@@ -1604,7 +1570,10 @@
{ ! \quark_if_no_value_p:N \l__tag_tmpa_tl }
{ ! \quark_if_no_value_p:N \l__tag_tmpb_tl }
{
- \__tag_role_get_parent_child_rule:VVN \l__tag_tmpa_tl \l__tag_tmpb_tl #5
+ \__tag_role_get_parent_child_rule:VVnN
+ \l__tag_tmpa_tl \l__tag_tmpb_tl
+ {Rolemapped~from:~'#1'~-->~'#3'}
+ #5
}
{
\tl_set:Nn #5 {0}
@@ -1694,7 +1663,10 @@
{ ! \quark_if_no_value_p:N \l__tag_tmpa_tl }
{ ! \quark_if_no_value_p:N \l__tag_tmpb_tl }
{
- \__tag_role_get_parent_child_rule:VVN \l__tag_tmpa_tl \l__tag_tmpb_tl #5
+ \__tag_role_get_parent_child_rule:VVnN
+ \l__tag_tmpa_tl \l__tag_tmpb_tl
+ {Rolemapped~from~'#1/#2'~-->~'#3\str_if_empty:nF{#4}{/#4}'}
+ #5
}
{
\tl_set:Nn #5 {0}
@@ -1712,7 +1684,7 @@
\prg_set_protected_conditional:Npnn \tag_check_child:nn #1 #2 {T,F,TF}
{
\seq_get:NN\g__tag_struct_stack_seq\l__tag_tmpa_tl
- \__tag_struct_get_tag_info:eNN
+ \__tag_struct_get_parentrole:eNN
{\l__tag_tmpa_tl}
\l__tag_get_parent_tmpa_tl
\l__tag_get_parent_tmpb_tl
@@ -1870,6 +1842,8 @@
}
\tl_new:N \g__tag_struct_tag_tl
\tl_new:N \g__tag_struct_tag_NS_tl
+\tl_new:N \l__tag_struct_roletag_tl
+\tl_new:N \l__tag_struct_roletag_NS_tl
\tl_new:N \l__tag_struct_key_label_tl
\bool_new:N \l__tag_struct_elem_stash_bool
\prop_new:N \g__tag_struct_ref_by_dest_prop
@@ -1906,6 +1880,16 @@
{ S }
{ \pdf_name_from_unicode_e:n {StructTreeRoot} }
+\__tag_prop_gput:cnx
+ { g__tag_struct_0_prop }
+ { rolemap }
+ { {StructTreeRoot}{pdf} }
+
+\__tag_prop_gput:cnx
+ { g__tag_struct_0_prop }
+ { parentrole }
+ { {StructTreeRoot}{pdf} }
+
\prop_gput:Nnn \g__tag_struct_tag_NS_prop {0}{{StructTreeRoot}{pdf}}
\__tag_prop_gput:cnx
{ g__tag_struct_0_prop }
@@ -1952,10 +1936,13 @@
}
}
\cs_generate_variant:Nn \__tag_struct_set_tag_info:nnn {eVV}
-\cs_new_protected:Npn \__tag_struct_get_tag_info:nNN #1 #2 #3
+\cs_new_protected:Npn \__tag_struct_get_parentrole:nNN #1 #2 #3
%#1 struct num, #2 tlvar for tag , #3 tlvar for NS
{
- \prop_get:NnNTF \g__tag_struct_tag_NS_prop {#1}\l__tag_get_tmpc_tl
+ \prop_get:cnNTF
+ { g__tag_struct_#1_prop }
+ { parentrole }
+ \l__tag_get_tmpc_tl
{
\tl_set:Nx #2{\exp_last_unbraced:NV\use_i:nn \l__tag_get_tmpc_tl}
\tl_set:Nx #3{\exp_last_unbraced:NV\use_ii:nn \l__tag_get_tmpc_tl}
@@ -1965,7 +1952,7 @@
\tl_clear:N#3
}
}
-\cs_generate_variant:Nn\__tag_struct_get_tag_info:nNN {eNN}
+\cs_generate_variant:Nn\__tag_struct_get_parentrole:nNN {eNN}
\cs_new:Npn \__tag_struct_mcid_dict:n #1 %#1 MCID absnum
{
<<
@@ -2243,28 +2230,34 @@
},
alt .code:n = % Alt property
{
- \str_set_convert:Noon
- \l__tag_tmpa_str
- { #1 }
- { default }
- { utf16/hex }
- \__tag_prop_gput:cnx
- { g__tag_struct_\int_eval:n {\c@g__tag_struct_abs_int}_prop }
- { Alt }
- { <\l__tag_tmpa_str> }
+ \tl_if_empty:oF{#1}
+ {
+ \str_set_convert:Noon
+ \l__tag_tmpa_str
+ { #1 }
+ { default }
+ { utf16/hex }
+ \__tag_prop_gput:cnx
+ { g__tag_struct_\int_eval:n {\c@g__tag_struct_abs_int}_prop }
+ { Alt }
+ { <\l__tag_tmpa_str> }
+ }
},
alttext .meta:n = {alt=#1},
actualtext .code:n = % ActualText property
{
- \str_set_convert:Noon
- \l__tag_tmpa_str
- { #1 }
- { default }
- { utf16/hex }
- \__tag_prop_gput:cnx
- { g__tag_struct_\int_eval:n {\c@g__tag_struct_abs_int}_prop }
- { ActualText }
- { <\l__tag_tmpa_str>}
+ \tl_if_empty:oF{#1}
+ {
+ \str_set_convert:Noon
+ \l__tag_tmpa_str
+ { #1 }
+ { default }
+ { utf16/hex }
+ \__tag_prop_gput:cnx
+ { g__tag_struct_\int_eval:n {\c@g__tag_struct_abs_int}_prop }
+ { ActualText }
+ { <\l__tag_tmpa_str>}
+ }
},
lang .code:n = % Lang property
{
@@ -2473,18 +2466,53 @@
}
}
\seq_gpush:NV \g__tag_struct_stack_seq \c@g__tag_struct_abs_int
- \__tag_role_get:VVN
+ \__tag_role_get:VVNN
\g__tag_struct_tag_tl
\g__tag_struct_tag_NS_tl
- \l__tag_get_tmpc_tl
+ \l__tag_struct_roletag_tl
+ \l__tag_struct_roletag_NS_tl
+ \__tag_prop_gput:cnx
+ { g__tag_struct_\int_eval:n {\c@g__tag_struct_abs_int}_prop }
+ { rolemap }
+ {
+ {\l__tag_struct_roletag_tl}{\l__tag_struct_roletag_NS_tl}
+ }
+ \str_case:VnTF \l__tag_struct_roletag_tl
+ {
+ {Part} {}
+ {Div} {}
+ {NonStruct} {}
+ }
+ {
+ \prop_get:cnNT
+ { g__tag_struct_ \l__tag_struct_stack_parent_tmpa_tl _prop }
+ { parentrole }
+ \l__tag_get_tmpc_tl
+ {
+ \__tag_prop_gput:cno
+ { g__tag_struct_\int_eval:n {\c@g__tag_struct_abs_int}_prop }
+ { parentrole }
+ {
+ \l__tag_get_tmpc_tl
+ }
+ }
+ }
+ {
+ \__tag_prop_gput:cnx
+ { g__tag_struct_\int_eval:n {\c@g__tag_struct_abs_int}_prop }
+ { parentrole }
+ {
+ {\l__tag_struct_roletag_tl}{\l__tag_struct_roletag_NS_tl}
+ }
+ }
\seq_gpush:Nx \g__tag_struct_tag_stack_seq
- {{\g__tag_struct_tag_tl}{\l__tag_get_tmpc_tl}}
+ {{\g__tag_struct_tag_tl}{\l__tag_struct_roletag_tl}}
\tl_gset:NV \g__tag_struct_stack_current_tl \c@g__tag_struct_abs_int
%\seq_show:N \g__tag_struct_stack_seq
\bool_if:NF
\l__tag_struct_elem_stash_bool
{
- \__tag_struct_get_tag_info:eNN
+ \__tag_struct_get_parentrole:eNN
{\l__tag_struct_stack_parent_tmpa_tl}
\l__tag_get_parent_tmpa_tl
\l__tag_get_parent_tmpb_tl
@@ -2496,12 +2524,19 @@
\l__tag_parent_child_check_tl
\int_compare:nNnT {\l__tag_parent_child_check_tl}<0
{
+ \prop_get:cnN
+ { g__tag_struct_ \l__tag_struct_stack_parent_tmpa_tl _prop}
+ {S}
+ \l__tag_tmpa_tl
\msg_warning:nnxxx
{ tag }
{role-parent-child}
{ \l__tag_get_parent_tmpa_tl/\l__tag_get_parent_tmpb_tl }
{ \g__tag_struct_tag_tl/\g__tag_struct_tag_NS_tl }
- { not~allowed~(struct~\g__tag_struct_stack_current_tl) }
+ { not~allowed~
+ (struct~\l__tag_struct_stack_parent_tmpa_tl,~\l__tag_tmpa_tl
+ \c_space_tl-->~struct~\int_eval:n {\c@g__tag_struct_abs_int})
+ }
\cs_set_eq:NN \l__tag_role_remap_tag_tl \g__tag_struct_tag_tl
\cs_set_eq:NN \l__tag_role_remap_NS_tl \g__tag_struct_tag_NS_tl
\__tag_role_remap:
@@ -2583,7 +2618,7 @@
{
\pdf_object_ref:e { __tag/struct/\g__tag_struct_stack_current_tl }
}
- \__tag_struct_get_tag_info:eNN
+ \__tag_struct_get_parentrole:eNN
{\__tag_ref_value:enn{tagpdfstruct-#1}{tagstruct}{0}}
\l__tag_tmpa_tl
\l__tag_tmpb_tl
diff --git a/Master/texmf-dist/tex/latex/tagpdf/tagpdfdocu-patches.sty b/Master/texmf-dist/tex/latex/tagpdf/tagpdfdocu-patches.sty
index 2501381ded3..35900172678 100644
--- a/Master/texmf-dist/tex/latex/tagpdf/tagpdfdocu-patches.sty
+++ b/Master/texmf-dist/tex/latex/tagpdf/tagpdfdocu-patches.sty
@@ -1,5 +1,5 @@
%\RequirePackage[enable-debug]{expl3}[2018/06/14]
-\ProvidesExplPackage {tagpdfdocu-patches} {2023-03-07} {0.98e}
+\ProvidesExplPackage {tagpdfdocu-patches} {2023-04-24} {0.98f}
{patches/commands for the tagpdf documentation}
\RequirePackage{etoolbox,xpatch}
@@ -9,7 +9,7 @@
\DeclareRobustCommand\TeX{
\leavevmode
\tag_mc_end_push:
- \tag_struct_begin:n{tag=Span,alt=TeX,actualtext=TeX}
+ \tag_struct_begin:n{tag=Span,actualtext=TeX}
\tagmcbegin{}
T\kern-.1667em\lower.5ex\hbox{E}\kern-.05emX\@ %changed from -.125em
\tagmcend
@@ -18,7 +18,7 @@
\DeclareRobustCommand{\LaTeX}{
\leavevmode
\tag_mc_end_push:
- \tag_struct_begin:n{tag=Span,alt=LaTeX,actualtext=LaTeX}
+ \tag_struct_begin:n{tag=Span,actualtext=LaTeX}
\tagmcbegin{}
L\kern-.25em % %changed from -0.36em
\sbox\z@ T%
@@ -136,8 +136,6 @@
% no internal patches, but redefining begentry/finentry is not safe.
% better hook is needed.
-\newbibmacro*{begentry}{\tagstructbegin{tag=BibEntry}\tagmcbegin{}}
-\newbibmacro*{finentry}{\finentry\tagmcend\tagstructend}
\def\blx@endbibliography{%
\csuse{blx@endenv@\blx@theenv}%
@@ -162,8 +160,8 @@
\let\tagstructend\relax
}}{}
+%====== picture =======
-%====== pictures ========
% PAC3 complained that the BBox is missing, so we are cheating for now
% and add a fix size.
\tagpdfsetup
@@ -172,4 +170,131 @@
{bbox}{/O /Layout /BBox [0 0 100 100]}
}
+
+%====== floats ========
+
+\tagpdfsetup{add-new-tag=float/Div}
+\makeatletter
+\def\@xfloat #1[#2]{%
+ \@nodocument
+ \def \@captype {#1}%
+ \def \@fps {#2}%
+ \@onelevel@sanitize \@fps
+ \def \reserved@b {!}%
+ \ifx \reserved@b \@fps
+ \@fpsadddefault
+ \else
+ \ifx \@fps \@empty
+ \@fpsadddefault
+ \fi
+ \fi
+ \ifhmode
+ \@bsphack
+ \tagmcend%end P
+ \@floatpenalty -\@Mii
+ \else
+ \@floatpenalty-\@Miii
+ \fi
+ \ifinner
+ \@parmoderr\@floatpenalty\z@
+ \else
+ \@next\@currbox\@freelist
+ {%
+ \@tempcnta \sixt@@n
+ \expandafter \@tfor \expandafter \reserved@a
+ \expandafter :\expandafter =\@fps
+ \do
+ {%
+ \if \reserved@a h%
+ \ifodd \@tempcnta
+ \else
+ \advance \@tempcnta \@ne
+ \fi
+ \else\if \reserved@a t%
+ \@setfpsbit \tw@
+ \else\if \reserved@a b%
+ \@setfpsbit 4%
+ \else\if \reserved@a p%
+ \@setfpsbit 8%
+ \else\if \reserved@a !%
+ \ifnum \@tempcnta>15
+ \advance\@tempcnta -\sixt@@n\relax
+ \fi
+ \else
+ \@latex@error{Unknown float option `\reserved@a'}%
+ {Option `\reserved@a' ignored and `p' used.}%
+ \@setfpsbit 8%
+ \fi\fi\fi\fi\fi
+ }%
+ \@tempcntb \csname ftype@\@captype \endcsname
+ \multiply \@tempcntb \@xxxii
+ \advance \@tempcnta \@tempcntb
+ \global \count\@currbox \@tempcnta
+ }%
+ \@fltovf
+ \fi
+ \tagstructbegin{tag=float}%float
+ \edef\@current@float@struct{\csname tag_get:n\endcsname{struct_num}}%
+ \typeout{Float structure: \@current@float@struct}
+ \global \setbox\@currbox
+ \color@vbox
+ \normalcolor
+ \vbox \bgroup
+ \hsize\columnwidth
+ \@parboxrestore
+ \@floatboxreset
+}%
+
+\def\end@float{%
+ \@endfloatbox
+ \tagstructend %end div
+ \ifnum\@floatpenalty <\z@
+ \@largefloatcheck
+ \@cons\@currlist\@currbox
+ \ifnum\@floatpenalty <-\@Mii
+ \penalty -\@Miv
+ \@tempdima\prevdepth
+ \vbox{}%
+ \prevdepth\@tempdima
+ \penalty\@floatpenalty
+ \else
+ \vadjust{\penalty -\@Miv \vbox{}\penalty\@floatpenalty}\@Esphack
+ \tagmcbegin{tag=P}%restart P Safe here??
+ \fi
+ \fi
+}
+
+\ExplSyntaxOn
+\long\def\@makecaption#1#2{%
+ \vskip\abovecaptionskip
+ \tagtool{para=false}
+ \sbox\@tempboxa{#1:~#2}%
+ \tag_struct_begin:n{tag=Caption}
+ \ifdim \wd\@tempboxa >\hsize
+ \tag_struct_begin:n{tag=Lbl}
+ \tag_mc_begin:n{}
+ #1:~
+ \tag_mc_end:
+ \tag_struct_end:
+ \tag_mc_begin:n{}
+ #2\par
+ \tag_mc_end:
+ \else
+ \global \@minipagefalse
+ \hb@xt@\hsize{\hfil
+ \tag_struct_begin:n{tag=Lbl}
+ \tag_mc_begin:n{}
+ #1:~
+ \tag_mc_end:
+ \tag_struct_end:
+ \tag_mc_begin:n{}
+ #2\par
+ \tag_mc_end:\hfil}%
+ \fi
+ \tagstructend %caption
+ \vskip\belowcaptionskip}
+\ExplSyntaxOff
+
+
+
\endinput