texlive[65845] Master/texmf-dist: tagpdf (15feb23)

commits+karl at tug.org commits+karl at tug.org
Wed Feb 15 21:38:41 CET 2023


Revision: 65845
          http://tug.org/svn/texlive?view=revision&revision=65845
Author:   karl
Date:     2023-02-15 21:38:40 +0100 (Wed, 15 Feb 2023)
Log Message:
-----------
tagpdf (15feb23)

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-02-15 20:38:14 UTC (rev 65844)
+++ trunk/Master/texmf-dist/doc/latex/tagpdf/README.md	2023-02-15 20:38:40 UTC (rev 65845)
@@ -1,6 +1,6 @@
 #tagpdf — A package to create tagged pdf
-Packageversion: 0.98c 
-Packagedate: 2023/01/30
+Packageversion: 0.98d 
+Packagedate: 2023/02/15
 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-02-15 20:38:14 UTC (rev 65844)
+++ trunk/Master/texmf-dist/doc/latex/tagpdf/tagpdf.tex	2023-02-15 20:38:40 UTC (rev 65845)
@@ -15,8 +15,8 @@
  }
 
 \makeatletter
-\def\UlrikeFischer at package@version{0.98c}
-\def\UlrikeFischer at package@date{2023-01-30}
+\def\UlrikeFischer at package@version{0.98d}
+\def\UlrikeFischer at package@date{2023-02-15}
 \makeatother
 
 \documentclass[DIV=12,parskip=half-,bibliography=totoc,a4paper]{article}
@@ -655,8 +655,23 @@
 
 \end{description}
 
+\begin{docCommand}[nosep]{tagtool}{\marg{key-val}}\end{docCommand}
+\begin{docCommand}{tag_tool:n}{\marg{key-val}}\end{docCommand}
 
+The tagging of document elements require a variety of small commands. This command
+will unify them under a common interface. This is work-in-progress and syntax and implementation
+can change! While the argument looks like a key-val \emph{list} (and currently is actually one), 
+this should not be relied on. Instead only
+one argument should be used as the implementation will change to improve the speed. Currently the following 
+arguments are supported
 
+\begin{description}
+\item[\PrintKeyName{para}] Boolean. It will replace the \cs{tagpdfparaOn} and \cs{tagpdfparaOff} command.
+\item[\PrintKeyName{paratag}] String. It allows to change the tag used in the following automatically tagged paragraphs.
+\end{description}
+
+
+
 \section{Tagging}
 
 
@@ -1643,6 +1658,10 @@
    \item[\PrintKeyName{AFinline-o}]
     This is like verb+AFinline+, but it expands the value once.
 
+\item[\PrintKeyName{texsource}] This is like verb+AFinline-o+, but it 
+    creates a tex-file, with mime type \texttt{application/x-tex} and the 
+    AFRelationship \texttt{Source}. 
+
    \item[\PrintKeyName{lang}]
      This key allows to set the language for a structure element. The value should be a bcp-identifier,
      e.g. |de-De|.

Modified: trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-backend.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-backend.dtx	2023-02-15 20:38:14 UTC (rev 65844)
+++ trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-backend.dtx	2023-02-15 20:38:40 UTC (rev 65845)
@@ -47,13 +47,13 @@
 %    }^^A
 % }
 %
-% \date{Version 0.98c, released 2023-01-30}
+% \date{Version 0.98d, released 2023-02-15}
 % \maketitle
 % \begin{implementation}
 %    \begin{macrocode}
 %<@@=tag>
 %<*luatex>
-\ProvidesExplFile {tagpdf-luatex.def} {2023-01-30} {0.98c}
+\ProvidesExplFile {tagpdf-luatex.def} {2023-02-15} {0.98d}
   {tagpdf~driver~for~luatex}
 %    \end{macrocode}
 % \section{Loading the lua}
@@ -158,8 +158,8 @@
 
 local ProvidesLuaModule = {
     name          = "tagpdf",
-    version       = "0.98c",       --TAGVERSION
-    date          = "2023-01-30", --TAGDATE
+    version       = "0.98d",       --TAGVERSION
+    date          = "2023-02-15", --TAGDATE
     description   = "tagpdf lua code",
     license       = "The LATEX Project Public License 1.3c"
 }
@@ -802,6 +802,7 @@
         end
       end
     end
+    box.head = head
   end
 end
 

Modified: trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-checks.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-checks.dtx	2023-02-15 20:38:14 UTC (rev 65844)
+++ trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-checks.dtx	2023-02-15 20:38:40 UTC (rev 65845)
@@ -48,7 +48,7 @@
 %    }^^A
 % }
 %
-% \date{Version 0.98c, released 2023-01-30}
+% \date{Version 0.98d, released 2023-02-15}
 % \maketitle
 % \begin{documentation}
 % \section{Commands}
@@ -295,7 +295,7 @@
 %    \begin{macrocode}
 %<@@=tag>
 %<*header>
-\ProvidesExplPackage {tagpdf-checks-code} {2023-01-30} {0.98c}
+\ProvidesExplPackage {tagpdf-checks-code} {2023-02-15} {0.98d}
  {part of tagpdf - code related to checks, conditionals, debugging and messages}
 %</header>
 %    \end{macrocode}

Modified: trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-data.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-data.dtx	2023-02-15 20:38:14 UTC (rev 65844)
+++ trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-data.dtx	2023-02-15 20:38:40 UTC (rev 65845)
@@ -47,7 +47,7 @@
 %    }^^A
 % }
 %
-% \date{Version 0.98c, released 2023-01-30}
+% \date{Version 0.98d, released 2023-02-15}
 % \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-01-30} {0.98c}
+%% \ProvidesExplFile {tagpdf-ns-latex.def} {2023-02-15} {0.98d}
 %% {latex} {https://www.latex-project.org/ns/dflt/2022}{}
 title,        Title,    pdf2,
 part,         Title,    pdf2,
@@ -86,7 +86,7 @@
 % It is bound to change
 %    \begin{macrocode}
 %<*ns-latex-book>
-%% \ProvidesExplFile {tagpdf-ns-latex-book.def} {2023-01-30} {0.98c}
+%% \ProvidesExplFile {tagpdf-ns-latex-book.def} {2023-02-15} {0.98d}
 %% {latex-book} {https://www.latex-project.org/ns/book/2022}{}
 chapter,       H1,pdf2,
 section,       H2,pdf2,
@@ -102,7 +102,7 @@
 % It is bound to change a lot!
 %    \begin{macrocode}
 %<*ns-latex-inline>
-%% \ProvidesExplFile {tagpdf-ns-latex-inline.def} {2023-01-30} {0.98c}
+%% \ProvidesExplFile {tagpdf-ns-latex-inline.def} {2023-02-15} {0.98d}
 %% {latex-inline} {https://www.latex-project.org/ns/inline/2022}{}
 chapter,       Span, pdf2,    
 section,       Span, pdf2,
@@ -116,7 +116,7 @@
 % \section{The pdf namespace data}
 %    \begin{macrocode}
 %<*ns-pdf>
-%% \ProvidesExplFile {tagpdf-ns-pdf.def} {2023-01-30} {0.98c}
+%% \ProvidesExplFile {tagpdf-ns-pdf.def} {2023-02-15} {0.98d}
 %%  {pdf}   {http://iso.org/pdf/ssn}{}
 StructTreeRoot,StructTreeRoot,pdf,D,
 Document,Document,pdf,D,   
@@ -184,7 +184,7 @@
 % \section{The pdf 2.0 namespace data}
 %    \begin{macrocode}
 %<*ns-pdf2>
-%% \ProvidesExplFile {tagpdf-ns-pdf2.def} {2023-01-30} {0.98c} 
+%% \ProvidesExplFile {tagpdf-ns-pdf2.def} {2023-02-15} {0.98d} 
 %%  {pdf2}  {http://iso.org/pdf2/ssn}{}
 Document,Document,pdf2,D,   
 Part,Part,pdf2,G,       
@@ -240,7 +240,7 @@
 % \section{The mathml namespace data}
 %    \begin{macrocode}
 %<*ns-mathml>
-%% \ProvidesExplFile {tagpdf-ns-mathml.def} {2023-01-30} {0.98c}
+%% \ProvidesExplFile {tagpdf-ns-mathml.def} {2023-02-15} {0.98d}
 % {mathml}{http://www.w3.org/1998/Math/MathML}{}
 abs,,,
 and,,,
@@ -475,7 +475,7 @@
 % This will perhaps change in future.
 %    \begin{macrocode}
 %<*parent-child>
-%% \ProvidesExplFile {tagpdf-parent-child.csv} {2023-01-30} {0.98c}
+%% \ProvidesExplFile {tagpdf-parent-child.csv} {2023-02-15} {0.98d}
 ,,,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,∅,∅
@@ -530,7 +530,7 @@
 % This will perhaps change in future.
 %    \begin{macrocode}
 %<*parent-child-2>
-%% \ProvidesExplFile {tagpdf-parent-child-2.csv} {2023-01-30} {0.98c}
+%% \ProvidesExplFile {tagpdf-parent-child-2.csv} {2023-02-15} {0.98d}
 ,,,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-02-15 20:38:14 UTC (rev 65844)
+++ trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-generic.dtx	2023-02-15 20:38:40 UTC (rev 65845)
@@ -46,7 +46,7 @@
 %    }^^A
 % }
 %
-% \date{Version 0.98c, released 2023-01-30}
+% \date{Version 0.98d, released 2023-02-15}
 % \maketitle
 % \begin{documentation}
 % \end{documentation}
@@ -55,11 +55,11 @@
 %    \begin{macrocode}
 %<@@=tag>
 %<*generic>
-\ProvidesExplPackage {tagpdf-mc-code-generic} {2023-01-30} {0.98c}
+\ProvidesExplPackage {tagpdf-mc-code-generic} {2023-02-15} {0.98d}
  {part of tagpdf - code related to marking chunks - generic mode}
 %</generic>
 %<*debug>
-\ProvidesExplPackage {tagpdf-debug-generic} {2023-01-30} {0.98c}
+\ProvidesExplPackage {tagpdf-debug-generic} {2023-02-15} {0.98d}
  {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-02-15 20:38:14 UTC (rev 65844)
+++ trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-luacode.dtx	2023-02-15 20:38:40 UTC (rev 65845)
@@ -46,7 +46,7 @@
 %    }^^A
 % }
 %
-% \date{Version 0.98c, released 2023-01-30}
+% \date{Version 0.98d, released 2023-02-15}
 % \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-01-30} {0.98c}
+\ProvidesExplPackage {tagpdf-mc-code-lua} {2023-02-15} {0.98d}
   {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-02-15 20:38:14 UTC (rev 65844)
+++ trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-shared.dtx	2023-02-15 20:38:40 UTC (rev 65845)
@@ -46,7 +46,7 @@
 %    }^^A
 % }
 %
-% \date{Version 0.98c, released 2023-01-30}
+% \date{Version 0.98d, released 2023-02-15}
 % \maketitle
 % \begin{documentation}
 % \section{Public Commands}
@@ -174,7 +174,7 @@
 %    \begin{macrocode}
 %<@@=tag>
 %<*header>
-\ProvidesExplPackage {tagpdf-mc-code-shared} {2023-01-30} {0.98c}
+\ProvidesExplPackage {tagpdf-mc-code-shared} {2023-02-15} {0.98d}
   {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-02-15 20:38:14 UTC (rev 65844)
+++ trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-roles.dtx	2023-02-15 20:38:40 UTC (rev 65845)
@@ -46,7 +46,7 @@
 %    }^^A
 % }
 %
-% \date{Version 0.98c, released 2023-01-30}
+% \date{Version 0.98d, released 2023-02-15}
 % \maketitle
 % \begin{documentation}
 % \begin{function}
@@ -98,7 +98,7 @@
 %    \begin{macrocode}
 %<@@=tag>
 %<*header>
-\ProvidesExplPackage {tagpdf-roles-code} {2023-01-30} {0.98c}
+\ProvidesExplPackage {tagpdf-roles-code} {2023-02-15} {0.98d}
  {part of tagpdf - code related to roles and structure names}
 %</header>
 %    \end{macrocode}
@@ -913,7 +913,7 @@
                {
                  \tl_set:Nx\l_@@_tmpa_tl { \use_ii:nn ##1 }
                  \exp_args:Nne
-                  \tl_if_in:nnF {-Part-Div-NonStruct-}{-\l_@@_tmpa_tl-}
+                  \str_if_in:nnF {-Part-Div-NonStruct-}{-\l_@@_tmpa_tl-}
                    {  
                      \tl_set:Nn\l_@@_role_real_parent_tl {##1}
                      \int_zero:N\l_@@_tmpa_int

Modified: trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-space.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-space.dtx	2023-02-15 20:38:14 UTC (rev 65844)
+++ trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-space.dtx	2023-02-15 20:38:40 UTC (rev 65845)
@@ -46,7 +46,7 @@
 %    }^^A
 % }
 %
-% \date{Version 0.98c, released 2023-01-30}
+% \date{Version 0.98d, released 2023-02-15}
 % \maketitle
 % \begin{documentation}
 % \begin{function}{interwordspace (setup-key)}
@@ -64,7 +64,7 @@
 %    \begin{macrocode}
 %<@@=tag>
 %<*header>
-\ProvidesExplPackage {tagpdf-space-code} {2023-01-30} {0.98c}
+\ProvidesExplPackage {tagpdf-space-code} {2023-02-15} {0.98d}
  {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-02-15 20:38:14 UTC (rev 65844)
+++ trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-struct.dtx	2023-02-15 20:38:40 UTC (rev 65845)
@@ -46,7 +46,7 @@
 %    }^^A
 % }
 %
-% \date{Version 0.98c, released 2023-01-30}
+% \date{Version 0.98d, released 2023-02-15}
 % \maketitle
 % \begin{documentation}
 % \section{Public Commands}
@@ -242,7 +242,7 @@
 %    \begin{macrocode}
 %<@@=tag>
 %<*header>
-\ProvidesExplPackage {tagpdf-struct-code} {2023-01-30} {0.98c}
+\ProvidesExplPackage {tagpdf-struct-code} {2023-02-15} {0.98d}
  {part of tagpdf - code related to storing structure}
 %</header>
 %    \end{macrocode}
@@ -1080,9 +1080,78 @@
 % extension.
 % AF is an array and can be used more than once, so we store it in a tl.
 % which is expanded.
-% AFinline can be use only once (more quite probably doesn't make sense).
+% AFinline currently uses the fix extention txt. 
+% texsource is a special variant which creates a tex-file, it expects a
+% tl-var as value (e.g. from math grabbing)
+% 
+% \begin{variable}{\g_@@_struct_AFobj_int}
+% This variable is used to number the AF-object names
 %    \begin{macrocode}
-\cs_new_protected:Npn \@@_struct_add_AF:nn #1 #2 % #1 struct num #2 object name
+\int_new:N\g_@@_struct_AFobj_int
+%    \end{macrocode}
+% \end{variable}
+% 
+%    \begin{macrocode}
+\cs_if_free:NTF \pdffile_embed_stream:nnN
+ {
+   \cs_new_protected:Npn \@@_struct_add_inline_AF:nn #1 #2  
+     % #1 content, #2 extension
+     {
+        \group_begin:
+        \int_gincr:N \g_@@_struct_AFobj_int
+        \pdf_object_if_exist:eF {@@/fileobj\int_use:N\g_@@_struct_AFobj_int}
+          {
+            \pdffile_embed_stream:nxx
+              {#1}
+              {tag-AFfile\int_use:N\g_@@_struct_AFobj_int.#2}
+              {@@/fileobj\int_use:N\g_@@_struct_AFobj_int}
+            \@@_struct_add_AF:ee
+              { \int_eval:n {\c at g_@@_struct_abs_int} }
+              { \pdf_object_ref:e {@@/fileobj\int_use:N\g_@@_struct_AFobj_int} }
+            \@@_prop_gput:cnx
+              { g_@@_struct_\int_use:N\c at g_@@_struct_abs_int _prop }
+              { AF }
+              {
+                [
+                  \tl_use:c
+                   { g_@@_struct_\int_eval:n {\c at g_@@_struct_abs_int}_AF_tl }
+                ]
+              }
+          }     
+        \group_end:
+      }  
+   }  
+   {
+     \cs_generate_variant:Nn \pdffile_embed_stream:nnN {nxN}
+     \cs_new_protected:Npn \@@_struct_add_inline_AF:nn #1 #2  
+     % #1 content, #2 extension
+      {
+        \group_begin:
+        \int_gincr:N \g_@@_struct_AFobj_int
+        \pdffile_embed_stream:nxN
+          {#1}
+          {tag-AFfile\int_use:N\g_@@_struct_AFobj_int.#2}
+          \l_@@_tmpa_tl          
+          \@@_struct_add_AF:ee
+            { \int_eval:n {\c at g_@@_struct_abs_int} }
+            { \l_@@_tmpa_tl }
+          \@@_prop_gput:cnx
+            { g_@@_struct_\int_use:N\c at g_@@_struct_abs_int _prop }
+            { AF }
+            {
+              [
+                \tl_use:c
+                 { g_@@_struct_\int_eval:n {\c at g_@@_struct_abs_int}_AF_tl }
+              ]
+            }               
+        \group_end:
+      } 
+   }     
+\cs_generate_variant:Nn \@@_struct_add_inline_AF:nn {on} 
+%    \end{macrocode}
+% 
+%    \begin{macrocode}
+\cs_new_protected:Npn \@@_struct_add_AF:nn #1 #2 % #1 struct num #2 object reference
   {
      \tl_if_exist:cTF
        {
@@ -1091,7 +1160,7 @@
        {
          \tl_gput_right:cx
            { g_@@_struct_#1_AF_tl }
-           {  ~ \pdf_object_ref:n {#2} }
+           {  \c_space_tl #2 }
        }
        {
           \tl_new:c
@@ -1098,7 +1167,7 @@
             { g_@@_struct_#1_AF_tl }
           \tl_gset:cx
             { g_@@_struct_#1_AF_tl }
-            { \pdf_object_ref:n {#2} }
+            { #2 }
        }
   }
 \cs_generate_variant:Nn \@@_struct_add_AF:nn {en,ee}
@@ -1108,7 +1177,7 @@
       {
         \pdf_object_if_exist:nTF {#1}
           {
-            \@@_struct_add_AF:en { \int_eval:n {\c at g_@@_struct_abs_int} }{#1}
+            \@@_struct_add_AF:ee { \int_eval:n {\c at g_@@_struct_abs_int} }{\pdf_object_ref:n {#1}}
             \@@_prop_gput:cnx
              { g_@@_struct_\int_eval:n {\c at g_@@_struct_abs_int}_prop }
              { AF }
@@ -1125,52 +1194,25 @@
       },
    ,AFinline .code:n =
      {
-       \group_begin:
-       \pdf_object_if_exist:eF {@@/fileobj\int_use:N\c at g_@@_struct_abs_int}
-         {
-           \pdffile_embed_stream:nxx
-             {#1}
-             {tag-AFfile\int_use:N\c at g_@@_struct_abs_int.txt}
-             {@@/fileobj\int_use:N\c at g_@@_struct_abs_int}
-           \@@_struct_add_AF:ee
-             { \int_eval:n {\c at g_@@_struct_abs_int} }
-             { @@/fileobj\int_use:N\c at g_@@_struct_abs_int }
-           \@@_prop_gput:cnx
-             { g_@@_struct_\int_use:N\c at g_@@_struct_abs_int _prop }
-             { AF }
-             {
-               [
-                 \tl_use:c
-                  { g_@@_struct_\int_eval:n {\c at g_@@_struct_abs_int}_AF_tl }
-               ]
-             }
-         }
-       \group_end:
+       \@@_struct_add_inline_AF:nn {#1}{txt}
      }
    ,AFinline-o .code:n =
      {
-       \group_begin:
-       \pdf_object_if_exist:eF {@@/fileobj\int_use:N\c at g_@@_struct_abs_int}
-        {
-          \pdffile_embed_stream:oxx
-            {#1}
-            {tag-AFfile\int_use:N\c at g_@@_struct_abs_int.txt}
-            {@@/fileobj\int_use:N\c at g_@@_struct_abs_int}
-          \@@_struct_add_AF:ee
-             { \int_eval:n {\c at g_@@_struct_abs_int} }
-             { @@/fileobj\int_use:N\c at g_@@_struct_abs_int }
-           \@@_prop_gput:cnx
-             { g_@@_struct_\int_use:N\c at g_@@_struct_abs_int _prop }
-             { AF }
-             {
-               [
-                 \tl_use:c
-                  { g_@@_struct_\int_eval:n {\c at g_@@_struct_abs_int}_AF_tl }
-               ]
-             }
-        }
-       \group_end:
+       \@@_struct_add_inline_AF:on {#1}{txt}
      }
+   ,texsource .code:n =
+    {
+      \group_begin:
+      \pdfdict_put:nnn { l_pdffile/Filespec }{AFRelationship} { /Source }
+%    \end{macrocode}
+% we set the mime type as pdfresources uses currently text/plain
+%    \begin{macrocode}
+      \pdfdict_put:nnx 
+        { l_pdffile }{Subtype} 
+        { \pdf_name_from_unicode_e:n{application/x-tex} }
+      \@@_struct_add_inline_AF:on {#1}{tex}
+      \group_end:
+    }  
  }
 %    \end{macrocode}
 % \end{macro}
@@ -1184,7 +1226,7 @@
      {
         \pdf_object_if_exist:nTF {#1}
           {
-            \@@_struct_add_AF:en { 0 }{#1}
+            \@@_struct_add_AF:ee { 0 }{\pdf_object_ref:n {#1}}
             \@@_prop_gput:cnx
              { g_@@_struct_0_prop }
              { AF }
@@ -1510,7 +1552,7 @@
 % \section{Attributes and attribute classes}
 %    \begin{macrocode}
 %<*header>
-\ProvidesExplPackage {tagpdf-attr-code} {2023-01-30} {0.98c}
+\ProvidesExplPackage {tagpdf-attr-code} {2023-02-15} {0.98d}
   {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-02-15 20:38:14 UTC (rev 65844)
+++ trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-tree.dtx	2023-02-15 20:38:40 UTC (rev 65845)
@@ -47,13 +47,13 @@
 %    }^^A
 % }
 %
-% \date{Version 0.98c, released 2023-01-30}
+% \date{Version 0.98d, released 2023-02-15}
 % \maketitle
 % \begin{implementation}
 %    \begin{macrocode}
 %<@@=tag>
 %<*header>
-\ProvidesExplPackage {tagpdf-tree-code} {2023-01-30} {0.98c}
+\ProvidesExplPackage {tagpdf-tree-code} {2023-02-15} {0.98d}
  {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-02-15 20:38:14 UTC (rev 65844)
+++ trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-user.dtx	2023-02-15 20:38:40 UTC (rev 65845)
@@ -46,7 +46,7 @@
 %    }^^A
 % }
 %
-% \date{Version 0.98c, released 2023-01-30}
+% \date{Version 0.98d, released 2023-02-15}
 % \maketitle
 % \begin{documentation}
 % \section{Setup commands}
@@ -64,10 +64,14 @@
 % add a document structure.
 % \end{function}
 %
-%
-% \begin{function}{\tagpdfifluatexTF,\tagpdfifluatexT,\tagpdfifpdftexT}
-% small wrappers around engine tests. This functions should not be used and will be removed
-% in one of the next versions.
+% \begin{function}{\tag_tool:n,\tagtool}
+% \begin{syntax}
+% \cs{tag_tool:n}\Arg{key val}
+% \end{syntax}
+% The tagging of basic document elements will require a variaty 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!
 % \end{function}
 %
 % \section{Commands related to mc-chunks}
@@ -246,7 +250,7 @@
 %    \begin{macrocode}
 %<@@=tag>
 %<*header>
-\ProvidesExplPackage {tagpdf-user} {2023-01-30} {0.98c}
+\ProvidesExplPackage {tagpdf-user} {2023-02-15} {0.98d}
   {tagpdf - user commands}
 %</header>
 %    \end{macrocode}
@@ -263,6 +267,22 @@
 %    \end{macrocode}
 % \end{macro}
 %
+% \begin{macro}{\tag_tool:n,\tagtool}
+% This is a first definition of the tool command.
+% Currently it uses key-val, but this should be probably
+% be flattened to speed it up.
+%    \begin{macrocode}
+%<base>\cs_new_protected:Npn\tag_tool:n #1 {}
+%<base>\cs_set_eq:NN\tagtool\tag_tool:n
+%<*package>
+\cs_set_protected:Npn\tag_tool:n #1 
+  {
+    \tag_if_active:T { \keys_set:nn {tag / tool}{#1} }  
+  }
+\cs_set_eq:NN\tagtool\tag_tool:n  
+%</package>
+%    \end{macrocode}
+% \end{macro}
 
 % \section{Commands for the mc-chunks}
 % \begin{macro}{\tagmcbegin,\tagmcend,\tagmcuse  }
@@ -579,10 +599,13 @@
 % {
 %  paratagging (setup-key),
 %  paratagging-show (setup-key),
+%  paratag (setup-key),
+%  paratag (tool-key),
 %  }
 % These keys enable/disable locally paratagging, and the debug modus.
 % It can affect the typesetting if |paratagging-show| is used. The small numbers
-% are boxes and they have a (small) height.
+% are boxes and they have a (small) height. The |paratag| key sets the tag used by
+% the next automatic paratagging, it can also be changed with |\tag_tool:n|
 %    \begin{macrocode}
 \keys_define:nn { @@ / setup }
   {
@@ -590,11 +613,36 @@
     paratagging-show .bool_set:N = \l_@@_para_show_bool,
     paratag          .tl_set:N   = \l_@@_para_tag_tl
   }
-
+\keys_define:nn { tag / tool} 
+  {
+    paratag .tl_set:N = \l_@@_para_tag_tl
+  }
 %    \end{macrocode}
 % \end{macro}
 % This fills the para hooks with the needed code.
 %    \begin{macrocode}
+\cs_new_protected:Npn \@@_check_para_begin_show:nn #1 #2 
+ %#1 color, #2 prefix
+  {
+    \bool_if:NT \l_@@_para_show_bool
+      { 
+        \tag_mc_begin:n{artifact}
+        \llap{\color_select:n{#1}\tiny#2\int_use:N\g_@@_para_begin_int\ }
+        \tag_mc_end:
+      }
+  }
+
+\cs_new_protected:Npn \@@_check_para_end_show:nn #1 #2
+ %#1  color, #2 prefix
+  {
+    \bool_if:NT \l_@@_para_show_bool
+      { 
+        \tag_mc_begin:n{artifact}
+        \rlap{\color_select:n{#1}\tiny\ #2\int_use:N\g_@@_para_end_int}
+        \tag_mc_end:
+      }
+  }
+  
 \AddToHook{para/begin}
   {
    \bool_if:NT \l_@@_para_bool
@@ -601,11 +649,7 @@
      {
        \int_gincr:N \g_@@_para_begin_int
        \tag_struct_begin:n {tag=\l_@@_para_tag_tl}
-       \bool_if:NT \l_@@_para_show_bool
-        { \tag_mc_begin:n{artifact}
-          \llap{\color_select:n{red}\tiny\int_use:N\g_@@_para_begin_int\ }
-          \tag_mc_end:
-        }
+       \@@_check_para_begin_show:nn {green}{}
        \tag_mc_begin:n {}
      }
   }
@@ -615,11 +659,7 @@
       {
         \int_gincr:N \g_@@_para_end_int
         \tag_mc_end:
-        \bool_if:NT \l_@@_para_show_bool
-          { \tag_mc_begin:n{artifact}
-            \rlap{\color_select:n{red}\tiny\ \int_use:N\g_@@_para_end_int}
-            \tag_mc_end:
-          }
+        \@@_check_para_end_show:nn {red}{}
         \tag_struct_end:
       }
   }
@@ -671,7 +711,7 @@
 %    \tagpdfparaOff
 %   }
 %  This two command switch para mode on and off. |\tagpdfsetup| could be used
-%  too but is longer.
+%  too but is longer. An alternative is |\tag_tool:n{para=false}|
 %    \begin{macrocode}
 %<base>\newcommand\tagpdfparaOn {}
 %<base>\newcommand\tagpdfparaOff{}
@@ -678,6 +718,10 @@
 %<*package>
 \renewcommand\tagpdfparaOn {\bool_set_true:N \l_@@_para_bool}
 \renewcommand\tagpdfparaOff{\bool_set_false:N \l_@@_para_bool}
+\keys_define:nn { tag / tool} 
+  {
+    para .bool_set:N = \l_@@_para_bool
+  }  
 %    \end{macrocode}
 % \end{macro}
 %

Modified: trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf.dtx	2023-02-15 20:38:14 UTC (rev 65844)
+++ trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf.dtx	2023-02-15 20:38:40 UTC (rev 65845)
@@ -92,7 +92,7 @@
 %    \begin{macrocode}
 %<@@=tag>
 %<*package>
-\ProvidesExplPackage {tagpdf} {2023-01-30} {0.98c}
+\ProvidesExplPackage {tagpdf} {2023-02-15} {0.98d}
   { A package to experiment with pdf tagging }
 
 \bool_if:nF
@@ -118,7 +118,7 @@
 %    \end{macrocode}
 %<*debug>
 %    \begin{macrocode}
-\ProvidesExplPackage {tagpdf-debug} {2023-01-30} {0.98c}
+\ProvidesExplPackage {tagpdf-debug} {2023-02-15} {0.98d}
   { debug code for tagpdf }
 \@ifpackageloaded{tagpdf}{}{\PackageWarning{tagpdf-debug}{tagpdf~not~loaded,~quitting}\endinput}
 %    \end{macrocode}
@@ -159,7 +159,7 @@
 %    \end{macrocode}
 %    \begin{macrocode}
 %<*base>
-\ProvidesExplPackage {tagpdf-base} {2023-01-30} {0.98c}
+\ProvidesExplPackage {tagpdf-base} {2023-02-15} {0.98d}
   {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-02-15 20:38:14 UTC (rev 65844)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-base.sty	2023-02-15 20:38:40 UTC (rev 65845)
@@ -25,7 +25,7 @@
 %% and all files in that bundle must be distributed together.
 %% 
 %% File: tagpdf.dtx
-\ProvidesExplPackage {tagpdf-base} {2023-01-30} {0.98c}
+\ProvidesExplPackage {tagpdf-base} {2023-02-15} {0.98d}
   {part of tagpdf - provide base, no-op versions of the user commands }
 \AddToHook{begindocument}
  {
@@ -76,6 +76,8 @@
 
 
 \NewDocumentCommand \tagpdfsetup { m }{}
+\cs_new_protected:Npn\tag_tool:n #1 {}
+\cs_set_eq:NN\tagtool\tag_tool:n
 
 \NewDocumentCommand \tagmcbegin { m }
   {

Modified: trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-debug-generic.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-debug-generic.sty	2023-02-15 20:38:14 UTC (rev 65844)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-debug-generic.sty	2023-02-15 20:38:40 UTC (rev 65845)
@@ -19,7 +19,7 @@
 %% and all files in that bundle must be distributed together.
 %% 
 %% File: tagpdf-mc-generic.dtx
-\ProvidesExplPackage {tagpdf-debug-generic} {2023-01-30} {0.98c}
+\ProvidesExplPackage {tagpdf-debug-generic} {2023-02-15} {0.98d}
  {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-02-15 20:38:14 UTC (rev 65844)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-debug.sty	2023-02-15 20:38:40 UTC (rev 65845)
@@ -26,7 +26,7 @@
 %% and all files in that bundle must be distributed together.
 %% 
 %% File: tagpdf.dtx
-\ProvidesExplPackage {tagpdf-debug} {2023-01-30} {0.98c}
+\ProvidesExplPackage {tagpdf-debug} {2023-02-15} {0.98d}
   { 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-02-15 20:38:14 UTC (rev 65844)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-luatex.def	2023-02-15 20:38:40 UTC (rev 65845)
@@ -19,7 +19,7 @@
 %% and all files in that bundle must be distributed together.
 %% 
 %% File: tagpdf-backend.dtx
-\ProvidesExplFile {tagpdf-luatex.def} {2023-01-30} {0.98c}
+\ProvidesExplFile {tagpdf-luatex.def} {2023-02-15} {0.98d}
   {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-02-15 20:38:14 UTC (rev 65844)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-generic.sty	2023-02-15 20:38:40 UTC (rev 65845)
@@ -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-01-30} {0.98c}
+\ProvidesExplPackage {tagpdf-mc-code-generic} {2023-02-15} {0.98d}
  {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-02-15 20:38:14 UTC (rev 65844)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-lua.sty	2023-02-15 20:38:40 UTC (rev 65845)
@@ -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-01-30} {0.98c}
+\ProvidesExplPackage {tagpdf-mc-code-lua} {2023-02-15} {0.98d}
   {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-02-15 20:38:14 UTC (rev 65844)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex-book.def	2023-02-15 20:38:40 UTC (rev 65845)
@@ -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-01-30} {0.98c}
+%% \ProvidesExplFile {tagpdf-ns-latex-book.def} {2023-02-15} {0.98d}
 %% {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-02-15 20:38:14 UTC (rev 65844)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex-inline.def	2023-02-15 20:38:40 UTC (rev 65845)
@@ -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-01-30} {0.98c}
+%% \ProvidesExplFile {tagpdf-ns-latex-inline.def} {2023-02-15} {0.98d}
 %% {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-02-15 20:38:14 UTC (rev 65844)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex.def	2023-02-15 20:38:40 UTC (rev 65845)
@@ -19,7 +19,7 @@
 %% and all files in that bundle must be distributed together.
 %% 
 %% File: tagpdf-data.dtx
-%% \ProvidesExplFile {tagpdf-ns-latex.def} {2023-01-30} {0.98c}
+%% \ProvidesExplFile {tagpdf-ns-latex.def} {2023-02-15} {0.98d}
 %% {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-02-15 20:38:14 UTC (rev 65844)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-mathml.def	2023-02-15 20:38:40 UTC (rev 65845)
@@ -19,7 +19,7 @@
 %% and all files in that bundle must be distributed together.
 %% 
 %% File: tagpdf-data.dtx
-%% \ProvidesExplFile {tagpdf-ns-mathml.def} {2023-01-30} {0.98c}
+%% \ProvidesExplFile {tagpdf-ns-mathml.def} {2023-02-15} {0.98d}
 abs,,,
 and,,,
 annotation,,,

Modified: trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-pdf.def
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-pdf.def	2023-02-15 20:38:14 UTC (rev 65844)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-pdf.def	2023-02-15 20:38:40 UTC (rev 65845)
@@ -19,7 +19,7 @@
 %% and all files in that bundle must be distributed together.
 %% 
 %% File: tagpdf-data.dtx
-%% \ProvidesExplFile {tagpdf-ns-pdf.def} {2023-01-30} {0.98c}
+%% \ProvidesExplFile {tagpdf-ns-pdf.def} {2023-02-15} {0.98d}
 %%  {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-02-15 20:38:14 UTC (rev 65844)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-pdf2.def	2023-02-15 20:38:40 UTC (rev 65845)
@@ -19,7 +19,7 @@
 %% and all files in that bundle must be distributed together.
 %% 
 %% File: tagpdf-data.dtx
-%% \ProvidesExplFile {tagpdf-ns-pdf2.def} {2023-01-30} {0.98c}
+%% \ProvidesExplFile {tagpdf-ns-pdf2.def} {2023-02-15} {0.98d}
 %%  {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-02-15 20:38:14 UTC (rev 65844)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-parent-child-2.csv	2023-02-15 20:38:40 UTC (rev 65845)
@@ -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-01-30} {0.98c}
+%% \ProvidesExplFile {tagpdf-parent-child-2.csv} {2023-02-15} {0.98d}
 ,,,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-02-15 20:38:14 UTC (rev 65844)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-parent-child.csv	2023-02-15 20:38:40 UTC (rev 65845)
@@ -19,7 +19,7 @@
 %% and all files in that bundle must be distributed together.
 %% 
 %% File: tagpdf-data.dtx
-%% \ProvidesExplFile {tagpdf-parent-child.csv} {2023-01-30} {0.98c}
+%% \ProvidesExplFile {tagpdf-parent-child.csv} {2023-02-15} {0.98d}
 ,,,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-02-15 20:38:14 UTC (rev 65844)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf.lua	2023-02-15 20:38:40 UTC (rev 65845)
@@ -24,8 +24,8 @@
 
 local ProvidesLuaModule = {
     name          = "tagpdf",
-    version       = "0.98c",       --TAGVERSION
-    date          = "2023-01-30", --TAGDATE
+    version       = "0.98d",       --TAGVERSION
+    date          = "2023-02-15", --TAGDATE
     description   = "tagpdf lua code",
     license       = "The LATEX Project Public License 1.3c"
 }
@@ -432,6 +432,7 @@
         end
       end
     end
+    box.head = head
   end
 end
 

Modified: trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf.sty	2023-02-15 20:38:14 UTC (rev 65844)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf.sty	2023-02-15 20:38:40 UTC (rev 65845)
@@ -28,7 +28,7 @@
 %% and all files in that bundle must be distributed together.
 %% 
 %% File: tagpdf.dtx
-\ProvidesExplPackage {tagpdf} {2023-01-30} {0.98c}
+\ProvidesExplPackage {tagpdf} {2023-02-15} {0.98d}
   { A package to experiment with pdf tagging }
 
 \bool_if:nF
@@ -1506,7 +1506,7 @@
                {
                  \tl_set:Nx\l__tag_tmpa_tl { \use_ii:nn ##1 }
                  \exp_args:Nne
-                  \tl_if_in:nnF {-Part-Div-NonStruct-}{-\l__tag_tmpa_tl-}
+                  \str_if_in:nnF {-Part-Div-NonStruct-}{-\l__tag_tmpa_tl-}
                    {
                      \tl_set:Nn\l__tag_role_real_parent_tl {##1}
                      \int_zero:N\l__tag_tmpa_int
@@ -2297,7 +2297,64 @@
           { <\l__tag_tmpa_str> }
       },
   }
-\cs_new_protected:Npn \__tag_struct_add_AF:nn #1 #2 % #1 struct num #2 object name
+\int_new:N\g__tag_struct_AFobj_int
+\cs_if_free:NTF \pdffile_embed_stream:nnN
+ {
+   \cs_new_protected:Npn \__tag_struct_add_inline_AF:nn #1 #2
+     % #1 content, #2 extension
+     {
+        \group_begin:
+        \int_gincr:N \g__tag_struct_AFobj_int
+        \pdf_object_if_exist:eF {__tag/fileobj\int_use:N\g__tag_struct_AFobj_int}
+          {
+            \pdffile_embed_stream:nxx
+              {#1}
+              {tag-AFfile\int_use:N\g__tag_struct_AFobj_int.#2}
+              {__tag/fileobj\int_use:N\g__tag_struct_AFobj_int}
+            \__tag_struct_add_AF:ee
+              { \int_eval:n {\c at g__tag_struct_abs_int} }
+              { \pdf_object_ref:e {__tag/fileobj\int_use:N\g__tag_struct_AFobj_int} }
+            \__tag_prop_gput:cnx
+              { g__tag_struct_\int_use:N\c at g__tag_struct_abs_int _prop }
+              { AF }
+              {
+                [
+                  \tl_use:c
+                   { g__tag_struct_\int_eval:n {\c at g__tag_struct_abs_int}_AF_tl }
+                ]
+              }
+          }
+        \group_end:
+      }
+   }
+   {
+     \cs_generate_variant:Nn \pdffile_embed_stream:nnN {nxN}
+     \cs_new_protected:Npn \__tag_struct_add_inline_AF:nn #1 #2
+     % #1 content, #2 extension
+      {
+        \group_begin:
+        \int_gincr:N \g__tag_struct_AFobj_int
+        \pdffile_embed_stream:nxN
+          {#1}
+          {tag-AFfile\int_use:N\g__tag_struct_AFobj_int.#2}
+          \l__tag_tmpa_tl
+          \__tag_struct_add_AF:ee
+            { \int_eval:n {\c at g__tag_struct_abs_int} }
+            { \l__tag_tmpa_tl }
+          \__tag_prop_gput:cnx
+            { g__tag_struct_\int_use:N\c at g__tag_struct_abs_int _prop }
+            { AF }
+            {
+              [
+                \tl_use:c
+                 { g__tag_struct_\int_eval:n {\c at g__tag_struct_abs_int}_AF_tl }
+              ]
+            }
+        \group_end:
+      }
+   }
+\cs_generate_variant:Nn \__tag_struct_add_inline_AF:nn {on}
+\cs_new_protected:Npn \__tag_struct_add_AF:nn #1 #2 % #1 struct num #2 object reference
   {
      \tl_if_exist:cTF
        {
@@ -2306,7 +2363,7 @@
        {
          \tl_gput_right:cx
            { g__tag_struct_#1_AF_tl }
-           {  ~ \pdf_object_ref:n {#2} }
+           {  \c_space_tl #2 }
        }
        {
           \tl_new:c
@@ -2313,7 +2370,7 @@
             { g__tag_struct_#1_AF_tl }
           \tl_gset:cx
             { g__tag_struct_#1_AF_tl }
-            { \pdf_object_ref:n {#2} }
+            { #2 }
        }
   }
 \cs_generate_variant:Nn \__tag_struct_add_AF:nn {en,ee}
@@ -2323,7 +2380,7 @@
       {
         \pdf_object_if_exist:nTF {#1}
           {
-            \__tag_struct_add_AF:en { \int_eval:n {\c at g__tag_struct_abs_int} }{#1}
+            \__tag_struct_add_AF:ee { \int_eval:n {\c at g__tag_struct_abs_int} }{\pdf_object_ref:n {#1}}
             \__tag_prop_gput:cnx
              { g__tag_struct_\int_eval:n {\c at g__tag_struct_abs_int}_prop }
              { AF }
@@ -2340,52 +2397,22 @@
       },
    ,AFinline .code:n =
      {
-       \group_begin:
-       \pdf_object_if_exist:eF {__tag/fileobj\int_use:N\c at g__tag_struct_abs_int}
-         {
-           \pdffile_embed_stream:nxx
-             {#1}
-             {tag-AFfile\int_use:N\c at g__tag_struct_abs_int.txt}
-             {__tag/fileobj\int_use:N\c at g__tag_struct_abs_int}
-           \__tag_struct_add_AF:ee
-             { \int_eval:n {\c at g__tag_struct_abs_int} }
-             { __tag/fileobj\int_use:N\c at g__tag_struct_abs_int }
-           \__tag_prop_gput:cnx
-             { g__tag_struct_\int_use:N\c at g__tag_struct_abs_int _prop }
-             { AF }
-             {
-               [
-                 \tl_use:c
-                  { g__tag_struct_\int_eval:n {\c at g__tag_struct_abs_int}_AF_tl }
-               ]
-             }
-         }
-       \group_end:
+       \__tag_struct_add_inline_AF:nn {#1}{txt}
      }
    ,AFinline-o .code:n =
      {
-       \group_begin:
-       \pdf_object_if_exist:eF {__tag/fileobj\int_use:N\c at g__tag_struct_abs_int}
-        {
-          \pdffile_embed_stream:oxx
-            {#1}
-            {tag-AFfile\int_use:N\c at g__tag_struct_abs_int.txt}
-            {__tag/fileobj\int_use:N\c at g__tag_struct_abs_int}
-          \__tag_struct_add_AF:ee
-             { \int_eval:n {\c at g__tag_struct_abs_int} }
-             { __tag/fileobj\int_use:N\c at g__tag_struct_abs_int }
-           \__tag_prop_gput:cnx
-             { g__tag_struct_\int_use:N\c at g__tag_struct_abs_int _prop }
-             { AF }
-             {
-               [
-                 \tl_use:c
-                  { g__tag_struct_\int_eval:n {\c at g__tag_struct_abs_int}_AF_tl }
-               ]
-             }
-        }
-       \group_end:
+       \__tag_struct_add_inline_AF:on {#1}{txt}
      }
+   ,texsource .code:n =
+    {
+      \group_begin:
+      \pdfdict_put:nnn { l_pdffile/Filespec }{AFRelationship} { /Source }
+      \pdfdict_put:nnx
+        { l_pdffile }{Subtype}
+        { \pdf_name_from_unicode_e:n{application/x-tex} }
+      \__tag_struct_add_inline_AF:on {#1}{tex}
+      \group_end:
+    }
  }
 \keys_define:nn { __tag / setup }
   {
@@ -2393,7 +2420,7 @@
      {
         \pdf_object_if_exist:nTF {#1}
           {
-            \__tag_struct_add_AF:en { 0 }{#1}
+            \__tag_struct_add_AF:ee { 0 }{\pdf_object_ref:n {#1}}
             \__tag_prop_gput:cnx
              { g__tag_struct_0_prop }
              { AF }
@@ -2798,6 +2825,11 @@
   {
     \keys_set:nn { __tag / setup } { #1 }
   }
+\cs_set_protected:Npn\tag_tool:n #1
+  {
+    \tag_if_active:T { \keys_set:nn {tag / tool}{#1} }
+  }
+\cs_set_eq:NN\tagtool\tag_tool:n
 
 
 \NewDocumentCommand \tagmcifinTF { m m }
@@ -2983,7 +3015,32 @@
     paratagging-show .bool_set:N = \l__tag_para_show_bool,
     paratag          .tl_set:N   = \l__tag_para_tag_tl
   }
+\keys_define:nn { tag / tool}
+  {
+    paratag .tl_set:N = \l__tag_para_tag_tl
+  }
+\cs_new_protected:Npn \__tag_check_para_begin_show:nn #1 #2
+ %#1 color, #2 prefix
+  {
+    \bool_if:NT \l__tag_para_show_bool
+      {
+        \tag_mc_begin:n{artifact}
+        \llap{\color_select:n{#1}\tiny#2\int_use:N\g__tag_para_begin_int\ }
+        \tag_mc_end:
+      }
+  }
 
+\cs_new_protected:Npn \__tag_check_para_end_show:nn #1 #2
+ %#1  color, #2 prefix
+  {
+    \bool_if:NT \l__tag_para_show_bool
+      {
+        \tag_mc_begin:n{artifact}
+        \rlap{\color_select:n{#1}\tiny\ #2\int_use:N\g__tag_para_end_int}
+        \tag_mc_end:
+      }
+  }
+
 \AddToHook{para/begin}
   {
    \bool_if:NT \l__tag_para_bool
@@ -2990,11 +3047,7 @@
      {
        \int_gincr:N \g__tag_para_begin_int
        \tag_struct_begin:n {tag=\l__tag_para_tag_tl}
-       \bool_if:NT \l__tag_para_show_bool
-        { \tag_mc_begin:n{artifact}
-          \llap{\color_select:n{red}\tiny\int_use:N\g__tag_para_begin_int\ }
-          \tag_mc_end:
-        }
+       \__tag_check_para_begin_show:nn {green}{}
        \tag_mc_begin:n {}
      }
   }
@@ -3004,11 +3057,7 @@
       {
         \int_gincr:N \g__tag_para_end_int
         \tag_mc_end:
-        \bool_if:NT \l__tag_para_show_bool
-          { \tag_mc_begin:n{artifact}
-            \rlap{\color_select:n{red}\tiny\ \int_use:N\g__tag_para_end_int}
-            \tag_mc_end:
-          }
+        \__tag_check_para_end_show:nn {red}{}
         \tag_struct_end:
       }
   }
@@ -3051,6 +3100,10 @@
   }
 \renewcommand\tagpdfparaOn {\bool_set_true:N \l__tag_para_bool}
 \renewcommand\tagpdfparaOff{\bool_set_false:N \l__tag_para_bool}
+\keys_define:nn { tag / tool}
+  {
+    para .bool_set:N = \l__tag_para_bool
+  }
 \NewDocumentCommand\tagpdfsuppressmarks{m}
   {{\use:c{__tag_mc_disable_marks:} #1}}
 \cs_new_protected:Npn\__tag_hook_kernel_before_head:{}

Modified: trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdfdocu-patches.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdfdocu-patches.sty	2023-02-15 20:38:14 UTC (rev 65844)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdfdocu-patches.sty	2023-02-15 20:38:40 UTC (rev 65845)
@@ -1,10 +1,8 @@
 %\RequirePackage[enable-debug]{expl3}[2018/06/14]
-\ProvidesExplPackage {tagpdfdocu-patches} {2023-01-30} {0.98c}
+\ProvidesExplPackage {tagpdfdocu-patches} {2023-02-15} {0.98d}
  {patches/commands for the tagpdf documentation}
 \RequirePackage{etoolbox,xpatch}
 
-% latex-lab experiments
-\providecommand\tagtool[1]{}
 %vLogos
 
 \ExplSyntaxOn



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