texlive[70094] Master/texmf-dist: tagpdf (23feb24)

commits+karl at tug.org commits+karl at tug.org
Fri Feb 23 23:02:49 CET 2024


Revision: 70094
          https://tug.org/svn/texlive?view=revision&revision=70094
Author:   karl
Date:     2024-02-23 23:02:49 +0100 (Fri, 23 Feb 2024)
Log Message:
-----------
tagpdf (23feb24)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/tagpdf/README.md
    trunk/Master/texmf-dist/doc/latex/tagpdf/ex-AF-file.pdf
    trunk/Master/texmf-dist/doc/latex/tagpdf/ex-alt-actualtext.pdf
    trunk/Master/texmf-dist/doc/latex/tagpdf/ex-attribute.pdf
    trunk/Master/texmf-dist/doc/latex/tagpdf/ex-formula-problem.pdf
    trunk/Master/texmf-dist/doc/latex/tagpdf/ex-list.pdf
    trunk/Master/texmf-dist/doc/latex/tagpdf/ex-mc-manual-para-split-obsolete.pdf
    trunk/Master/texmf-dist/doc/latex/tagpdf/ex-softhyphen.pdf
    trunk/Master/texmf-dist/doc/latex/tagpdf/ex-spaceglyph-listings.pdf
    trunk/Master/texmf-dist/doc/latex/tagpdf/ex-structure-obsolete.pdf
    trunk/Master/texmf-dist/doc/latex/tagpdf/ex-tagpdf-template.pdf
    trunk/Master/texmf-dist/doc/latex/tagpdf/tagpdf-code.pdf
    trunk/Master/texmf-dist/doc/latex/tagpdf/tagpdf.bib
    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-lua.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.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

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/tagpdf/tagpdfsetup-keys.tex

Modified: trunk/Master/texmf-dist/doc/latex/tagpdf/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tagpdf/README.md	2024-02-23 22:02:28 UTC (rev 70093)
+++ trunk/Master/texmf-dist/doc/latex/tagpdf/README.md	2024-02-23 22:02:49 UTC (rev 70094)
@@ -1,6 +1,6 @@
 #tagpdf — A package to create tagged pdf
-Packageversion: 0.98v 
-Packagedate: 2024/02/04
+Packageversion: 0.98w 
+Packagedate: 2024/02/22
 Author: Ulrike Fischer, LaTeX Project Team
 
 ## License

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

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

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

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

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

Modified: trunk/Master/texmf-dist/doc/latex/tagpdf/ex-mc-manual-para-split-obsolete.pdf
===================================================================
(Binary files differ)

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

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

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

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

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

Modified: trunk/Master/texmf-dist/doc/latex/tagpdf/tagpdf.bib
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tagpdf/tagpdf.bib	2024-02-23 22:02:28 UTC (rev 70093)
+++ trunk/Master/texmf-dist/doc/latex/tagpdf/tagpdf.bib	2024-02-23 22:02:49 UTC (rev 70094)
@@ -1,8 +1,9 @@
 @online{pdfreference,
 title= {PDF Reference, sixth edition},
 author={{Adobe Systems Incorporated}},
-url =  {https://www.adobe.com/content/dam/acom/en/devnet/pdf/pdfs/PDF32000_2008.pdf},
-year = {2006}
+url =  {https://opensource.adobe.com/dc-acrobat-sdk-docs/pdfstandards/pdfreference1.7old.pdf},
+year = {2006},
+urldate={2024-02-17},
       }
 
 @book{pdfspec-iso32000-1,
@@ -10,8 +11,8 @@
   title={Document management -- Portable document format -- Part 1: PDF 1.7},
   date={2008-07-01},
   edition={1},
-  url={https://www.adobe.com/content/dam/acom/en/devnet/pdf/pdfs/PDF32000_2008.pdf},
-  urldate={2021-04-18},
+  url={https://opensource.adobe.com/dc-acrobat-sdk-docs/pdfstandards/PDF32000_2008.pdf},
+  urldate={2024-02-17},
 }
 
 
@@ -34,26 +35,51 @@
   url={https://www.iso.org/obp/ui/#iso:std:iso:32000:-2:ed-2:v1:en},
   urldate={2021-04-18},
 }
- at online{pac3,
-title = {PDF Accessibility Checker (PAC 3)},
-author= {{Zugang für alle -- Schweizerische Stiftung zur behindertengerechten Technologienutzung}},
-url = {http://www.access-for-all.ch/ch/pdf-werkstatt/pdf-accessibility-checker-pac.html},
-urldate ={2018-07-05}}
+ at online{pac2024,
+title = {PDF Accessibility Checker (PAC 2024)},
+url = {https://pac.pdf-accessibility.org/},
+urldate ={2024-02-17}}
 
 @online{verapdf,
 title = {veraPDF},
 author={{veraPDF consortium}},
-url = {http://verapdf.org/}
+url = {https://verapdf.org/}
 }
 
 @online{ngpdf,
 title = {Next-Generation PDF},
 author={{Dual Lab}},
-url = {http://ngpdf.com/}
+url = {https://ngpdf.com}
 }
 
+ at online{mathexamples,
+title = {MathML Associated Files Examples},
+author={\LaTeX\ Project},
+url = {https://github.com/latex3/tagging-project/discussions/56},
+urldate={2024-02-19}
+}
+
 @online{tugaccess,
 title={PDF accessibility and PDF standards},
 author= {{TeX User Group}},
 url= {https://tug.org/twg/accessibility/}
 }
+
+ at inproceedings{todasoifferdeims2024,
+author={Roman Toda  and Jing Mu and Youqiang Wu and Neil Soiffer},
+title = {PDF Document Object Model Support for Math},
+year={2024},
+booktitle    = {The 5th International Workshop on Digitization and E-Inclusion in Mathematics and Science 2024},
+publisher    = {The DEIMS2024 Organizing Committee},
+url={https://workshop.sciaccess.net/deims2024/DEIMS2024_Proceedings.zip}
+}
+
+ at inproceedings{mittelbachfischerdeims2024,
+author={Frank Mittelbach und Ulrike Fischer},
+title = {Enhancing LATEX to Automatically Produce Tagged and
+Accessible PDF},
+year={2024},
+booktitle    = {The 5th International Workshop on Digitization and E-Inclusion in Mathematics and Science 2024},
+publisher    = {The DEIMS2024 Organizing Committee},
+url={https://workshop.sciaccess.net/deims2024/DEIMS2024_Proceedings.zip}
+}

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	2024-02-23 22:02:28 UTC (rev 70093)
+++ trunk/Master/texmf-dist/doc/latex/tagpdf/tagpdf.tex	2024-02-23 22:02:49 UTC (rev 70094)
@@ -10,14 +10,14 @@
 \DocumentMetadata
  {
    % comment the following line to compile an untagged documentation:
-   testphase=phase-III,
+   testphase={phase-III,title,table},
    pdfversion=2.0,lang=en-UK,pdfstandard=a-4,pdfstandard=ua-2
    %uncompress
  }
 \DebugBlocksOff
 \makeatletter
-\def\UlrikeFischer at package@version{0.98v}
-\def\UlrikeFischer at package@date{2024-02-04}
+\def\UlrikeFischer at package@version{0.98w}
+\def\UlrikeFischer at package@date{2024-02-22}
 \makeatother
 
 \documentclass[bibliography=totoc,a4paper]{article}
@@ -36,7 +36,8 @@
 
 \usepackage[noparboxrestore]{marginnote}
 \reversemarginpar
-
+\usepackage{booktabs}
+\setlength\belowcaptionskip{10pt}
 \usepackage{tcolorbox}
 
 \usepackage{tikz}
@@ -282,9 +283,11 @@
 
 
 Syntax validation and formal standard validation can be done for example with 
-preflight of the (non-free) Adobe Acrobat. It can also be done also with the 
-free \PDF{} Accessibility Checker (PAC~2021) \parencite{pac3}. There is also 
-the validator veraPDF \parencite{verapdf}. A rather new and quite useful tool 
+preflight of the (non-free) Adobe Acrobat. It can also be done 
+(only for PDF 1.7 and older) also with the 
+free \PDF{} Accessibility Checker (PAC~2024) \parencite{pac2024}. There is also 
+the validator veraPDF \parencite{verapdf} which can also handle PDF 2.0 files. 
+A quite useful tool 
 is \enquote{Next Generation PDF} \parencite{ngpdf}, a browser application 
 which converts a tagged PDF to html, allows to inspect its structure and also 
 to edit the structure. For PDF~2.0 files there is also a checker based on the 
@@ -337,7 +340,7 @@
 the \PDF\ management code and is now much better. Only a few 
 structures---mostly some from currently unsupported packages--- still need 
 manual tagging. But sadly the output of the validators don't quite reflect 
-the improvements. The documentation uses now \PDF~2.0  and PAC~3 can't handle 
+the improvements. The documentation uses now \PDF~2.0  and PAC~2024 can't handle 
 this, it claims that the file is damaged. The Adobe validator has a bug and 
 doesn't like the (valid) use of  the \texttt{Lbl} tag for the section numbers 
 (see figure~\ref{fig:adobe}).  
@@ -396,7 +399,7 @@
 
 When loading \pkg{tagpdf} through the \texttt{testphase} keys, it is automatically activated. 
 To deactivate it while still retaining all the other new code from the latex-lab testphase files,
-use in the preamble |\tagpdfsetup{activate-all=false}|. You can additionally also deactivate the 
+use in the preamble |\tagpdfsetup{activate/all=false}|. You can additionally also deactivate the 
 paratagging and the interword space code. 
 To suppress the loading of the package altogether you can try
 
@@ -461,74 +464,70 @@
 The command should be normally used only in the preamble
 (for a few keys it could also make sense to change them in the document).
 
-The key-val list understands the following keys:
+The key-val list understands at least the following keys. More keys are defined in some of the latex-lab module, see table~\ref{tab:setupkey} for an overview which also includes older, now deprecated names.
 
+\begin{table}
+\caption{Overview over keys for \cs{tagpdfsetup}}\label{tab:setupkey}
+\input{tagpdfsetup-keys}
+\end{table}
+
 \begin{description}
-\item[\PrintKeyName{activate-all}] Boolean, initially false. Activates
+\item[\PrintKeyName{activate/all}] Boolean, initially false. Activates
   everything, that's normally the sensible thing to do.
 
-\item [\PrintKeyName{activate}] Like |activate-all|,
+\item [\PrintKeyName{activate}] Like |activate/all|,
   \emph{additionally} is opens at begin document a structure with
   |\tagstructbegin| and closes it at end document. The key accepts as
   value a tag name which is used as the tag of the structure.  The
   default value is |Document|.
 
-\item[\PrintKeyName{activate-mc}] Boolean, initially false. Activates
+\item[\PrintKeyName{activate/mc}] Boolean, initially false. Activates
   the code related to marked content.
 
-\item[\PrintKeyName{activate-struct}] Boolean, initially
+\item[\PrintKeyName{activate/struct}] Boolean, initially
   false. Activates the code related to structures. Should be used only
-  if \PrintKeyName{activate-mc} has been used too.
+  if \PrintKeyName{activate/mc} has been used too.
 
-\item[\PrintKeyName{no-struct-dest}] Starting with version 0.93
+\item[\PrintKeyName{activate/struct-dest}] Boolean, initially true.
+  Starting with version 0.93
   \pkg{tagpdf} will create automatically structure destinations (see
-  section~\ref{sec:struct-dest} if \pkg{hyperref} is used, if the
-  engine supports it and if the pdf version is 2.0. With this key this
+  section~\ref{sec:struct-dest} if \pkg{hyperref} is used and if the
+  engine supports it. With this key this
   can be suppressed.
 
-\item[\PrintKeyName{activate-tree}] Boolean, initially
+\item[\PrintKeyName{activate/tree}] Boolean, initially
   false. Activates the code related to trees. Should be used only if
   the two other keys has been used too.
 
-\item[\PrintKeyName{add-new-tag}] Allows to define new tag names, see
-  section \ref{sec:new-tag} for a description.
-
-\item[\PrintKeyName{interwordspace}] Choice key, possible values are
-  \PrintKeyName{true}/""\PrintKeyName{on} and
-  \PrintKeyName{false}/\PrintKeyName{off}. The key
+\item[\PrintKeyName{activate/spaces}] Boolean. The key
   activates/deactivates the insertion of space glyphs, see
   section~\ref{sec:spacechars}. In the luamode it only works if at
-  least \PrintKeyName{activate-mc} has been used.
+  least \PrintKeyName{activate/mc} has been used.
+  The old name of the key |interwordspace| is still supported but deprecated.
 
-\item[\PrintKeyName{log}] Choice key, possible values
-  \PrintKeyName{none}, \PrintKeyName{v}, \PrintKeyName{vv},
-  \PrintKeyName{vvv}, \PrintKeyName{all}.  Setups the log level.
-  Changing the value affects currently mostly the luamode:
-  \enquote{higher} values gives more messages in the log. The current
-  levels and messages have been setup in a quite ad-hoc manner and
-  will need improvement.
 
-\item[\PrintKeyName{newattribute}] This key takes two arguments and
+\item[\PrintKeyName{role/new-tag}] Allows to define new tag names, see
+  section \ref{sec:new-tag} for a description.
+
+\item[\PrintKeyName{role/new-attribute}] This key takes two arguments and
   declares an attribute. See \ref{sec:attributes}.
+  
+\item[\PrintKeyName{role/map-tags}] This key allows to remap the structure 
+tags. Currently it supports only two values: |false| (the default) and |pdf| which
+maps all tags to their standard PDF role, e.g. |itemize| will be mapped to |L|. 
 
-\item[\PrintKeyName{show-spaces}] Boolean.\sidenote{luamode} That's a
-  debug option, it helps in lua mode to see where space glyph will be
-  inserted if \PrintKeyName{interwordspace} is activated.
 
-\item[\PrintKeyName{paratagging}] Boolean. This activate/deactivates
+\item[\PrintKeyName{para/tagging}] Boolean. This activate/deactivates
   the automatic tagging of paragraphs, see \ref{sec:paratagging} for
   more background.  It uses the \texttt{para/begin} and
-  \texttt{para/end} hooks of the newest \LaTeX{} version (2021-05-01).
+  \texttt{para/end} hooks.
   With more tagging support conditions will be added, that means the
   code is bound to change! Paragraphs can appear in many unexpected
   places and the code can easily break, so there is also an option to
   see where such paragraphs are:
 
-\item[\PrintKeyName{paratagging-show}] Boolean. This
-  activate/deactivates small red and green numbers in the places where
-  the paratagging hook code is used.
 
-\item[\PrintKeyName{paratag}] String. This key changes the second tag
+\item[\PrintKeyName{para/tag}] String. This key changes the second tag
   used by the paratagging code. The default tag is \texttt{text}, a
   \LaTeX{} specific tag that is role mapped to \texttt{P}. A useful
   local setting here can be \texttt{NonStruct}, which creates a
@@ -536,7 +535,14 @@
   recommended to use the newer \cs{tagtool} command described below
   instead of \cs{tagpdfsetup}.
 
-\item[\PrintKeyName{tabsorder}] Choice key, possible values are
+\item[\PrintKeyName{para/maintag}] String. This key changes the first tag
+  used by the paratagging code. The default tag is \texttt{text-unit}, a
+  \LaTeX{} specific tag that is role mapped to \texttt{Part}. 
+  For local changes it is
+  recommended to use the newer \cs{tagtool} command described below
+  instead of \cs{tagpdfsetup}.
+
+\item[\PrintKeyName{page/tabsorder}] Choice key, possible values are
   \PrintKeyName{row}, \PrintKeyName{column}, \PrintKeyName{structure},
   \PrintKeyName{none}.  This decides if a \verb+/Tabs+ value is
   written to the dictionary of the page objects. Not really needed for
@@ -544,7 +550,7 @@
   accessibility checks. So I added it. Currently the tabsorder is the
   same for all pages. Perhaps this should be changed \ldots.
 
-\item[\PrintKeyName{tagunmarked}] Boolean,\sidenote{luamode} initially
+\item[\PrintKeyName{activate/tagunmarked}] Boolean,\sidenote{luamode} initially
   true. When this boolean is true, the lua code will try to mark
   everything that has not been marked yet as an artifact. The benefit
   is that one doesn't have to mark up every deco rule oneself. The
@@ -553,11 +559,37 @@
   annotations etc. See also section~\ref{sec:lazy} for a discussion
   about automatic tagging.
 
-\item[\PrintKeyName{uncompress}] Sets both the \PDF{} compresslevel
+\item[\PrintKeyName{debug/uncompress}] Sets both the \PDF{} compresslevel
   and the \PDF{} objcompresslevel to 0 and so allows to inspect the
-  \PDF{}.
+  \PDF{}. No really useful anymore as this can also 
+  be set in \cs{DocumentMetadata}.
 
+\item[\PrintKeyName{debug}] This keys knows a number of sub-keys to
+  set various debug options. 
+  \begin{description}
+  \item[\PrintKeyName{debug/show}] This takes a comma list of keywords:
+  
+  \texttt{spaces}/\texttt{spacesOff}: \sidenote{luamode} 
+   That helps in lua mode to see where space glyph will be
+   inserted if \PrintKeyName{activate/spaces} is activated. 
+   This can also be activated with the now deprecated key |show-spaces|
 
+  \texttt{para}/\texttt{paraOff}: This (locally)
+  activates/deactivates small red and green numbers in the places where
+  the paratagging hook code is used. 
+
+  
+  \item[\PrintKeyName{debug/log}] Choice key, possible values
+  \PrintKeyName{none}, \PrintKeyName{v}, \PrintKeyName{vv},
+  \PrintKeyName{vvv}, \PrintKeyName{all}.  Setups the log level.
+  Changing the value affects currently mostly the luamode:
+  \enquote{higher} values gives more messages in the log. The current
+  levels and messages have been setup in a quite ad-hoc manner and
+  will need improvement.
+
+  
+   \end{description}
+
 \end{description}
 
 \begin{docCommands}
@@ -576,18 +608,18 @@
 speed. Currently the following arguments are supported
 
 \begin{description}
-\item[\PrintKeyName{para}] Boolean. It will replace the
+\item[\PrintKeyName{para/tagging}] Boolean. It will replace the
   \cs{tagpdfparaOn} and \cs{tagpdfparaOff} command.
 
-\item[\PrintKeyName{unittag}] String. It allows to change the outer
+\item[\PrintKeyName{para/maintag}] String. It allows to change the outer
   tag used in the following automatically tagged paragraphs. The
   setting is local.
 
-\item[\PrintKeyName{paratag}] String. It allows to change the inner
+\item[\PrintKeyName{para/tag}] String. It allows to change the inner
   tag used in the following automatically tagged paragraphs. The
   setting is local.
 
-\item[\PrintKeyName{para-flattened}] Boolean. If set it will suppress
+\item[\PrintKeyName{para/flattened}] Boolean. If set it will suppress
   the outer structure in the automatic paratagging.  This should be
   applied to the start and end hook in the same way! The setting is
   local.
@@ -992,7 +1024,7 @@
 
   The\sidenote{lua mode only} lua mode will mark up everything unmarked as 
   \texttt{artifact=notype}. You can suppress this behavior by setting the 
-  tagpdfsetup key \texttt{tagunmarked} to false. See section 
+  tagpdfsetup key \texttt{activate/tagunmarked} to false. See section 
   \ref{ssec:setup}. 
 
   \item[\PrintKeyName{stash}] Normally marked content will be stored in the 
@@ -1382,9 +1414,30 @@
 
 \subsubsection{Math}
 
+Math is still a problem but some progress has been made.
+To tag math you have to surround it with a \texttt{Formula} structure. But the content of such a structure is handled by readers as a black box so additional data is needed for accessibility.
 
+There are a number of theoretical options here:
+\begin{enumerate}
+\item One can add an alternative text (\texttt{/Alt}) or an \texttt{/ActualText}
+to the structure element either some text manually provided by the author or (with
+the math module in the latex-lab bundle) the \LaTeX-source).
+\item One can add an alternative text (\texttt{/Alt} or \texttt{/ActualText})
+to the MC-chunks.
+\item One can build inside the \texttt{Formula} structure element a tree with MathML structure elements --- with PDF 2.0 this not require to declare new tags as the MathML name space is built-in. 
+\item One can in PDF 2.0 attach a MathML file and/or the \LaTeX-source as associated file to the \texttt{Formula} structure (or to one or more MC-chunks).
+\end{enumerate}        
+The question is how these work in reality.
+ 
+Option 1 and 2 give not too bad results 
+with a screen reader, but can 
+require manual work and if you are unlucky the reader drops 
+important part of the math (like punctuation symbols). 
+Exploring the equation is not possible. 
 
-Math is a problem. I have seen an example where \emph{every single
+
+Option 3 creates many structure elements. 
+E.g. I have seen an example where \emph{every single
 symbol} has been marked up with tags from MathML along with an
 \texttt{/ActualText} entry and an entry with alternate text which
 describes how to read the symbol.  The \PDF{} then looked like this
@@ -1403,19 +1456,20 @@
 mark-up as doing it manually is too much work and would make the
 source unreadable -- at least with pdflatex and the generic mode. In
 lua mode is it possible to hook into the \texttt{mlist\_to\_hlist}
-callback and add marker automatically. Some first implementation is
-done by Marcel Krüger in the luamml project.
-
-But I'm not sure that this is the best way to do math. It looks rather
+callback and add marker automatically. Some first implementation in this direction
+has been done by Marcel Krüger in the luamml project. But up-to-now it was not possible 
+to test the usability of this approach: With the exception of the html derivation
+with ngpdf no PDF-viewer/screen reader combination
+seems to make use of such structures. 
+I'm not sure anyway that this is the best way to do math. It looks rather
 odd that a document should have to tell a screen reader in such detail
-how to read an equation. It would be much more efficient, sensible and
-flexible if a complete representation of the equation in mathML could
-be stored in the \PDF{} and the task how to read this aloud delegated
-to the screen reader. As \PDF{}~2.0 introduced associated files it is
-probable that this will be the way to go but more investigations are
-needed here.
+how to read an equation. 
 
-See also section~\ref{sec:alt} for some more remarks and tests.
+The last option 4 has been implemented in the math module in the \texttt{latex-lab}
+bundle. Here happily a proof of
+concept was possible: With development versions of foxit and the NVDA reader
+it was possible to access an attached MathML and get speech output from it \cite{todasoifferdeims2024,mittelbachfischerdeims2024}. See also \cite{mathexamples} for some
+examples and section~\ref{sec:alt} for some more remarks and tests.
 
 
 \subsubsection{Split paragraphs}\label{sec:splitpara}
@@ -1448,7 +1502,7 @@
 sit amet, lacus.\tagmcend
 \end{taglstlisting}
 
-Starting with version 0.92 there is code which tries to resolve this
+Starting with version 0.92 there is code which resolves this
 problem. Basically it works like this: every mc-command issues a mark
 command (actually two slightly different). When the page is built in
 the output routine this mark commands are inspected and from them
@@ -1461,14 +1515,13 @@
 Please note
 
 \begin{itemize}
-\item The code requires a \pkg{pdfmanagement-testphase} version v0.95i or newer.
-
 \item Typically you will need more compilations than previously, don't
   rely on the rerun messages, but if something looks wrong rerun.
 
 \item The code relies on that related |\tagmcbegin| and |\tagmcend|
   are in the same boxing level. If one is in a box (which hides the
-  marks) and the other in the main galley, things will go wrong.
+  marks) and the other in the main galley, things will go wrong (\texttt{longtable} 
+  is for example problematic).
 \end{itemize}
 
 \subsubsection{Automatic tagging of paragraphs}\label{sec:paratagging}
@@ -1570,8 +1623,8 @@
 
 \begin{taglstlisting}
 \tagpdfsetup{
-  add-new-tag = TAB/P,
-  add-new-tag = FIG/P,
+  role/new-tag = TAB/P,
+  role/new-tag = FIG/P,
             }
 \end{taglstlisting}
 
@@ -1616,8 +1669,8 @@
 The flat version is more \LaTeX-like and it is rather straightforward to 
 patch \verb+\chapter+, \verb+\section+ and so on to insert the appropriates 
 \texttt{H\ldots} start and end markers. The xml-like tree is more difficult 
-to automate. If such a tree is wanted I would recommend to use -- like the 
-context format -- explicit commands to start and end a sectioning unit. 
+to automate. It has been implemented in the sec module in latex-lab, but can break
+if sectioning commands are hidden inside boxes.
 
 
 
@@ -1861,7 +1914,7 @@
 
 
 To use such attributes you must at first declare it in \verb+\tagpdfsetup+ 
-with the key \texttt{newattribute}. This key takes two argument, a name and 
+with the key \texttt{role/new-attribute}. This key takes two argument, a name and 
 the content of the attribute. The name should be a sensible key name, it is 
 converted to a pdf name with \verb+\pdf_name_from_unicode_e:n+, so slashes 
 and spaces are allow. The content should be a dictionary without the 
@@ -1871,9 +1924,9 @@
 \begin{taglstlisting}
 \tagpdfsetup
  {
-  newattribute =
+  role/new-attribute =
    {TH-col}{/O /Table /Scope /Column},
-  newattribute =
+  role/new-attribute =
    {TH-row}{/O /Table /Scope /Row},
   }
 \end{taglstlisting}
@@ -2112,10 +2165,10 @@
 role mapping is a simple key-value in the RoleMap dictionary.
 
 So instead of |H1| the type |section| could be used. The role mapping
-can then be declared with the |add-new-tag| key:
+can then be declared with the |role/new-tag| key:
 
 \begin{taglstlisting}
- \tagpdfsetup{add-new-tag = section/H1}
+ \tagpdfsetup{role/new-tag = section/H1}
 \end{taglstlisting}
 
 In PDF 2.0 the situation is a bit more complicated. At first PDF~2.0
@@ -2185,7 +2238,7 @@
 \end{enumerate}
 
 To allow to this more complicated setup the syntax of the
-\texttt{add-new-tag} key has been extended.  It now takes as argument
+\texttt{role/new-tag} key has been extended.  It now takes as argument
 a key-value list with the following keys.  A normal document shouldn't
 need the extended syntax, the simple syntax |section/H1| should in
 most cases do the right thing.
@@ -2220,8 +2273,8 @@
    this preserves the old syntax. So this two calls are equivalent:
 
    \begin{taglstlisting}
-    \tagpdfsetup{add-new-tag = section/H1}
-    \tagpdfsetup{add-new-tag = {tag=section,role=H1}}
+    \tagpdfsetup{role/new-tag = section/H1}
+    \tagpdfsetup{role/new-tag = {tag=section,role=H1}}
    \end{taglstlisting}
 
 \end{description}
@@ -2253,7 +2306,8 @@
 In PDF 2.0 mathml tags have their own name space and can be freely used. 
 In PDF 1.7. they can only be used if they are rolemapped to a standard type. 
 By default they are not added to the |/RoleMap| dictionary, but this can be
-forced with |\tagpdfsetup{mathml-tags}|. Please note that this adds mathml at the end of the document and overwrites tag with the same name without warning.
+forced with |\tagpdfsetup{role/mathml-tags}|. Please note that this adds mathml 
+at the end of the document and overwrites tags with the same name without warning.
 
 
 \section{Checking parent-child rules}\label{sec:parent-child}
@@ -2331,7 +2385,7 @@
 or e.g.  as a kerning. Accessible document should use real space
 glyphs (U+0032) from a font in such places.
 
-With the key \PrintKeyName{interwordspace} you can activate such space
+With the key \PrintKeyName{activate/spaces} you can activate such space
 glyphs.
 
 With pdftex this will simply call the primitive
@@ -2344,16 +2398,16 @@
 and off and insert manually such a space glyph with
 \verb+\pdffakespace+.
 
-With luatex (in luamode) |interwordspace| is implemented with a
+With luatex (in luamode) |activate/spaces| is implemented with a
 lua-function which is inserted in two callbacks and marks up the
 places where it seems sensible to inter a space glyph. Later in the
 process the space glyphs are injected -- the code will take the glyph
 from the current font if this has a space glyph or switch to the
 default latin modern font.  The current code works reasonable well in
-normal text. |interwordspace| can be used without actually tagging a
+normal text. |activate/spaces| can be used without actually tagging a
 document.
 
-The key \PrintKeyName{show-spaces} will show lines at the places where
+The key-value \PrintKeyName{debug/show=spaces} will show lines at the places where
 in lua mode spaces are inserted and so can help you to find
 problematic places. For listings -- which have a quite specific
 handling of spaces -- you can find a suggestion in the example
@@ -2532,7 +2586,7 @@
 tagging commands) the following strategy can be used: 
 
 \begin{itemize}
-\item when storing the box put around it a structure as need by the 
+\item when storing the box put around it a structure as needed by the 
     tagged variant: 
 \begin{verbatim}
 \tag_mc_end_push: % interrupt an open mc
@@ -2727,7 +2781,7 @@
     commands starting with |\uftag| will stay valid for some time but 
     then be deprecated. 
 
-\item \textbf{Breaking change!} The argument of \texttt{newattribute} 
+\item \textbf{Breaking change!} The argument of \texttt{role/new-attribute} (old key name: \texttt{newattribute})
     option should no longer add the dictionary bracket \verb+<<..>>+, 
     they are added by the code. 
 
@@ -2823,10 +2877,10 @@
     places, it also ate spaces in places where this wasn't expected. From 
     now on both commands behave exactly like the expl3 versions. 
 \item The lua-code to add real space glyphs has been separated from the 
-    tagging code. This means that |interwordspace| now works also if 
+    tagging code. This means that |activate/spaces| now works also if 
     tagging is not active. 
 \item The key |activate| has been added, it open the first structure, see 
-    below. 
+    above. 
 \end{itemize}
 
 \subsection{Changes in version 0.92}
@@ -2969,7 +3023,7 @@
 compilations. The new code requires a current pdfmanagement-testphase and 
 is then used automatically if the new engines are detected. 
 
-
+\subsection{}
 \printbibliography[heading=bibintoc]
 
 

Added: trunk/Master/texmf-dist/doc/latex/tagpdf/tagpdfsetup-keys.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tagpdf/tagpdfsetup-keys.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/tagpdf/tagpdfsetup-keys.tex	2024-02-23 22:02:49 UTC (rev 70094)
@@ -0,0 +1,70 @@
+%% Overview over tagpdfsetup keys
+%% The keys are split in a number of key pathes. 
+\tagpdfsetup{table/header-rows=1}
+\begin{tabular}{lllll}
+\toprule
+new key name    & old key name & value            &type   & defined in \\\midrule
+ ???            & root-AF      & string           &code   &tagpdf-struct\\[4pt]\midrule
+%% activate key path
+%% activate` is used for keys that enable 
+%% general, typically document wide tagging options 
+%% related  to the PDF processing.
+
+activate        & activate        & boolean         &meta  & tagpdf \\
+activate/all    & activate-all    & boolean         &meta & tagpdf\\
+activate/mc     & activate-mc     & boolean         &bool  & tagpdf\\  
+activate/spaces & interwordspace  & boolean         &code  & tagpdf-space\\
+activate/struct & activate-struct & boolean         &bool  & tagpdf\\  
+activate/struct-dest & no-struct-dest&boolean       &bool  & tagpdf\\
+activate/tagunmarked& tagunmarked & boolean         &bool & tagpdf\\
+activate/tree   & activate-tree   & boolean         &bool  & tagpdf\\[4pt]\midrule  
+% temporary until tagging-sockets are in the kernel:
+% activate/socket & ---             & boolean         & bool & tagpdf\\
+%% role key path. For everything related to tag and attribute names
+%% adds mathml to the global rolemap, should perhaps be default
+role/mathml-tags & mathml-tags    & boolean          &bool  & tagpdf-roles\\
+role/new-tag     & add-new-tag    & string           &code  & tagpdf-roles\\
+role/new-attribute&newattribute   & string           &code  & tagpdf-struct\\
+% values: latex, pdf, default is latex, with pdf only PDF-tags are used
+role/map-tags      & ---            & choice           & code & tagpdf-roles\\[4pt]\midrule
+%% debug key path
+%% for logging and showing
+debug/show       &various          &choice            &code  & various \\ 
+debug/show=para  & paratagging-show&    ---           &code  & tagpdf-user\\
+debug/show=paraOff&                &    ---           &code  & tagpdf-user\\
+debug/show=spaces & show-spaces    &    ---           &code  & tagpdf-spaces\\
+debug/show=spacesOff& ---          &    ---           &code  & tagpdf-spaces\\
+debug/log        & log             & choice           &code  & tagpdf \\
+debug/uncompress & uncompress      &  ---             &code  & tagpdf\\[4pt]\midrule  
+%% viewer key path.
+%% viewer keys influence some display options in a pdf viewer. 
+%% There is an overlap with similar "non-tagging" options. 
+% TODO viewer/display-title   
+%% show mathml-files in attachment pane (old mathml-panel) 
+viewer/pane/mathml &  ---          &  boolean         &bool  &latex-lab-math (dev)\\
+viewer/pane/mathsource& ---        &boolean           &bool  &latex-lab-math (dev)\\[4pt]\midrule
+%%% Document element keys
+%%  page key path 
+page/tabsorder  &tabsorder         & choice          & code & tagpdf\\   
+page/exclude-header-footer & exclude-header-footer &choice & code &tagpdf-user\\[4pt]\midrule
+%% para key path
+para/tagging     &paratagging      &boolean          &bool  &tagpdf-user\\
+para/tag         &paratag          &string           &code  &tagpdf-user\\
+para/maintag     &---              &string           &code  &tagpdf-user\\
+para/flattened   &---              &boolean          &bool  &tagpdf-user\\[4pt]\midrule
+%% math key path
+% use the /Alt key, currently clashes with mathml-AF in foxit, 
+% so false if mathml handling is activated
+math/alt/use     &---              &boolean          &bool  &latex-lab-math\\
+math/mathml/write-dummy & ---      &---              &code  &latex-lab-math\\
+% mathml source files:
+math/mathml/sources &---           & clist           &clist &latex-lab-math\\
+math/mathml/AF      &---           &boolean          &bool  &latex-lab-math\\
+math/tex/AF       & ---            &boolean          &bool  &latex-lab-math\\[4pt]\midrule
+% TODO math/alt/type = source|manual|     (later)                                                                               
+%% table key path
+% true/false/layout
+table/tagging     & table-tagging  &choice           &code  &latex-lab-table\\
+table/header-rows & table-header-rows& clist         &clist &latex-lab-table\\
+\bottomrule
+\end{tabular}


Property changes on: trunk/Master/texmf-dist/doc/latex/tagpdf/tagpdfsetup-keys.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-backend.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-backend.dtx	2024-02-23 22:02:28 UTC (rev 70093)
+++ trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-backend.dtx	2024-02-23 22:02:49 UTC (rev 70094)
@@ -47,13 +47,13 @@
 %    }^^A
 % }
 %
-% \date{Version 0.98v, released 2024-02-04}
+% \date{Version 0.98w, released 2024-02-22}
 % \maketitle
 % \begin{implementation}
 %    \begin{macrocode}
 %<@@=tag>
 %<*luatex>
-\ProvidesExplFile {tagpdf-luatex.def} {2024-02-04} {0.98v}
+\ProvidesExplFile {tagpdf-luatex.def} {2024-02-22} {0.98w}
   {tagpdf~driver~for~luatex}
 %    \end{macrocode}
 % \section{Loading the lua}
@@ -97,7 +97,13 @@
     \lua_now:e { ltx.@@.tables.\cs_to_str:N#1 = {} }
   }
 
+\cs_set_protected:Npn \@@_prop_new_linked:N #1
+  {
+    \prop_new_linked:N #1
+    \lua_now:e { ltx.@@.tables.\cs_to_str:N#1 = {} }
+  }
 
+
 \cs_set_protected:Npn \@@_seq_new:N #1
   {
     \seq_new:N #1
@@ -158,8 +164,8 @@
 
 local ProvidesLuaModule = {
     name          = "tagpdf",
-    version       = "0.98v",       --TAGVERSION
-    date          = "2024-02-04", --TAGDATE
+    version       = "0.98w",       --TAGVERSION
+    date          = "2024-02-22", --TAGDATE
     description   = "tagpdf lua code",
     license       = "The LATEX Project Public License 1.3c"
 }
@@ -636,7 +642,7 @@
  else -- assume a dvips variant
   function @@_backend_create_bmc_node (tag)
     local bmcnode = nodenew("whatsit","special")
-    bmcnode.data = "ps:SDict begin mark/"..tag.." BMC pdfmark end"
+    bmcnode.data = "ps:SDict begin mark/"..tag.." /BMC pdfmark end"
     return bmcnode
   end
  end 
@@ -672,7 +678,7 @@
  else -- assume a dvips variant
   function @@_backend_create_bdc_node (tag,dict)
     local bdcnode = nodenew("whatsit","special")
-    bdcnode.data = "ps:SDict begin mark/"..tag.."<<"..dict..">> BDC pdfmark end"
+    bdcnode.data = "ps:SDict begin mark/"..tag.."<<"..dict..">> /BDC pdfmark end"
     return bdcnode
   end
  end 
@@ -699,7 +705,7 @@
 %    \begin{macrocode}
 local function @@_pdf_object_ref (name)
    local tokenname = 'c__pdf_backend_object_'..name..'_int'
-   local object = token.create(tokenname).index..' 0 R'
+   local object = token.create(tokenname).mode ..' 0 R'
    return object
 end
 ltx.@@.func.pdf_object_ref=@@_pdf_object_ref

Modified: trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-checks.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-checks.dtx	2024-02-23 22:02:28 UTC (rev 70093)
+++ trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-checks.dtx	2024-02-23 22:02:49 UTC (rev 70094)
@@ -48,7 +48,7 @@
 %    }^^A
 % }
 %
-% \date{Version 0.98v, released 2024-02-04}
+% \date{Version 0.98w, released 2024-02-22}
 % \maketitle
 % \begin{documentation}
 % \section{Commands}
@@ -71,7 +71,7 @@
 %  \cs{tag_if_box_tagged:N}\Arg{box}
 %  \end{syntax}
 % This tests if a box contains tagging commands. 
-% It relies currently on that the code that saved the box correctly set 
+% It relies currently on that the code, that saved the box, correctly sets 
 % the command \verb+\l_tag_box_\int_use:N #1_tl+ to a positive value. 
 % The LaTeX commands will do that automatically
 % at some time but it is in the responsability of the user to 
@@ -306,7 +306,7 @@
 % Message if an attribute i sunknown.
 % \end{function}
 %
-% \begin{function}{role-missing,role-unknown,role-unknown-tag,role-tag,new-tag,
+% \begin{function}{role-missing,role-unknown,role-unknown-tag,role-unknown-NS,role-tag,new-tag,
 % role-parent-child,role-remapping}
 % Messages related to role mapping.
 % \end{function}
@@ -327,7 +327,7 @@
 %    \begin{macrocode}
 %<@@=tag>
 %<*header>
-\ProvidesExplPackage {tagpdf-checks-code} {2024-02-04} {0.98v}
+\ProvidesExplPackage {tagpdf-checks-code} {2024-02-22} {0.98w}
  {part of tagpdf - code related to checks, conditionals, debugging and messages}
 %</header>
 %    \end{macrocode}
@@ -500,12 +500,13 @@
 % \end{macro}
 %
 % \subsection{Roles}
-% \begin{macro}{role-missing,role-unknown,role-unknown-tag}
+% \begin{macro}{role-missing,role-unknown,role-unknown-tag,role-unknown-NS}
 % Warning message if either the tag or the role is missing
 %    \begin{macrocode}
 \msg_new:nnn { tag } {role-missing}     { tag~#1~has~no~role~assigned  }
 \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-unknown-NS}  { \tl_if_empty:nTF{#1}{Empty~NS}{NS~#1~is~not~known} }
 %    \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	2024-02-23 22:02:28 UTC (rev 70093)
+++ trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-data.dtx	2024-02-23 22:02:49 UTC (rev 70094)
@@ -47,7 +47,7 @@
 %    }^^A
 % }
 %
-% \date{Version 0.98v, released 2024-02-04}
+% \date{Version 0.98w, released 2024-02-22}
 % \maketitle
 % \begin{documentation}
 % This files contains a various data files which are read in
@@ -58,9 +58,10 @@
 % \section{The LaTeX namespace}
 % This is the main new namespace. It is bound to change a lot!
 % It lists the new tag, the rolemap and the namespace of the rolemap.
+% latex-lab has also a namespace module, which takes precendence!
 %    \begin{macrocode}
 %<*ns-latex>
-%% \ProvidesExplFile {tagpdf-ns-latex.def} {2024-02-04} {0.98v}
+%% \ProvidesExplFile {tagpdf-ns-latex.def} {2024-02-22} {0.98w}
 %% {latex} {https://www.latex-project.org/ns/dflt/2022}{}
 title,        Title,    pdf2,
 part,         Title,    pdf2,
@@ -92,7 +93,7 @@
 % It is bound to change
 %    \begin{macrocode}
 %<*ns-latex-book>
-%% \ProvidesExplFile {tagpdf-ns-latex-book.def} {2024-02-04} {0.98v}
+%% \ProvidesExplFile {tagpdf-ns-latex-book.def} {2024-02-22} {0.98w}
 %% {latex-book} {https://www.latex-project.org/ns/book/2022}{}
 chapter,       H1,pdf2,
 section,       H2,pdf2,
@@ -106,7 +107,7 @@
 % \section{The pdf namespace data}
 %    \begin{macrocode}
 %<*ns-pdf>
-%% \ProvidesExplFile {tagpdf-ns-pdf.def} {2024-02-04} {0.98v}
+%% \ProvidesExplFile {tagpdf-ns-pdf.def} {2024-02-22} {0.98w}
 %%  {pdf}   {http://iso.org/pdf/ssn}{}
 StructTreeRoot,StructTreeRoot,pdf,D,
 Document,Document,pdf,D,   
@@ -174,7 +175,7 @@
 % \section{The pdf 2.0 namespace data}
 %    \begin{macrocode}
 %<*ns-pdf2>
-%% \ProvidesExplFile {tagpdf-ns-pdf2.def} {2024-02-04} {0.98v} 
+%% \ProvidesExplFile {tagpdf-ns-pdf2.def} {2024-02-22} {0.98w} 
 %%  {pdf2}  {http://iso.org/pdf2/ssn}{}
 StructTreeRoot,StructTreeRoot,pdf2,D,
 Document,Document,pdf2,D,   
@@ -231,7 +232,7 @@
 % \section{The mathml namespace data}
 %    \begin{macrocode}
 %<*ns-mathml>
-%% \ProvidesExplFile {tagpdf-ns-mathml.def} {2024-02-04} {0.98v}
+%% \ProvidesExplFile {tagpdf-ns-mathml.def} {2024-02-22} {0.98w}
 % {mathml}{http://www.w3.org/1998/Math/MathML}{}
 abs,abs,mathml,
 and,and,mathml,
@@ -466,7 +467,7 @@
 % This will perhaps change in future.
 %    \begin{macrocode}
 %<*parent-child>
-%% \ProvidesExplFile {tagpdf-parent-child.csv} {2024-02-04} {0.98v}
+%% \ProvidesExplFile {tagpdf-parent-child.csv} {2024-02-22} {0.98w}
 ,,,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,∅,∅
@@ -521,7 +522,7 @@
 % This will perhaps change in future.
 %    \begin{macrocode}
 %<*parent-child-2>
-%% \ProvidesExplFile {tagpdf-parent-child-2.csv} {2024-02-04} {0.98v}
+%% \ProvidesExplFile {tagpdf-parent-child-2.csv} {2024-02-22} {0.98w}
 ,,,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	2024-02-23 22:02:28 UTC (rev 70093)
+++ trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-generic.dtx	2024-02-23 22:02:49 UTC (rev 70094)
@@ -46,7 +46,7 @@
 %    }^^A
 % }
 %
-% \date{Version 0.98v, released 2024-02-04}
+% \date{Version 0.98w, released 2024-02-22}
 % \maketitle
 % \begin{documentation}
 % \end{documentation}
@@ -55,11 +55,11 @@
 %    \begin{macrocode}
 %<@@=tag>
 %<*generic>
-\ProvidesExplPackage {tagpdf-mc-code-generic} {2024-02-04} {0.98v}
+\ProvidesExplPackage {tagpdf-mc-code-generic} {2024-02-22} {0.98w}
  {part of tagpdf - code related to marking chunks - generic mode}
 %</generic>
 %<*debug>
-\ProvidesExplPackage {tagpdf-debug-generic} {2024-02-04} {0.98v}
+\ProvidesExplPackage {tagpdf-debug-generic} {2024-02-22} {0.98w}
  {part of tagpdf - debugging code related to marking chunks - generic mode}
 %</debug>
 %    \end{macrocode}

Modified: trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-luacode.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-luacode.dtx	2024-02-23 22:02:28 UTC (rev 70093)
+++ trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-luacode.dtx	2024-02-23 22:02:49 UTC (rev 70094)
@@ -46,7 +46,7 @@
 %    }^^A
 % }
 %
-% \date{Version 0.98v, released 2024-02-04}
+% \date{Version 0.98w, released 2024-02-22}
 % \maketitle
 % \begin{implementation}
 % The code is splitted into three parts: code shared by all engines,
@@ -86,11 +86,11 @@
 %    \begin{macrocode}
 %<@@=tag>
 %<*luamode>
-\ProvidesExplPackage {tagpdf-mc-code-lua} {2024-02-04} {0.98v}
+\ProvidesExplPackage {tagpdf-mc-code-lua} {2024-02-22} {0.98w}
   {tagpdf - mc code only for the luamode }
 %</luamode>
 %<*debug>
-\ProvidesExplPackage {tagpdf-debug-lua} {2024-02-04} {0.98v}
+\ProvidesExplPackage {tagpdf-debug-lua} {2024-02-22} {0.98w}
  {part of tagpdf - debugging code related to marking chunks - lua mode}
 %</debug>
 %    \end{macrocode}

Modified: trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-shared.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-shared.dtx	2024-02-23 22:02:28 UTC (rev 70093)
+++ trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-shared.dtx	2024-02-23 22:02:49 UTC (rev 70094)
@@ -46,7 +46,7 @@
 %    }^^A
 % }
 %
-% \date{Version 0.98v, released 2024-02-04}
+% \date{Version 0.98w, released 2024-02-22}
 % \maketitle
 % \begin{documentation}
 % \section{Public Commands}
@@ -181,7 +181,7 @@
 %    \begin{macrocode}
 %<@@=tag>
 %<*header>
-\ProvidesExplPackage {tagpdf-mc-code-shared} {2024-02-04} {0.98v}
+\ProvidesExplPackage {tagpdf-mc-code-shared} {2024-02-22} {0.98w}
   {part of tagpdf - code related to marking chunks -
    code shared by generic and luamode }
 %</header>
@@ -240,7 +240,7 @@
 % key:   absolute number of the mc (tagmcabs)\\
 % value: the structure number the mc is in
 %    \begin{macrocode}
-\@@_prop_new:N \g_@@_mc_parenttree_prop
+\@@_prop_new_linked:N \g_@@_mc_parenttree_prop
 %    \end{macrocode}
 % \end{variable}
 %

Modified: trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-roles.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-roles.dtx	2024-02-23 22:02:28 UTC (rev 70093)
+++ trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-roles.dtx	2024-02-23 22:02:49 UTC (rev 70094)
@@ -46,7 +46,7 @@
 %    }^^A
 % }
 %
-% \date{Version 0.98v, released 2024-02-04}
+% \date{Version 0.98w, released 2024-02-22}
 % \maketitle
 % \begin{documentation}
 % \begin{function}
@@ -98,7 +98,7 @@
 %    \begin{macrocode}
 %<@@=tag>
 %<*header>
-\ProvidesExplPackage {tagpdf-roles-code} {2024-02-04} {0.98v}
+\ProvidesExplPackage {tagpdf-roles-code} {2024-02-22} {0.98w}
  {part of tagpdf - code related to roles and structure names}
 %</header>
 %    \end{macrocode}
@@ -505,11 +505,16 @@
       {
         \msg_info:nnn { tag }{new-tag}{#1}
       }
-    \prop_get:cnN { g_@@_role_NS_#4_class_prop } {#3}\l_@@_tmpa_tl
-    \quark_if_no_value:NT \l_@@_tmpa_tl 
-      {
-        \tl_set:Nn\l_@@_tmpa_tl{--UNKNOWN--}
-      }         
+    \prop_if_exist:cTF
+     { g_@@_role_NS_#4_class_prop }  
+     {
+       \prop_get:cnN { g_@@_role_NS_#4_class_prop } {#3}\l_@@_tmpa_tl
+       \quark_if_no_value:NT \l_@@_tmpa_tl 
+        {
+          \tl_set:Nn\l_@@_tmpa_tl{--UNKNOWN--}
+        }                     
+     }
+     { \tl_set:Nn\l_@@_tmpa_tl{--UNKNOWN--} } 
     \@@_role_alloctag:nnV {#1}{#2}\l_@@_tmpa_tl  
 %    \end{macrocode}
 % Do not remap standard tags. TODO add warning?
@@ -579,15 +584,24 @@
      %#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_@@_tmpa_tl
-        {
-         \tl_set:Ne #3 {\exp_last_unbraced:NV\use_i:nn   \l_@@_tmpa_tl}         
-         \tl_set:Ne #4 {\exp_last_unbraced:NV\use_ii:nn  \l_@@_tmpa_tl}
-        } 
-        {
-         \tl_set:Nn #3 {#1}
-         \tl_set:Nn #4 {#2}
-        }
+      \prop_if_exist:cTF {g_@@_role_NS_#2_prop}
+       {      
+        \prop_get:cnNTF {g_@@_role_NS_#2_prop} {#1}\l_@@_get_tmpc_tl
+          {
+           \tl_set:Ne #3 {\exp_last_unbraced:NV\use_i:nn   \l_@@_get_tmpc_tl}         
+           \tl_set:Ne #4 {\exp_last_unbraced:NV\use_ii:nn  \l_@@_get_tmpc_tl}
+          } 
+          {
+           \msg_warning:nnn { tag } {role-unknown-tag} { #1 }
+           \tl_set:Nn #3 {#1}
+           \tl_set:Nn #4 {#2}
+          }
+       }
+       {
+          \msg_warning:nnn { tag } {role-unknown-NS} { #2 }
+          \tl_set:Nn #3 {#1}
+          \tl_set:Nn #4 {#2}          
+       }   
     }
    \cs_generate_variant:Nn \@@_role_get:nnNN {VVNN} 
  }   
@@ -1106,20 +1120,27 @@
             \tl_set:Nn \l_@@_tmpa_tl {#1}
           } 
           {           
-            \prop_get:cnNTF 
-               { g_@@_role_NS_#2_prop }
-               {#1}
-               \l_@@_tmpa_tl
-               {
-                 \tl_set:Ne \l_@@_tmpa_tl {\tl_head:N\l_@@_tmpa_tl}
-                 \tl_if_empty:NT\l_@@_tmpa_tl
-                   {
-                     \tl_set:Nn \l_@@_tmpa_tl {#1}
-                   } 
-               }
-               { 
-                 \tl_set:Nn \l_@@_tmpa_tl {\q_no_value}
-               }  
+            \prop_if_exist:cTF { g_@@_role_NS_#2_prop }
+              {
+               \prop_get:cnNTF 
+                  { g_@@_role_NS_#2_prop }
+                  {#1}
+                  \l_@@_tmpa_tl
+                  {
+                    \tl_set:Ne \l_@@_tmpa_tl {\tl_head:N\l_@@_tmpa_tl}
+                    \tl_if_empty:NT\l_@@_tmpa_tl
+                      {
+                        \tl_set:Nn \l_@@_tmpa_tl {#1}
+                      } 
+                  }
+                  { 
+                    \tl_set:Nn \l_@@_tmpa_tl {\q_no_value}
+                  } 
+              }
+              { 
+                \msg_warning:nnn { tag } {role-unknown-NS} { #2}
+                \tl_set:Nn \l_@@_tmpa_tl {\q_no_value} 
+              }    
           }            
 %    \end{macrocode}
 % and the same for the child
@@ -1131,20 +1152,27 @@
             \tl_set:Nn \l_@@_tmpb_tl {#3}
           } 
           { 
-            \prop_get:cnNTF 
-              { g_@@_role_NS_#4_prop }
-              {#3}
-              \l_@@_tmpb_tl
+            \prop_if_exist:cTF { g_@@_role_NS_#4_prop }
               {
-                \tl_set:Ne \l_@@_tmpb_tl { \tl_head:N\l_@@_tmpb_tl }
-                \tl_if_empty:NT\l_@@_tmpb_tl
-                  {
-                    \tl_set:Nn \l_@@_tmpb_tl {#3}
-                  }             
+               \prop_get:cnNTF 
+                 { g_@@_role_NS_#4_prop }
+                 {#3}
+                 \l_@@_tmpb_tl
+                 {
+                   \tl_set:Ne \l_@@_tmpb_tl { \tl_head:N\l_@@_tmpb_tl }
+                   \tl_if_empty:NT\l_@@_tmpb_tl
+                     {
+                       \tl_set:Nn \l_@@_tmpb_tl {#3}
+                     }             
+                 }
+                 { 
+                   \tl_set:Nn \l_@@_tmpb_tl {\q_no_value}
+                 } 
               }
-              { 
+              {
+                \msg_warning:nnn { tag } {role-unknown-NS} { #4}
                 \tl_set:Nn \l_@@_tmpb_tl {\q_no_value}
-              } 
+              }   
           }         
 %    \end{macrocode}
 % and now get the relation
@@ -1239,7 +1267,8 @@
 %     tag-namespace (rolemap-key),
 %     role (rolemap-key),
 %     role-namespace (rolemap-key),
-%     add-new-tag (setup-key)}
+%     role/new-tag (setup-key),
+%     add-new-tag (deprecated)}
 %    \begin{macrocode}
 \keys_define:nn { @@ / tag-role }
   {
@@ -1251,8 +1280,8 @@
 
 \keys_define:nn { @@ / setup }
   {
-     mathml-tags .bool_gset:N = \g_@@_role_add_mathml_bool
-    ,add-new-tag .code:n =
+     role/mathml-tags .bool_gset:N = \g_@@_role_add_mathml_bool
+    ,role/new-tag .code:n =
      {
        \keys_set_known:nnnN
          {@@/tag-role}
@@ -1298,6 +1327,14 @@
            \l_@@_role_role_namespace_tmpa_tl
        }
     }
+   ,role/map-tags .choice:
+   ,role/map-tags/false .code:n = { \socket_assign_plug:nn { tag/struct/tag } {latex-tags} }
+   ,role/map-tags/pdf   .code:n = { \socket_assign_plug:nn { tag/struct/tag } {pdf-tags} } 
+%    \end{macrocode}
+% deprecated names
+%    \begin{macrocode}
+   , mathml-tags .bool_gset:N = \g_@@_role_add_mathml_bool
+   , add-new-tag .meta:n = {role/new-tag={#1}}
   }
 %</package>
 %    \end{macrocode}

Modified: trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-space.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-space.dtx	2024-02-23 22:02:28 UTC (rev 70093)
+++ trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-space.dtx	2024-02-23 22:02:49 UTC (rev 70094)
@@ -46,14 +46,16 @@
 %    }^^A
 % }
 %
-% \date{Version 0.98v, released 2024-02-04}
+% \date{Version 0.98w, released 2024-02-22}
 % \maketitle
 % \begin{documentation}
-% \begin{function}{interwordspace (setup-key)}
+% \begin{function}{activate/space (setup-key),interwordspace (deprecated)}
 % This key allows to activate/deactivate the real space chars if the engine supports
 % it. The allowed values are |true|, |on|, |false|, |off|.
+% The old name of the key |interwordspace| is still supported but deprecated.
 % \end{function}
-% \begin{function}{show-spaces (setup-key)}
+% \begin{function}{show-spaces (deprecated)}
+% This key is deprecated. Use |debug/show=spaces| instead. 
 % This key works only with luatex and shows with small red
 % bars where spaces have been inserted. This is only for debugging and
 % is not completly reliable (and change affect other literals and tagging), so it
@@ -64,7 +66,7 @@
 %    \begin{macrocode}
 %<@@=tag>
 %<*header>
-\ProvidesExplPackage {tagpdf-space-code} {2024-02-04} {0.98v}
+\ProvidesExplPackage {tagpdf-space-code} {2024-02-22} {0.98w}
  {part of tagpdf - code related to real space chars}
 %</header>
 %    \end{macrocode}
@@ -73,17 +75,29 @@
 % support real space chars. Most of the code for luatex which uses attributes
 % is in the lua code, here are only the keys.
 %
-% \begin{macro}{interwordspace (setup-key),show-spaces (setup-key)}
+% \begin{macro}{activate/spaces (setup-key),interwordspace (deprecated),show-spaces (deprecated)}
 %    \begin{macrocode}
 %<*package>
 \keys_define:nn { @@ / setup }
-  {
-    interwordspace .choices:nn = { true, on }
+  {         
+    activate/spaces .choice:,
+    activate/spaces/true .code:n = 
       { \msg_warning:nne {tag}{sys-no-interwordspace}{\c_sys_engine_str}  },
-    interwordspace .choices:nn = { false, off }
+    activate/spaces/false .code:n= 
       { \msg_warning:nne {tag}{sys-no-interwordspace}{\c_sys_engine_str}  },
-    interwordspace .default:n = true,
-    show-spaces .bool_set:N = \l_@@_showspaces_bool
+    activate/spaces .default:n = true,    
+    debug/show/spaces     .code:n = {\bool_set_true:N \l_@@_showspaces_bool},
+    debug/show/spacesOff  .code:n = {\bool_set_false:N \l_@@_showspaces_bool},
+%    \end{macrocode}
+% deprecated versions:
+%    \begin{macrocode}
+    interwordspace .choices:nn = {true,on}{\keys_set:nn{@@/setup}{activate/spaces={true}}},
+    interwordspace .choices:nn = {false,off}{\keys_set:nn{@@/setup}{activate/spaces={false}}},
+    interwordspace .default:n = {true},
+    show-spaces    .choice:,
+    show-spaces/true .meta:n =  {debug/show=spaces},
+    show-spaces/false .meta:n = {debug/show=spacesOff},
+    show-spaces .default:n = true
   }
 \sys_if_engine_pdftex:T
   {
@@ -92,19 +106,17 @@
         \pdfglyphtounicode{space}{0020}
         \keys_define:nn { @@ / setup }
           {
-            interwordspace .choices:nn = { true, on }  { \pdfinterwordspaceon },
-            interwordspace .choices:nn = { false, off }{ \pdfinterwordspaceon },
-            interwordspace .default:n = true,
-            show-spaces .bool_set:N = \l_@@_showspaces_bool
+            activate/spaces/true .code:n  = { \pdfinterwordspaceon },
+            activate/spaces/false .code:n = { \pdfinterwordspaceoff },
+            activate/spaces .default:n = true,
           }
       }
       {
         \keys_define:nn { @@ / setup }
           {
-            interwordspace .choices:nn = { true, on, false, off }
+            activate/spaces .choices:nn = { true, false }
               { \msg_warning:nnn {tag}{sys-no-interwordspace}{dvi}  },
-            interwordspace .default:n = true,
-            show-spaces .bool_set:N = \l_@@_showspaces_bool
+            activate/spaces .default:n = true,
           }
       }
   }
@@ -114,25 +126,22 @@
   {
     \keys_define:nn { @@ / setup }
       {
-        interwordspace .choices:nn =
-                                 { true, on }
+        activate/spaces .choice:,
+        activate/spaces/true .code:n =                            
                                  {
                                    \bool_gset_true:N \g_@@_active_space_bool
                                    \lua_now:e{ltx.@@.func.markspaceon()}
                                  },
-        interwordspace .choices:nn =
-                                 { false, off }
+        activate/spaces/false .code:n =
                                  {
                                   \bool_gset_false:N \g_@@_active_space_bool
                                   \lua_now:e{ltx.@@.func.markspaceoff()}
                                  },
-        interwordspace .default:n = true,
-        show-spaces      .choice:,
-        show-spaces  / true  .code:n =
+        activate/spaces .default:n = true,
+        debug/show/spaces    .code:n =
                                  {\lua_now:e{ltx.@@.trace.showspaces=true}},
-        show-spaces  / false .code:n =
+        debug/show/spacesOff .code:n =
                                  {\lua_now:e{ltx.@@.trace.showspaces=nil}},
-        show-spaces .default:n = true
       }
   }
 %    \end{macrocode}

Modified: trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-struct.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-struct.dtx	2024-02-23 22:02:28 UTC (rev 70093)
+++ trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-struct.dtx	2024-02-23 22:02:49 UTC (rev 70094)
@@ -46,7 +46,7 @@
 %    }^^A
 % }
 %
-% \date{Version 0.98v, released 2024-02-04}
+% \date{Version 0.98w, released 2024-02-22}
 % \maketitle
 % \begin{documentation}
 % \section{Public Commands}
@@ -254,9 +254,9 @@
 %  must be declared first in \cs{tagpdfsetup}.
 % \end{function}
 % \subsection{Setup keys}
-% \begin{function}{newattribute (setup-key)}
+% \begin{function}{role/new-attribute (setup-key), newattribute (deprecated)}
 % \begin{syntax}
-% newattribute = \Arg{name}\Arg{Content}
+% role/new-attribute = \Arg{name}\Arg{Content}
 % \end{syntax}
 % This key can be used in the setup command \cs{tagpdfsetup} and allow to declare a
 % new attribute, which can be used as attribute or attribute class.
@@ -264,9 +264,9 @@
 % \begin{verbatim}
 % \tagpdfsetup
 %  {
-%   newattribute =
+%   role/new-attribute =
 %    {TH-col}{/O /Table /Scope /Column},
-%   newattribute =
+%   role/new-attribute =
 %    {TH-row}{/O /Table /Scope /Row},
 %   }
 % \end{verbatim}
@@ -285,7 +285,7 @@
 %    \begin{macrocode}
 %<@@=tag>
 %<*header>
-\ProvidesExplPackage {tagpdf-struct-code} {2024-02-04} {0.98v}
+\ProvidesExplPackage {tagpdf-struct-code} {2024-02-22} {0.98w}
  {part of tagpdf - code related to storing structure}
 %</header>
 %    \end{macrocode}
@@ -464,7 +464,7 @@
 % It is currently used by the toc-tagging and sec-tagging code.
 %    \begin{macrocode}
 %</package>
-%<base>\prop_new:N \g_@@_struct_dest_num_prop
+%<base>\prop_new_linked:N \g_@@_struct_dest_num_prop
 %<*package>
 %    \end{macrocode}
 % \end{variable}
@@ -474,7 +474,7 @@
 % at the end to point to structured related with this destination.
 % As this is probably need in other places too, it is not only a toc-variable.
 %    \begin{macrocode}
-\prop_new:N \g_@@_struct_ref_by_dest_prop
+\prop_new_linked:N \g_@@_struct_ref_by_dest_prop
 %    \end{macrocode}
 % \end{variable} 
 % 
@@ -1113,6 +1113,33 @@
 % This are the keys for the user commands.
 % we store the tag in a variable. But we should be careful, it is only reliable
 % at the begin.
+% 
+% This socket is used by the tag key. It allows to switch between
+% the latex-tabs and the standard tags.
+%    \begin{macrocode}
+%<*package>
+\socket_new:nn { tag/struct/tag }{1}
+\socket_new_plug:nnn { tag/struct/tag }{ latex-tags }
+ {
+   \seq_set_split:Nne \l_@@_tmpa_seq { / } {#1/\prop_item:Ne\g__tag_role_tags_NS_prop{#1}}
+   \tl_gset:Ne \g_@@_struct_tag_tl   { \seq_item:Nn\l_@@_tmpa_seq {1} }
+   \tl_gset:Ne \g_@@_struct_tag_NS_tl{ \seq_item:Nn\l_@@_tmpa_seq {2} }  
+   \@@_check_structure_tag:N \g_@@_struct_tag_tl
+ }
+ 
+\socket_new_plug:nnn { tag/struct/tag }{ pdf-tags }
+ {
+   \seq_set_split:Nne \l_@@_tmpa_seq { / } {#1/\prop_item:Ne\g_@@_role_tags_NS_prop{#1}}
+   \tl_gset:Ne \g_@@_struct_tag_tl   { \seq_item:Nn\l_@@_tmpa_seq {1} }
+   \tl_gset:Ne \g_@@_struct_tag_NS_tl{ \seq_item:Nn\l_@@_tmpa_seq {2} }
+   \@@_role_get:VVNN \g_@@_struct_tag_tl\g_@@_struct_tag_NS_tl\l_@@_tmpa_tl\l_@@_tmpb_tl
+   \tl_gset:Ne \g_@@_struct_tag_tl {\l_@@_tmpa_tl}
+   \tl_gset:Ne \g_@@_struct_tag_NS_tl{\l_@@_tmpb_tl}
+   \@@_check_structure_tag:N \g_@@_struct_tag_tl
+ }
+\socket_assign_plug:nn { tag/struct/tag } {latex-tags} 
+%    \end{macrocode}
+
 % \begin{macro}
 %  {
 %    label (struct-key),
@@ -1128,7 +1155,6 @@
 %    E (struct-key)
 %  }
 %    \begin{macrocode}
-%<*package>
 \keys_define:nn { @@ / struct }
   {
     label .tl_set:N      = \l_@@_struct_key_label_tl,
@@ -1152,10 +1178,7 @@
     parent .default:n    = {-1},
     tag   .code:n        = % S property
       {
-        \seq_set_split:Nne \l_@@_tmpa_seq { / } {#1/\prop_item:Ne\g__tag_role_tags_NS_prop{#1}}
-        \tl_gset:Ne \g_@@_struct_tag_tl   { \seq_item:Nn\l_@@_tmpa_seq {1} }
-        \tl_gset:Ne \g_@@_struct_tag_NS_tl{ \seq_item:Nn\l_@@_tmpa_seq {2} }  
-        \@@_check_structure_tag:N \g_@@_struct_tag_tl
+        \socket_use:nn { tag/struct/tag }{#1}
       },
     title .code:n        = % T property
       {
@@ -1905,7 +1928,7 @@
 % \section{Attributes and attribute classes}
 %    \begin{macrocode}
 %<*header>
-\ProvidesExplPackage {tagpdf-attr-code} {2024-02-04} {0.98v}
+\ProvidesExplPackage {tagpdf-attr-code} {2024-02-22} {0.98w}
   {part of tagpdf - code related to attributes and attribute classes}
 %</header>
 %    \end{macrocode}
@@ -1921,7 +1944,7 @@
 % |\g_@@_attr_class_used_seq| will hold the attributes which have been used as
 % class name.
 % |\l_@@_attr_value_tl| is used to build the attribute array or key.
-% Everytime an attribute is used for the first time, and object is created
+% Every time an attribute is used for the first time, and object is created
 % with its content, the name-object reference relation is stored in
 % |\g_@@_attr_objref_prop|
 %    \begin{macrocode}
@@ -1933,9 +1956,9 @@
 %    \end{macrocode}
 % \end{variable}
 % \subsection{Commands and keys}
-% \begin{macro}{\@@_attr_new_entry:nn,newattribute (setup-key)}
+% \begin{macro}{\@@_attr_new_entry:nn,role/new-attribute (setup-key), newattribute (deprecated)}
 % This allows to define attributes. Defined attributes
-% are stored in a global property. |newattribute| expects
+% are stored in a global property. |role/new-attribute| expects
 % two brace group, the name and the content. The content typically
 % needs an |/O| key for the owner. An example look like
 % this.
@@ -1945,9 +1968,9 @@
 % \begin{verbatim}
 %  \tagpdfsetup
 %   {
-%    newattribute =
+%    role/new-attribute =
 %     {TH-col}{/O /Table /Scope /Column},
-%    newattribute =
+%    role/new-attribute =
 %     {TH-row}{/O /Table /Scope /Row},
 %    }
 % \end{verbatim}
@@ -1957,13 +1980,21 @@
     \prop_gput:Nen \g_@@_attr_entries_prop
       {\pdf_name_from_unicode_e:n{#1}}{#2}
   }
-
+  
+\cs_generate_variant:Nn \__tag_attr_new_entry:nn {ee}
 \keys_define:nn { @@ / setup }
   {
-    newattribute .code:n =
+    role/new-attribute .code:n =
       {
         \@@_attr_new_entry:nn #1
       }
+%    \end{macrocode}
+% deprecated name
+%    \begin{macrocode}
+   ,newattribute .code:n =
+      {
+        \@@_attr_new_entry:nn #1
+      },   
   }
 %    \end{macrocode}
 % \end{macro}

Modified: trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-tree.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-tree.dtx	2024-02-23 22:02:28 UTC (rev 70093)
+++ trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-tree.dtx	2024-02-23 22:02:49 UTC (rev 70094)
@@ -47,13 +47,13 @@
 %    }^^A
 % }
 %
-% \date{Version 0.98v, released 2024-02-04}
+% \date{Version 0.98w, released 2024-02-22}
 % \maketitle
 % \begin{implementation}
 %    \begin{macrocode}
 %<@@=tag>
 %<*header>
-\ProvidesExplPackage {tagpdf-tree-code} {2024-02-04} {0.98v}
+\ProvidesExplPackage {tagpdf-tree-code} {2024-02-22} {0.98w}
  {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	2024-02-23 22:02:28 UTC (rev 70093)
+++ trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-user.dtx	2024-02-23 22:02:49 UTC (rev 70094)
@@ -46,7 +46,7 @@
 %    }^^A
 % }
 %
-% \date{Version 0.98v, released 2024-02-04}
+% \date{Version 0.98w, released 2024-02-22}
 % \maketitle
 % \begin{documentation}
 % \section{Setup commands}
@@ -60,8 +60,8 @@
 %
 % \begin{function}{activate (setup-key)}
 % And additional setup key which combine the other activate keys
-% |activate-mc|, |activate-tree|, |activate-struct| and additionally
-% add a document structure.
+% |activate/mc|, |activate/tree|, |activate/struct| and additionally
+% adds a document structure.
 % \end{function}
 %
 % \begin{function}{\tag_tool:n,\tagtool}
@@ -109,7 +109,7 @@
 % \end{syntax}
 % These are direct wrappers around |\tag_struct_begin:n|,
 % |\tag_struct_end:| and |\tag_struct_use:n|.
-% The commands and their argument are documentated in the \pkg{tagpdf-struct} module.
+% The commands and their argument are documented in the \pkg{tagpdf-struct} module.
 % \end{function}
 
 
@@ -183,22 +183,24 @@
 % pdftex.
 % \end{function}
 %
-% \subsection{Paratagging}
+% \subsection{Tagging of paragraphs}
 %
-% This is a first try to make use of the new paragraph hooks in a current LaTeX to
+% This makes use of the paragraph hooks in LaTeX to
 % automate the tagging of paragraph. It requires sane paragraph nesting,
 % faulty code, e.g. a missing |\par| at the end of a low-level vbox can highly
 % confuse the tagging. The tags should be carefully checked if this is used.
 %
-% \begin{function}{paratagging (setup-key),paratagging-show (setup-key)}
+% \begin{function}{para/tagging (setup-key),paratagging-show (deprecated),paratagging (deprecated)}
 %  \begin{syntax}
-%    |paratagging| = |true|\verb+|+|false|\\
-%    |paratagging-show| = |true|\verb+|+|false|\\
+%    |para/tagging| = |true|\verb+|+|false|\\
+%    |debug/show=para|\\
+%    |debug/show=paraOff|   
 %  \end{syntax}
-% This keys can be used in |\tagpdfsetup| and enable/disable paratagging.
-% |paratagging-show| puts small red numbers at the begin and end of a paragraph.
+% The |para/tagging| key can be used in |\tagpdfsetup| and enable/disables tagging
+% of paragraphics.
+% |debug/show=para| puts small colored numbers at the begin and end of a paragraph.
 % This is meant as a debugging help. The number are boxes and have a (tiny) height,
-% so they can affect typesetting.
+% so they can affect typesetting. 
 % \end{function}
 %
 % \begin{function}{\tagpdfparaOn,\tagpdfparaOff}
@@ -223,17 +225,21 @@
 % \end{function}
 %
 % \subsection{Header and footer}
-% Header and footer are automatically excluded from tagging. This can
-% be disabled with the following key.
+% Header and footer are automatically tagged as artifact:
+% They are surrounded by an artifact-mc and inside tagging is stopped.
 % If some real content is in the header and
 % footer, tagging must be restarted there explicitly.
-% The key accepts the values |true| which surrounds the header with an artifact
-% mc-chunk, |false| which disables the automatic tagging, and |pagination| which
+% The behaviour can be changed with the following key.
+% The key accepts the values |true| (the default),
+% |false| which disables the header tagging code. This can be useful
+% if the page style is empty (it then avoids empty mc-chunks) or
+% if the head and foot should be tagged in some special way.
+% The last value, |pagination|, is like |true| but
 % additionally adds an artifact structure with an pagination attribute.
 %
-% \begin{function}{exclude-header-footer (setup-key)}
+% \begin{function}{page/exclude-header-footer (setup-key)}
 %  \begin{syntax}
-%    |exclude-header-footer| = |true|\verb+|+|false|\verb+|+pagination
+%    |page/exclude-header-footer| = |true|\verb+|+|false|\verb+|+pagination
 %  \end{syntax}%
 % \end{function}
 
@@ -264,7 +270,7 @@
 % \end{syntax}
 % \end{function}
 
-% The next \LaTeX{} will use special sockets for the tagging.
+% The next \LaTeX{} (2024-06-01) will use special sockets for the tagging.
 % 
 % These sockets will use names starting
 % with \texttt{tagsupport/}. Usually, these sockets have exactly two
@@ -303,7 +309,7 @@
 %    \begin{macrocode}
 %<@@=tag>
 %<*header>
-\ProvidesExplPackage {tagpdf-user} {2024-02-04} {0.98v}
+\ProvidesExplPackage {tagpdf-user} {2024-02-22} {0.98w}
   {tagpdf - user commands}
 %</header>
 %    \end{macrocode}
@@ -664,7 +670,7 @@
 %<*package>
 %    \end{macrocode}
 % \subsection{Document structure}
-% \begin{macro}{\g_@@_root_default_tl,activate (setup-key),activate-socket (setup-key)}
+% \begin{macro}{\g_@@_root_default_tl,activate (setup-key),activate/socket (setup-key)}
 %    \begin{macrocode}
 \tl_new:N\g_@@_root_default_tl
 \tl_gset:Nn\g_@@_root_default_tl {Document}
@@ -674,11 +680,11 @@
 
 \keys_define:nn { @@ / setup}
  {  
-   activate-socket .bool_set:N  = \l_@@_active_socket_bool, 
+   activate/socket .bool_set:N  = \l_@@_active_socket_bool, 
    activate  .code:n =
     {
       \keys_set:nn { @@ / setup }
-        { activate-mc,activate-tree,activate-struct,activate-socket }
+        { activate/mc,activate/tree,activate/struct,activate/socket }
       \tl_gset:Nn\g_@@_root_default_tl {#1}  
     },
    activate .default:n = Document
@@ -879,20 +885,52 @@
 %    \end{macrocode}
 %\begin{macro}
 % {
-%  paratagging (setup-key),
-%  paratagging-show (setup-key),
-%  paratag (setup-key),
-%  paratag (tool-key),
-%  unittag (tool-key),
-%  para-flattened (tool-key),
+%  para/tagging (setup-key),
+%  para/tag (setup-key),
+%  para/maintag (setup-key),
+%  para/tagging (tool-key),
+%  para/tag (tool-key),
+%  para/maintag (tool-key),
+%  para/flattened (tool-key),
+%  unittag (deprecated),
+%  para-flattened (deprecated),
+%  paratagging (deprecated),
+%  paratagging-show (deprecated),
+%  paratag (deprecated),
 %  }
-% These keys enable/disable locally paratagging, and the debug modus.
-% It can affect the typesetting if |paratagging-show| is used. The small numbers
-% are boxes and they have a (small) height. The |paratag| key sets the tag used by
-% the next automatic paratagging, it can also be changed with |\tag_tool:n|
+% These keys enable/disable locally paratagging. 
+% Paragraphs are typically tagged with two structure: A main structure
+% around the whole paragraph, and inner structures around the various chunks.
+% Debugging can be
+% activated locally with |debug/show=para|, this can affect the typesetting 
+% as the small numbers
+% are boxes and they have a (small) height. Debugging can be deactivated
+% with |debug/show=paraOff| 
+% The |para/tag| key sets the tag used by
+% the inner structure, |para/maintag| the tag of the outer structure,
+% both can also be changed with |\tag_tool:n|
 %    \begin{macrocode}
 \keys_define:nn { @@ / setup }
   {
+    para/tagging      .bool_set:N = \l_@@_para_bool,
+    debug/show/para   .code:n = {\bool_set_true:N \l_@@_para_show_bool},
+    debug/show/paraOff  .code:n = {\bool_set_false:N \l_@@_para_show_bool},
+    para/tag          .tl_set:N   = \l_@@_para_tag_tl,
+    para/maintag      .tl_set:N   = \l_@@_para_main_tag_tl,
+    para/flattened    .bool_set:N = \l_@@_para_flattened_bool
+  }
+\keys_define:nn { tag / tool} 
+  {
+    para/tagging   .bool_set:N = \l_@@_para_bool,
+    para/tag       .tl_set:N = \l_@@_para_tag_tl,
+    para/maintag   .tl_set:N = \l_@@_para_main_tag_tl,
+    para/flattened .bool_set:N = \l_@@_para_flattened_bool
+  }
+%    \end{macrocode}
+% the deprecated names
+%    \begin{macrocode}
+\keys_define:nn { @@ / setup }
+  {
     paratagging      .bool_set:N = \l_@@_para_bool,
     paratagging-show .bool_set:N = \l_@@_para_show_bool,
     paratag          .tl_set:N   = \l_@@_para_tag_tl
@@ -899,6 +937,7 @@
   }
 \keys_define:nn { tag / tool} 
   {
+    para    .bool_set:N = \l_@@_para_bool,
     paratag .tl_set:N = \l_@@_para_tag_tl,
     unittag .tl_set:N = \l_@@_para_main_tag_tl,
     para-flattened .bool_set:N = \l_@@_para_flattened_bool
@@ -1133,11 +1172,6 @@
 %<*package>
 \renewcommand\tagpdfparaOn {\bool_set_true:N \l_@@_para_bool}
 \renewcommand\tagpdfparaOff{\bool_set_false:N \l_@@_para_bool}
-\keys_define:nn { tag / tool} 
-  {
-    para .bool_set:N = \l_@@_para_bool,
-    para-flattened .bool_set:N = \l_@@_para_flattened_bool,
-  }  
 %    \end{macrocode}
 % \end{macro}
 %
@@ -1248,12 +1282,12 @@
  }
 %    \end{macrocode}
 % And now the keys
-% \begin{macro}{exclude-header-footer (setup-key)}
+% \begin{macro}{page/exclude-header-footer (setup-key),exclude-header-footer (deprecated)}
 %    \begin{macrocode}
 \keys_define:nn { @@ / setup }
   {
-    exclude-header-footer .choice:,
-    exclude-header-footer / true .code:n =
+    page/exclude-header-footer .choice:,
+    page/exclude-header-footer / true .code:n =
      {
        \cs_set_eq:NN \@@_hook_kernel_before_head: \@@_exclude_headfoot_begin:
        \cs_set_eq:NN \@@_hook_kernel_before_foot: \@@_exclude_headfoot_begin:
@@ -1260,7 +1294,7 @@
        \cs_set_eq:NN \@@_hook_kernel_after_head:  \@@_exclude_headfoot_end:
        \cs_set_eq:NN \@@_hook_kernel_after_foot:  \@@_exclude_headfoot_end:
      },
-    exclude-header-footer / pagination .code:n =
+    page/exclude-header-footer / pagination .code:n =
      {
        \cs_set:Nn \@@_hook_kernel_before_head: { \@@_exclude_struct_headfoot_begin:n {pagination} }
        \cs_set:Nn \@@_hook_kernel_before_foot: { \@@_exclude_struct_headfoot_begin:n {pagination} }
@@ -1267,7 +1301,7 @@
        \cs_set_eq:NN \@@_hook_kernel_after_head:  \@@_exclude_struct_headfoot_end:
        \cs_set_eq:NN \@@_hook_kernel_after_foot:  \@@_exclude_struct_headfoot_end:
      },
-    exclude-header-footer / false .code:n =
+    page/exclude-header-footer / false .code:n =
      {
        \cs_set_eq:NN \@@_hook_kernel_before_head: \prg_do_nothing:
        \cs_set_eq:NN \@@_hook_kernel_before_foot: \prg_do_nothing:
@@ -1274,8 +1308,12 @@
        \cs_set_eq:NN \@@_hook_kernel_after_head:  \prg_do_nothing:
        \cs_set_eq:NN \@@_hook_kernel_after_foot:  \prg_do_nothing:
      },
-   exclude-header-footer .default:n = true,
-   exclude-header-footer .initial:n = true
+   page/exclude-header-footer .default:n = true,
+   page/exclude-header-footer .initial:n = true,
+%    \end{macrocode}
+% deprecated name
+%    \begin{macrocode}
+   exclude-header-footer .meta:n = { page/exclude-header-footer = {#1} }
   }
 %    \end{macrocode}
 % \end{macro}

Modified: trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf.dtx	2024-02-23 22:02:28 UTC (rev 70093)
+++ trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf.dtx	2024-02-23 22:02:49 UTC (rev 70094)
@@ -42,34 +42,37 @@
 % in debugging messages to allow to follow the nesting.
 % \end{function}
 %
-% \begin{function}{activate-space (setup-key)}
-%  |activate-space| activates the additional parsing needed for
-%  interword spaces. It is not documented, the parsing is currently
-%  implicitly activated by the known key |interwordspace|, as the code will
-%  perhaps move to some other place, now that it is better separated.
+% \begin{function}{activate/spaces (setup-key)}
+%  |activate/spaces| activates the additional parsing needed for
+%  interword spaces. It replaces the deprecated key |interwordspace|.
 % \end{function}
 %
-% \begin{function}{activate-mc (setup-key),
-%    activate-tree (setup-key),
-%    activate-struct (setup-key),
-%    activate-all (setup-key)}
-% Keys to activate the various tagging steps
+% \begin{function}{activate/mc (setup-key),
+%    activate/tree (setup-key),
+%    activate/struct (setup-key),
+%    activate/all (setup-key),
+%    activate-mc (deprecated),
+%    activate-tree (deprecated),
+%    activate-struct (deprecated),
+%    activate-all (deprecated),
+%    }
+% Keys to activate the various tagging steps. 
 % \end{function}
-%\begin{function}{no-struct-dest (setup-key)}
+%\begin{function}{activate/struct-dest (setup-key),no-struct-dest (deprecated)}
 % The key allows to suppress the creation of structure destinations
 % \end{function}
 %
-% \begin{function}{log (setup-key)}
-% The |log| takes currently the values |none|, |v|, |vv|, |vvv|, |all|.
+% \begin{function}{debug/log (setup-key)}
+% The |debug/log| key takes currently the values |none|, |v|, |vv|, |vvv|, |all|.
 % More details are in \texttt{tagpdf-checks}.
 % \end{function}
 %
-% \begin{function}{tagunmarked (setup-key)}
+% \begin{function}{activate/tagunmarked (setup-key), tagunmarked (deprecated) }
 % This key allows to set if (in luamode) unmarked text should be
 % marked up as artifact. The initial value is true.
 % \end{function}
 %
-% \begin{function}{tabsorder (setup-key)}
+% \begin{function}{page/tabsorder (setup-key), tabsorder (deprecated)}
 % This sets the tabsorder on a page. The values are |row|, |column|, |structure| (default)
 % or |none|. Currently this is set more or less globally. More finer control can be
 % added if needed.
@@ -84,7 +87,7 @@
 %    \begin{macrocode}
 %<@@=tag>
 %<*package>
-\ProvidesExplPackage {tagpdf} {2024-02-04} {0.98v}
+\ProvidesExplPackage {tagpdf} {2024-02-22} {0.98w}
   { A package to experiment with pdf tagging }
 
 \bool_if:nF
@@ -110,7 +113,7 @@
 %    \end{macrocode}
 %<*debug>
 %    \begin{macrocode}
-\ProvidesExplPackage {tagpdf-debug} {2024-02-04} {0.98v}
+\ProvidesExplPackage {tagpdf-debug} {2024-02-22} {0.98w}
   { debug code for tagpdf }
 \@ifpackageloaded{tagpdf}{}{\PackageWarning{tagpdf-debug}{tagpdf~not~loaded,~quitting}\endinput}
 %    \end{macrocode}
@@ -133,7 +136,7 @@
 % we define a base package with dummy functions
 %    \begin{macrocode}
 %<*base>
-\ProvidesExplPackage {tagpdf-base} {2024-02-04} {0.98v}
+\ProvidesExplPackage {tagpdf-base} {2024-02-22} {0.98w}
   {part of tagpdf - provide base, no-op versions of the user commands }
 %</base>
 %    \end{macrocode} 
@@ -278,7 +281,7 @@
 % commands, the struct-boolean activates the storing of the structure data.
 % In a normal document all should be active, the split is only there for
 % debugging purpose.
-% Structure destination will be activated automatically if pdf version 2.0 is detected,
+% Structure destination will be activated automatically,
 % but with the boolean struct-dest-boolean one can suppress them.
 % Also we assume currently that they are set only at begin document. But
 % if some control passing over groups are needed they could be perhaps
@@ -329,10 +332,10 @@
 \cs_generate_variant:Nn \pdf_object_ref:n {e}
 \cs_generate_variant:Nn \pdfannot_dict_put:nnn {nne}
 \cs_generate_variant:Nn \pdffile_embed_stream:nnn {nee,oee}
-\cs_generate_variant:Nn \prop_gput:Nnn {Nee,Nen}
-\cs_generate_variant:Nn \prop_put:Nnn  {Nee}
-\cs_generate_variant:Nn \prop_item:Nn {No,Ne}
-\cs_generate_variant:Nn \seq_set_split:Nnn{Nne}
+\cs_generate_variant:Nn \prop_gput:Nnn {Nee,Nen} %** unneeded
+\cs_generate_variant:Nn \prop_put:Nnn  {Nee}     %** unneeded
+\cs_generate_variant:Nn \prop_item:Nn {No,Ne}    %**  unneeded
+\cs_generate_variant:Nn \seq_set_split:Nnn{Nne}  %**  unneeded
 \cs_generate_variant:Nn \str_set_convert:Nnnn {Nonn, Noon, Nnon }
 \cs_generate_variant:Nn \clist_map_inline:nn {on}
 %    \end{macrocode}
@@ -340,6 +343,7 @@
 % \section{Label and Reference commands}
 % To ease transition to properties we setup internal definition. They can be replaced
 % by the property definitions once that is released.
+% %** do it!
 % \begin{macro}{\@@_property_new:nnnn,\@@_property_gset:nnnn,\@@_property_ref:nnn}
 % At first a command to define new properties
 %    \begin{macrocode}
@@ -425,6 +429,7 @@
 % \begin{macro}
 %  {
 %    \@@_prop_new:N
+%    ,\@@_prop_new_linked:N
 %    ,\@@_seq_new:N
 %    ,\@@_prop_gput:Nnn
 %    ,\@@_seq_gput_right:Nn
@@ -435,6 +440,7 @@
 %  }
 %    \begin{macrocode}
 \cs_set_eq:NN \@@_prop_new:N        \prop_new:N
+\cs_set_eq:NN \@@_prop_new_linked:N \prop_new_linked:N
 \cs_set_eq:NN \@@_seq_new:N         \seq_new:N
 \cs_set_eq:NN \@@_prop_gput:Nnn     \prop_gput:Nnn
 \cs_set_eq:NN \@@_seq_gput_right:Nn \seq_gput_right:Nn
@@ -539,78 +545,103 @@
 %
 %
 % \section{Keys for tagpdfsetup}
-
+%
 % TODO: the log-levels must be sorted
 %
 % \begin{macro}
 %  {
-%    activate-space (setup-key),
-%    activate-mc (setup-key),
-%    activate-tree (setup-key),
-%    activate-struct (setup-key),
-%    activate-all (setup-key),
-%    no-struct-dest (setup-key),
+%    activate/mc (setup-key),
+%    activate/tree (setup-key),
+%    activate/struct (setup-key),
+%    activate/all (setup-key),
+%    activate/struct-dest (setup-key),
 %  }
 %  Keys to (globally) activate tagging.
-%  |activate-space| activates the additional parsing needed for
-%  interword spaces. It is not documented, the parsing is currently
-%  implicitly activated by the known key |interwordspace|, as the code will
-%  perhaps move to some other place, now that it is better separated.
-%  |no-struct-dest| allows to suppress structure destinations.
+%  |activate/spaces| activates the additional parsing needed for
+%  interword spaces. It is defined in tagpdf-space. 
+%  |activate/struct-dest| allows to activate or suppress structure destinations.
 %    \begin{macrocode}
 %<*package>
 \keys_define:nn { @@ / setup }
   {
-    activate-space  .bool_gset:N = \g_@@_active_space_bool,
+    activate/mc     .bool_gset:N = \g_@@_active_mc_bool,
+    activate/tree   .bool_gset:N = \g_@@_active_tree_bool,
+    activate/struct .bool_gset:N = \g_@@_active_struct_bool,
+    activate/all    .meta:n =
+      {activate/mc={#1},activate/tree={#1},activate/struct={#1}},
+    activate/all  .default:n = true,
+    activate/struct-dest .bool_gset:N = \g_@@_active_struct_dest_bool,
+%    \end{macrocode}
+% old, deprecated names
+%    \begin{macrocode}
     activate-mc     .bool_gset:N = \g_@@_active_mc_bool,
     activate-tree   .bool_gset:N = \g_@@_active_tree_bool,
     activate-struct .bool_gset:N = \g_@@_active_struct_bool,
     activate-all    .meta:n =
-      {activate-mc={#1},activate-tree={#1},activate-struct={#1}},
+      {activate/mc={#1},activate/tree={#1},activate/struct={#1}},
     activate-all  .default:n = true,
-    no-struct-dest .bool_gset_inverse:N = \g_@@_active_struct_dest_bool,
- %    \end{macrocode}
+    no-struct-dest .bool_gset_inverse:N = \g_@@_active_struct_dest_bool,    
+%    \end{macrocode}
 % \end{macro}
-% \begin{macro}{log (setup-key)}
+% \begin{macro}{debug/show (setup-key)}
+% Subkeys/values are defined in various other places.
+%    \begin{macrocode}
+    debug/show            .choice:,
+%    \end{macrocode}
+% \end{macro}
+% \begin{macro}{debug/log (setup-key), debug/uncompress (setup-key), log (deprecated), uncompress (deprecated)}
 % The |log| takes currently the values |none|, |v|, |vv|, |vvv|, |all|.
 % The description of the log levels is in tagpdf-checks.
 %    \begin{macrocode}
-    log             .choice:,
-    log / none      .code:n = {\int_set:Nn \l_@@_loglevel_int { 0 }},
-    log / v         .code:n =
+    debug/log             .choice:,
+    debug/log / none      .code:n = {\int_set:Nn \l_@@_loglevel_int { 0 }},
+    debug/log / v         .code:n =
       {
         \int_set:Nn \l_@@_loglevel_int { 1 }
         \cs_set_protected:Nn \@@_check_typeout_v:n { \iow_term:e {##1} }
       },
-    log / vv        .code:n = {\int_set:Nn \l_@@_loglevel_int { 2 }},
-    log / vvv       .code:n = {\int_set:Nn \l_@@_loglevel_int { 3 }},
-    log / all       .code:n = {\int_set:Nn \l_@@_loglevel_int { 10 }},
+    debug/log / vv        .code:n = {\int_set:Nn \l_@@_loglevel_int { 2 }},
+    debug/log / vvv       .code:n = {\int_set:Nn \l_@@_loglevel_int { 3 }},
+    debug/log / all       .code:n = {\int_set:Nn \l_@@_loglevel_int { 10 }},
+    debug/uncompress .code:n = { \pdf_uncompress:  },    
 %    \end{macrocode}
+% deprecated but still needed as the documentmetadata key argument uses it.
+%    \begin{macrocode}
+    log             .meta:n = {debug/log={#1}},
+    uncompress      .code:n = { \pdf_uncompress:  },
+%    \end{macrocode}
 % \end{macro}
-% \begin{macro}{tagunmarked (setup-key)}
+% \begin{macro}{activate/tagunmarked (setup-key),tagunmarked (deprecated)}
 % This key allows to set if (in luamode) unmarked text should be
 % marked up as artifact. The initial value is true.
 %    \begin{macrocode}
-    tagunmarked     .bool_gset:N = \g_@@_tagunmarked_bool,
-    tagunmarked     .initial:n  = true,
+    activate/tagunmarked     .bool_gset:N = \g_@@_tagunmarked_bool,
+    activate/tagunmarked     .initial:n  = true,
 %    \end{macrocode}
+% deprecated name
+%    \begin{macrocode}
+    tagunmarked .bool_gset:N = \g_@@_tagunmarked_bool,
+%    \end{macrocode}
 % \end{macro}
-% \begin{macro}{tabsorder (setup-key)}
+% \begin{macro}{page/tabsorder (setup-key),tabsorder (deprecated)}
 % This sets the tabsorder on a page. The values are |row|, |column|, |structure| (default)
 % or |none|. Currently this is set more or less globally. More finer control can be
 % added if needed.
 %    \begin{macrocode}
-    tabsorder       .choice:,
-    tabsorder / row       .code:n =
+    page/tabsorder       .choice:,
+    page/tabsorder / row       .code:n =
       \pdfmanagement_add:nnn { Page } {Tabs}{/R},
-    tabsorder / column    .code:n =
+    page/tabsorder / column    .code:n =
       \pdfmanagement_add:nnn { Page } {Tabs}{/C},
-    tabsorder / structure .code:n =
+    page/tabsorder / structure .code:n =
       \pdfmanagement_add:nnn { Page } {Tabs}{/S},
-    tabsorder / none      .code:n =
+    page/tabsorder / none      .code:n =
       \pdfmanagement_remove:nn {Page} {Tabs},
-    tabsorder       .initial:n = structure,
-    uncompress      .code:n = { \pdf_uncompress:  },
+    page/tabsorder       .initial:n = structure,
+%    \end{macrocode}
+% deprecated name
+%    \begin{macrocode}
+    tabsorder .meta:n = {page/tabsorder={#1}},    
   }
 %    \end{macrocode}
 % \end{macro}

Modified: trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-base.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-base.sty	2024-02-23 22:02:28 UTC (rev 70093)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-base.sty	2024-02-23 22:02:49 UTC (rev 70094)
@@ -25,7 +25,7 @@
 %% and all files in that bundle must be distributed together.
 %% 
 %% File: tagpdf.dtx
-\ProvidesExplPackage {tagpdf-base} {2024-02-04} {0.98v}
+\ProvidesExplPackage {tagpdf-base} {2024-02-22} {0.98w}
   {part of tagpdf - provide base, no-op versions of the user commands }
 \AddToHook{begindocument}
  {
@@ -45,7 +45,6 @@
 \cs_new_protected:Npn \tagstart{}
 \cs_new_protected:Npn \tag_stop:n  #1 {}
 \cs_new_protected:Npn \tag_start:n #1 {}
-
 %% File: tagpdf-mc-generic.dtx
 \cs_new_protected:Npn \tag_mc_begin:n #1 { \__tag_whatsits: \int_gincr:N \c at g__tag_MCID_abs_int }
 \cs_new_protected:Nn \tag_mc_end:{ \__tag_whatsits: }
@@ -68,7 +67,7 @@
 \int_gzero:N \c at g__tag_struct_abs_int
 \tl_new:N  \g__tag_struct_stack_current_tl
 \tl_gset:Nn \g__tag_struct_stack_current_tl {\int_use:N\c at g__tag_struct_abs_int}
-\prop_new:N \g__tag_struct_dest_num_prop
+\prop_new_linked:N \g__tag_struct_dest_num_prop
 
 \cs_new:Npn \__tag_get_data_struct_num:
   {

Modified: trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-debug-generic.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-debug-generic.sty	2024-02-23 22:02:28 UTC (rev 70093)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-debug-generic.sty	2024-02-23 22:02:49 UTC (rev 70094)
@@ -19,7 +19,7 @@
 %% and all files in that bundle must be distributed together.
 %% 
 %% File: tagpdf-mc-generic.dtx
-\ProvidesExplPackage {tagpdf-debug-generic} {2024-02-04} {0.98v}
+\ProvidesExplPackage {tagpdf-debug-generic} {2024-02-22} {0.98w}
  {part of tagpdf - debugging code related to marking chunks - generic mode}
 \cs_set_protected:Npn \tag_mc_begin:n #1 %#1 keyval
   {

Modified: trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-debug-lua.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-debug-lua.sty	2024-02-23 22:02:28 UTC (rev 70093)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-debug-lua.sty	2024-02-23 22:02:49 UTC (rev 70094)
@@ -19,7 +19,7 @@
 %% and all files in that bundle must be distributed together.
 %% 
 %% File: tagpdf-mc-luacode.dtx
-\ProvidesExplPackage {tagpdf-debug-lua} {2024-02-04} {0.98v}
+\ProvidesExplPackage {tagpdf-debug-lua} {2024-02-22} {0.98w}
  {part of tagpdf - debugging code related to marking chunks - lua mode}
 \cs_set_protected:Npn \__tag_mc_handle_stash:n #1 %1 mcidnum
   {

Modified: trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-debug.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-debug.sty	2024-02-23 22:02:28 UTC (rev 70093)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-debug.sty	2024-02-23 22:02:49 UTC (rev 70094)
@@ -26,7 +26,7 @@
 %% and all files in that bundle must be distributed together.
 %% 
 %% File: tagpdf.dtx
-\ProvidesExplPackage {tagpdf-debug} {2024-02-04} {0.98v}
+\ProvidesExplPackage {tagpdf-debug} {2024-02-22} {0.98w}
   { debug code for tagpdf }
 \@ifpackageloaded{tagpdf}{}{\PackageWarning{tagpdf-debug}{tagpdf~not~loaded,~quitting}\endinput}
 \prop_gput:Nnn \g_msg_module_type_prop { tag / debug} {}
@@ -76,7 +76,6 @@
       }
     \msg_note:nnxx {tag / debug }{tag-start}{ \int_use:N \l__tag_tag_stop_int }{#1}
   }
-
 \bool_if:NTF \g__tag_mode_lua_bool
   {
    \RequirePackage {tagpdf-debug-lua}

Modified: trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-luatex.def
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-luatex.def	2024-02-23 22:02:28 UTC (rev 70093)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-luatex.def	2024-02-23 22:02:49 UTC (rev 70094)
@@ -19,7 +19,7 @@
 %% and all files in that bundle must be distributed together.
 %% 
 %% File: tagpdf-backend.dtx
-\ProvidesExplFile {tagpdf-luatex.def} {2024-02-04} {0.98v}
+\ProvidesExplFile {tagpdf-luatex.def} {2024-02-22} {0.98w}
   {tagpdf~driver~for~luatex}
 {
   \fontencoding{TU}\fontfamily{lmr}\fontseries{m}\fontshape{n}\fontsize{10pt}{10pt}\selectfont
@@ -31,6 +31,12 @@
     \lua_now:e { ltx.__tag.tables.\cs_to_str:N#1 = {} }
   }
 
+\cs_set_protected:Npn \__tag_prop_new_linked:N #1
+  {
+    \prop_new_linked:N #1
+    \lua_now:e { ltx.__tag.tables.\cs_to_str:N#1 = {} }
+  }
+
 \cs_set_protected:Npn \__tag_seq_new:N #1
   {
     \seq_new:N #1

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	2024-02-23 22:02:28 UTC (rev 70093)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-generic.sty	2024-02-23 22:02:49 UTC (rev 70094)
@@ -19,7 +19,7 @@
 %% and all files in that bundle must be distributed together.
 %% 
 %% File: tagpdf-mc-generic.dtx
-\ProvidesExplPackage {tagpdf-mc-code-generic} {2024-02-04} {0.98v}
+\ProvidesExplPackage {tagpdf-mc-code-generic} {2024-02-22} {0.98w}
  {part of tagpdf - code related to marking chunks - generic mode}
 \tl_new:N \l__tag_mc_ref_abspage_tl
 

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	2024-02-23 22:02:28 UTC (rev 70093)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-lua.sty	2024-02-23 22:02:49 UTC (rev 70094)
@@ -19,7 +19,7 @@
 %% and all files in that bundle must be distributed together.
 %% 
 %% File: tagpdf-mc-luacode.dtx
-\ProvidesExplPackage {tagpdf-mc-code-lua} {2024-02-04} {0.98v}
+\ProvidesExplPackage {tagpdf-mc-code-lua} {2024-02-22} {0.98w}
   {tagpdf - mc code only for the luamode }
 \hook_gput_code:nnn{begindocument}{tagpdf/mc}
   {

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	2024-02-23 22:02:28 UTC (rev 70093)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex-book.def	2024-02-23 22:02:49 UTC (rev 70094)
@@ -19,7 +19,7 @@
 %% and all files in that bundle must be distributed together.
 %% 
 %% File: tagpdf-data.dtx
-%% \ProvidesExplFile {tagpdf-ns-latex-book.def} {2024-02-04} {0.98v}
+%% \ProvidesExplFile {tagpdf-ns-latex-book.def} {2024-02-22} {0.98w}
 %% {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.def
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex.def	2024-02-23 22:02:28 UTC (rev 70093)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex.def	2024-02-23 22:02:49 UTC (rev 70094)
@@ -19,7 +19,7 @@
 %% and all files in that bundle must be distributed together.
 %% 
 %% File: tagpdf-data.dtx
-%% \ProvidesExplFile {tagpdf-ns-latex.def} {2024-02-04} {0.98v}
+%% \ProvidesExplFile {tagpdf-ns-latex.def} {2024-02-22} {0.98w}
 %% {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	2024-02-23 22:02:28 UTC (rev 70093)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-mathml.def	2024-02-23 22:02:49 UTC (rev 70094)
@@ -19,7 +19,7 @@
 %% and all files in that bundle must be distributed together.
 %% 
 %% File: tagpdf-data.dtx
-%% \ProvidesExplFile {tagpdf-ns-mathml.def} {2024-02-04} {0.98v}
+%% \ProvidesExplFile {tagpdf-ns-mathml.def} {2024-02-22} {0.98w}
 abs,abs,mathml,
 and,and,mathml,
 annotation,annotation,mathml,

Modified: trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-pdf.def
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-pdf.def	2024-02-23 22:02:28 UTC (rev 70093)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-pdf.def	2024-02-23 22:02:49 UTC (rev 70094)
@@ -19,7 +19,7 @@
 %% and all files in that bundle must be distributed together.
 %% 
 %% File: tagpdf-data.dtx
-%% \ProvidesExplFile {tagpdf-ns-pdf.def} {2024-02-04} {0.98v}
+%% \ProvidesExplFile {tagpdf-ns-pdf.def} {2024-02-22} {0.98w}
 %%  {pdf}   {http://iso.org/pdf/ssn}{}
 StructTreeRoot,StructTreeRoot,pdf,D,
 Document,Document,pdf,D,

Modified: trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-pdf2.def
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-pdf2.def	2024-02-23 22:02:28 UTC (rev 70093)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-pdf2.def	2024-02-23 22:02:49 UTC (rev 70094)
@@ -19,7 +19,7 @@
 %% and all files in that bundle must be distributed together.
 %% 
 %% File: tagpdf-data.dtx
-%% \ProvidesExplFile {tagpdf-ns-pdf2.def} {2024-02-04} {0.98v}
+%% \ProvidesExplFile {tagpdf-ns-pdf2.def} {2024-02-22} {0.98w}
 %%  {pdf2}  {http://iso.org/pdf2/ssn}{}
 StructTreeRoot,StructTreeRoot,pdf2,D,
 Document,Document,pdf2,D,

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	2024-02-23 22:02:28 UTC (rev 70093)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-parent-child-2.csv	2024-02-23 22:02:49 UTC (rev 70094)
@@ -19,7 +19,7 @@
 %% and all files in that bundle must be distributed together.
 %% 
 %% File: tagpdf-data.dtx
-%% \ProvidesExplFile {tagpdf-parent-child-2.csv} {2024-02-04} {0.98v}
+%% \ProvidesExplFile {tagpdf-parent-child-2.csv} {2024-02-22} {0.98w}
 ,,,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	2024-02-23 22:02:28 UTC (rev 70093)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-parent-child.csv	2024-02-23 22:02:49 UTC (rev 70094)
@@ -19,7 +19,7 @@
 %% and all files in that bundle must be distributed together.
 %% 
 %% File: tagpdf-data.dtx
-%% \ProvidesExplFile {tagpdf-parent-child.csv} {2024-02-04} {0.98v}
+%% \ProvidesExplFile {tagpdf-parent-child.csv} {2024-02-22} {0.98w}
 ,,,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	2024-02-23 22:02:28 UTC (rev 70093)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf.lua	2024-02-23 22:02:49 UTC (rev 70094)
@@ -24,8 +24,8 @@
 
 local ProvidesLuaModule = {
     name          = "tagpdf",
-    version       = "0.98v",       --TAGVERSION
-    date          = "2024-02-04", --TAGDATE
+    version       = "0.98w",       --TAGVERSION
+    date          = "2024-02-22", --TAGDATE
     description   = "tagpdf lua code",
     license       = "The LATEX Project Public License 1.3c"
 }
@@ -328,7 +328,7 @@
  else -- assume a dvips variant
   function __tag_backend_create_bmc_node (tag)
     local bmcnode = nodenew("whatsit","special")
-    bmcnode.data = "ps:SDict begin mark/"..tag.." BMC pdfmark end"
+    bmcnode.data = "ps:SDict begin mark/"..tag.." /BMC pdfmark end"
     return bmcnode
   end
  end
@@ -358,7 +358,7 @@
  else -- assume a dvips variant
   function __tag_backend_create_bdc_node (tag,dict)
     local bdcnode = nodenew("whatsit","special")
-    bdcnode.data = "ps:SDict begin mark/"..tag.."<<"..dict..">> BDC pdfmark end"
+    bdcnode.data = "ps:SDict begin mark/"..tag.."<<"..dict..">> /BDC pdfmark end"
     return bdcnode
   end
  end
@@ -378,7 +378,7 @@
 end
 local function __tag_pdf_object_ref (name)
    local tokenname = 'c__pdf_backend_object_'..name..'_int'
-   local object = token.create(tokenname).index..' 0 R'
+   local object = token.create(tokenname).mode ..' 0 R'
    return object
 end
 ltx.__tag.func.pdf_object_ref=__tag_pdf_object_ref

Modified: trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf.sty	2024-02-23 22:02:28 UTC (rev 70093)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf.sty	2024-02-23 22:02:49 UTC (rev 70094)
@@ -28,7 +28,7 @@
 %% and all files in that bundle must be distributed together.
 %% 
 %% File: tagpdf.dtx
-\ProvidesExplPackage {tagpdf} {2024-02-04} {0.98v}
+\ProvidesExplPackage {tagpdf} {2024-02-22} {0.98w}
   { A package to experiment with pdf tagging }
 
 \bool_if:nF
@@ -118,10 +118,10 @@
 \cs_generate_variant:Nn \pdf_object_ref:n {e}
 \cs_generate_variant:Nn \pdfannot_dict_put:nnn {nne}
 \cs_generate_variant:Nn \pdffile_embed_stream:nnn {nee,oee}
-\cs_generate_variant:Nn \prop_gput:Nnn {Nee,Nen}
-\cs_generate_variant:Nn \prop_put:Nnn  {Nee}
-\cs_generate_variant:Nn \prop_item:Nn {No,Ne}
-\cs_generate_variant:Nn \seq_set_split:Nnn{Nne}
+\cs_generate_variant:Nn \prop_gput:Nnn {Nee,Nen} %** unneeded
+\cs_generate_variant:Nn \prop_put:Nnn  {Nee}     %** unneeded
+\cs_generate_variant:Nn \prop_item:Nn {No,Ne}    %**  unneeded
+\cs_generate_variant:Nn \seq_set_split:Nnn{Nne}  %**  unneeded
 \cs_generate_variant:Nn \str_set_convert:Nnnn {Nonn, Noon, Nnon }
 \cs_generate_variant:Nn \clist_map_inline:nn {on}
     \cs_new_eq:NN \__tag_property_new:nnnn \property_new:nnnn
@@ -165,6 +165,7 @@
 
 
 \cs_set_eq:NN \__tag_prop_new:N        \prop_new:N
+\cs_set_eq:NN \__tag_prop_new_linked:N \prop_new_linked:N
 \cs_set_eq:NN \__tag_seq_new:N         \seq_new:N
 \cs_set_eq:NN \__tag_prop_gput:Nnn     \prop_gput:Nnn
 \cs_set_eq:NN \__tag_seq_gput_right:Nn \seq_gput_right:Nn
@@ -219,41 +220,50 @@
         \__tag_start_para_ints:
       }
   }
-
 \keys_define:nn { __tag / setup }
   {
-    activate-space  .bool_gset:N = \g__tag_active_space_bool,
+    activate/mc     .bool_gset:N = \g__tag_active_mc_bool,
+    activate/tree   .bool_gset:N = \g__tag_active_tree_bool,
+    activate/struct .bool_gset:N = \g__tag_active_struct_bool,
+    activate/all    .meta:n =
+      {activate/mc={#1},activate/tree={#1},activate/struct={#1}},
+    activate/all  .default:n = true,
+    activate/struct-dest .bool_gset:N = \g__tag_active_struct_dest_bool,
     activate-mc     .bool_gset:N = \g__tag_active_mc_bool,
     activate-tree   .bool_gset:N = \g__tag_active_tree_bool,
     activate-struct .bool_gset:N = \g__tag_active_struct_bool,
     activate-all    .meta:n =
-      {activate-mc={#1},activate-tree={#1},activate-struct={#1}},
+      {activate/mc={#1},activate/tree={#1},activate/struct={#1}},
     activate-all  .default:n = true,
     no-struct-dest .bool_gset_inverse:N = \g__tag_active_struct_dest_bool,
- %    \end{macrocode}
-    log             .choice:,
-    log / none      .code:n = {\int_set:Nn \l__tag_loglevel_int { 0 }},
-    log / v         .code:n =
+    debug/show            .choice:,
+    debug/log             .choice:,
+    debug/log / none      .code:n = {\int_set:Nn \l__tag_loglevel_int { 0 }},
+    debug/log / v         .code:n =
       {
         \int_set:Nn \l__tag_loglevel_int { 1 }
         \cs_set_protected:Nn \__tag_check_typeout_v:n { \iow_term:e {##1} }
       },
-    log / vv        .code:n = {\int_set:Nn \l__tag_loglevel_int { 2 }},
-    log / vvv       .code:n = {\int_set:Nn \l__tag_loglevel_int { 3 }},
-    log / all       .code:n = {\int_set:Nn \l__tag_loglevel_int { 10 }},
-    tagunmarked     .bool_gset:N = \g__tag_tagunmarked_bool,
-    tagunmarked     .initial:n  = true,
-    tabsorder       .choice:,
-    tabsorder / row       .code:n =
+    debug/log / vv        .code:n = {\int_set:Nn \l__tag_loglevel_int { 2 }},
+    debug/log / vvv       .code:n = {\int_set:Nn \l__tag_loglevel_int { 3 }},
+    debug/log / all       .code:n = {\int_set:Nn \l__tag_loglevel_int { 10 }},
+    debug/uncompress .code:n = { \pdf_uncompress:  },
+    log             .meta:n = {debug/log={#1}},
+    uncompress      .code:n = { \pdf_uncompress:  },
+    activate/tagunmarked     .bool_gset:N = \g__tag_tagunmarked_bool,
+    activate/tagunmarked     .initial:n  = true,
+    tagunmarked .bool_gset:N = \g__tag_tagunmarked_bool,
+    page/tabsorder       .choice:,
+    page/tabsorder / row       .code:n =
       \pdfmanagement_add:nnn { Page } {Tabs}{/R},
-    tabsorder / column    .code:n =
+    page/tabsorder / column    .code:n =
       \pdfmanagement_add:nnn { Page } {Tabs}{/C},
-    tabsorder / structure .code:n =
+    page/tabsorder / structure .code:n =
       \pdfmanagement_add:nnn { Page } {Tabs}{/S},
-    tabsorder / none      .code:n =
+    page/tabsorder / none      .code:n =
       \pdfmanagement_remove:nn {Page} {Tabs},
-    tabsorder       .initial:n = structure,
-    uncompress      .code:n = { \pdf_uncompress:  },
+    page/tabsorder       .initial:n = structure,
+    tabsorder .meta:n = {page/tabsorder={#1}},
   }
 \sys_if_engine_luatex:T
   {
@@ -308,6 +318,7 @@
 \msg_new:nnn { tag } {role-missing}     { tag~#1~has~no~role~assigned  }
 \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-unknown-NS}  { \tl_if_empty:nTF{#1}{Empty~NS}{NS~#1~is~not~known} }
 \msg_new:nnn { tag } {role-parent-child}
   { Parent-Child~'#1'~-->~'#2'.\\Relation~is~#3~\msg_line_context:}
 \msg_new:nnn { tag } {role-remapping}
@@ -576,7 +587,7 @@
 
 \cs_new:Npn \__tag_get_mc_abs_cnt: { \int_use:N \c at g__tag_MCID_abs_int }
 \bool_new:N \g__tag_in_mc_bool
-\__tag_prop_new:N \g__tag_mc_parenttree_prop
+\__tag_prop_new_linked:N \g__tag_mc_parenttree_prop
 \seq_new:N \g__tag_mc_stack_seq
 \tl_new:N \l__tag_mc_artifact_type_tl
 \bool_new:N \l__tag_mc_key_stash_bool
@@ -708,7 +719,6 @@
   }
 %% File: tagpdf.dtx
 
-
 \bool_if:NTF \g__tag_mode_lua_bool
   {
    \RequirePackage {tagpdf-mc-code-lua}
@@ -1235,11 +1245,16 @@
       {
         \msg_info:nnn { tag }{new-tag}{#1}
       }
-    \prop_get:cnN { g__tag_role_NS_#4_class_prop } {#3}\l__tag_tmpa_tl
-    \quark_if_no_value:NT \l__tag_tmpa_tl
-      {
-        \tl_set:Nn\l__tag_tmpa_tl{--UNKNOWN--}
-      }
+    \prop_if_exist:cTF
+     { g__tag_role_NS_#4_class_prop }
+     {
+       \prop_get:cnN { g__tag_role_NS_#4_class_prop } {#3}\l__tag_tmpa_tl
+       \quark_if_no_value:NT \l__tag_tmpa_tl
+        {
+          \tl_set:Nn\l__tag_tmpa_tl{--UNKNOWN--}
+        }
+     }
+     { \tl_set:Nn\l__tag_tmpa_tl{--UNKNOWN--} }
     \__tag_role_alloctag:nnV {#1}{#2}\l__tag_tmpa_tl
     \tl_if_in:nnF {-pdf-pdf2-mathml-}{-#2-}
      {
@@ -1290,15 +1305,24 @@
      %#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_tmpa_tl
-        {
-         \tl_set:Ne #3 {\exp_last_unbraced:NV\use_i:nn   \l__tag_tmpa_tl}
-         \tl_set:Ne #4 {\exp_last_unbraced:NV\use_ii:nn  \l__tag_tmpa_tl}
-        }
-        {
-         \tl_set:Nn #3 {#1}
-         \tl_set:Nn #4 {#2}
-        }
+      \prop_if_exist:cTF {g__tag_role_NS_#2_prop}
+       {
+        \prop_get:cnNTF {g__tag_role_NS_#2_prop} {#1}\l__tag_get_tmpc_tl
+          {
+           \tl_set:Ne #3 {\exp_last_unbraced:NV\use_i:nn   \l__tag_get_tmpc_tl}
+           \tl_set:Ne #4 {\exp_last_unbraced:NV\use_ii:nn  \l__tag_get_tmpc_tl}
+          }
+          {
+           \msg_warning:nnn { tag } {role-unknown-tag} { #1 }
+           \tl_set:Nn #3 {#1}
+           \tl_set:Nn #4 {#2}
+          }
+       }
+       {
+          \msg_warning:nnn { tag } {role-unknown-NS} { #2 }
+          \tl_set:Nn #3 {#1}
+          \tl_set:Nn #4 {#2}
+       }
     }
    \cs_generate_variant:Nn \__tag_role_get:nnNN {VVNN}
  }
@@ -1633,20 +1657,27 @@
             \tl_set:Nn \l__tag_tmpa_tl {#1}
           }
           {
-            \prop_get:cnNTF
-               { g__tag_role_NS_#2_prop }
-               {#1}
-               \l__tag_tmpa_tl
-               {
-                 \tl_set:Ne \l__tag_tmpa_tl {\tl_head:N\l__tag_tmpa_tl}
-                 \tl_if_empty:NT\l__tag_tmpa_tl
-                   {
-                     \tl_set:Nn \l__tag_tmpa_tl {#1}
-                   }
-               }
-               {
-                 \tl_set:Nn \l__tag_tmpa_tl {\q_no_value}
-               }
+            \prop_if_exist:cTF { g__tag_role_NS_#2_prop }
+              {
+               \prop_get:cnNTF
+                  { g__tag_role_NS_#2_prop }
+                  {#1}
+                  \l__tag_tmpa_tl
+                  {
+                    \tl_set:Ne \l__tag_tmpa_tl {\tl_head:N\l__tag_tmpa_tl}
+                    \tl_if_empty:NT\l__tag_tmpa_tl
+                      {
+                        \tl_set:Nn \l__tag_tmpa_tl {#1}
+                      }
+                  }
+                  {
+                    \tl_set:Nn \l__tag_tmpa_tl {\q_no_value}
+                  }
+              }
+              {
+                \msg_warning:nnn { tag } {role-unknown-NS} { #2}
+                \tl_set:Nn \l__tag_tmpa_tl {\q_no_value}
+              }
           }
         \tl_if_empty:nTF  {#4}
           {
@@ -1653,18 +1684,25 @@
             \tl_set:Nn \l__tag_tmpb_tl {#3}
           }
           {
-            \prop_get:cnNTF
-              { g__tag_role_NS_#4_prop }
-              {#3}
-              \l__tag_tmpb_tl
+            \prop_if_exist:cTF { g__tag_role_NS_#4_prop }
               {
-                \tl_set:Ne \l__tag_tmpb_tl { \tl_head:N\l__tag_tmpb_tl }
-                \tl_if_empty:NT\l__tag_tmpb_tl
-                  {
-                    \tl_set:Nn \l__tag_tmpb_tl {#3}
-                  }
+               \prop_get:cnNTF
+                 { g__tag_role_NS_#4_prop }
+                 {#3}
+                 \l__tag_tmpb_tl
+                 {
+                   \tl_set:Ne \l__tag_tmpb_tl { \tl_head:N\l__tag_tmpb_tl }
+                   \tl_if_empty:NT\l__tag_tmpb_tl
+                     {
+                       \tl_set:Nn \l__tag_tmpb_tl {#3}
+                     }
+                 }
+                 {
+                   \tl_set:Nn \l__tag_tmpb_tl {\q_no_value}
+                 }
               }
               {
+                \msg_warning:nnn { tag } {role-unknown-NS} { #4}
                 \tl_set:Nn \l__tag_tmpb_tl {\q_no_value}
               }
           }
@@ -1720,8 +1758,8 @@
 
 \keys_define:nn { __tag / setup }
   {
-     mathml-tags .bool_gset:N = \g__tag_role_add_mathml_bool
-    ,add-new-tag .code:n =
+     role/mathml-tags .bool_gset:N = \g__tag_role_add_mathml_bool
+    ,role/new-tag .code:n =
      {
        \keys_set_known:nnnN
          {__tag/tag-role}
@@ -1767,6 +1805,11 @@
            \l__tag_role_role_namespace_tmpa_tl
        }
     }
+   ,role/map-tags .choice:
+   ,role/map-tags/false .code:n = { \socket_assign_plug:nn { tag/struct/tag } {latex-tags} }
+   ,role/map-tags/pdf   .code:n = { \socket_assign_plug:nn { tag/struct/tag } {pdf-tags} }
+   , mathml-tags .bool_gset:N = \g__tag_role_add_mathml_bool
+   , add-new-tag .meta:n = {role/new-tag={#1}}
   }
 %% File: tagpdf-struct.dtx
 \__tag_seq_new:N  \g__tag_struct_objR_seq
@@ -1822,7 +1865,7 @@
 \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
+\prop_new_linked:N \g__tag_struct_ref_by_dest_prop
 \cs_new:Npn \__tag_struct_output_prop_aux:nn #1 #2 %#1 num, #2 key
   {
     \prop_if_in:cnT
@@ -2191,6 +2234,27 @@
   {
     \__tag_struct_get_id:n {\g__tag_struct_stack_current_tl}
   }
+\socket_new:nn { tag/struct/tag }{1}
+\socket_new_plug:nnn { tag/struct/tag }{ latex-tags }
+ {
+   \seq_set_split:Nne \l__tag_tmpa_seq { / } {#1/\prop_item:Ne\g__tag_role_tags_NS_prop{#1}}
+   \tl_gset:Ne \g__tag_struct_tag_tl   { \seq_item:Nn\l__tag_tmpa_seq {1} }
+   \tl_gset:Ne \g__tag_struct_tag_NS_tl{ \seq_item:Nn\l__tag_tmpa_seq {2} }
+   \__tag_check_structure_tag:N \g__tag_struct_tag_tl
+ }
+
+\socket_new_plug:nnn { tag/struct/tag }{ pdf-tags }
+ {
+   \seq_set_split:Nne \l__tag_tmpa_seq { / } {#1/\prop_item:Ne\g__tag_role_tags_NS_prop{#1}}
+   \tl_gset:Ne \g__tag_struct_tag_tl   { \seq_item:Nn\l__tag_tmpa_seq {1} }
+   \tl_gset:Ne \g__tag_struct_tag_NS_tl{ \seq_item:Nn\l__tag_tmpa_seq {2} }
+   \__tag_role_get:VVNN \g__tag_struct_tag_tl\g__tag_struct_tag_NS_tl\l__tag_tmpa_tl\l__tag_tmpb_tl
+   \tl_gset:Ne \g__tag_struct_tag_tl {\l__tag_tmpa_tl}
+   \tl_gset:Ne \g__tag_struct_tag_NS_tl{\l__tag_tmpb_tl}
+   \__tag_check_structure_tag:N \g__tag_struct_tag_tl
+ }
+\socket_assign_plug:nn { tag/struct/tag } {latex-tags}
+
 \keys_define:nn { __tag / struct }
   {
     label .tl_set:N      = \l__tag_struct_key_label_tl,
@@ -2214,10 +2278,7 @@
     parent .default:n    = {-1},
     tag   .code:n        = % S property
       {
-        \seq_set_split:Nne \l__tag_tmpa_seq { / } {#1/\prop_item:Ne\g__tag_role_tags_NS_prop{#1}}
-        \tl_gset:Ne \g__tag_struct_tag_tl   { \seq_item:Nn\l__tag_tmpa_seq {1} }
-        \tl_gset:Ne \g__tag_struct_tag_NS_tl{ \seq_item:Nn\l__tag_tmpa_seq {2} }
-        \__tag_check_structure_tag:N \g__tag_struct_tag_tl
+        \socket_use:nn { tag/struct/tag }{#1}
       },
     title .code:n        = % T property
       {
@@ -2765,12 +2826,17 @@
       {\pdf_name_from_unicode_e:n{#1}}{#2}
   }
 
+\cs_generate_variant:Nn \__tag_attr_new_entry:nn {ee}
 \keys_define:nn { __tag / setup }
   {
-    newattribute .code:n =
+    role/new-attribute .code:n =
       {
         \__tag_attr_new_entry:nn #1
       }
+   ,newattribute .code:n =
+      {
+        \__tag_attr_new_entry:nn #1
+      },
   }
 \keys_define:nn { __tag / struct }
   {
@@ -2859,12 +2925,21 @@
 %% File: tagpdf-space.dtx
 \keys_define:nn { __tag / setup }
   {
-    interwordspace .choices:nn = { true, on }
+    activate/spaces .choice:,
+    activate/spaces/true .code:n =
       { \msg_warning:nne {tag}{sys-no-interwordspace}{\c_sys_engine_str}  },
-    interwordspace .choices:nn = { false, off }
+    activate/spaces/false .code:n=
       { \msg_warning:nne {tag}{sys-no-interwordspace}{\c_sys_engine_str}  },
-    interwordspace .default:n = true,
-    show-spaces .bool_set:N = \l__tag_showspaces_bool
+    activate/spaces .default:n = true,
+    debug/show/spaces     .code:n = {\bool_set_true:N \l__tag_showspaces_bool},
+    debug/show/spacesOff  .code:n = {\bool_set_false:N \l__tag_showspaces_bool},
+    interwordspace .choices:nn = {true,on}{\keys_set:nn{__tag/setup}{activate/spaces={true}}},
+    interwordspace .choices:nn = {false,off}{\keys_set:nn{__tag/setup}{activate/spaces={false}}},
+    interwordspace .default:n = {true},
+    show-spaces    .choice:,
+    show-spaces/true .meta:n =  {debug/show=spaces},
+    show-spaces/false .meta:n = {debug/show=spacesOff},
+    show-spaces .default:n = true
   }
 \sys_if_engine_pdftex:T
   {
@@ -2873,19 +2948,17 @@
         \pdfglyphtounicode{space}{0020}
         \keys_define:nn { __tag / setup }
           {
-            interwordspace .choices:nn = { true, on }  { \pdfinterwordspaceon },
-            interwordspace .choices:nn = { false, off }{ \pdfinterwordspaceon },
-            interwordspace .default:n = true,
-            show-spaces .bool_set:N = \l__tag_showspaces_bool
+            activate/spaces/true .code:n  = { \pdfinterwordspaceon },
+            activate/spaces/false .code:n = { \pdfinterwordspaceoff },
+            activate/spaces .default:n = true,
           }
       }
       {
         \keys_define:nn { __tag / setup }
           {
-            interwordspace .choices:nn = { true, on, false, off }
+            activate/spaces .choices:nn = { true, false }
               { \msg_warning:nnn {tag}{sys-no-interwordspace}{dvi}  },
-            interwordspace .default:n = true,
-            show-spaces .bool_set:N = \l__tag_showspaces_bool
+            activate/spaces .default:n = true,
           }
       }
   }
@@ -2894,25 +2967,22 @@
   {
     \keys_define:nn { __tag / setup }
       {
-        interwordspace .choices:nn =
-                                 { true, on }
+        activate/spaces .choice:,
+        activate/spaces/true .code:n =
                                  {
                                    \bool_gset_true:N \g__tag_active_space_bool
                                    \lua_now:e{ltx.__tag.func.markspaceon()}
                                  },
-        interwordspace .choices:nn =
-                                 { false, off }
+        activate/spaces/false .code:n =
                                  {
                                   \bool_gset_false:N \g__tag_active_space_bool
                                   \lua_now:e{ltx.__tag.func.markspaceoff()}
                                  },
-        interwordspace .default:n = true,
-        show-spaces      .choice:,
-        show-spaces  / true  .code:n =
+        activate/spaces .default:n = true,
+        debug/show/spaces    .code:n =
                                  {\lua_now:e{ltx.__tag.trace.showspaces=true}},
-        show-spaces  / false .code:n =
+        debug/show/spacesOff .code:n =
                                  {\lua_now:e{ltx.__tag.trace.showspaces=nil}},
-        show-spaces .default:n = true
       }
   }
 \sys_if_engine_luatex:T
@@ -3107,11 +3177,11 @@
 
 \keys_define:nn { __tag / setup}
  {
-   activate-socket .bool_set:N  = \l__tag_active_socket_bool,
+   activate/socket .bool_set:N  = \l__tag_active_socket_bool,
    activate  .code:n =
     {
       \keys_set:nn { __tag / setup }
-        { activate-mc,activate-tree,activate-struct,activate-socket }
+        { activate/mc,activate/tree,activate/struct,activate/socket }
       \tl_gset:Nn\g__tag_root_default_tl {#1}
     },
    activate .default:n = Document
@@ -3230,6 +3300,22 @@
 
 \keys_define:nn { __tag / setup }
   {
+    para/tagging      .bool_set:N = \l__tag_para_bool,
+    debug/show/para   .code:n = {\bool_set_true:N \l__tag_para_show_bool},
+    debug/show/paraOff  .code:n = {\bool_set_false:N \l__tag_para_show_bool},
+    para/tag          .tl_set:N   = \l__tag_para_tag_tl,
+    para/maintag      .tl_set:N   = \l__tag_para_main_tag_tl,
+    para/flattened    .bool_set:N = \l__tag_para_flattened_bool
+  }
+\keys_define:nn { tag / tool}
+  {
+    para/tagging   .bool_set:N = \l__tag_para_bool,
+    para/tag       .tl_set:N = \l__tag_para_tag_tl,
+    para/maintag   .tl_set:N = \l__tag_para_main_tag_tl,
+    para/flattened .bool_set:N = \l__tag_para_flattened_bool
+  }
+\keys_define:nn { __tag / setup }
+  {
     paratagging      .bool_set:N = \l__tag_para_bool,
     paratagging-show .bool_set:N = \l__tag_para_show_bool,
     paratag          .tl_set:N   = \l__tag_para_tag_tl
@@ -3236,6 +3322,7 @@
   }
 \keys_define:nn { tag / tool}
   {
+    para    .bool_set:N = \l__tag_para_bool,
     paratag .tl_set:N = \l__tag_para_tag_tl,
     unittag .tl_set:N = \l__tag_para_main_tag_tl,
     para-flattened .bool_set:N = \l__tag_para_flattened_bool
@@ -3415,11 +3502,6 @@
   }
 \renewcommand\tagpdfparaOn {\bool_set_true:N \l__tag_para_bool}
 \renewcommand\tagpdfparaOff{\bool_set_false:N \l__tag_para_bool}
-\keys_define:nn { tag / tool}
-  {
-    para .bool_set:N = \l__tag_para_bool,
-    para-flattened .bool_set:N = \l__tag_para_flattened_bool,
-  }
 \NewDocumentCommand\tagpdfsuppressmarks{m}
   {{\use:c{__tag_mc_disable_marks:} #1}}
 \cs_new_protected:Npn\__tag_hook_kernel_before_head:{}
@@ -3497,8 +3579,8 @@
  }
 \keys_define:nn { __tag / setup }
   {
-    exclude-header-footer .choice:,
-    exclude-header-footer / true .code:n =
+    page/exclude-header-footer .choice:,
+    page/exclude-header-footer / true .code:n =
      {
        \cs_set_eq:NN \__tag_hook_kernel_before_head: \__tag_exclude_headfoot_begin:
        \cs_set_eq:NN \__tag_hook_kernel_before_foot: \__tag_exclude_headfoot_begin:
@@ -3505,7 +3587,7 @@
        \cs_set_eq:NN \__tag_hook_kernel_after_head:  \__tag_exclude_headfoot_end:
        \cs_set_eq:NN \__tag_hook_kernel_after_foot:  \__tag_exclude_headfoot_end:
      },
-    exclude-header-footer / pagination .code:n =
+    page/exclude-header-footer / pagination .code:n =
      {
        \cs_set:Nn \__tag_hook_kernel_before_head: { \__tag_exclude_struct_headfoot_begin:n {pagination} }
        \cs_set:Nn \__tag_hook_kernel_before_foot: { \__tag_exclude_struct_headfoot_begin:n {pagination} }
@@ -3512,7 +3594,7 @@
        \cs_set_eq:NN \__tag_hook_kernel_after_head:  \__tag_exclude_struct_headfoot_end:
        \cs_set_eq:NN \__tag_hook_kernel_after_foot:  \__tag_exclude_struct_headfoot_end:
      },
-    exclude-header-footer / false .code:n =
+    page/exclude-header-footer / false .code:n =
      {
        \cs_set_eq:NN \__tag_hook_kernel_before_head: \prg_do_nothing:
        \cs_set_eq:NN \__tag_hook_kernel_before_foot: \prg_do_nothing:
@@ -3519,8 +3601,9 @@
        \cs_set_eq:NN \__tag_hook_kernel_after_head:  \prg_do_nothing:
        \cs_set_eq:NN \__tag_hook_kernel_after_foot:  \prg_do_nothing:
      },
-   exclude-header-footer .default:n = true,
-   exclude-header-footer .initial:n = true
+   page/exclude-header-footer .default:n = true,
+   page/exclude-header-footer .initial:n = true,
+   exclude-header-footer .meta:n = { page/exclude-header-footer = {#1} }
   }
 \hook_gput_code:nnn
   {pdfannot/link/URI/before}

Modified: trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdfdocu-patches.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdfdocu-patches.sty	2024-02-23 22:02:28 UTC (rev 70093)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdfdocu-patches.sty	2024-02-23 22:02:49 UTC (rev 70094)
@@ -1,5 +1,5 @@
 %\RequirePackage[enable-debug]{expl3}[2018/06/14]
-\ProvidesExplPackage {tagpdfdocu-patches} {2024-02-04} {0.98v}
+\ProvidesExplPackage {tagpdfdocu-patches} {2024-02-22} {0.98w}
  {patches/commands for the tagpdf documentation}
 \RequirePackage{etoolbox,xpatch}
 



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