texlive[63448] Master/texmf-dist: tagpdf (30may22)

commits+karl at tug.org commits+karl at tug.org
Mon May 30 22:07:45 CEST 2022


Revision: 63448
          http://tug.org/svn/texlive?view=revision&revision=63448
Author:   karl
Date:     2022-05-30 22:07:45 +0200 (Mon, 30 May 2022)
Log Message:
-----------
tagpdf (30may22)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/tagpdf/README.md
    trunk/Master/texmf-dist/doc/latex/tagpdf/global-ex.png
    trunk/Master/texmf-dist/doc/latex/tagpdf/pac3.PNG
    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-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.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	2022-05-30 20:07:11 UTC (rev 63447)
+++ trunk/Master/texmf-dist/doc/latex/tagpdf/README.md	2022-05-30 20:07:45 UTC (rev 63448)
@@ -1,6 +1,6 @@
 #tagpdf — A package to create tagged pdf
-Packageversion: 0.94 
-Packagedate: 2022/05/11
+Packageversion: 0.95 
+Packagedate: 2022/05/29
 Author: Ulrike Fischer
 
 ## License

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

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

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

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

Modified: trunk/Master/texmf-dist/doc/latex/tagpdf/tagpdf.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tagpdf/tagpdf.tex	2022-05-30 20:07:11 UTC (rev 63447)
+++ trunk/Master/texmf-dist/doc/latex/tagpdf/tagpdf.tex	2022-05-30 20:07:45 UTC (rev 63448)
@@ -4,8 +4,8 @@
 \DocumentMetadata{pdfversion=2.0,lang=en-UK,testphase=phase-II}
 
 \makeatletter
-\def\UlrikeFischer at package@version{0.94}
-\def\UlrikeFischer at package@date{2022-05-11}
+\def\UlrikeFischer at package@version{0.95}
+\def\UlrikeFischer at package@date{2022-05-29}
 \makeatother
 
 \documentclass[DIV=12,parskip=half-,bibliography=totoc]{scrartcl}
@@ -936,7 +936,7 @@
 
 \begin{docCommand}{tag_get:n}{\marg{key word}}\end{docCommand}
 
-This command give back some variables. Currently the only working key words are \verb+mc\_tag+ and \verb+struct\_tag+.
+This command give back some variables. Currently the only working key words are \verb+mc\_tag+, \verb+struct\_tag+ and \verb+struct\_num+. The last returns a number works also if only \pkg{tagpdf-base} has been loaded.
 
 \subsubsection{Luamode: global or not global -- that is the question}\label{sec:global-local}
 

Modified: trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-backend.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-backend.dtx	2022-05-30 20:07:11 UTC (rev 63447)
+++ trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-backend.dtx	2022-05-30 20:07:45 UTC (rev 63448)
@@ -47,13 +47,13 @@
 %    }^^A
 % }
 %
-% \date{Version 0.94, released 2022-05-11}
+% \date{Version 0.95, released 2022-05-29}
 % \maketitle
 % \begin{implementation}
 %    \begin{macrocode}
 %<@@=tag>
 %<*luatex>
-\ProvidesExplFile {tagpdf-luatex.def} {2022-05-11} {0.94}
+\ProvidesExplFile {tagpdf-luatex.def} {2022-05-29} {0.95}
   {tagpdf~driver~for~luatex}
 %    \end{macrocode}
 % \section{Loading the lua}
@@ -157,8 +157,8 @@
 
 local ProvidesLuaModule = {
     name          = "tagpdf",
-    version       = "0.94",       --TAGVERSION
-    date          = "2022-05-11", --TAGDATE
+    version       = "0.95",       --TAGVERSION
+    date          = "2022-05-29", --TAGDATE
     description   = "tagpdf lua code",
     license       = "The LATEX Project Public License 1.3c"
 }

Modified: trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-checks.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-checks.dtx	2022-05-30 20:07:11 UTC (rev 63447)
+++ trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-checks.dtx	2022-05-30 20:07:45 UTC (rev 63448)
@@ -48,7 +48,7 @@
 %    }^^A
 % }
 %
-% \date{Version 0.94, released 2022-05-11}
+% \date{Version 0.95, released 2022-05-29}
 % \maketitle
 % \begin{documentation}
 % \section{Commands}
@@ -294,7 +294,7 @@
 %    \begin{macrocode}
 %<@@=tag>
 %<*header>
-\ProvidesExplPackage {tagpdf-checks-code} {2022-05-11} {0.94}
+\ProvidesExplPackage {tagpdf-checks-code} {2022-05-29} {0.95}
  {part of tagpdf - code related to checks, conditionals, debugging and messages}
 %</header>
 %    \end{macrocode}
@@ -455,6 +455,7 @@
 \msg_new:nnnn { tag } {para-hook-count-wrong}
   {The~number~of~automatic~begin~(#1)~and~end~(#2)~para~hooks~differ!}
   {This~quite~probably~a~coding~error~and~the~structure~will~be~wrong!}
+%</package>
 %    \end{macrocode}
 % \end{macro}
 % \section{Retrieving data}
@@ -461,10 +462,10 @@
 % \begin{macro}[EXP]{\tag_get:n}
 % This retrieves some data.
 % This is a generic command to retrieve data. Currently
-% the only sensible values for the argument are |mc_tag| and |struct_tag|.
+% the only sensible values for the argument are |mc_tag|, |struct_tag|
+% and |struct-num|.
 %    \begin{macrocode}
-\cs_new:Npn \tag_get:n #1   { \use:c {@@_get_data_#1: } }
-%</package>
+%<base>\cs_new:Npn \tag_get:n #1   { \use:c {@@_get_data_#1: } }
 %    \end{macrocode}
 % \end{macro}
 %

Modified: trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-generic.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-generic.dtx	2022-05-30 20:07:11 UTC (rev 63447)
+++ trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-generic.dtx	2022-05-30 20:07:45 UTC (rev 63448)
@@ -46,7 +46,7 @@
 %    }^^A
 % }
 %
-% \date{Version 0.94, released 2022-05-11}
+% \date{Version 0.95, released 2022-05-29}
 % \maketitle
 % \begin{documentation}
 % \end{documentation}
@@ -55,11 +55,11 @@
 %    \begin{macrocode}
 %<@@=tag>
 %<*generic>
-\ProvidesExplPackage {tagpdf-mc-code-generic} {2022-05-11} {0.94}
+\ProvidesExplPackage {tagpdf-mc-code-generic} {2022-05-29} {0.95}
  {part of tagpdf - code related to marking chunks - generic mode}
 %</generic>
 %<*debug>
-\ProvidesExplPackage {tagpdf-debug-generic} {2022-05-11} {0.94}
+\ProvidesExplPackage {tagpdf-debug-generic} {2022-05-29} {0.95}
  {part of tagpdf - debugging code related to marking chunks - generic mode}
 %</debug>
 %    \end{macrocode}
@@ -664,8 +664,8 @@
 % 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 {}
-%<base>\cs_new_protected:Nn \tag_mc_end:{}
+%<base>\cs_new_protected:Npn \tag_mc_begin:n #1 { \@@_whatsits: }
+%<base>\cs_new_protected:Nn \tag_mc_end:{ \@@_whatsits: }
 %<*generic|debug>
 %<*generic>
 \cs_set_protected:Npn \tag_mc_begin:n #1 %#1 keyval

Modified: trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-luacode.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-luacode.dtx	2022-05-30 20:07:11 UTC (rev 63447)
+++ trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-luacode.dtx	2022-05-30 20:07:45 UTC (rev 63448)
@@ -46,7 +46,7 @@
 %    }^^A
 % }
 %
-% \date{Version 0.94, released 2022-05-11}
+% \date{Version 0.95, released 2022-05-29}
 % \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} {2022-05-11} {0.94}
+\ProvidesExplPackage {tagpdf-mc-code-lua} {2022-05-29} {0.95}
   {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	2022-05-30 20:07:11 UTC (rev 63447)
+++ trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-shared.dtx	2022-05-30 20:07:45 UTC (rev 63448)
@@ -46,7 +46,7 @@
 %    }^^A
 % }
 %
-% \date{Version 0.94, released 2022-05-11}
+% \date{Version 0.95, released 2022-05-29}
 % \maketitle
 % \begin{documentation}
 % \section{Public Commands}
@@ -174,7 +174,7 @@
 %    \begin{macrocode}
 %<@@=tag>
 %<*header>
-\ProvidesExplPackage {tagpdf-mc-code-shared} {2022-05-11} {0.94}
+\ProvidesExplPackage {tagpdf-mc-code-shared} {2022-05-29} {0.95}
   {part of tagpdf - code related to marking chunks -
    code shared by generic and luamode }
 %</header>
@@ -308,7 +308,7 @@
 %
 % TODO: is testing for struct the right test?
 %    \begin{macrocode}
-%<base>\cs_new_protected:Npn \tag_mc_use:n #1 {}
+%<base>\cs_new_protected:Npn \tag_mc_use:n #1 { \@@_whatsits: }
 %<*shared>
 \cs_set_protected:Npn \tag_mc_use:n #1 %#1: label name
   {

Modified: trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-roles.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-roles.dtx	2022-05-30 20:07:11 UTC (rev 63447)
+++ trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-roles.dtx	2022-05-30 20:07:45 UTC (rev 63448)
@@ -46,7 +46,7 @@
 %    }^^A
 % }
 %
-% \date{Version 0.94, released 2022-05-11}
+% \date{Version 0.95, released 2022-05-29}
 % \maketitle
 % \begin{documentation}
 % \begin{function}
@@ -87,7 +87,7 @@
 %    \begin{macrocode}
 %<@@=tag>
 %<*header>
-\ProvidesExplPackage {tagpdf-roles-code} {2022-05-11} {0.94}
+\ProvidesExplPackage {tagpdf-roles-code} {2022-05-29} {0.95}
  {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	2022-05-30 20:07:11 UTC (rev 63447)
+++ trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-space.dtx	2022-05-30 20:07:45 UTC (rev 63448)
@@ -46,7 +46,7 @@
 %    }^^A
 % }
 %
-% \date{Version 0.94, released 2022-05-11}
+% \date{Version 0.95, released 2022-05-29}
 % \maketitle
 % \begin{documentation}
 % \begin{function}{interwordspace (setup-key)}
@@ -64,7 +64,7 @@
 %    \begin{macrocode}
 %<@@=tag>
 %<*header>
-\ProvidesExplPackage {tagpdf-space-code} {2022-05-11} {0.94}
+\ProvidesExplPackage {tagpdf-space-code} {2022-05-29} {0.95}
  {part of tagpdf - code related to real space chars}
 %</header>
 %    \end{macrocode}
@@ -76,6 +76,15 @@
 % \begin{macro}{interwordspace (setup-key),show-spaces (setup-key)}
 %    \begin{macrocode}
 %<*package>
+\keys_define:nn { @@ / setup }
+  {
+    interwordspace .choices:nn = { true, on }
+      { \msg_warning:nnx {tag}{sys-no-interwordspace}{\c_sys_engine_str}  },
+    interwordspace .choices:nn = { false, off }
+      { \msg_warning:nnx {tag}{sys-no-interwordspace}{\c_sys_engine_str}  },
+    interwordspace .default:n = true,
+    show-spaces .bool_set:N = \l_@@_showspaces_bool
+  }
 \sys_if_engine_pdftex:T
   {
     \sys_if_output_pdf:TF
@@ -126,19 +135,6 @@
         show-spaces .default:n = true
       }
   }
-
-\sys_if_engine_xetex:T
-  {
-    \keys_define:nn { @@ / setup }
-      {
-        interwordspace .choices:nn = { true, on }
-          { \msg_warning:nnn {tag}{sys-no-interwordspace}{xetex}  },
-        interwordspace .choices:nn = { false, off }
-          { \msg_warning:nnn {tag}{sys-no-interwordspace}{xetex}  },
-        interwordspace .default:n = true,
-        show-spaces .bool_set:N = \l_@@_showspaces_bool
-      }
-  }
 %    \end{macrocode}
 % \end{macro}
 %

Modified: trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-struct.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-struct.dtx	2022-05-30 20:07:11 UTC (rev 63447)
+++ trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-struct.dtx	2022-05-30 20:07:45 UTC (rev 63448)
@@ -46,7 +46,7 @@
 %    }^^A
 % }
 %
-% \date{Version 0.94, released 2022-05-11}
+% \date{Version 0.95, released 2022-05-29}
 % \maketitle
 % \begin{documentation}
 % \section{Public Commands}
@@ -217,7 +217,7 @@
 %    \begin{macrocode}
 %<@@=tag>
 %<*header>
-\ProvidesExplPackage {tagpdf-struct-code} {2022-05-11} {0.94}
+\ProvidesExplPackage {tagpdf-struct-code} {2022-05-29} {0.95}
  {part of tagpdf - code related to storing structure}
 %</header>
 %    \end{macrocode}
@@ -228,9 +228,8 @@
 % to have a chance to avoid double structures in align etc.
 %
 %    \begin{macrocode}
-%<*package>
-\newcounter  { g_@@_struct_abs_int }
-\int_gzero:N \c at g_@@_struct_abs_int
+%<base>\newcounter  { g_@@_struct_abs_int }
+%<base>\int_gzero:N \c at g_@@_struct_abs_int
 %    \end{macrocode}
 % \end{variable}
 %
@@ -241,6 +240,7 @@
 % consecutively and so the index of the seq can be used.
 % A seq allows easy mapping over the structures.
 %    \begin{macrocode}
+%<*package>
 \@@_seq_new:N  \g_@@_struct_objR_seq
 %    \end{macrocode}
 % \end{variable}
@@ -503,18 +503,21 @@
 %    \end{macrocode}
 % \end{macro}
 % \begin{macro}
-%  {\@@_struct_kid_OBJR_gput_right:nn,\@@_struct_kid_OBJR_gput_right:xx}
+%  {\@@_struct_kid_OBJR_gput_right:nnn,\@@_struct_kid_OBJR_gput_right:xxx}
 % At last the command to add an OBJR object. This has to write an object first.
 % The first argument is the number of the parent structure, the second the
-% (expanded) object reference of the annotation.
+% (expanded) object reference of the annotation. The last argument is the page
+% object reference
+%
 %    \begin{macrocode}
-\cs_new_protected:Npn\@@_struct_kid_OBJR_gput_right:nn #1 #2 %#1 num of parent struct,
+\cs_new_protected:Npn\@@_struct_kid_OBJR_gput_right:nnn #1 #2 #3 %#1 num of parent struct,
                                                              %#2 obj reference
+                                                             %#3 page object reference
   {
     \pdf_object_unnamed_write:nn
       { dict }
       {
-        /Type/OBJR/Obj~#2
+        /Type/OBJR/Obj~#2/Pg~#3
       }
     \@@_seq_gput_right:cx
       { g_@@_struct_kids_#1_seq }
@@ -523,7 +526,7 @@
       }
   }
 
-\cs_generate_variant:Nn\@@_struct_kid_OBJR_gput_right:nn { xx }
+\cs_generate_variant:Nn\@@_struct_kid_OBJR_gput_right:nnn { xxx }
 
 %    \end{macrocode}
 % \end{macro}
@@ -705,7 +708,8 @@
           }
         %put the obj number of the annot in the kid entry, this also creates
         %the OBJR object
-        \@@_struct_kid_OBJR_gput_right:xx
+        \ref_label:nn {__tag_objr_page_#2 }{ tagabspage }
+        \@@_struct_kid_OBJR_gput_right:xxx
           {
             \l_@@_struct_stack_parent_tmpa_tl
           }
@@ -712,6 +716,9 @@
           {
             #1 %
           }
+          {
+            \pdf_pageobject_ref:n { \@@_ref_value:nnn {__tag_objr_page_#2 }{ tagabspage }{1} }
+          }
         % add the parent obj number to the parent tree:
         \exp_args:Nnx
         \@@_parenttree_add_objr:nn
@@ -740,9 +747,23 @@
        \prop_item:cn {g_@@_struct_\g__tag_struct_stack_current_tl _prop}{S}
      }
   }
+%</package>
 %    \end{macrocode}
 % \end{macro}
 %
+% \begin{macro}{\@@_get_data_struct_num:}
+% this command allows \cs{tag_get:n} to get the current
+% structure number with the keyword |struct_num|. We will need to handle nesting
+%    \begin{macrocode}
+%<*base>
+\cs_new:Npn \@@_get_data_struct_num:
+  {
+    \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
@@ -761,6 +782,7 @@
 %    E (struct-key)
 %  }
 %    \begin{macrocode}
+%<*package>
 \keys_define:nn { @@ / struct }
   {
     label .tl_set:N      = \l_@@_struct_key_label_tl,
@@ -1000,7 +1022,7 @@
 %
 % \begin{macro}{\tag_struct_begin:n,\tag_struct_end:}
 %    \begin{macrocode}
-%<base>\cs_new_protected:Npn \tag_struct_begin:n #1 {}
+%<base>\cs_new_protected:Npn \tag_struct_begin:n #1 {\int_gincr:N \c at g_@@_struct_abs_int}
 %<base>\cs_new_protected:Npn \tag_struct_end:{}
 %<*package|debug>
 %<package>\cs_set_protected:Npn \tag_struct_begin:n #1 %#1 key-val
@@ -1170,7 +1192,7 @@
 % \section{Attributes and attribute classes}
 %    \begin{macrocode}
 %<*header>
-\ProvidesExplPackage {tagpdf-attr-code} {2022-05-11} {0.94}
+\ProvidesExplPackage {tagpdf-attr-code} {2022-05-29} {0.95}
   {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	2022-05-30 20:07:11 UTC (rev 63447)
+++ trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-tree.dtx	2022-05-30 20:07:45 UTC (rev 63448)
@@ -47,13 +47,13 @@
 %    }^^A
 % }
 %
-% \date{Version 0.94, released 2022-05-11}
+% \date{Version 0.95, released 2022-05-29}
 % \maketitle
 % \begin{implementation}
 %    \begin{macrocode}
 %<@@=tag>
 %<*header>
-\ProvidesExplPackage {tagpdf-tree-code} {2022-05-11} {0.94}
+\ProvidesExplPackage {tagpdf-tree-code} {2022-05-29} {0.95}
  {part of tagpdf - code related to writing trees and dictionaries to the pdf}
 %</header>
 %    \end{macrocode}
@@ -125,7 +125,7 @@
 % \end{macro}
 %
 % \begin{macro}{\@@_tree_write_structelements:}
-% This writes out the other struct elems, the absolute number is in the counter
+% This writes out the other struct elems, the absolute number is in the counter.
 %    \begin{macrocode}
 \cs_new_protected:Npn \@@_tree_write_structelements:
   {
@@ -397,6 +397,7 @@
 % TODO (when tabular are done or if someone requests it): IDTree
 %  \begin{macro}{ \@@_finish_structure: }
 %    \begin{macrocode}
+\hook_new:n {tagpdf/finish/before}
 \cs_new_protected:Npn \@@_finish_structure:
   {
     \bool_if:NT\g_@@_active_tree_bool

Modified: trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-user.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-user.dtx	2022-05-30 20:07:11 UTC (rev 63447)
+++ trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf-user.dtx	2022-05-30 20:07:45 UTC (rev 63448)
@@ -46,7 +46,7 @@
 %    }^^A
 % }
 %
-% \date{Version 0.94, released 2022-05-11}
+% \date{Version 0.95, released 2022-05-29}
 % \maketitle
 % \begin{documentation}
 % \section{Setup commands}
@@ -246,7 +246,7 @@
 %    \begin{macrocode}
 %<@@=tag>
 %<*header>
-\ProvidesExplPackage {tagpdf-user} {2022-05-11} {0.94}
+\ProvidesExplPackage {tagpdf-user} {2022-05-29} {0.95}
   {tagpdf - user commands}
 %</header>
 %    \end{macrocode}

Modified: trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf.dtx	2022-05-30 20:07:11 UTC (rev 63447)
+++ trunk/Master/texmf-dist/source/latex/tagpdf/tagpdf.dtx	2022-05-30 20:07:45 UTC (rev 63448)
@@ -81,7 +81,7 @@
 %    \begin{macrocode}
 %<@@=tag>
 %<*package>
-\ProvidesExplPackage {tagpdf} {2022-05-11} {0.94}
+\ProvidesExplPackage {tagpdf} {2022-05-29} {0.95}
   { A package to experiment with pdf tagging }
 
 \bool_if:nF
@@ -107,7 +107,7 @@
 %    \end{macrocode}
 %<*debug>
 %    \begin{macrocode}
-\ProvidesExplPackage {tagpdf-debug} {2022-05-11} {0.94}
+\ProvidesExplPackage {tagpdf-debug} {2022-05-29} {0.95}
   { debug code for tagpdf }
 \@ifpackageloaded{tagpdf}{}{\PackageWarning{tagpdf-debug}{tagpdf~not~loaded,~quitting}\endinput}
     \end{macrocode}
@@ -148,10 +148,27 @@
 %    \end{macrocode}
 %    \begin{macrocode}
 %<*base>
-\ProvidesExplPackage {tagpdf-base} {2022-05-11} {0.94}
+\ProvidesExplPackage {tagpdf-base} {2022-05-29} {0.95}
   {part of tagpdf - provide base, no-op versions of the user commands }
 %</base>
 %    \end{macrocode}
+% The no-op version should behave a near enough to the real code as
+% possible, so we define a command which a special in the relevant backends:
+%    \begin{macrocode}
+%<*base>
+\AddToHook{begindocument}
+ {
+  \str_case:VnF \c_sys_backend_str
+   {
+    { luatex  } { \cs_new_protected:Npn \@@_whatsits: {} }
+    { dvisvgm } { \cs_new_protected:Npn \@@_whatsits: {} }
+   }
+   {
+     \cs_new_protected:Npn \@@_whatsits: {\tex_special:D {} }
+   }
+ }
+%</base>
+%    \end{macrocode}
 % \section{Temporary code}
 % This is code which will be removed when proper support exists in LaTeX
 % \subsection{a LastPage label}

Modified: trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-base.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-base.sty	2022-05-30 20:07:11 UTC (rev 63447)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-base.sty	2022-05-30 20:07:45 UTC (rev 63448)
@@ -23,25 +23,43 @@
 %% and all files in that bundle must be distributed together.
 %% 
 %% File: tagpdf.dtx
-\ProvidesExplPackage {tagpdf-base} {2022-05-11} {0.94}
+\ProvidesExplPackage {tagpdf-base} {2022-05-29} {0.95}
   {part of tagpdf - provide base, no-op versions of the user commands }
+\AddToHook{begindocument}
+ {
+  \str_case:VnF \c_sys_backend_str
+   {
+    { luatex  } { \cs_new_protected:Npn \__tag_whatsits: {} }
+    { dvisvgm } { \cs_new_protected:Npn \__tag_whatsits: {} }
+   }
+   {
+     \cs_new_protected:Npn \__tag_whatsits: {\tex_special:D {} }
+   }
+ }
 %% File: tagpdf-mc-generic.dtx
-\cs_new_protected:Npn \tag_mc_begin:n #1 {}
-\cs_new_protected:Nn \tag_mc_end:{}
+\cs_new_protected:Npn \tag_mc_begin:n #1 { \__tag_whatsits: }
+\cs_new_protected:Nn \tag_mc_end:{ \__tag_whatsits: }
 
 %% File: tagpdf-mc-shared.dtx
 
-\cs_new_protected:Npn \tag_mc_use:n #1 {}
+\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_end_push: {}
 \cs_new_protected:Npn \tag_mc_begin_pop:n #1 {}
 %% File: tagpdf-struct.dtx
-\cs_new_protected:Npn \tag_struct_begin:n #1 {}
+\newcounter  { g__tag_struct_abs_int }
+\int_gzero:N \c at g__tag_struct_abs_int
+\cs_new:Npn \__tag_get_data_struct_num:
+  {
+    \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_use:n #1 {}
 
 %% File: tagpdf-checks.dtx
+\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: }
 %% 

Modified: trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-debug-generic.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-debug-generic.sty	2022-05-30 20:07:11 UTC (rev 63447)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-debug-generic.sty	2022-05-30 20:07:45 UTC (rev 63448)
@@ -19,7 +19,7 @@
 %% and all files in that bundle must be distributed together.
 %% 
 %% File: tagpdf-mc-generic.dtx
-\ProvidesExplPackage {tagpdf-debug-generic} {2022-05-11} {0.94}
+\ProvidesExplPackage {tagpdf-debug-generic} {2022-05-29} {0.95}
  {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	2022-05-30 20:07:11 UTC (rev 63447)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-debug.sty	2022-05-30 20:07:45 UTC (rev 63448)
@@ -26,7 +26,7 @@
 %% and all files in that bundle must be distributed together.
 %% 
 %% File: tagpdf.dtx
-\ProvidesExplPackage {tagpdf-debug} {2022-05-11} {0.94}
+\ProvidesExplPackage {tagpdf-debug} {2022-05-29} {0.95}
   { debug code for tagpdf }
 \@ifpackageloaded{tagpdf}{}{\PackageWarning{tagpdf-debug}{tagpdf~not~loaded,~quitting}\endinput}
     \end{macrocode}

Modified: trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-luatex.def
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-luatex.def	2022-05-30 20:07:11 UTC (rev 63447)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-luatex.def	2022-05-30 20:07:45 UTC (rev 63448)
@@ -19,7 +19,7 @@
 %% and all files in that bundle must be distributed together.
 %% 
 %% File: tagpdf-backend.dtx
-\ProvidesExplFile {tagpdf-luatex.def} {2022-05-11} {0.94}
+\ProvidesExplFile {tagpdf-luatex.def} {2022-05-29} {0.95}
   {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	2022-05-30 20:07:11 UTC (rev 63447)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-generic.sty	2022-05-30 20:07:45 UTC (rev 63448)
@@ -19,7 +19,7 @@
 %% and all files in that bundle must be distributed together.
 %% 
 %% File: tagpdf-mc-generic.dtx
-\ProvidesExplPackage {tagpdf-mc-code-generic} {2022-05-11} {0.94}
+\ProvidesExplPackage {tagpdf-mc-code-generic} {2022-05-29} {0.95}
  {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	2022-05-30 20:07:11 UTC (rev 63447)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-lua.sty	2022-05-30 20:07:45 UTC (rev 63448)
@@ -19,7 +19,7 @@
 %% and all files in that bundle must be distributed together.
 %% 
 %% File: tagpdf-mc-luacode.dtx
-\ProvidesExplPackage {tagpdf-mc-code-lua} {2022-05-11} {0.94}
+\ProvidesExplPackage {tagpdf-mc-code-lua} {2022-05-29} {0.95}
   {tagpdf - mc code only for the luamode }
 \hook_gput_code:nnn{begindocument}{tagpdf/mc}
   {

Modified: trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf.lua
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf.lua	2022-05-30 20:07:11 UTC (rev 63447)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf.lua	2022-05-30 20:07:45 UTC (rev 63448)
@@ -24,8 +24,8 @@
 
 local ProvidesLuaModule = {
     name          = "tagpdf",
-    version       = "0.94",       --TAGVERSION
-    date          = "2022-05-11", --TAGDATE
+    version       = "0.95",       --TAGVERSION
+    date          = "2022-05-29", --TAGDATE
     description   = "tagpdf lua code",
     license       = "The LATEX Project Public License 1.3c"
 }

Modified: trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf.sty	2022-05-30 20:07:11 UTC (rev 63447)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf.sty	2022-05-30 20:07:45 UTC (rev 63448)
@@ -27,7 +27,7 @@
 %% and all files in that bundle must be distributed together.
 %% 
 %% File: tagpdf.dtx
-\ProvidesExplPackage {tagpdf} {2022-05-11} {0.94}
+\ProvidesExplPackage {tagpdf} {2022-05-29} {0.95}
   { A package to experiment with pdf tagging }
 
 \bool_if:nF
@@ -268,7 +268,6 @@
 \msg_new:nnnn { tag } {para-hook-count-wrong}
   {The~number~of~automatic~begin~(#1)~and~end~(#2)~para~hooks~differ!}
   {This~quite~probably~a~coding~error~and~the~structure~will~be~wrong!}
-\cs_new:Npn \tag_get:n #1   { \use:c {__tag_get_data_#1: } }
 \prg_set_conditional:Npnn \tag_if_active: { p , T , TF, F }
   {
      \bool_lazy_all:nTF
@@ -842,6 +841,7 @@
         \prop_map_tokens:Nn \g__tag_role_NS_prop{\use_ii:nn}
       }
   }
+\hook_new:n {tagpdf/finish/before}
 \cs_new_protected:Npn \__tag_finish_structure:
   {
     \bool_if:NT\g__tag_active_tree_bool
@@ -1365,8 +1365,6 @@
     }
   }
 %% File: tagpdf-struct.dtx
-\newcounter  { g__tag_struct_abs_int }
-\int_gzero:N \c at g__tag_struct_abs_int
 \__tag_seq_new:N  \g__tag_struct_objR_seq
 
 \__tag_prop_new:N  \g__tag_struct_cont_mc_prop
@@ -1485,13 +1483,14 @@
  }
 
 \cs_generate_variant:Nn \__tag_struct_kid_struct_gput_right:nn {xx}
-\cs_new_protected:Npn\__tag_struct_kid_OBJR_gput_right:nn #1 #2 %#1 num of parent struct,
+\cs_new_protected:Npn\__tag_struct_kid_OBJR_gput_right:nnn #1 #2 #3 %#1 num of parent struct,
                                                              %#2 obj reference
+                                                             %#3 page object reference
   {
     \pdf_object_unnamed_write:nn
       { dict }
       {
-        /Type/OBJR/Obj~#2
+        /Type/OBJR/Obj~#2/Pg~#3
       }
     \__tag_seq_gput_right:cx
       { g__tag_struct_kids_#1_seq }
@@ -1500,7 +1499,7 @@
       }
   }
 
-\cs_generate_variant:Nn\__tag_struct_kid_OBJR_gput_right:nn { xx }
+\cs_generate_variant:Nn\__tag_struct_kid_OBJR_gput_right:nnn { xxx }
 
 \cs_new_protected:Npn\__tag_struct_exchange_kid_command:N #1 %#1 = seq var
   {
@@ -1625,7 +1624,8 @@
           }
         %put the obj number of the annot in the kid entry, this also creates
         %the OBJR object
-        \__tag_struct_kid_OBJR_gput_right:xx
+        \ref_label:nn {__tag_objr_page_#2 }{ tagabspage }
+        \__tag_struct_kid_OBJR_gput_right:xxx
           {
             \l__tag_struct_stack_parent_tmpa_tl
           }
@@ -1632,6 +1632,9 @@
           {
             #1 %
           }
+          {
+            \pdf_pageobject_ref:n { \__tag_ref_value:nnn {__tag_objr_page_#2 }{ tagabspage }{1} }
+          }
         % add the parent obj number to the parent tree:
         \exp_args:Nnx
         \__tag_parenttree_add_objr:nn
@@ -2089,6 +2092,15 @@
     },
   }
 %% File: tagpdf-space.dtx
+\keys_define:nn { __tag / setup }
+  {
+    interwordspace .choices:nn = { true, on }
+      { \msg_warning:nnx {tag}{sys-no-interwordspace}{\c_sys_engine_str}  },
+    interwordspace .choices:nn = { false, off }
+      { \msg_warning:nnx {tag}{sys-no-interwordspace}{\c_sys_engine_str}  },
+    interwordspace .default:n = true,
+    show-spaces .bool_set:N = \l__tag_showspaces_bool
+  }
 \sys_if_engine_pdftex:T
   {
     \sys_if_output_pdf:TF
@@ -2138,19 +2150,6 @@
         show-spaces .default:n = true
       }
   }
-
-\sys_if_engine_xetex:T
-  {
-    \keys_define:nn { __tag / setup }
-      {
-        interwordspace .choices:nn = { true, on }
-          { \msg_warning:nnn {tag}{sys-no-interwordspace}{xetex}  },
-        interwordspace .choices:nn = { false, off }
-          { \msg_warning:nnn {tag}{sys-no-interwordspace}{xetex}  },
-        interwordspace .default:n = true,
-        show-spaces .bool_set:N = \l__tag_showspaces_bool
-      }
-  }
 \sys_if_engine_luatex:T
   {
     \cs_new_protected:Nn \__tag_fakespace:

Modified: trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdfdocu-patches.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdfdocu-patches.sty	2022-05-30 20:07:11 UTC (rev 63447)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdfdocu-patches.sty	2022-05-30 20:07:45 UTC (rev 63448)
@@ -1,5 +1,5 @@
 %\RequirePackage[enable-debug]{expl3}[2018/06/14]
-\ProvidesExplPackage {tagpdfdocu-patches} {2022-05-11} {0.94}
+\ProvidesExplPackage {tagpdfdocu-patches} {2022-05-29} {0.95}
  {patches/commands for the tagpdf documentation}
 \RequirePackage{etoolbox}
 



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