texlive[67308] Master/texmf-dist: tagpdf (8jun23)

commits+karl at tug.org commits+karl at tug.org
Thu Jun 8 23:05:21 CEST 2023


Revision: 67308
          http://tug.org/svn/texlive?view=revision&revision=67308
Author:   karl
Date:     2023-06-08 23:05:21 +0200 (Thu, 08 Jun 2023)
Log Message:
-----------
tagpdf (8jun23)

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

Modified: trunk/Master/texmf-dist/doc/latex/tagpdf/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tagpdf/README.md	2023-06-08 21:05:03 UTC (rev 67307)
+++ trunk/Master/texmf-dist/doc/latex/tagpdf/README.md	2023-06-08 21:05:21 UTC (rev 67308)
@@ -1,6 +1,6 @@
 #tagpdf — A package to create tagged pdf
-Packageversion: 0.98g 
-Packagedate: 2023/05/16
+Packageversion: 0.98h 
+Packagedate: 2023/06/06
 Author: Ulrike Fischer
 
 ## License

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

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

Modified: trunk/Master/texmf-dist/doc/latex/tagpdf/tagpdf.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tagpdf/tagpdf.tex	2023-06-08 21:05:03 UTC (rev 67307)
+++ trunk/Master/texmf-dist/doc/latex/tagpdf/tagpdf.tex	2023-06-08 21:05:21 UTC (rev 67308)
@@ -10,16 +10,17 @@
 \DocumentMetadata
  {
    % comment the following line to compile an untagged documentation:
-   testphase=phase-III,testphase=graphics,
+   testphase=phase-III,
    pdfversion=2.0,lang=en-UK,pdfstandard=a-4,
+   %uncompress
  }
 \DebugBlocksOff
 \makeatletter
-\def\UlrikeFischer at package@version{0.98g}
-\def\UlrikeFischer at package@date{2023-05-16}
+\def\UlrikeFischer at package@version{0.98h}
+\def\UlrikeFischer at package@date{2023-06-06}
 \makeatother
 
-\documentclass[DIV=12,parskip=half-,bibliography=totoc,a4paper]{article}
+\documentclass[bibliography=totoc,a4paper]{article}
 \usepackage{geometry}
 \usepackage[english]{babel}
 
@@ -26,19 +27,16 @@
 \usepackage{unicode-math}
 \setmainfont{Heuristica}
 \usepackage[nopatch]{microtype}
-\makeatletter
-% see https://github.com/schlcht/microtype/issues/8
-%\patchcmd{\MT at get@prot}{\noindent}{\RawNoindent}{}{\fail}
-\makeatother
 
-%\usepackage{scrlayer-scrpage}
 
 \usepackage[autostyle]{csquotes}
-\usepackage[style=numeric,hyperref=false]{biblatex}
+\usepackage[style=numeric]{biblatex}
 \addbibresource{tagpdf.bib}
 
 \usepackage[noparboxrestore]{marginnote}
-\makeatletter \renewcommand*{\mn at parboxrestore}{\tagpdfparaOff}%
+\makeatletter 
+\renewcommand*{\mn at parboxrestore}{\tagpdfparaOff}%
+\makeatother
 \reversemarginpar
 
 \usepackage{tcolorbox}
@@ -89,11 +87,6 @@
 
 \usepackage{tagpdfdocu-patches}
 
-
-%\cfoot*{\pagemark}
-
-%
-
 \newcommand\PDF{PDF}
 
 \title{The \pkg{tagpdf} package, v\csname UlrikeFischer at package@version\endcsname}
@@ -128,12 +121,12 @@
 tagging.
 
 You need a very current \LaTeX{} format.
-      You need a very current L3 programming layer.
-      You need the new \LaTeX{} PDF management bundle.
+You need a very current L3 programming layer.
+You need the new \LaTeX{} PDF management bundle.
 
 This package is incomplete, experimental and quite probably contains bugs. It is in parts
 quite slow as the code prefers readability over speed.
-      At some time it will disappear when the code has been integrated into the \LaTeX{} format.
+At some time it will disappear when the code has been integrated into the \LaTeX{} format.
 
 This package can change in an incompatible way.
 
@@ -160,32 +153,33 @@
 
 \section{Introduction}
 
-Since many years the creation of accessible \PDF{}-files with \LaTeX\ which conform to the PDF/UA standard has been on the agenda of \TeX-meetings. Many people agree that this is important and Ross Moore has done quite some work on it. There is also a TUG-mailing list and a webpage \parencite{tugaccess} dedicated to this theme.
+Since many years the creation of accessible, tagged \PDF{}-files with \LaTeX\ which conform to the PDF/UA standard has been on the agenda of \TeX-meetings. Many people agree that this is important and Ross Moore has done quite some work on it. There is also a TUG-mailing list and a web page \parencite{tugaccess} dedicated to this theme.
 
-But in my opinion missing were means to \emph{experiment} with tagging and accessibility. Means to try out, how difficult it is to tag some structures, means to try out, how much tagging is really needed (standards and validators don't need to be right \ldots), means to test what else is needed so that a \PDF{} works e.g. with a screen reader. Without such experiments it is imho quite difficult to get a feeling about what has to be done, which kernel changes are needed, how packages should be adapted.
+In my opinion missing were means to \emph{experiment} with tagging and accessibility. Means to try out, how difficult it is to tag some structures, means to try out, how much tagging is really needed (standards and validators don't need to be right \ldots), means to test what else is needed so that a \PDF{} works e.g. with a screen reader, means to try out how core \LaTeX\ commands behave if tagging is used. Without such experiments it is in my opinion
+quite difficult to get a feeling about what has to be done, which kernel changes are needed, how packages should be adapted.
 
-
-This package were developped to close this gap by offering \emph{core} commands to tag a \PDF{}%
+This package was developed to close this gap by offering \emph{core} commands to tag a \PDF{}%
 \footnote{In case you don't know what this means: there will be some explanations later on.}.
-My hope was that the knowledge gained by the use of this package will at the end allow to decide if and how code to do tagging should be part of the \LaTeX\ kernel.
+My hope was that the knowledge gained by the use of this package will at the end 
+allow to decide if and how code to do tagging should be part of the \LaTeX\ kernel.
 
 
-The code has been written with the goal to extend \LaTeX{} itself.
-It therefore quite does not patch commands from other packages and is also not an aim of the package to develop such patches. While at the end changes to various commands in many classes and packages will be needed to get tagged \PDF{} files -- and the examples accompanying the package try (or will try) to show various strategies -- these changes should in my opinion be done by the class, package and document writers themselves using a sensible API provided by the kernel and not by some external package that adds patches everywhere and would need constant maintenance -- one only need to look at packages like tex4ht or bidi or hyperref to see how difficult and sometimes fragile this is.
+The code has been written so that it can be added as module to the \LaTeX{} kernel itself if it turns out to be usable. 
+It therefore avoid to patch commands from other packages and is also not an aim of the package to develop such patches. While at the end changes to various commands in many classes and packages will be needed to get tagged \PDF{} files 
+these changes should be done by the class, package and document writers themselves using a sensible API provided by the kernel and not by some external package that adds patches everywhere and would need constant maintenance -- one only need to look at packages like tex4ht or bidi or hyperref to see how difficult and sometimes fragile this is.
 
-
 The package is now a part of the Tagged PDF project and triggered already various changes in the LaTeX kernel and the engines: There is a new PDF management,
 the new para hooks allows to automatically tag paragraphs, after changes in the output routine
 page breaks and header and footer are handled correctly, the engines support
-now structure destinations.
+now structure destinations. More changes are in the latex-lab bundle and can be loaded through testphase keys.
 
-I'm sure that it still has bugs. Bugs reports, suggestions and comments can be added to the issue tracker on github. \url{https://github.com/u-fischer/tagpdf}.
+I'm sure that tagpdf still has bugs. Bugs reports, suggestions and comments can be added to the issue tracker on github. \url{https://github.com/u-fischer/tagpdf}.
 
-Please also check the github site for new examples and improvements.
+Please also check the github site and latex-lab for new examples and improvements.
 
 \subsection{Tagging and accessibility}
 
-While the package is named \texttt{tagpdf} the goal is actually \emph{accessible} \PDF{}-files. Tagging is \emph{one} requirement for accessibility but there are others. I will mention some later on in this documentation, and -- if sensible -- I will also try to add code, keys or tips for them.
+While the package is named \texttt{tagpdf} the goal is also \emph{accessible} \PDF{}-files. Tagging is \emph{one} (the most difficult) requirement for accessibility but there are others. I will mention some later on in this documentation, and -- if sensible -- I will also try to add code, keys or tips for them.
 
 So the name of the package is a bit wrong. As excuse I can only say that it is shorter and easier to pronounce.
 
@@ -192,13 +186,14 @@
 
 \subsection{Engines and modes}
 
-The package theoretically with all engines,
-But the xelatex and the latex-dvips-route are not much tested and they also don't support
-real space glyphs. lualatex is the most powerful and safe modus, but pdflatex works ok too.
+The package works theoretically with all engines,
+but the xelatex and the latex-dvips-route are basically untested tested and they also don't support
+real space glyphs so I don't recommend them. 
+lualatex is the most powerful and safe modus and should be used for new documents, it is slower than pdflatex but requires less compilations to get tagging. pdflatex works ok and can be used for legacy documents; it needs more compilations to resolve all cross references needed for the tagging. 
 
 The package has two modes: the \emph{generic mode} which should work in theory with every engine and the \emph{lua mode} which works only with lualatex.
 
-I implemented the generic mode first. Mostly because my tex skills are much better than my lua skills and I wanted to get the tex side right before starting to fight with attributes and node traversing.
+I implemented the generic mode first. Mostly because my \TeX\ skills are much better than my lua skills and I wanted to get the \TeX\ side right before starting to fight with attributes and node traversing.
 
 While the generic mode is not bad and I spent quite some time to get it working I nevertheless think that the lua mode is the future and the only one that will be usable for larger documents. \PDF{} is a page orientated format and so the ability of luatex to manipulate pages and nodes after the \TeX-processing is really useful here. Also with luatex characters are normally already given as unicode.
 
@@ -208,19 +203,38 @@
 
 \subsection{References and target PDF version}
 
-My main reference for the first versions of this package
-was the free reference for \PDF{} 1.7. \parencite{pdfreference} and so the package also targetted this version.
+My main reference for the first versions of this package was the free 
+reference for \PDF{} 1.7. \parencite{pdfreference} and so the first versions 
+of the package implemented only \PDF{} 1.7. 
 
-In 2018 \PDF{} 2.0. has been released, and since 2020 all engines can set the version to 2.0. So the package will
-now target \PDF{} 2.0. This doesn't mean that 2.0 will be required, but that the code and the options will be extended to
-support \PDF{} 2.0. One example is the support for associated files, another the support for name spaces in version 0.82.
+In 2018 \PDF{} 2.0. has been released. The reference can be bought at no cost 
+through the PDF association. 
 
-The package doesn't try to suppress all 2.0 features if an older \PDF{} version is produced. It normally doesn't harm if a \PDF{} contains keys unknown in its version and it makes the code faster and easier to maintain if there aren't too many tests and code pathes; so for example associated files will always be added. But tests could be added in case this leads to incompabilities.
+\PDF{} 2.0 has a number of features that are really needed for good tagging: 
+it knows more structure types, it allows to add associated files to 
+structures---these are small, embedded files which can for example contain 
+the mathML or source code of an equation---, it knows structure destinations 
+which allows to link to a structure. 
 
-It should be noted that some tools don't like \PDF{}~2.0.  PAC~3 for example 
-simply crashes, and pdftk will create a \PDF{}~1.0 from it. This makes 
-testing \PDF{}~2.0 files a bit of a challenge. 
 
+\PDF{}~2.0 features are currently (mid 2023) not well supported by 
+\PDF~consumer. No PDF viewer (including Acrobat) for example can handle name 
+spaces and associated files. PAC~3 even crashes if one tries to load a \PDF{} 
+2.0 file, and pdftk will create a \PDF{}~1.0 from it. 
+
+Nevertheless \LaTeX{} targets \PDF{} 2.0, tagpdf has added support for 
+associated files, for name spaces and other \PDF{} 2.0 features tagpdf and we 
+recommend to use \PDF{} 2.0 if possible and then to complain to the PDF{} 
+consumer if something doesn't work.   
+
+The package doesn't try to suppress all 2.0 features if an older \PDF{} 
+version is produced. It normally doesn't harm if a \PDF{} contains keys 
+unknown in its version and it makes the code faster and easier to maintain if 
+there aren't too many tests and code pathes; so for example associated files 
+will always be added. But tests could be added in case this leads to 
+incompabilities. 
+
+
 \subsection{Validation}
 
 
@@ -228,11 +242,14 @@
 
 \begin{itemize}
 \item
- One must check that the \PDF{} is \emph{syntactically} correct. It is rather easy to create broken \PDF{}:
- e.g. if a chunk is opened on one page but closed on the next page or if the document isn't compiled often enough.
+ One must check that the \PDF{} is \emph{syntactically} correct. 
+ It is rather easy to create broken \PDF{}:
+ e.g. if a chunk is opened on one page but closed 
+ on the next page or if the document isn't compiled often enough.
 
-\item
-One must check how good the requirements of the PDF/UA standard are followed \emph{formally}.
+\item One must check how good the requirements of the PDF/UA standard are 
+    followed \emph{formally}\footnote{The PDF/UA-2 standard for \PDF~2.0 
+    will hopefully be released in 2023}. 
 
 \item
 One must check how good the accessibility is \emph{practically}.
@@ -241,19 +258,24 @@
 
 Syntax validation and formal standard validation can be done with preflight 
 of the (non-free) adobe acrobat. It can also be done also with the free 
-\PDF{} Accessibility Checker (PAC~3) \parencite{pac3}. There is also the 
+\PDF{} Accessibility Checker (PAC~2021) \parencite{pac3}. There is also the 
 validator veraPDF \parencite{verapdf}. A rather new and 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. 
 
-Practical validation is naturally the more complicated part. It needs screen reader, users which actually knows how to handle them, can test documents and can report where a \PDF{} has real accessibility problems.
+Practical validation is naturally the more complicated part. 
+It needs screen reader, users which actually knows how to handle them, 
+can test documents and can report where a \PDF{} has real accessibility problems.
 
 
 \minisec{Preflight woes}
 
-Sadly validators can not be always trusted. As an example for an reason that I don't understand the adobe preflight don't like the list structure \texttt{L}.
-It is also possible that validators contradict: that the one says everything is okay, while the other complains.
+Sadly validators can not be always trusted. 
+As an example for an reason that I don't understand the adobe preflight 
+don't like the list structure \texttt{L}.
+It is also possible that validators contradict: that the one says everything is okay, 
+while the other complains.
 
 
 
@@ -260,7 +282,9 @@
 \subsection{Examples wanted!}
 
 
-To make the package usable examples are needed: examples that demonstrate how various structures can be tagged and which patches are needed, examples for the test suite, examples that demonstrates problems.
+To make the package usable examples are needed: 
+examples that demonstrate how various structures can be tagged and which patches are needed, 
+examples for the test suite, examples that demonstrates problems.
 
 
 \begin{tcolorbox}
@@ -269,7 +293,8 @@
 
 
 All examples should use the \cs{DocumentMetadata} key \PrintKeyName{uncompress}
-so that uncompressed \PDF{} are created and the internal objects and structures can be inspected and -- hopefully soon -- be compared by the l3build checks.%
+so that uncompressed \PDF{} are created and the internal objects and 
+structures can be inspected and be compared by the l3build checks.%
 
 
 \section{Changes}
@@ -1232,19 +1257,14 @@
 must be properly guarded. For example
 
 \begin{taglstlisting}
-\RequirePackage{pdfmanagement-testphase}
-\DeclareDocumentMetadata{uncompress}
+\DocumentMetadata{uncompress}
 \documentclass{article}
-\usepackage{tagpdf}
-\tagpdfsetup{activate,interwordspace=true}
 
 \pagestyle{headings}
 \begin{document}
-\tagstructbegin{tag=Document}
 \sectionmark{HEADER}
 \AddToHook{shipout/background}{\put(5cm,-5cm){BACKGROUND}}
 \tagmcbegin{tag=P}Page 1\newpage Page 2\tagmcend
-\tagstructend
 \end{document}
 \end{taglstlisting}
 
@@ -1255,13 +1275,11 @@
 
 \includegraphics[alt=Show tags of examples]{global-ex}
 
-It is therefore from now on important to correctly markup such code. Header and footer typically should be
-artifacts. The LaTeX kernel hasn't yet suitable hooks around header and footer to allow to automate
-this, but a first draft has been added with \pkg{pdfmanagement-testphase}. Starting with version 0.92
-header and footer are marked as (simple) artifacts.
-If they contain code which needs a different markup it still must be added explicitly.
-With packages like \pkg{fancyhdr}  or \pkg{scrlayer-scrpage} it is quite easy to add
-the needed code.
+It is therefore from now on important to correctly markup such code. Header 
+and footer are now marked as artifacts (see below). If they contain code 
+which needs a different markup it still must be added explicitly. With 
+packages like \pkg{fancyhdr}  or \pkg{scrlayer-scrpage} it is quite easy to 
+add the needed code. 
 
 
 \subsubsection{Tips}

Modified: trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-backend.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-backend.dtx	2023-06-08 21:05:03 UTC (rev 67307)
+++ trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-backend.dtx	2023-06-08 21:05:21 UTC (rev 67308)
@@ -47,13 +47,13 @@
 %    }^^A
 % }
 %
-% \date{Version 0.98g, released 2023-05-16}
+% \date{Version 0.98h, released 2023-06-06}
 % \maketitle
 % \begin{implementation}
 %    \begin{macrocode}
 %<@@=tag>
 %<*luatex>
-\ProvidesExplFile {tagpdf-luatex.def} {2023-05-16} {0.98g}
+\ProvidesExplFile {tagpdf-luatex.def} {2023-06-06} {0.98h}
   {tagpdf~driver~for~luatex}
 %    \end{macrocode}
 % \section{Loading the lua}
@@ -158,8 +158,8 @@
 
 local ProvidesLuaModule = {
     name          = "tagpdf",
-    version       = "0.98g",       --TAGVERSION
-    date          = "2023-05-16", --TAGDATE
+    version       = "0.98h",       --TAGVERSION
+    date          = "2023-06-06", --TAGDATE
     description   = "tagpdf lua code",
     license       = "The LATEX Project Public License 1.3c"
 }

Modified: trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-checks.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-checks.dtx	2023-06-08 21:05:03 UTC (rev 67307)
+++ trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-checks.dtx	2023-06-08 21:05:21 UTC (rev 67308)
@@ -48,7 +48,7 @@
 %    }^^A
 % }
 %
-% \date{Version 0.98g, released 2023-05-16}
+% \date{Version 0.98h, released 2023-06-06}
 % \maketitle
 % \begin{documentation}
 % \section{Commands}
@@ -151,6 +151,11 @@
 % & error
 % & in struct module
 % \\
+%   |\@@_struct_write_obj:n|
+% & |struct-orphan|
+% & warning
+% & in struct module
+% \\
 %   |\tag_struct_begin:n|
 % & |struct-faulty-nesting|
 % & error
@@ -295,7 +300,7 @@
 %    \begin{macrocode}
 %<@@=tag>
 %<*header>
-\ProvidesExplPackage {tagpdf-checks-code} {2023-05-16} {0.98g}
+\ProvidesExplPackage {tagpdf-checks-code} {2023-06-06} {0.98h}
  {part of tagpdf - code related to checks, conditionals, debugging and messages}
 %</header>
 %    \end{macrocode}
@@ -370,6 +375,19 @@
 \msg_new:nnn { tag } {struct-no-objnum} { objnum~missing~for~structure~#1 }
 %    \end{macrocode}
 % \end{macro}
+% \begin{macro}{struct-orphan}
+% This indicates that there is a structure which has kids but no parent.
+% This can happen if a structure is stashed but then not used.  
+%    \begin{macrocode}
+\msg_new:nnn { tag } {struct-orphan} 
+  { 
+    Structure~#1~has~#2~kids~but~no~parent.\\
+    It~is~turned~into~an~artifact.\\
+    Did~you~stashed~a~structure~and~then~didn't~use~it?
+  }
+ 
+%    \end{macrocode}
+% \end{macro}
 % \begin{macro}{struct-faulty-nesting}
 % This indicates that there is somewhere one |\tag_struct_end:| too much.
 % This should be normally an error.

Modified: trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-data.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-data.dtx	2023-06-08 21:05:03 UTC (rev 67307)
+++ trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-data.dtx	2023-06-08 21:05:21 UTC (rev 67308)
@@ -47,7 +47,7 @@
 %    }^^A
 % }
 %
-% \date{Version 0.98g, released 2023-05-16}
+% \date{Version 0.98h, released 2023-06-06}
 % \maketitle
 % \begin{documentation}
 % This files contains a various data files which are read in
@@ -60,7 +60,7 @@
 % It lists the new tag, the rolemap and the namespace of the rolemap.
 %    \begin{macrocode}
 %<*ns-latex>
-%% \ProvidesExplFile {tagpdf-ns-latex.def} {2023-05-16} {0.98g}
+%% \ProvidesExplFile {tagpdf-ns-latex.def} {2023-06-06} {0.98h}
 %% {latex} {https://www.latex-project.org/ns/dflt/2022}{}
 title,        Title,    pdf2,
 part,         Title,    pdf2,
@@ -92,7 +92,7 @@
 % It is bound to change
 %    \begin{macrocode}
 %<*ns-latex-book>
-%% \ProvidesExplFile {tagpdf-ns-latex-book.def} {2023-05-16} {0.98g}
+%% \ProvidesExplFile {tagpdf-ns-latex-book.def} {2023-06-06} {0.98h}
 %% {latex-book} {https://www.latex-project.org/ns/book/2022}{}
 chapter,       H1,pdf2,
 section,       H2,pdf2,
@@ -108,7 +108,7 @@
 % It is bound to change a lot!
 %    \begin{macrocode}
 %<*ns-latex-inline>
-%% \ProvidesExplFile {tagpdf-ns-latex-inline.def} {2023-05-16} {0.98g}
+%% \ProvidesExplFile {tagpdf-ns-latex-inline.def} {2023-06-06} {0.98h}
 %% {latex-inline} {https://www.latex-project.org/ns/inline/2022}{}
 chapter,       Span, pdf2,    
 section,       Span, pdf2,
@@ -122,7 +122,7 @@
 % \section{The pdf namespace data}
 %    \begin{macrocode}
 %<*ns-pdf>
-%% \ProvidesExplFile {tagpdf-ns-pdf.def} {2023-05-16} {0.98g}
+%% \ProvidesExplFile {tagpdf-ns-pdf.def} {2023-06-06} {0.98h}
 %%  {pdf}   {http://iso.org/pdf/ssn}{}
 StructTreeRoot,StructTreeRoot,pdf,D,
 Document,Document,pdf,D,   
@@ -190,7 +190,7 @@
 % \section{The pdf 2.0 namespace data}
 %    \begin{macrocode}
 %<*ns-pdf2>
-%% \ProvidesExplFile {tagpdf-ns-pdf2.def} {2023-05-16} {0.98g} 
+%% \ProvidesExplFile {tagpdf-ns-pdf2.def} {2023-06-06} {0.98h} 
 %%  {pdf2}  {http://iso.org/pdf2/ssn}{}
 Document,Document,pdf2,D,   
 Part,Part,pdf2,G,       
@@ -246,7 +246,7 @@
 % \section{The mathml namespace data}
 %    \begin{macrocode}
 %<*ns-mathml>
-%% \ProvidesExplFile {tagpdf-ns-mathml.def} {2023-05-16} {0.98g}
+%% \ProvidesExplFile {tagpdf-ns-mathml.def} {2023-06-06} {0.98h}
 % {mathml}{http://www.w3.org/1998/Math/MathML}{}
 abs,abs,mathml,
 and,and,mathml,
@@ -481,7 +481,7 @@
 % This will perhaps change in future.
 %    \begin{macrocode}
 %<*parent-child>
-%% \ProvidesExplFile {tagpdf-parent-child.csv} {2023-05-16} {0.98g}
+%% \ProvidesExplFile {tagpdf-parent-child.csv} {2023-06-06} {0.98h}
 ,,,StructTreeRoot,Document,Art,Part,Div,Sect,BlockQuote,NonStruct,TOC,TOCI,Index,Private,Quote,Note,Reference,BibEntry,P,Hn,H,Lbl,Code,Span,Link,Annot,Form,Ruby,RB,RT,RP,Warichu,WT,WP,L,LI,LBody,Table,TR,TH,TD,THead,TBody,TFoot,Caption,Figure,Formula,MC
 Document,both,document level,1,0..n,∅,‡,‡,∅,0..n,‡,∅,∅,∅,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅
 Art,1.7,grouping,∅,0..n,∅,‡,‡,0..n,0..n,‡,∅,∅,∅,0..n,∅,0..n,∅,∅,∅,0..1,0..1,∅,∅,∅,0..n,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,0..n,∅,∅,0..n,0..n,∅,∅,∅,0..n,0..n,∅,∅
@@ -536,7 +536,7 @@
 % This will perhaps change in future.
 %    \begin{macrocode}
 %<*parent-child-2>
-%% \ProvidesExplFile {tagpdf-parent-child-2.csv} {2023-05-16} {0.98g}
+%% \ProvidesExplFile {tagpdf-parent-child-2.csv} {2023-06-06} {0.98h}
 ,,,StructTreeRoot,Document,DocumentFragment,Art,Part,Div,Sect,Aside,BlockQuote,NonStruct,TOC,TOCI,Index,Private,Title,Sub,Quote,Note,Reference,BibEntry,P,Hn,H,Lbl,Code,Em,Strong,Span,Link,Annot,Form,Ruby,RB,RT,RP,Warichu,WT,WP,FENote,L,LI,LBody,Table,TR,TH,TD,THead,TBody,TFoot,Caption,Figure,Formula,math,mathml,Artifact,MC
 Document,both,document level,1,0..n,0..n,∅,‡,‡,∅,0..n,0..n,‡,∅,∅,∅,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,0..n,∅
 DocumentFragment,2.0,document level,∅,0..n,0..n,0..n,‡,‡,0..n,0..n,0..n,‡,∅,∅,∅,0..n,∅,∅,∅,∅*,∅,∅,∅,∅,∅,∅,∅*,∅,∅,∅,∅*,∅*,∅,∅,∅,∅,∅,∅,∅,∅,∅*,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅*,∅,∅,∅,∅,0..n,∅

Modified: trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-generic.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-generic.dtx	2023-06-08 21:05:03 UTC (rev 67307)
+++ trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-generic.dtx	2023-06-08 21:05:21 UTC (rev 67308)
@@ -46,7 +46,7 @@
 %    }^^A
 % }
 %
-% \date{Version 0.98g, released 2023-05-16}
+% \date{Version 0.98h, released 2023-06-06}
 % \maketitle
 % \begin{documentation}
 % \end{documentation}
@@ -55,11 +55,11 @@
 %    \begin{macrocode}
 %<@@=tag>
 %<*generic>
-\ProvidesExplPackage {tagpdf-mc-code-generic} {2023-05-16} {0.98g}
+\ProvidesExplPackage {tagpdf-mc-code-generic} {2023-06-06} {0.98h}
  {part of tagpdf - code related to marking chunks - generic mode}
 %</generic>
 %<*debug>
-\ProvidesExplPackage {tagpdf-debug-generic} {2023-05-16} {0.98g}
+\ProvidesExplPackage {tagpdf-debug-generic} {2023-06-06} {0.98h}
  {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	2023-06-08 21:05:03 UTC (rev 67307)
+++ trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-luacode.dtx	2023-06-08 21:05:21 UTC (rev 67308)
@@ -46,7 +46,7 @@
 %    }^^A
 % }
 %
-% \date{Version 0.98g, released 2023-05-16}
+% \date{Version 0.98h, released 2023-06-06}
 % \maketitle
 % \begin{implementation}
 % The code is splitted into three parts: code shared by all engines,
@@ -86,7 +86,7 @@
 %    \begin{macrocode}
 %<@@=tag>
 %<*luamode>
-\ProvidesExplPackage {tagpdf-mc-code-lua} {2023-05-16} {0.98g}
+\ProvidesExplPackage {tagpdf-mc-code-lua} {2023-06-06} {0.98h}
   {tagpdf - mc code only for the luamode }
 %</luamode>
 %    \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	2023-06-08 21:05:03 UTC (rev 67307)
+++ trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-shared.dtx	2023-06-08 21:05:21 UTC (rev 67308)
@@ -46,7 +46,7 @@
 %    }^^A
 % }
 %
-% \date{Version 0.98g, released 2023-05-16}
+% \date{Version 0.98h, released 2023-06-06}
 % \maketitle
 % \begin{documentation}
 % \section{Public Commands}
@@ -174,7 +174,7 @@
 %    \begin{macrocode}
 %<@@=tag>
 %<*header>
-\ProvidesExplPackage {tagpdf-mc-code-shared} {2023-05-16} {0.98g}
+\ProvidesExplPackage {tagpdf-mc-code-shared} {2023-06-06} {0.98h}
   {part of tagpdf - code related to marking chunks -
    code shared by generic and luamode }
 %</header>

Modified: trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-roles.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-roles.dtx	2023-06-08 21:05:03 UTC (rev 67307)
+++ trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-roles.dtx	2023-06-08 21:05:21 UTC (rev 67308)
@@ -46,7 +46,7 @@
 %    }^^A
 % }
 %
-% \date{Version 0.98g, released 2023-05-16}
+% \date{Version 0.98h, released 2023-06-06}
 % \maketitle
 % \begin{documentation}
 % \begin{function}
@@ -98,7 +98,7 @@
 %    \begin{macrocode}
 %<@@=tag>
 %<*header>
-\ProvidesExplPackage {tagpdf-roles-code} {2023-05-16} {0.98g}
+\ProvidesExplPackage {tagpdf-roles-code} {2023-06-06} {0.98h}
  {part of tagpdf - code related to roles and structure names}
 %</header>
 %    \end{macrocode}

Modified: trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-space.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-space.dtx	2023-06-08 21:05:03 UTC (rev 67307)
+++ trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-space.dtx	2023-06-08 21:05:21 UTC (rev 67308)
@@ -46,7 +46,7 @@
 %    }^^A
 % }
 %
-% \date{Version 0.98g, released 2023-05-16}
+% \date{Version 0.98h, released 2023-06-06}
 % \maketitle
 % \begin{documentation}
 % \begin{function}{interwordspace (setup-key)}
@@ -64,7 +64,7 @@
 %    \begin{macrocode}
 %<@@=tag>
 %<*header>
-\ProvidesExplPackage {tagpdf-space-code} {2023-05-16} {0.98g}
+\ProvidesExplPackage {tagpdf-space-code} {2023-06-06} {0.98h}
  {part of tagpdf - code related to real space chars}
 %</header>
 %    \end{macrocode}

Modified: trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-struct.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-struct.dtx	2023-06-08 21:05:03 UTC (rev 67307)
+++ trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-struct.dtx	2023-06-08 21:05:21 UTC (rev 67308)
@@ -46,7 +46,7 @@
 %    }^^A
 % }
 %
-% \date{Version 0.98g, released 2023-05-16}
+% \date{Version 0.98h, released 2023-06-06}
 % \maketitle
 % \begin{documentation}
 % \section{Public Commands}
@@ -247,7 +247,7 @@
 %    \begin{macrocode}
 %<@@=tag>
 %<*header>
-\ProvidesExplPackage {tagpdf-struct-code} {2023-05-16} {0.98g}
+\ProvidesExplPackage {tagpdf-struct-code} {2023-06-06} {0.98h}
  {part of tagpdf - code related to storing structure}
 %</header>
 %    \end{macrocode}
@@ -837,16 +837,35 @@
   {
     \pdf_object_if_exist:nTF { @@/struct/#1 }
       {
+%    \end{macrocode}
+% It can happen that a structure is not used and so has not parent.
+% Simply ignoring it is problematic as it is also recorded in 
+% the IDTree, so we make an artifact out of it.
+%    \begin{macrocode}
+        \prop_get:cnNF { g_@@_struct_#1_prop } {P}\l_@@_tmpb_tl
+          { 
+            \prop_gput:cnx { g_@@_struct_#1_prop } {P}{\pdf_object_ref:n { @@/struct/0  }}
+            \prop_gput:cnx { g_@@_struct_#1_prop } {S}{/Artifact}
+            \seq_if_empty:cF {g_@@_struct_kids_#1_seq}
+              {
+                \msg_warning:nnxx 
+                  {tag} 
+                  {struct-orphan} 
+                  { #1 }
+                  {\seq_count:c{g_@@_struct_kids_#1_seq}}
+              }
+          }              
         \@@_struct_fill_kid_key:n { #1 }
         \@@_struct_get_dict_content:nN { #1 } \l_@@_tmpa_tl
         \exp_args:Nx
-          \pdf_object_write:nnx
-            { @@/struct/#1 }
-            {dict}
-            {
-              \l_@@_tmpa_tl\c_space_tl                            
-              /ID~\@@_struct_get_id:n{#1}              
-            }
+              \pdf_object_write:nnx
+                { @@/struct/#1 }
+                {dict}
+                {
+                  \l_@@_tmpa_tl\c_space_tl                            
+                  /ID~\@@_struct_get_id:n{#1}              
+                }
+           
       }
       {
         \msg_error:nnn { tag } { struct-no-objnum } { #1}
@@ -1470,6 +1489,10 @@
           {
             \tl_gset:Nx \g_@@_struct_tag_tl 
               { \exp_last_unbraced:NV\use_i:nn \l_@@_tmpa_tl }
+            \prop_get:NVNT\g_@@_role_tags_NS_prop \g_@@_struct_tag_tl\l_@@_tmpa_tl
+             {
+               \tl_gset:Nx \g_@@_struct_tag_NS_tl { \l_@@_tmpa_tl } 
+             }  
           }
 %<debug>\@@_debug_struct_end_insert:
       }
@@ -1703,7 +1726,7 @@
 % \section{Attributes and attribute classes}
 %    \begin{macrocode}
 %<*header>
-\ProvidesExplPackage {tagpdf-attr-code} {2023-05-16} {0.98g}
+\ProvidesExplPackage {tagpdf-attr-code} {2023-06-06} {0.98h}
   {part of tagpdf - code related to attributes and attribute classes}
 %</header>
 %    \end{macrocode}

Modified: trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-tree.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-tree.dtx	2023-06-08 21:05:03 UTC (rev 67307)
+++ trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-tree.dtx	2023-06-08 21:05:21 UTC (rev 67308)
@@ -47,13 +47,13 @@
 %    }^^A
 % }
 %
-% \date{Version 0.98g, released 2023-05-16}
+% \date{Version 0.98h, released 2023-06-06}
 % \maketitle
 % \begin{implementation}
 %    \begin{macrocode}
 %<@@=tag>
 %<*header>
-\ProvidesExplPackage {tagpdf-tree-code} {2023-05-16} {0.98g}
+\ProvidesExplPackage {tagpdf-tree-code} {2023-06-06} {0.98h}
  {part of tagpdf - code related to writing trees and dictionaries to the pdf}
 %</header>
 %    \end{macrocode}

Modified: trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-user.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-user.dtx	2023-06-08 21:05:03 UTC (rev 67307)
+++ trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-user.dtx	2023-06-08 21:05:21 UTC (rev 67308)
@@ -46,7 +46,7 @@
 %    }^^A
 % }
 %
-% \date{Version 0.98g, released 2023-05-16}
+% \date{Version 0.98h, released 2023-06-06}
 % \maketitle
 % \begin{documentation}
 % \section{Setup commands}
@@ -68,7 +68,7 @@
 % \begin{syntax}
 % \cs{tag_tool:n}\Arg{key val}
 % \end{syntax}
-% The tagging of basic document elements will require a variaty of small commands
+% The tagging of basic document elements will require a variety of small commands
 % to configure and adapt the tagging. This command will collect them under a command
 % interface. The argument is \emph{one} key-value like string. This is work in progress
 % and both syntax, known arguments and implementation can change!
@@ -250,7 +250,7 @@
 %    \begin{macrocode}
 %<@@=tag>
 %<*header>
-\ProvidesExplPackage {tagpdf-user} {2023-05-16} {0.98g}
+\ProvidesExplPackage {tagpdf-user} {2023-06-06} {0.98h}
   {tagpdf - user commands}
 %</header>
 %    \end{macrocode}

Modified: trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf.dtx	2023-06-08 21:05:03 UTC (rev 67307)
+++ trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf.dtx	2023-06-08 21:05:21 UTC (rev 67308)
@@ -92,7 +92,7 @@
 %    \begin{macrocode}
 %<@@=tag>
 %<*package>
-\ProvidesExplPackage {tagpdf} {2023-05-16} {0.98g}
+\ProvidesExplPackage {tagpdf} {2023-06-06} {0.98h}
   { A package to experiment with pdf tagging }
 
 \bool_if:nF
@@ -118,7 +118,7 @@
 %    \end{macrocode}
 %<*debug>
 %    \begin{macrocode}
-\ProvidesExplPackage {tagpdf-debug} {2023-05-16} {0.98g}
+\ProvidesExplPackage {tagpdf-debug} {2023-06-06} {0.98h}
   { debug code for tagpdf }
 \@ifpackageloaded{tagpdf}{}{\PackageWarning{tagpdf-debug}{tagpdf~not~loaded,~quitting}\endinput}
 %    \end{macrocode}
@@ -141,7 +141,7 @@
 % we define a base package with dummy functions
 %    \begin{macrocode}
 %<*base>
-\ProvidesExplPackage {tagpdf-base} {2023-05-16} {0.98g}
+\ProvidesExplPackage {tagpdf-base} {2023-06-06} {0.98h}
   {part of tagpdf - provide base, no-op versions of the user commands }
 %</base>
 %    \end{macrocode} 

Modified: trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-base.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-base.sty	2023-06-08 21:05:03 UTC (rev 67307)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-base.sty	2023-06-08 21:05:21 UTC (rev 67308)
@@ -25,7 +25,7 @@
 %% and all files in that bundle must be distributed together.
 %% 
 %% File: tagpdf.dtx
-\ProvidesExplPackage {tagpdf-base} {2023-05-16} {0.98g}
+\ProvidesExplPackage {tagpdf-base} {2023-06-06} {0.98h}
   {part of tagpdf - provide base, no-op versions of the user commands }
 \AddToHook{begindocument}
  {

Modified: trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-debug-generic.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-debug-generic.sty	2023-06-08 21:05:03 UTC (rev 67307)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-debug-generic.sty	2023-06-08 21:05:21 UTC (rev 67308)
@@ -19,7 +19,7 @@
 %% and all files in that bundle must be distributed together.
 %% 
 %% File: tagpdf-mc-generic.dtx
-\ProvidesExplPackage {tagpdf-debug-generic} {2023-05-16} {0.98g}
+\ProvidesExplPackage {tagpdf-debug-generic} {2023-06-06} {0.98h}
  {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.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-debug.sty	2023-06-08 21:05:03 UTC (rev 67307)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-debug.sty	2023-06-08 21:05:21 UTC (rev 67308)
@@ -26,7 +26,7 @@
 %% and all files in that bundle must be distributed together.
 %% 
 %% File: tagpdf.dtx
-\ProvidesExplPackage {tagpdf-debug} {2023-05-16} {0.98g}
+\ProvidesExplPackage {tagpdf-debug} {2023-06-06} {0.98h}
   { debug code for tagpdf }
 \@ifpackageloaded{tagpdf}{}{\PackageWarning{tagpdf-debug}{tagpdf~not~loaded,~quitting}\endinput}
 \prop_gput:Nnn \g_msg_module_type_prop { tag / debug} {}
@@ -308,6 +308,10 @@
           {
             \tl_gset:Nx \g__tag_struct_tag_tl
               { \exp_last_unbraced:NV\use_i:nn \l__tag_tmpa_tl }
+            \prop_get:NVNT\g__tag_role_tags_NS_prop \g__tag_struct_tag_tl\l__tag_tmpa_tl
+             {
+               \tl_gset:Nx \g__tag_struct_tag_NS_tl { \l__tag_tmpa_tl }
+             }
           }
 \__tag_debug_struct_end_insert:
       }

Modified: trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-luatex.def
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-luatex.def	2023-06-08 21:05:03 UTC (rev 67307)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-luatex.def	2023-06-08 21:05:21 UTC (rev 67308)
@@ -19,7 +19,7 @@
 %% and all files in that bundle must be distributed together.
 %% 
 %% File: tagpdf-backend.dtx
-\ProvidesExplFile {tagpdf-luatex.def} {2023-05-16} {0.98g}
+\ProvidesExplFile {tagpdf-luatex.def} {2023-06-06} {0.98h}
   {tagpdf~driver~for~luatex}
 {
   \fontencoding{TU}\fontfamily{lmr}\fontseries{m}\fontshape{n}\fontsize{10pt}{10pt}\selectfont

Modified: trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-generic.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-generic.sty	2023-06-08 21:05:03 UTC (rev 67307)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-generic.sty	2023-06-08 21:05:21 UTC (rev 67308)
@@ -19,7 +19,7 @@
 %% and all files in that bundle must be distributed together.
 %% 
 %% File: tagpdf-mc-generic.dtx
-\ProvidesExplPackage {tagpdf-mc-code-generic} {2023-05-16} {0.98g}
+\ProvidesExplPackage {tagpdf-mc-code-generic} {2023-06-06} {0.98h}
  {part of tagpdf - code related to marking chunks - generic mode}
 \__tag_prop_new:N \g__tag_MCID_byabspage_prop
 

Modified: trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-lua.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-lua.sty	2023-06-08 21:05:03 UTC (rev 67307)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-lua.sty	2023-06-08 21:05:21 UTC (rev 67308)
@@ -19,7 +19,7 @@
 %% and all files in that bundle must be distributed together.
 %% 
 %% File: tagpdf-mc-luacode.dtx
-\ProvidesExplPackage {tagpdf-mc-code-lua} {2023-05-16} {0.98g}
+\ProvidesExplPackage {tagpdf-mc-code-lua} {2023-06-06} {0.98h}
   {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	2023-06-08 21:05:03 UTC (rev 67307)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex-book.def	2023-06-08 21:05:21 UTC (rev 67308)
@@ -19,7 +19,7 @@
 %% and all files in that bundle must be distributed together.
 %% 
 %% File: tagpdf-data.dtx
-%% \ProvidesExplFile {tagpdf-ns-latex-book.def} {2023-05-16} {0.98g}
+%% \ProvidesExplFile {tagpdf-ns-latex-book.def} {2023-06-06} {0.98h}
 %% {latex-book} {https://www.latex-project.org/ns/book/2022}{}
 chapter,       H1,pdf2,
 section,       H2,pdf2,

Modified: trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex-inline.def
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex-inline.def	2023-06-08 21:05:03 UTC (rev 67307)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex-inline.def	2023-06-08 21:05:21 UTC (rev 67308)
@@ -19,7 +19,7 @@
 %% and all files in that bundle must be distributed together.
 %% 
 %% File: tagpdf-data.dtx
-%% \ProvidesExplFile {tagpdf-ns-latex-inline.def} {2023-05-16} {0.98g}
+%% \ProvidesExplFile {tagpdf-ns-latex-inline.def} {2023-06-06} {0.98h}
 %% {latex-inline} {https://www.latex-project.org/ns/inline/2022}{}
 chapter,       Span, pdf2,
 section,       Span, pdf2,

Modified: trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex.def
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex.def	2023-06-08 21:05:03 UTC (rev 67307)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex.def	2023-06-08 21:05:21 UTC (rev 67308)
@@ -19,7 +19,7 @@
 %% and all files in that bundle must be distributed together.
 %% 
 %% File: tagpdf-data.dtx
-%% \ProvidesExplFile {tagpdf-ns-latex.def} {2023-05-16} {0.98g}
+%% \ProvidesExplFile {tagpdf-ns-latex.def} {2023-06-06} {0.98h}
 %% {latex} {https://www.latex-project.org/ns/dflt/2022}{}
 title,        Title,    pdf2,
 part,         Title,    pdf2,

Modified: trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-mathml.def
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-mathml.def	2023-06-08 21:05:03 UTC (rev 67307)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-mathml.def	2023-06-08 21:05:21 UTC (rev 67308)
@@ -19,7 +19,7 @@
 %% and all files in that bundle must be distributed together.
 %% 
 %% File: tagpdf-data.dtx
-%% \ProvidesExplFile {tagpdf-ns-mathml.def} {2023-05-16} {0.98g}
+%% \ProvidesExplFile {tagpdf-ns-mathml.def} {2023-06-06} {0.98h}
 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	2023-06-08 21:05:03 UTC (rev 67307)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-pdf.def	2023-06-08 21:05:21 UTC (rev 67308)
@@ -19,7 +19,7 @@
 %% and all files in that bundle must be distributed together.
 %% 
 %% File: tagpdf-data.dtx
-%% \ProvidesExplFile {tagpdf-ns-pdf.def} {2023-05-16} {0.98g}
+%% \ProvidesExplFile {tagpdf-ns-pdf.def} {2023-06-06} {0.98h}
 %%  {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	2023-06-08 21:05:03 UTC (rev 67307)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-pdf2.def	2023-06-08 21:05:21 UTC (rev 67308)
@@ -19,7 +19,7 @@
 %% and all files in that bundle must be distributed together.
 %% 
 %% File: tagpdf-data.dtx
-%% \ProvidesExplFile {tagpdf-ns-pdf2.def} {2023-05-16} {0.98g}
+%% \ProvidesExplFile {tagpdf-ns-pdf2.def} {2023-06-06} {0.98h}
 %%  {pdf2}  {http://iso.org/pdf2/ssn}{}
 Document,Document,pdf2,D,
 Part,Part,pdf2,G,

Modified: trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-parent-child-2.csv
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-parent-child-2.csv	2023-06-08 21:05:03 UTC (rev 67307)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-parent-child-2.csv	2023-06-08 21:05:21 UTC (rev 67308)
@@ -19,7 +19,7 @@
 %% and all files in that bundle must be distributed together.
 %% 
 %% File: tagpdf-data.dtx
-%% \ProvidesExplFile {tagpdf-parent-child-2.csv} {2023-05-16} {0.98g}
+%% \ProvidesExplFile {tagpdf-parent-child-2.csv} {2023-06-06} {0.98h}
 ,,,StructTreeRoot,Document,DocumentFragment,Art,Part,Div,Sect,Aside,BlockQuote,NonStruct,TOC,TOCI,Index,Private,Title,Sub,Quote,Note,Reference,BibEntry,P,Hn,H,Lbl,Code,Em,Strong,Span,Link,Annot,Form,Ruby,RB,RT,RP,Warichu,WT,WP,FENote,L,LI,LBody,Table,TR,TH,TD,THead,TBody,TFoot,Caption,Figure,Formula,math,mathml,Artifact,MC
 Document,both,document level,1,0..n,0..n,∅,‡,‡,∅,0..n,0..n,‡,∅,∅,∅,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,0..n,∅
 DocumentFragment,2.0,document level,∅,0..n,0..n,0..n,‡,‡,0..n,0..n,0..n,‡,∅,∅,∅,0..n,∅,∅,∅,∅*,∅,∅,∅,∅,∅,∅,∅*,∅,∅,∅,∅*,∅*,∅,∅,∅,∅,∅,∅,∅,∅,∅*,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅*,∅,∅,∅,∅,0..n,∅

Modified: trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-parent-child.csv
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-parent-child.csv	2023-06-08 21:05:03 UTC (rev 67307)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-parent-child.csv	2023-06-08 21:05:21 UTC (rev 67308)
@@ -19,7 +19,7 @@
 %% and all files in that bundle must be distributed together.
 %% 
 %% File: tagpdf-data.dtx
-%% \ProvidesExplFile {tagpdf-parent-child.csv} {2023-05-16} {0.98g}
+%% \ProvidesExplFile {tagpdf-parent-child.csv} {2023-06-06} {0.98h}
 ,,,StructTreeRoot,Document,Art,Part,Div,Sect,BlockQuote,NonStruct,TOC,TOCI,Index,Private,Quote,Note,Reference,BibEntry,P,Hn,H,Lbl,Code,Span,Link,Annot,Form,Ruby,RB,RT,RP,Warichu,WT,WP,L,LI,LBody,Table,TR,TH,TD,THead,TBody,TFoot,Caption,Figure,Formula,MC
 Document,both,document level,1,0..n,∅,‡,‡,∅,0..n,‡,∅,∅,∅,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅
 Art,1.7,grouping,∅,0..n,∅,‡,‡,0..n,0..n,‡,∅,∅,∅,0..n,∅,0..n,∅,∅,∅,0..1,0..1,∅,∅,∅,0..n,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,0..n,∅,∅,0..n,0..n,∅,∅,∅,0..n,0..n,∅,∅

Modified: trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf.lua
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf.lua	2023-06-08 21:05:03 UTC (rev 67307)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf.lua	2023-06-08 21:05:21 UTC (rev 67308)
@@ -24,8 +24,8 @@
 
 local ProvidesLuaModule = {
     name          = "tagpdf",
-    version       = "0.98g",       --TAGVERSION
-    date          = "2023-05-16", --TAGDATE
+    version       = "0.98h",       --TAGVERSION
+    date          = "2023-06-06", --TAGDATE
     description   = "tagpdf lua code",
     license       = "The LATEX Project Public License 1.3c"
 }

Modified: trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf.sty	2023-06-08 21:05:03 UTC (rev 67307)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf.sty	2023-06-08 21:05:21 UTC (rev 67308)
@@ -28,7 +28,7 @@
 %% and all files in that bundle must be distributed together.
 %% 
 %% File: tagpdf.dtx
-\ProvidesExplPackage {tagpdf} {2023-05-16} {0.98g}
+\ProvidesExplPackage {tagpdf} {2023-06-06} {0.98h}
   { A package to experiment with pdf tagging }
 
 \bool_if:nF
@@ -281,6 +281,13 @@
 \msg_new:nnn { tag } {struct-unknown}
    { structure~with~number~#1~doesn't~exist\\ #2 }
 \msg_new:nnn { tag } {struct-no-objnum} { objnum~missing~for~structure~#1 }
+\msg_new:nnn { tag } {struct-orphan}
+  {
+    Structure~#1~has~#2~kids~but~no~parent.\\
+    It~is~turned~into~an~artifact.\\
+    Did~you~stashed~a~structure~and~then~didn't~use~it?
+  }
+
 \msg_new:nnn { tag }
   {struct-faulty-nesting}
   { there~is~no~open~structure~on~the~stack }
@@ -2114,16 +2121,30 @@
   {
     \pdf_object_if_exist:nTF { __tag/struct/#1 }
       {
+        \prop_get:cnNF { g__tag_struct_#1_prop } {P}\l__tag_tmpb_tl
+          {
+            \prop_gput:cnx { g__tag_struct_#1_prop } {P}{\pdf_object_ref:n { __tag/struct/0  }}
+            \prop_gput:cnx { g__tag_struct_#1_prop } {S}{/Artifact}
+            \seq_if_empty:cF {g__tag_struct_kids_#1_seq}
+              {
+                \msg_warning:nnxx
+                  {tag}
+                  {struct-orphan}
+                  { #1 }
+                  {\seq_count:c{g__tag_struct_kids_#1_seq}}
+              }
+          }
         \__tag_struct_fill_kid_key:n { #1 }
         \__tag_struct_get_dict_content:nN { #1 } \l__tag_tmpa_tl
         \exp_args:Nx
-          \pdf_object_write:nnx
-            { __tag/struct/#1 }
-            {dict}
-            {
-              \l__tag_tmpa_tl\c_space_tl
-              /ID~\__tag_struct_get_id:n{#1}
-            }
+              \pdf_object_write:nnx
+                { __tag/struct/#1 }
+                {dict}
+                {
+                  \l__tag_tmpa_tl\c_space_tl
+                  /ID~\__tag_struct_get_id:n{#1}
+                }
+
       }
       {
         \msg_error:nnn { tag } { struct-no-objnum } { #1}
@@ -2594,6 +2615,10 @@
           {
             \tl_gset:Nx \g__tag_struct_tag_tl
               { \exp_last_unbraced:NV\use_i:nn \l__tag_tmpa_tl }
+            \prop_get:NVNT\g__tag_role_tags_NS_prop \g__tag_struct_tag_tl\l__tag_tmpa_tl
+             {
+               \tl_gset:Nx \g__tag_struct_tag_NS_tl { \l__tag_tmpa_tl }
+             }
           }
       }
   }

Modified: trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdfdocu-patches.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdfdocu-patches.sty	2023-06-08 21:05:03 UTC (rev 67307)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdfdocu-patches.sty	2023-06-08 21:05:21 UTC (rev 67308)
@@ -1,25 +1,17 @@
 %\RequirePackage[enable-debug]{expl3}[2018/06/14]
-\ProvidesExplPackage {tagpdfdocu-patches} {2023-05-16} {0.98g}
+\ProvidesExplPackage {tagpdfdocu-patches} {2023-06-06} {0.98h}
  {patches/commands for the tagpdf documentation}
 \RequirePackage{etoolbox,xpatch}
 
 %Logos
-
+% only spacing changes:
 \ExplSyntaxOn
 \DeclareRobustCommand\TeX{
   \leavevmode
-  \tag_mc_end_push:
-   \tag_struct_begin:n{tag=Span,actualtext=TeX}
-    \tagmcbegin{}
      T\kern-.1667em\lower.5ex\hbox{E}\kern-.05emX\@ %changed from -.125em
-    \tagmcend
-   \tag_struct_end:
-  \tag_mc_begin_pop:n{}}
+   }
 \DeclareRobustCommand{\LaTeX}{
         \leavevmode
-        \tag_mc_end_push:
-        \tag_struct_begin:n{tag=Span,actualtext=LaTeX}
-        \tagmcbegin{}
         L\kern-.25em % %changed from -0.36em
         \sbox\z@ T%
          \vbox to\ht\z@{\hbox{\check at mathfonts
@@ -29,24 +21,7 @@
                         \vss}%
         \kern-.1em % %changed from 0.15em
         T\kern-.1667em\lower.5ex\hbox{E}\kern-.05emX\@ %changed from -0.125
-        \tagmcend
-        \tag_struct_end:
-        \tag_mc_begin_pop:n{}    
-  }
-% textbf
-
-\AddToHook{cmd/textbf/before}
-  {\leavevmode\tag_mc_end_push:\tag_struct_begin:n{tag=Strong}\tagmcbegin{}}
-
-\AddToHook{cmd/textbf/after}
-  {\tag_mc_end:\tag_struct_end:\tag_mc_begin_pop:n{}}
-
-% emph
-\AddToHook{cmd/emph/before}
-  {\leavevmode\tag_mc_end_push:\tag_struct_begin:n{tag=Em}\tagmcbegin{}}
-
-\AddToHook{cmd/emph/after}
-  {\tag_mc_end:\tag_struct_end:\tag_mc_begin_pop:n{}}
+    }
   
 % minisec, correct tagging is still unclear.  
 \newcommand\minisec[1]{%
@@ -173,128 +148,5 @@
 
 %====== floats ========
 
-\tagpdfsetup{add-new-tag=float/Div}
-\makeatletter
-\def\@xfloat #1[#2]{%
-  \@nodocument
-  \def \@captype {#1}%
-   \def \@fps {#2}%
-   \@onelevel at sanitize \@fps
-   \def \reserved at b {!}%
-   \ifx \reserved at b \@fps
-     \@fpsadddefault
-   \else
-     \ifx \@fps \@empty
-       \@fpsadddefault
-     \fi
-   \fi
-   \ifhmode
-     \@bsphack
-     \tagmcend%end P     
-     \@floatpenalty -\@Mii
-   \else
-     \@floatpenalty-\@Miii
-   \fi
-  \ifinner
-     \@parmoderr\@floatpenalty\z@
-  \else
-    \@next\@currbox\@freelist
-      {%
-       \@tempcnta \sixt@@n
-       \expandafter \@tfor \expandafter \reserved at a
-         \expandafter :\expandafter =\@fps
-         \do
-          {%
-           \if \reserved at a h%
-             \ifodd \@tempcnta
-             \else
-               \advance \@tempcnta \@ne
-             \fi
-           \else\if \reserved at a t%
-             \@setfpsbit \tw@
-           \else\if \reserved at a b%
-             \@setfpsbit 4%
-           \else\if \reserved at a p%
-             \@setfpsbit 8%
-           \else\if \reserved at a !%
-             \ifnum \@tempcnta>15
-               \advance\@tempcnta -\sixt@@n\relax
-             \fi
-           \else
-             \@latex at error{Unknown float option `\reserved at a'}%
-             {Option `\reserved at a' ignored and `p' used.}%
-             \@setfpsbit 8%
-           \fi\fi\fi\fi\fi
-           }%
-       \@tempcntb \csname ftype@\@captype \endcsname
-       \multiply \@tempcntb \@xxxii
-       \advance \@tempcnta \@tempcntb
-       \global \count\@currbox \@tempcnta
-       }%
-    \@fltovf
-  \fi
-  \tagstructbegin{tag=float}%float
-  \edef\@current at float@struct{\csname tag_get:n\endcsname{struct_num}}%
-  \typeout{Float structure: \@current at float@struct}
-  \global \setbox\@currbox
-    \color at vbox
-      \normalcolor
-      \vbox \bgroup
-        \hsize\columnwidth
-        \@parboxrestore
-        \@floatboxreset
-}%
 
-\def\end at float{%
-  \@endfloatbox
-  \tagstructend %end div
-  \ifnum\@floatpenalty <\z@
-    \@largefloatcheck
-    \@cons\@currlist\@currbox
-    \ifnum\@floatpenalty <-\@Mii
-      \penalty -\@Miv
-      \@tempdima\prevdepth
-      \vbox{}%
-      \prevdepth\@tempdima
-      \penalty\@floatpenalty
-    \else
-      \vadjust{\penalty -\@Miv \vbox{}\penalty\@floatpenalty}\@Esphack
-      \tagmcbegin{tag=P}%restart P Safe here??
-    \fi
-  \fi
-}
-
-\ExplSyntaxOn
-\long\def\@makecaption#1#2{%
-  \vskip\abovecaptionskip
-  \tagtool{para=false}
-  \sbox\@tempboxa{#1:~#2}% 
-  \tag_struct_begin:n{tag=Caption}   
-  \ifdim \wd\@tempboxa >\hsize
-  \tag_struct_begin:n{tag=Lbl}
-  \tag_mc_begin:n{}
-    #1:~ 
-  \tag_mc_end:
-  \tag_struct_end:
-  \tag_mc_begin:n{}  
-    #2\par
-  \tag_mc_end:  
-  \else
-    \global \@minipagefalse
-    \hb at xt@\hsize{\hfil
-     \tag_struct_begin:n{tag=Lbl}
-      \tag_mc_begin:n{}
-       #1:~ 
-      \tag_mc_end:
-     \tag_struct_end:
-     \tag_mc_begin:n{}  
-      #2\par
-     \tag_mc_end:\hfil}%
-   \fi
-   \tagstructend %caption
-  \vskip\belowcaptionskip}
-\ExplSyntaxOff
-
-
-
 \endinput



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