texlive[66937] Master/texmf-dist: tagpdf (25apr23)

commits+karl at tug.org commits+karl at tug.org
Tue Apr 25 21:36:46 CEST 2023


Revision: 66937
          http://tug.org/svn/texlive?view=revision&revision=66937
Author:   karl
Date:     2023-04-25 21:36:46 +0200 (Tue, 25 Apr 2023)
Log Message:
-----------
tagpdf (25apr23)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/tagpdf/README.md
    trunk/Master/texmf-dist/doc/latex/tagpdf/tagpdf-code.pdf
    trunk/Master/texmf-dist/doc/latex/tagpdf/tagpdf-code.tex
    trunk/Master/texmf-dist/doc/latex/tagpdf/tagpdf.pdf
    trunk/Master/texmf-dist/doc/latex/tagpdf/tagpdf.tex
    trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-backend.dtx
    trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-checks.dtx
    trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-data.dtx
    trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-generic.dtx
    trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-luacode.dtx
    trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-shared.dtx
    trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-roles.dtx
    trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-space.dtx
    trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-struct.dtx
    trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-tree.dtx
    trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-user.dtx
    trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf.dtx
    trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-base.sty
    trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-debug-generic.sty
    trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-debug.sty
    trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-luatex.def
    trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-generic.sty
    trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-lua.sty
    trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex-book.def
    trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex-inline.def
    trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex.def
    trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-mathml.def
    trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-pdf.def
    trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-pdf2.def
    trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-parent-child-2.csv
    trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-parent-child.csv
    trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf.lua
    trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf.sty
    trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdfdocu-patches.sty

Modified: trunk/Master/texmf-dist/doc/latex/tagpdf/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tagpdf/README.md	2023-04-25 19:36:11 UTC (rev 66936)
+++ trunk/Master/texmf-dist/doc/latex/tagpdf/README.md	2023-04-25 19:36:46 UTC (rev 66937)
@@ -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

Modified: trunk/Master/texmf-dist/doc/latex/tagpdf/tagpdf-code.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/tagpdf/tagpdf-code.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tagpdf/tagpdf-code.tex	2023-04-25 19:36:11 UTC (rev 66936)
+++ trunk/Master/texmf-dist/doc/latex/tagpdf/tagpdf-code.tex	2023-04-25 19:36:46 UTC (rev 66937)
@@ -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

Modified: trunk/Master/texmf-dist/doc/latex/tagpdf/tagpdf.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/tagpdf/tagpdf.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tagpdf/tagpdf.tex	2023-04-25 19:36:11 UTC (rev 66936)
+++ trunk/Master/texmf-dist/doc/latex/tagpdf/tagpdf.tex	2023-04-25 19:36:46 UTC (rev 66937)
@@ -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 at package@version{0.98e}
-\def\UlrikeFischer at package@date{2023-03-07}
+\def\UlrikeFischer at package@version{0.98f}
+\def\UlrikeFischer at package@date{2023-04-24}
 \makeatother
 
 \documentclass[DIV=12,parskip=half-,bibliography=totoc,a4paper]{article}
@@ -527,28 +527,17 @@
 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 @@
 
 \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 @@
       \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 @@
       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 @@
 
   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 @@
 \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,13 +1236,8 @@
 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
+\includegraphics[alt=Show tags of examples]{global-ex}
 
-\tagpdfparaOn
-
 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
 this, but a first draft has been added with \pkg{pdfmanagement-testphase}. Starting with version 0.92
@@ -1300,9 +1273,7 @@
 \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 @@
    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 @@
    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}

Modified: trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-backend.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-backend.dtx	2023-04-25 19:36:11 UTC (rev 66936)
+++ trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-backend.dtx	2023-04-25 19:36:46 UTC (rev 66937)
@@ -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"
 }

Modified: trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-checks.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-checks.dtx	2023-04-25 19:36:11 UTC (rev 66936)
+++ trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-checks.dtx	2023-04-25 19:36:46 UTC (rev 66937)
@@ -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}

Modified: trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-data.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-data.dtx	2023-04-25 19:36:11 UTC (rev 66936)
+++ trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-data.dtx	2023-04-25 19:36:46 UTC (rev 66937)
@@ -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 @@
 % 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 @@
 % 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 @@
 % \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 @@
 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 @@
 % \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 @@
 % \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 @@
 % 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 @@
 % 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,∅

Modified: trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-generic.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-generic.dtx	2023-04-25 19:36:11 UTC (rev 66936)
+++ trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-generic.dtx	2023-04-25 19:36:46 UTC (rev 66937)
@@ -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 at 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       =

Modified: trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-luacode.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-luacode.dtx	2023-04-25 19:36:11 UTC (rev 66936)
+++ trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-luacode.dtx	2023-04-25 19:36:46 UTC (rev 66937)
@@ -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 =
       {

Modified: trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-shared.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-shared.dtx	2023-04-25 19:36:11 UTC (rev 66936)
+++ trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-shared.dtx	2023-04-25 19:36:46 UTC (rev 66937)
@@ -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,7 +144,7 @@
 % \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)}
@@ -151,7 +151,7 @@
 %  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>

Modified: trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-roles.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-roles.dtx	2023-04-25 19:36:11 UTC (rev 66936)
+++ trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-roles.dtx	2023-04-25 19:36:46 UTC (rev 66937)
@@ -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,7 +891,7 @@
 %    \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 
@@ -896,33 +898,17 @@
               {\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

Modified: trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-space.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-space.dtx	2023-04-25 19:36:11 UTC (rev 66936)
+++ trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-space.dtx	2023-04-25 19:36:46 UTC (rev 66937)
@@ -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}

Modified: trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-struct.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-struct.dtx	2023-04-25 19:36:11 UTC (rev 66936)
+++ trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-struct.dtx	2023-04-25 19:36:46 UTC (rev 66937)
@@ -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 at 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 at 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 at 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 at 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 at 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 at 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 at g_@@_struct_abs_int}_prop }
+                { parentrole }
+                {
+                  \l_@@_get_tmpc_tl
+                } 
+            }  
+         }
+         {
+           \@@_prop_gput:cnx
+              { g_@@_struct_\int_eval:n {\c at 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 at 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 at 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}

Modified: trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-tree.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-tree.dtx	2023-04-25 19:36:11 UTC (rev 66936)
+++ trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-tree.dtx	2023-04-25 19:36:46 UTC (rev 66937)
@@ -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}

Modified: trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-user.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-user.dtx	2023-04-25 19:36:11 UTC (rev 66936)
+++ trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-user.dtx	2023-04-25 19:36:46 UTC (rev 66937)
@@ -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}

Modified: trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf.dtx	2023-04-25 19:36:11 UTC (rev 66936)
+++ trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf.dtx	2023-04-25 19:36:46 UTC (rev 66937)
@@ -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} 

Modified: trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-base.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-base.sty	2023-04-25 19:36:11 UTC (rev 66936)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-base.sty	2023-04-25 19:36:46 UTC (rev 66937)
@@ -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}
  {

Modified: trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-debug-generic.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-debug-generic.sty	2023-04-25 19:36:11 UTC (rev 66936)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-debug-generic.sty	2023-04-25 19:36:46 UTC (rev 66937)
@@ -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 at g__tag_MCID_abs_int }
               }

Modified: trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-debug.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-debug.sty	2023-04-25 19:36:11 UTC (rev 66936)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-debug.sty	2023-04-25 19:36:46 UTC (rev 66937)
@@ -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 at 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 at 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 at g__tag_struct_abs_int}_prop }
+                { parentrole }
+                {
+                  \l__tag_get_tmpc_tl
+                }
+            }
+         }
+         {
+           \__tag_prop_gput:cnx
+              { g__tag_struct_\int_eval:n {\c at 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 at 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 at 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:

Modified: trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-luatex.def
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-luatex.def	2023-04-25 19:36:11 UTC (rev 66936)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-luatex.def	2023-04-25 19:36:46 UTC (rev 66937)
@@ -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

Modified: trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-generic.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-generic.sty	2023-04-25 19:36:11 UTC (rev 66936)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-generic.sty	2023-04-25 19:36:46 UTC (rev 66937)
@@ -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 at 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       =

Modified: trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-lua.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-lua.sty	2023-04-25 19:36:11 UTC (rev 66936)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-lua.sty	2023-04-25 19:36:46 UTC (rev 66937)
@@ -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 =

Modified: trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex-book.def
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex-book.def	2023-04-25 19:36:11 UTC (rev 66936)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex-book.def	2023-04-25 19:36:46 UTC (rev 66937)
@@ -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,

Modified: trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex-inline.def
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex-inline.def	2023-04-25 19:36:11 UTC (rev 66936)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex-inline.def	2023-04-25 19:36:46 UTC (rev 66937)
@@ -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,

Modified: trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex.def
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex.def	2023-04-25 19:36:11 UTC (rev 66936)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex.def	2023-04-25 19:36:46 UTC (rev 66937)
@@ -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,

Modified: trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-mathml.def
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-mathml.def	2023-04-25 19:36:11 UTC (rev 66936)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-mathml.def	2023-04-25 19:36:46 UTC (rev 66937)
@@ -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'.

Modified: trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-pdf.def
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-pdf.def	2023-04-25 19:36:11 UTC (rev 66936)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-pdf.def	2023-04-25 19:36:46 UTC (rev 66937)
@@ -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 @@
 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,

Modified: trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-pdf2.def
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-pdf2.def	2023-04-25 19:36:11 UTC (rev 66936)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-pdf2.def	2023-04-25 19:36:46 UTC (rev 66937)
@@ -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,

Modified: trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-parent-child-2.csv
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-parent-child-2.csv	2023-04-25 19:36:11 UTC (rev 66936)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-parent-child-2.csv	2023-04-25 19:36:46 UTC (rev 66937)
@@ -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,∅

Modified: trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-parent-child.csv
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-parent-child.csv	2023-04-25 19:36:11 UTC (rev 66936)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-parent-child.csv	2023-04-25 19:36:46 UTC (rev 66937)
@@ -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,∅,∅

Modified: trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf.lua
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf.lua	2023-04-25 19:36:11 UTC (rev 66936)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf.lua	2023-04-25 19:36:46 UTC (rev 66937)
@@ -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"
 }

Modified: trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf.sty	2023-04-25 19:36:11 UTC (rev 66936)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf.sty	2023-04-25 19:36:46 UTC (rev 66937)
@@ -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,12 +1485,11 @@
       }
     \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
@@ -1491,7 +1496,7 @@
        { ! \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
@@ -1498,29 +1503,14 @@
               {\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 at 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 at 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 at 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 at 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 at 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 at 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 at g__tag_struct_abs_int}_prop }
+                { parentrole }
+                {
+                  \l__tag_get_tmpc_tl
+                }
+            }
+         }
+         {
+           \__tag_prop_gput:cnx
+              { g__tag_struct_\int_eval:n {\c at 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 at 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 at 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

Modified: trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdfdocu-patches.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdfdocu-patches.sty	2023-04-25 19:36:11 UTC (rev 66936)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdfdocu-patches.sty	2023-04-25 19:36:46 UTC (rev 66937)
@@ -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 at endbibliography{%
   \csuse{blx at endenv@\blx at 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 at sanitize \@fps
+   \def \reserved at b {!}%
+   \ifx \reserved at 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 at a
+         \expandafter :\expandafter =\@fps
+         \do
+          {%
+           \if \reserved at a h%
+             \ifodd \@tempcnta
+             \else
+               \advance \@tempcnta \@ne
+             \fi
+           \else\if \reserved at a t%
+             \@setfpsbit \tw@
+           \else\if \reserved at a b%
+             \@setfpsbit 4%
+           \else\if \reserved at a p%
+             \@setfpsbit 8%
+           \else\if \reserved at a !%
+             \ifnum \@tempcnta>15
+               \advance\@tempcnta -\sixt@@n\relax
+             \fi
+           \else
+             \@latex at error{Unknown float option `\reserved at a'}%
+             {Option `\reserved at 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 at float@struct{\csname tag_get:n\endcsname{struct_num}}%
+  \typeout{Float structure: \@current at float@struct}
+  \global \setbox\@currbox
+    \color at vbox
+      \normalcolor
+      \vbox \bgroup
+        \hsize\columnwidth
+        \@parboxrestore
+        \@floatboxreset
+}%
+
+\def\end at 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 at 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



More information about the tex-live-commits mailing list.