texlive[67368] Master/texmf-dist: tagpdf (14jun23)

commits+karl at tug.org commits+karl at tug.org
Wed Jun 14 22:14:39 CEST 2023


Revision: 67368
          http://tug.org/svn/texlive?view=revision&revision=67368
Author:   karl
Date:     2023-06-14 22:14:39 +0200 (Wed, 14 Jun 2023)
Log Message:
-----------
tagpdf (14jun23)

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-14 20:14:27 UTC (rev 67367)
+++ trunk/Master/texmf-dist/doc/latex/tagpdf/README.md	2023-06-14 20:14:39 UTC (rev 67368)
@@ -1,6 +1,6 @@
 #tagpdf — A package to create tagged pdf
-Packageversion: 0.98h 
-Packagedate: 2023/06/06
+Packageversion: 0.98i 
+Packagedate: 2023/06/14
 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-14 20:14:27 UTC (rev 67367)
+++ trunk/Master/texmf-dist/doc/latex/tagpdf/tagpdf.tex	2023-06-14 20:14:39 UTC (rev 67368)
@@ -16,8 +16,8 @@
  }
 \DebugBlocksOff
 \makeatletter
-\def\UlrikeFischer at package@version{0.98h}
-\def\UlrikeFischer at package@date{2023-06-06}
+\def\UlrikeFischer at package@version{0.98i}
+\def\UlrikeFischer at package@date{2023-06-14}
 \makeatother
 
 \documentclass[bibliography=totoc,a4paper]{article}
@@ -298,6 +298,9 @@
 
 
 \section{Changes}
+
+This section lists only important changes. More can be found in the \texttt{CHANGELOG.MD} and by checking the git commits.
+
 \subsection{Changes in 0.3}
 
 
@@ -509,12 +512,6 @@
 see~\ref{sec:retrieve}. 
 
 
-\subsection{Changes in version 0.98d}
-The main change is from now on every structure has an ID and an IDtree is 
-added. The ID of a structure can be retrieved with |\tag_get:n| 
-see~\ref{sec:retrieve}. 
-
-
 \subsection{Changes in version 0.98e}
 
 \begin{itemize}
@@ -1211,16 +1208,30 @@
 
 In \emph{lua mode} it tests if the mc-attribute is currently unset. You can't test the nesting level with it!
 
+
+
+\begin{docCommand}{tag_mc_reset_box:N}{\marg{box}}\end{docCommand}
+
+In lua mode this command will process the given box and reset all mc related attributes in the box to the current values.
+This means that if the box is used all its contents will be a kid of the current structure.
+This should (probably) only be used on boxes which don't contain tagging commands.
+See below section~\ref{sec:savebox} for more details.
+
+
 \subsubsection{Retrieving data} \label{sec:retrieve}
 With more elaborate tagging the need arise to retrieve and store current data. 
 
 \begin{docCommand}{tag_get:n}{\marg{key word}}\end{docCommand}
 
-This (expandable) command give back some variables. Currently the working key words are \verb+mc_tag+, \verb+struct_tag+,
-\verb+struct_id+ and \verb+struct_num+. The ID is a string and returned including parentheses. 
-\verb+struct_num+ returns a number and works also if only \pkg{tagpdf-base} has been loaded, but then doesn't give the same output: if \pkg{tagpdf} is loaded and tagging is active, \verb+struct_num+ gives the number of currently
-active structure, so it reverts to the parent number if a structure is closed. If only \pkg{tagpdf-base} is loaded
-nesting of structure is not tracked and so the command gives back the number of the last structure that has been created.
+This (expandable) command give back some variables. Currently the working key words are 
+\begin{itemize} 
+\item \verb+mc_tag+: the tag name of the current mc-chunk
+\item  \verb+struct_tag+: the tag name of the current structure
+\item \verb+struct_id+: The ID of the current structure. This is a string and is returned including parentheses. 
+\item \verb+struct_num+: This returns a number and works also if only \pkg{tagpdf-base} has been loaded, but then doesn't give the same output: if \pkg{tagpdf} is loaded and tagging is active, \verb+struct_num+ gives the number of currently active structure, so it reverts to the parent number if a structure is closed. If only \pkg{tagpdf-base} is loaded nesting of structure is not tracked and so the command gives back the number of the last structure that has been created.
+\item \verb+struct_counter+:  This returns a number and works also if only \pkg{tagpdf-base} has been loaded. It gives back the state of the absolute structure counter and so number of the last structure that has been created. This can be used to detect if in a piece of code there are structure commands. Be aware that this is a \LaTeX{} counter and so reset in some places.
+\item \verb+mc_counter+:  This returns a number and works also if only \pkg{tagpdf-base} has been loaded. It gives back the state of the absolute mc-counter and so number of the last mc-chunk that has been created. This can be used to detect if in a piece of code there are mc-commands.
+\end{itemize}              
 
 
 \subsubsection{Luamode: global or not global -- that is the question}\label{sec:global-local}
@@ -2209,8 +2220,8 @@
  necessary to surround destinations with a dummy structure (a Span or an 
  Artifact) to get the right page number. 
 
+\section{Storing and reusing boxes}\label{sec:savebox}
 
-
 \section{Accessibility is not only tagging}
 
 

Modified: trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-backend.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-backend.dtx	2023-06-14 20:14:27 UTC (rev 67367)
+++ trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-backend.dtx	2023-06-14 20:14:39 UTC (rev 67368)
@@ -47,13 +47,13 @@
 %    }^^A
 % }
 %
-% \date{Version 0.98h, released 2023-06-06}
+% \date{Version 0.98i, released 2023-06-14}
 % \maketitle
 % \begin{implementation}
 %    \begin{macrocode}
 %<@@=tag>
 %<*luatex>
-\ProvidesExplFile {tagpdf-luatex.def} {2023-06-06} {0.98h}
+\ProvidesExplFile {tagpdf-luatex.def} {2023-06-14} {0.98i}
   {tagpdf~driver~for~luatex}
 %    \end{macrocode}
 % \section{Loading the lua}
@@ -158,8 +158,8 @@
 
 local ProvidesLuaModule = {
     name          = "tagpdf",
-    version       = "0.98h",       --TAGVERSION
-    date          = "2023-06-06", --TAGDATE
+    version       = "0.98i",       --TAGVERSION
+    date          = "2023-06-14", --TAGDATE
     description   = "tagpdf lua code",
     license       = "The LATEX Project Public License 1.3c"
 }
@@ -890,6 +890,25 @@
 %    \end{macrocode}
 % \end{macro}
 %
+% \begin{macro}{ltx.@@.func.update_mc_attributes}
+% This updates the mc-attributes of a box. It should only be used on boxes
+% which don't contain structure elements.
+% The arguments are a box, the mc-num and the type (as a number)
+%    \begin{macrocode}
+local function @@_update_mc_attributes (head,mcnum,type)
+ for n in node.traverse(head) do
+   node.set_attribute(n,mccntattributeid,mcnum)
+   node.set_attribute(n,mctypeattributeid,type)
+   if n.id == HLIST or n.id == VLIST then
+     @@_update_mc_attributes (n.list,mcnum,type)
+   end
+ end
+ return head
+end
+ltx.@@.func.update_mc_attributes = @@_update_mc_attributes
+%    \end{macrocode}
+% \end{macro}
+%
 % \begin{macro}{ltx.@@.func.mark_page_elements}
 % This is the main traversing function. See the lua comment for more details.
 %    \begin{macrocode}

Modified: trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-checks.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-checks.dtx	2023-06-14 20:14:27 UTC (rev 67367)
+++ trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-checks.dtx	2023-06-14 20:14:39 UTC (rev 67368)
@@ -48,7 +48,7 @@
 %    }^^A
 % }
 %
-% \date{Version 0.98h, released 2023-06-06}
+% \date{Version 0.98i, released 2023-06-14}
 % \maketitle
 % \begin{documentation}
 % \section{Commands}
@@ -66,6 +66,18 @@
 % are |mc_tag|, |struct_tag|, |struct_id| and |struct_num|.
 % \end{function}
 %
+% \begin{function}[pTF,EXP]{\tag_if_box_tagged:N}
+%  \begin{syntax}
+%  \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 
+% 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 
+% ensure that when using low-level code.
+% If the internal command doesn't exist the box is assumed to be tagged.
+% \end{function}
 % \section{Description of log messages}
 % \subsection{\cs{ShowTagging} command}
 %  \begin{tabular}{lll}
@@ -300,7 +312,7 @@
 %    \begin{macrocode}
 %<@@=tag>
 %<*header>
-\ProvidesExplPackage {tagpdf-checks-code} {2023-06-06} {0.98h}
+\ProvidesExplPackage {tagpdf-checks-code} {2023-06-14} {0.98i}
  {part of tagpdf - code related to checks, conditionals, debugging and messages}
 %</header>
 %    \end{macrocode}
@@ -529,7 +541,7 @@
 %
 % \section{User conditionals}
 % \begin{macro}[pTF]{\tag_if_active:}
-% This is a test it tagging is active. This allows packages
+% This tests if tagging is active. This allows packages
 % to add conditional code.
 % The test is true if all booleans, the global and the two local one are true.
 %
@@ -556,9 +568,37 @@
          \prg_return_false:
        }
   }
+%</package>  
 %    \end{macrocode}
 % \end{macro}
 %
+% \begin{macro}[pTF]{\tag_if_box_tagged:N}
+% This tests if a box contains tagging commands. 
+% It relies on that the code that saved the box correctly set 
+% \verb+\l_tag_box_<box number>_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 
+% ensure that when using low-level code.
+% If the internal command doesn't exist the box is assumed to be tagged.
+%    \begin{macrocode}
+%<*base>
+\prg_new_conditional:Npnn \tag_if_box_tagged:N #1 {p,T,F,TF} 
+    {
+      \tl_if_exist:cTF {l_tag_box_\int_use:N #1_tl}
+       {
+         \int_compare:nNnTF {\tl_use:c{l_tag_box_\int_use:N #1_tl}}>{0}
+          { \prg_return_true:  }
+          { \prg_return_false: }      
+       }
+       {
+         \prg_return_true:     
+         % warning?? 
+       }
+    }  
+%</base>
+%    \end{macrocode}
+% \end{macro}
+%
 % \section{Internal checks}
 % These are checks used in various places in the code.
 %
@@ -566,6 +606,7 @@
 % \begin{macro}[TF]{\@@_check_if_active_mc:,\@@_check_if_active_struct:}
 % This checks if mc are active.
 %    \begin{macrocode}
+%<*package>
 \prg_new_conditional:Npnn \@@_check_if_active_mc: {T,F,TF}
   {
     \bool_lazy_and:nnTF { \g_@@_active_mc_bool } { \l_@@_active_mc_bool }

Modified: trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-data.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-data.dtx	2023-06-14 20:14:27 UTC (rev 67367)
+++ trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-data.dtx	2023-06-14 20:14:39 UTC (rev 67368)
@@ -47,7 +47,7 @@
 %    }^^A
 % }
 %
-% \date{Version 0.98h, released 2023-06-06}
+% \date{Version 0.98i, released 2023-06-14}
 % \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-06-06} {0.98h}
+%% \ProvidesExplFile {tagpdf-ns-latex.def} {2023-06-14} {0.98i}
 %% {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-06-06} {0.98h}
+%% \ProvidesExplFile {tagpdf-ns-latex-book.def} {2023-06-14} {0.98i}
 %% {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-06-06} {0.98h}
+%% \ProvidesExplFile {tagpdf-ns-latex-inline.def} {2023-06-14} {0.98i}
 %% {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-06-06} {0.98h}
+%% \ProvidesExplFile {tagpdf-ns-pdf.def} {2023-06-14} {0.98i}
 %%  {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-06-06} {0.98h} 
+%% \ProvidesExplFile {tagpdf-ns-pdf2.def} {2023-06-14} {0.98i} 
 %%  {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-06-06} {0.98h}
+%% \ProvidesExplFile {tagpdf-ns-mathml.def} {2023-06-14} {0.98i}
 % {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-06-06} {0.98h}
+%% \ProvidesExplFile {tagpdf-parent-child.csv} {2023-06-14} {0.98i}
 ,,,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-06-06} {0.98h}
+%% \ProvidesExplFile {tagpdf-parent-child-2.csv} {2023-06-14} {0.98i}
 ,,,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-14 20:14:27 UTC (rev 67367)
+++ trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-generic.dtx	2023-06-14 20:14:39 UTC (rev 67368)
@@ -46,7 +46,7 @@
 %    }^^A
 % }
 %
-% \date{Version 0.98h, released 2023-06-06}
+% \date{Version 0.98i, released 2023-06-14}
 % \maketitle
 % \begin{documentation}
 % \end{documentation}
@@ -55,11 +55,11 @@
 %    \begin{macrocode}
 %<@@=tag>
 %<*generic>
-\ProvidesExplPackage {tagpdf-mc-code-generic} {2023-06-06} {0.98h}
+\ProvidesExplPackage {tagpdf-mc-code-generic} {2023-06-14} {0.98i}
  {part of tagpdf - code related to marking chunks - generic mode}
 %</generic>
 %<*debug>
-\ProvidesExplPackage {tagpdf-debug-generic} {2023-06-06} {0.98h}
+\ProvidesExplPackage {tagpdf-debug-generic} {2023-06-14} {0.98i}
  {part of tagpdf - debugging code related to marking chunks - generic mode}
 %</debug>
 %    \end{macrocode}
@@ -657,6 +657,7 @@
 %    \end{macrocode}
 % \end{macro}
 %
+%
 % \begin{macro}{\tag_mc_begin:n,\tag_mc_end:}
 % These are the core public commands to open and close an mc.
 % They don't need to be in the same group or grouping level,
@@ -664,7 +665,7 @@
 % the state is passed to the end command through a global var and
 % a global boolean.
 %    \begin{macrocode}
-%<base>\cs_new_protected:Npn \tag_mc_begin:n #1 { \@@_whatsits: }
+%<base>\cs_new_protected:Npn \tag_mc_begin:n #1 { \@@_whatsits: \int_gincr:N \c at g_@@_MCID_abs_int }
 %<base>\cs_new_protected:Nn \tag_mc_end:{ \@@_whatsits: }
 %<*generic|debug>
 %<*generic>

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-14 20:14:27 UTC (rev 67367)
+++ trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-luacode.dtx	2023-06-14 20:14:39 UTC (rev 67368)
@@ -46,7 +46,7 @@
 %    }^^A
 % }
 %
-% \date{Version 0.98h, released 2023-06-06}
+% \date{Version 0.98i, released 2023-06-14}
 % \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-06-06} {0.98h}
+\ProvidesExplPackage {tagpdf-mc-code-lua} {2023-06-14} {0.98i}
   {tagpdf - mc code only for the luamode }
 %</luamode>
 %    \end{macrocode}
@@ -375,6 +375,22 @@
 %    \end{macrocode}
 % \end{macro}
 %
+% \begin{macro}{\tag_mc_reset_box:N}
+% This allows to reset the mc-attributes in box. On base and generic mode it should do 
+% nothing.
+%    \begin{macrocode}
+\cs_set_protected:Npn \tag_mc_reset_box:N #1
+  {
+    \lua_now:e
+     {
+       local~type=tex.getattribute(luatexbase.attributes.g_@@_mc_type_attr)
+       local~mc=tex.getattribute(luatexbase.attributes.g_@@_mc_cnt_attr)
+       ltx.__tag.func.update_mc_attributes(tex.getbox(\int_use:N #1),mc,type)
+     }
+  }
+%    \end{macrocode}
+% \end{macro}
+% 
 % \begin{macro}{ \@@_get_data_mc_tag: }
 % The command to retrieve the current mc tag.
 % TODO: Perhaps this should use the attribute instead.

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-14 20:14:27 UTC (rev 67367)
+++ trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-shared.dtx	2023-06-14 20:14:39 UTC (rev 67368)
@@ -46,7 +46,7 @@
 %    }^^A
 % }
 %
-% \date{Version 0.98h, released 2023-06-06}
+% \date{Version 0.98i, released 2023-06-14}
 % \maketitle
 % \begin{documentation}
 % \section{Public Commands}
@@ -111,6 +111,13 @@
 %   Determines if a mc-chunk is open.
 % \end{function}
 
+% \begin{function}[ EXP,added=2023-06-11]{\tag_mc_reset_box:N}
+%   \begin{syntax}
+%     \cs{tag_mc_reset:N} \Arg{box} 
+%   \end{syntax}
+%   This resets in lua mode the mc attributes to the one currently in use.
+%   It does nothing in generic mode.
+% \end{function}
 %
 % \section{Public keys}
 % The following keys can be used with |\tag_mc_begin:n|, |\tagmcbegin|,
@@ -174,7 +181,7 @@
 %    \begin{macrocode}
 %<@@=tag>
 %<*header>
-\ProvidesExplPackage {tagpdf-mc-code-shared} {2023-06-06} {0.98h}
+\ProvidesExplPackage {tagpdf-mc-code-shared} {2023-06-14} {0.98i}
   {part of tagpdf - code related to marking chunks -
    code shared by generic and luamode }
 %</header>
@@ -192,18 +199,34 @@
 %
 % \begin{variable}{g_@@_MCID_abs_int}
 %    \begin{macrocode}
-%<*shared>
+%<*base>
 \newcounter { g_@@_MCID_abs_int }
 %    \end{macrocode}
 % \end{variable}
+% \begin{macro}{\@@_get_data_mc_counter:}
+% This command allows \cs{tag_get:n} to get the current
+% state of the mc counter with the keyword |mc_counter|. 
+% By comparing the numbers it can be used to check the number of 
+% structure commands in a piece of code.
+%    \begin{macrocode}
+\cs_new:Npn \@@_get_data_mc_counter:
+  {
+    \int_use:N \c at g_@@_MCID_abs_int
+  }
+%</base>
+%    \end{macrocode}
+% \end{macro}
 %
-% \begin{macro}{\_@@_get_mc_abs_cnt:}
+%
+% \begin{macro}{\@@_get_mc_abs_cnt:}
 % A (expandable) function to get the current value of the cnt.
+% TODO: duplicate of the previous one, this should be cleaned up.
 %    \begin{macrocode}
-\cs_new:Npn \_@@_get_mc_abs_cnt: { \int_use:N \c at g_@@_MCID_abs_int }
+%<*shared>
+\cs_new:Npn \@@_get_mc_abs_cnt: { \int_use:N \c at g_@@_MCID_abs_int }
 %    \end{macrocode}
 % \end{macro}
-%
+% 
 % \begin{variable}{\g_@@_MCID_tmp_bypage_int}
 % The following hold the temporary by page number assigned to a mc.
 % It must be defined in the shared code to avoid problems with labels.
@@ -362,7 +385,13 @@
 %</shared>
 %    \end{macrocode}
 % \end{macro}
-%
+% \begin{macro}{\tag_mc_reset_box:N}
+% This allows to reset the mc-attributes in box. On base and generic mode it should do 
+% nothing.
+%    \begin{macrocode}
+%<base>\cs_new_protected:Npn \tag_mc_reset_box:N #1 {}
+%    \end{macrocode}
+% \end{macro}
 % \begin{macro}{\tag_mc_end_push:, \tag_mc_begin_pop:n}
 %
 %    \begin{macrocode}
@@ -410,7 +439,7 @@
   }
 %    \end{macrocode}
 % \end{macro}
-%
+% 
 % \subsection{Keys}
 % This are the keys where the code can be shared between the modes.
 %

Modified: trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-roles.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-roles.dtx	2023-06-14 20:14:27 UTC (rev 67367)
+++ trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-roles.dtx	2023-06-14 20:14:39 UTC (rev 67368)
@@ -46,7 +46,7 @@
 %    }^^A
 % }
 %
-% \date{Version 0.98h, released 2023-06-06}
+% \date{Version 0.98i, released 2023-06-14}
 % \maketitle
 % \begin{documentation}
 % \begin{function}
@@ -98,7 +98,7 @@
 %    \begin{macrocode}
 %<@@=tag>
 %<*header>
-\ProvidesExplPackage {tagpdf-roles-code} {2023-06-06} {0.98h}
+\ProvidesExplPackage {tagpdf-roles-code} {2023-06-14} {0.98i}
  {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-14 20:14:27 UTC (rev 67367)
+++ trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-space.dtx	2023-06-14 20:14:39 UTC (rev 67368)
@@ -46,7 +46,7 @@
 %    }^^A
 % }
 %
-% \date{Version 0.98h, released 2023-06-06}
+% \date{Version 0.98i, released 2023-06-14}
 % \maketitle
 % \begin{documentation}
 % \begin{function}{interwordspace (setup-key)}
@@ -64,7 +64,7 @@
 %    \begin{macrocode}
 %<@@=tag>
 %<*header>
-\ProvidesExplPackage {tagpdf-space-code} {2023-06-06} {0.98h}
+\ProvidesExplPackage {tagpdf-space-code} {2023-06-14} {0.98i}
  {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-14 20:14:27 UTC (rev 67367)
+++ trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-struct.dtx	2023-06-14 20:14:39 UTC (rev 67368)
@@ -46,7 +46,7 @@
 %    }^^A
 % }
 %
-% \date{Version 0.98h, released 2023-06-06}
+% \date{Version 0.98i, released 2023-06-14}
 % \maketitle
 % \begin{documentation}
 % \section{Public Commands}
@@ -247,7 +247,7 @@
 %    \begin{macrocode}
 %<@@=tag>
 %<*header>
-\ProvidesExplPackage {tagpdf-struct-code} {2023-06-06} {0.98h}
+\ProvidesExplPackage {tagpdf-struct-code} {2023-06-14} {0.98i}
  {part of tagpdf - code related to storing structure}
 %</header>
 %    \end{macrocode}
@@ -978,6 +978,20 @@
 %    \end{macrocode}
 % \end{macro}
 %
+% \begin{macro}{\@@_get_data_struct_counter:}
+% this command allows \cs{tag_get:n} to get the current
+% state of the structure counter with the keyword |struct_counter|. 
+% By comparing the numbers it can be used to check the number of 
+% structure commands in a piece of code.
+%    \begin{macrocode}
+%<*base>
+\cs_new:Npn \@@_get_data_struct_counter:
+  {
+    \int_use:N \c at g_@@_struct_abs_int
+  }
+%</base>
+%    \end{macrocode}
+% \end{macro}
 % \section{Keys}
 % This are the keys for the user commands.
 % we store the tag in a variable. But we should be careful, it is only reliable
@@ -1726,7 +1740,7 @@
 % \section{Attributes and attribute classes}
 %    \begin{macrocode}
 %<*header>
-\ProvidesExplPackage {tagpdf-attr-code} {2023-06-06} {0.98h}
+\ProvidesExplPackage {tagpdf-attr-code} {2023-06-14} {0.98i}
   {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-14 20:14:27 UTC (rev 67367)
+++ trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-tree.dtx	2023-06-14 20:14:39 UTC (rev 67368)
@@ -47,13 +47,13 @@
 %    }^^A
 % }
 %
-% \date{Version 0.98h, released 2023-06-06}
+% \date{Version 0.98i, released 2023-06-14}
 % \maketitle
 % \begin{implementation}
 %    \begin{macrocode}
 %<@@=tag>
 %<*header>
-\ProvidesExplPackage {tagpdf-tree-code} {2023-06-06} {0.98h}
+\ProvidesExplPackage {tagpdf-tree-code} {2023-06-14} {0.98i}
  {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-14 20:14:27 UTC (rev 67367)
+++ trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-user.dtx	2023-06-14 20:14:39 UTC (rev 67368)
@@ -46,7 +46,7 @@
 %    }^^A
 % }
 %
-% \date{Version 0.98h, released 2023-06-06}
+% \date{Version 0.98i, released 2023-06-14}
 % \maketitle
 % \begin{documentation}
 % \section{Setup commands}
@@ -250,7 +250,7 @@
 %    \begin{macrocode}
 %<@@=tag>
 %<*header>
-\ProvidesExplPackage {tagpdf-user} {2023-06-06} {0.98h}
+\ProvidesExplPackage {tagpdf-user} {2023-06-14} {0.98i}
   {tagpdf - user commands}
 %</header>
 %    \end{macrocode}
@@ -517,6 +517,16 @@
 % or do a first step to apply tagpdf commands to document commands.
 % This part should be regularly revisited to check if the code should go to a
 % better place or can be improved.
+% 
+% \subsection{new ref system}
+% Until l3ref is in the kernel, we provide a definition for \cs{newlabeldata} in 
+% the aux-file to avoid errors if a document switches between tagging and non-tagging.
+%    \begin{macrocode}
+%</package>
+%<base>\AddToHook{begindocument}
+%<base> {\immediate\write\@mainaux{\string\providecommand\string\newlabeldata[2]{}}}
+%<*package>
+%    \end{macrocode}
 % \subsection{Document structure}
 % \begin{macro}{\g_@@_root_default_tl,activate (setup-key)}
 %    \begin{macrocode}
@@ -840,9 +850,11 @@
        \bool_gset_false:N \g_@@_in_mc_bool
      }
     \tag_mc_begin:n {artifact}
+    \tag_stop:n{headfoot}
  }
 \cs_new_protected:Npn \@@_exclude_headfoot_end:
  {
+    \tag_start:n{headfoot}
     \tag_mc_end:
     \bool_if:NTF \g_@@_mode_lua_bool
      {
@@ -869,10 +881,12 @@
      }
     \tag_struct_begin:n{tag=Artifact,attribute-class=@@/attr/#1}
     \tag_mc_begin:n {artifact=#1}
+    \tag_stop:n{headfoot}
  }
 
 \cs_new_protected:Npn \@@_exclude_struct_headfoot_end:
  {
+    \tag_start:n{headfoot}
     \tag_mc_end:
     \tag_struct_end:
     \bool_if:NTF \g_@@_mode_lua_bool

Modified: trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf.dtx	2023-06-14 20:14:27 UTC (rev 67367)
+++ trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf.dtx	2023-06-14 20:14:39 UTC (rev 67368)
@@ -92,7 +92,7 @@
 %    \begin{macrocode}
 %<@@=tag>
 %<*package>
-\ProvidesExplPackage {tagpdf} {2023-06-06} {0.98h}
+\ProvidesExplPackage {tagpdf} {2023-06-14} {0.98i}
   { A package to experiment with pdf tagging }
 
 \bool_if:nF
@@ -118,7 +118,7 @@
 %    \end{macrocode}
 %<*debug>
 %    \begin{macrocode}
-\ProvidesExplPackage {tagpdf-debug} {2023-06-06} {0.98h}
+\ProvidesExplPackage {tagpdf-debug} {2023-06-14} {0.98i}
   { 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-06-06} {0.98h}
+\ProvidesExplPackage {tagpdf-base} {2023-06-14} {0.98i}
   {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-14 20:14:27 UTC (rev 67367)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-base.sty	2023-06-14 20:14:39 UTC (rev 67368)
@@ -25,7 +25,7 @@
 %% and all files in that bundle must be distributed together.
 %% 
 %% File: tagpdf.dtx
-\ProvidesExplPackage {tagpdf-base} {2023-06-06} {0.98h}
+\ProvidesExplPackage {tagpdf-base} {2023-06-14} {0.98i}
   {part of tagpdf - provide base, no-op versions of the user commands }
 \AddToHook{begindocument}
  {
@@ -45,14 +45,20 @@
 \cs_new_protected:Npn \tag_start:n #1 {}
 
 %% File: tagpdf-mc-generic.dtx
-\cs_new_protected:Npn \tag_mc_begin:n #1 { \__tag_whatsits: }
+\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: }
 
 %% File: tagpdf-mc-shared.dtx
 
+\newcounter { g__tag_MCID_abs_int }
+\cs_new:Npn \__tag_get_data_mc_counter:
+  {
+    \int_use:N \c at g__tag_MCID_abs_int
+  }
 \cs_new_protected:Npn \tag_mc_use:n #1 { \__tag_whatsits: }
 \cs_new_protected:Npn \tag_mc_artifact_group_begin:n #1 {}
 \cs_new_protected:Npn \tag_mc_artifact_group_end:{}
+\cs_new_protected:Npn \tag_mc_reset_box:N #1 {}
 \cs_new_protected:Npn \tag_mc_end_push: {}
 \cs_new_protected:Npn \tag_mc_begin_pop:n #1 {}
 %% File: tagpdf-struct.dtx
@@ -65,6 +71,10 @@
   {
     \g__tag_struct_stack_current_tl
   }
+\cs_new:Npn \__tag_get_data_struct_counter:
+  {
+    \int_use:N \c at g__tag_struct_abs_int
+  }
 \cs_new_protected:Npn \tag_struct_begin:n #1 {\int_gincr:N \c at g__tag_struct_abs_int}
 \cs_new_protected:Npn \tag_struct_end:{}
 \cs_new_protected:Npn \tag_struct_end:n{}
@@ -75,6 +85,19 @@
 \cs_new:Npn \tag_get:n #1   { \use:c {__tag_get_data_#1: } }
 \prg_new_conditional:Npnn \tag_if_active: { p , T , TF, F }
   { \prg_return_false: }
+\prg_new_conditional:Npnn \tag_if_box_tagged:N #1 {p,T,F,TF}
+    {
+      \tl_if_exist:cTF {l_tag_box_\int_use:N #1_tl}
+       {
+         \int_compare:nNnTF {\tl_use:c{l_tag_box_\int_use:N #1_tl}}>{0}
+          { \prg_return_true:  }
+          { \prg_return_false: }
+       }
+       {
+         \prg_return_true:
+         % warning??
+       }
+    }
 %% File: tagpdf-user.dtx
 
 
@@ -111,6 +134,8 @@
   {
     \tag_struct_use:n {#1}
   }
+\AddToHook{begindocument}
+ {\immediate\write\@mainaux{\string\providecommand\string\newlabeldata[2]{}}}
 \bool_new:N \l__tag_para_flattened_bool
 \newcommand\tagpdfparaOn {}
 \newcommand\tagpdfparaOff{}

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-14 20:14:27 UTC (rev 67367)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-debug-generic.sty	2023-06-14 20:14:39 UTC (rev 67368)
@@ -19,7 +19,7 @@
 %% and all files in that bundle must be distributed together.
 %% 
 %% File: tagpdf-mc-generic.dtx
-\ProvidesExplPackage {tagpdf-debug-generic} {2023-06-06} {0.98h}
+\ProvidesExplPackage {tagpdf-debug-generic} {2023-06-14} {0.98i}
  {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-14 20:14:27 UTC (rev 67367)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-debug.sty	2023-06-14 20:14:39 UTC (rev 67368)
@@ -26,7 +26,7 @@
 %% and all files in that bundle must be distributed together.
 %% 
 %% File: tagpdf.dtx
-\ProvidesExplPackage {tagpdf-debug} {2023-06-06} {0.98h}
+\ProvidesExplPackage {tagpdf-debug} {2023-06-14} {0.98i}
   { debug code for tagpdf }
 \@ifpackageloaded{tagpdf}{}{\PackageWarning{tagpdf-debug}{tagpdf~not~loaded,~quitting}\endinput}
 \prop_gput:Nnn \g_msg_module_type_prop { tag / debug} {}

Modified: trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-luatex.def
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-luatex.def	2023-06-14 20:14:27 UTC (rev 67367)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-luatex.def	2023-06-14 20:14:39 UTC (rev 67368)
@@ -19,7 +19,7 @@
 %% and all files in that bundle must be distributed together.
 %% 
 %% File: tagpdf-backend.dtx
-\ProvidesExplFile {tagpdf-luatex.def} {2023-06-06} {0.98h}
+\ProvidesExplFile {tagpdf-luatex.def} {2023-06-14} {0.98i}
   {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-14 20:14:27 UTC (rev 67367)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-generic.sty	2023-06-14 20:14:39 UTC (rev 67368)
@@ -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-06-06} {0.98h}
+\ProvidesExplPackage {tagpdf-mc-code-generic} {2023-06-14} {0.98i}
  {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-14 20:14:27 UTC (rev 67367)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-lua.sty	2023-06-14 20:14:39 UTC (rev 67368)
@@ -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-06-06} {0.98h}
+\ProvidesExplPackage {tagpdf-mc-code-lua} {2023-06-14} {0.98i}
   {tagpdf - mc code only for the luamode }
 \hook_gput_code:nnn{begindocument}{tagpdf/mc}
   {
@@ -242,6 +242,15 @@
         \tl_gset:Nn \g__tag_mc_key_tag_tl { }
       }
   }
+\cs_set_protected:Npn \tag_mc_reset_box:N #1
+  {
+    \lua_now:e
+     {
+       local~type=tex.getattribute(luatexbase.attributes.g__tag_mc_type_attr)
+       local~mc=tex.getattribute(luatexbase.attributes.g__tag_mc_cnt_attr)
+       ltx.__tag.func.update_mc_attributes(tex.getbox(\int_use:N #1),mc,type)
+     }
+  }
 \cs_new:Npn \__tag_get_data_mc_tag: { \g__tag_mc_key_tag_tl }
 
 \keys_define:nn { __tag / 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-14 20:14:27 UTC (rev 67367)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex-book.def	2023-06-14 20:14:39 UTC (rev 67368)
@@ -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-06-06} {0.98h}
+%% \ProvidesExplFile {tagpdf-ns-latex-book.def} {2023-06-14} {0.98i}
 %% {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-14 20:14:27 UTC (rev 67367)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex-inline.def	2023-06-14 20:14:39 UTC (rev 67368)
@@ -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-06-06} {0.98h}
+%% \ProvidesExplFile {tagpdf-ns-latex-inline.def} {2023-06-14} {0.98i}
 %% {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-14 20:14:27 UTC (rev 67367)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex.def	2023-06-14 20:14:39 UTC (rev 67368)
@@ -19,7 +19,7 @@
 %% and all files in that bundle must be distributed together.
 %% 
 %% File: tagpdf-data.dtx
-%% \ProvidesExplFile {tagpdf-ns-latex.def} {2023-06-06} {0.98h}
+%% \ProvidesExplFile {tagpdf-ns-latex.def} {2023-06-14} {0.98i}
 %% {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-14 20:14:27 UTC (rev 67367)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-mathml.def	2023-06-14 20:14:39 UTC (rev 67368)
@@ -19,7 +19,7 @@
 %% and all files in that bundle must be distributed together.
 %% 
 %% File: tagpdf-data.dtx
-%% \ProvidesExplFile {tagpdf-ns-mathml.def} {2023-06-06} {0.98h}
+%% \ProvidesExplFile {tagpdf-ns-mathml.def} {2023-06-14} {0.98i}
 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-14 20:14:27 UTC (rev 67367)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-pdf.def	2023-06-14 20:14:39 UTC (rev 67368)
@@ -19,7 +19,7 @@
 %% and all files in that bundle must be distributed together.
 %% 
 %% File: tagpdf-data.dtx
-%% \ProvidesExplFile {tagpdf-ns-pdf.def} {2023-06-06} {0.98h}
+%% \ProvidesExplFile {tagpdf-ns-pdf.def} {2023-06-14} {0.98i}
 %%  {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-14 20:14:27 UTC (rev 67367)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-pdf2.def	2023-06-14 20:14:39 UTC (rev 67368)
@@ -19,7 +19,7 @@
 %% and all files in that bundle must be distributed together.
 %% 
 %% File: tagpdf-data.dtx
-%% \ProvidesExplFile {tagpdf-ns-pdf2.def} {2023-06-06} {0.98h}
+%% \ProvidesExplFile {tagpdf-ns-pdf2.def} {2023-06-14} {0.98i}
 %%  {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-14 20:14:27 UTC (rev 67367)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-parent-child-2.csv	2023-06-14 20:14:39 UTC (rev 67368)
@@ -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-06-06} {0.98h}
+%% \ProvidesExplFile {tagpdf-parent-child-2.csv} {2023-06-14} {0.98i}
 ,,,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-14 20:14:27 UTC (rev 67367)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-parent-child.csv	2023-06-14 20:14:39 UTC (rev 67368)
@@ -19,7 +19,7 @@
 %% and all files in that bundle must be distributed together.
 %% 
 %% File: tagpdf-data.dtx
-%% \ProvidesExplFile {tagpdf-parent-child.csv} {2023-06-06} {0.98h}
+%% \ProvidesExplFile {tagpdf-parent-child.csv} {2023-06-14} {0.98i}
 ,,,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-14 20:14:27 UTC (rev 67367)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf.lua	2023-06-14 20:14:39 UTC (rev 67368)
@@ -24,8 +24,8 @@
 
 local ProvidesLuaModule = {
     name          = "tagpdf",
-    version       = "0.98h",       --TAGVERSION
-    date          = "2023-06-06", --TAGDATE
+    version       = "0.98i",       --TAGVERSION
+    date          = "2023-06-14", --TAGDATE
     description   = "tagpdf lua code",
     license       = "The LATEX Project Public License 1.3c"
 }
@@ -491,6 +491,17 @@
  ltx.__tag.trace.log("INFO TAG-MC-INTO-PAGE: page " .. page ..
                    ": inserting MCID " .. mcpagecnt .. " => " .. mcnum,3)
 end
+local function __tag_update_mc_attributes (head,mcnum,type)
+ for n in node.traverse(head) do
+   node.set_attribute(n,mccntattributeid,mcnum)
+   node.set_attribute(n,mctypeattributeid,type)
+   if n.id == HLIST or n.id == VLIST then
+     __tag_update_mc_attributes (n.list,mcnum,type)
+   end
+ end
+ return head
+end
+ltx.__tag.func.update_mc_attributes = __tag_update_mc_attributes
 --[[
     Now follows the core function
     It wades through the shipout box and checks the attributes

Modified: trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf.sty	2023-06-14 20:14:27 UTC (rev 67367)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf.sty	2023-06-14 20:14:39 UTC (rev 67368)
@@ -28,7 +28,7 @@
 %% and all files in that bundle must be distributed together.
 %% 
 %% File: tagpdf.dtx
-\ProvidesExplPackage {tagpdf} {2023-06-06} {0.98h}
+\ProvidesExplPackage {tagpdf} {2023-06-14} {0.98i}
   { A package to experiment with pdf tagging }
 
 \bool_if:nF
@@ -575,7 +575,6 @@
  }
 %% File: tagpdf-mc-shared.dtx
 
-\newcounter { g__tag_MCID_abs_int }
 \cs_new:Npn \__tag_get_mc_abs_cnt: { \int_use:N \c at g__tag_MCID_abs_int }
 \int_new:N \g__tag_MCID_tmp_bypage_int
 \bool_new:N \g__tag_in_mc_bool
@@ -3292,9 +3291,11 @@
        \bool_gset_false:N \g__tag_in_mc_bool
      }
     \tag_mc_begin:n {artifact}
+    \tag_stop:n{headfoot}
  }
 \cs_new_protected:Npn \__tag_exclude_headfoot_end:
  {
+    \tag_start:n{headfoot}
     \tag_mc_end:
     \bool_if:NTF \g__tag_mode_lua_bool
      {
@@ -3318,10 +3319,12 @@
      }
     \tag_struct_begin:n{tag=Artifact,attribute-class=__tag/attr/#1}
     \tag_mc_begin:n {artifact=#1}
+    \tag_stop:n{headfoot}
  }
 
 \cs_new_protected:Npn \__tag_exclude_struct_headfoot_end:
  {
+    \tag_start:n{headfoot}
     \tag_mc_end:
     \tag_struct_end:
     \bool_if:NTF \g__tag_mode_lua_bool

Modified: trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdfdocu-patches.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdfdocu-patches.sty	2023-06-14 20:14:27 UTC (rev 67367)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdfdocu-patches.sty	2023-06-14 20:14:39 UTC (rev 67368)
@@ -1,5 +1,5 @@
 %\RequirePackage[enable-debug]{expl3}[2018/06/14]
-\ProvidesExplPackage {tagpdfdocu-patches} {2023-06-06} {0.98h}
+\ProvidesExplPackage {tagpdfdocu-patches} {2023-06-14} {0.98i}
  {patches/commands for the tagpdf documentation}
 \RequirePackage{etoolbox,xpatch}
 



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