[latex3-commits] [latex3/latex2e] latex-lab/uf-review-05: add tagpdf 0.98p (a970e5db)

github at latex-project.org github at latex-project.org
Sat Nov 18 00:33:18 CET 2023


Repository : https://github.com/latex3/latex2e
On branch  : latex-lab/uf-review-05
Link       : https://github.com/latex3/latex2e/commit/a970e5dbd005fe35ec4487504d83a6678c7a32de

>---------------------------------------------------------------

commit a970e5dbd005fe35ec4487504d83a6678c7a32de
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date:   Sat Nov 18 00:33:18 2023 +0100

    add tagpdf 0.98p


>---------------------------------------------------------------

a970e5dbd005fe35ec4487504d83a6678c7a32de
 texmf/tex/latex/tagpdf/tagpdf-base.sty            |   2 +-
 texmf/tex/latex/tagpdf/tagpdf-debug-generic.sty   |   2 +-
 texmf/tex/latex/tagpdf/tagpdf-debug-lua.sty       |   2 +-
 texmf/tex/latex/tagpdf/tagpdf-debug.sty           |   2 +-
 texmf/tex/latex/tagpdf/tagpdf-luatex.def          |   2 +-
 texmf/tex/latex/tagpdf/tagpdf-mc-code-generic.sty |   2 +-
 texmf/tex/latex/tagpdf/tagpdf-mc-code-lua.sty     |   2 +-
 texmf/tex/latex/tagpdf/tagpdf-ns-latex-book.def   |   2 +-
 texmf/tex/latex/tagpdf/tagpdf-ns-latex-inline.def |   2 +-
 texmf/tex/latex/tagpdf/tagpdf-ns-latex.def        |   2 +-
 texmf/tex/latex/tagpdf/tagpdf-ns-mathml.def       |   2 +-
 texmf/tex/latex/tagpdf/tagpdf-ns-pdf.def          |   2 +-
 texmf/tex/latex/tagpdf/tagpdf-ns-pdf2.def         |   2 +-
 texmf/tex/latex/tagpdf/tagpdf-parent-child-2.csv  |   2 +-
 texmf/tex/latex/tagpdf/tagpdf-parent-child.csv    |   2 +-
 texmf/tex/latex/tagpdf/tagpdf.lua                 |   4 +-
 texmf/tex/latex/tagpdf/tagpdf.sty                 | 232 ++++++++++++++++------
 17 files changed, 183 insertions(+), 83 deletions(-)

diff --git a/texmf/tex/latex/tagpdf/tagpdf-base.sty b/texmf/tex/latex/tagpdf/tagpdf-base.sty
index 15b0eb08..5259ae6c 100644
--- a/texmf/tex/latex/tagpdf/tagpdf-base.sty
+++ b/texmf/tex/latex/tagpdf/tagpdf-base.sty
@@ -25,7 +25,7 @@
 %% and all files in that bundle must be distributed together.
 %% 
 %% File: tagpdf.dtx
-\ProvidesExplPackage {tagpdf-base} {2023-11-10} {0.98n}
+\ProvidesExplPackage {tagpdf-base} {2023-11-17} {0.98p}
   {part of tagpdf - provide base, no-op versions of the user commands }
 \AddToHook{begindocument}
  {
diff --git a/texmf/tex/latex/tagpdf/tagpdf-debug-generic.sty b/texmf/tex/latex/tagpdf/tagpdf-debug-generic.sty
index afb30a81..8a741db7 100644
--- a/texmf/tex/latex/tagpdf/tagpdf-debug-generic.sty
+++ b/texmf/tex/latex/tagpdf/tagpdf-debug-generic.sty
@@ -19,7 +19,7 @@
 %% and all files in that bundle must be distributed together.
 %% 
 %% File: tagpdf-mc-generic.dtx
-\ProvidesExplPackage {tagpdf-debug-generic} {2023-11-10} {0.98n}
+\ProvidesExplPackage {tagpdf-debug-generic} {2023-11-17} {0.98p}
  {part of tagpdf - debugging code related to marking chunks - generic mode}
 \cs_set_protected:Npn \tag_mc_begin:n #1 %#1 keyval
   {
diff --git a/texmf/tex/latex/tagpdf/tagpdf-debug-lua.sty b/texmf/tex/latex/tagpdf/tagpdf-debug-lua.sty
index c52c27bb..9a21fe95 100644
--- a/texmf/tex/latex/tagpdf/tagpdf-debug-lua.sty
+++ b/texmf/tex/latex/tagpdf/tagpdf-debug-lua.sty
@@ -19,7 +19,7 @@
 %% and all files in that bundle must be distributed together.
 %% 
 %% File: tagpdf-mc-luacode.dtx
-\ProvidesExplPackage {tagpdf-debug-lua} {2023-11-10} {0.98n}
+\ProvidesExplPackage {tagpdf-debug-lua} {2023-11-17} {0.98p}
  {part of tagpdf - debugging code related to marking chunks - lua mode}
 \cs_set_protected:Npn \__tag_mc_handle_stash:n #1 %1 mcidnum
   {
diff --git a/texmf/tex/latex/tagpdf/tagpdf-debug.sty b/texmf/tex/latex/tagpdf/tagpdf-debug.sty
index aab0e238..af96fb61 100644
--- a/texmf/tex/latex/tagpdf/tagpdf-debug.sty
+++ b/texmf/tex/latex/tagpdf/tagpdf-debug.sty
@@ -26,7 +26,7 @@
 %% and all files in that bundle must be distributed together.
 %% 
 %% File: tagpdf.dtx
-\ProvidesExplPackage {tagpdf-debug} {2023-11-10} {0.98n}
+\ProvidesExplPackage {tagpdf-debug} {2023-11-17} {0.98p}
   { debug code for tagpdf }
 \@ifpackageloaded{tagpdf}{}{\PackageWarning{tagpdf-debug}{tagpdf~not~loaded,~quitting}\endinput}
 \prop_gput:Nnn \g_msg_module_type_prop { tag / debug} {}
diff --git a/texmf/tex/latex/tagpdf/tagpdf-luatex.def b/texmf/tex/latex/tagpdf/tagpdf-luatex.def
index 9d2924f2..82ae95a0 100644
--- a/texmf/tex/latex/tagpdf/tagpdf-luatex.def
+++ b/texmf/tex/latex/tagpdf/tagpdf-luatex.def
@@ -19,7 +19,7 @@
 %% and all files in that bundle must be distributed together.
 %% 
 %% File: tagpdf-backend.dtx
-\ProvidesExplFile {tagpdf-luatex.def} {2023-11-10} {0.98n}
+\ProvidesExplFile {tagpdf-luatex.def} {2023-11-17} {0.98p}
   {tagpdf~driver~for~luatex}
 {
   \fontencoding{TU}\fontfamily{lmr}\fontseries{m}\fontshape{n}\fontsize{10pt}{10pt}\selectfont
diff --git a/texmf/tex/latex/tagpdf/tagpdf-mc-code-generic.sty b/texmf/tex/latex/tagpdf/tagpdf-mc-code-generic.sty
index e989c08c..05851dc5 100644
--- a/texmf/tex/latex/tagpdf/tagpdf-mc-code-generic.sty
+++ b/texmf/tex/latex/tagpdf/tagpdf-mc-code-generic.sty
@@ -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-11-10} {0.98n}
+\ProvidesExplPackage {tagpdf-mc-code-generic} {2023-11-17} {0.98p}
  {part of tagpdf - code related to marking chunks - generic mode}
 \tl_new:N \l__tag_mc_ref_abspage_tl
 
diff --git a/texmf/tex/latex/tagpdf/tagpdf-mc-code-lua.sty b/texmf/tex/latex/tagpdf/tagpdf-mc-code-lua.sty
index 99220f23..6213ec2a 100644
--- a/texmf/tex/latex/tagpdf/tagpdf-mc-code-lua.sty
+++ b/texmf/tex/latex/tagpdf/tagpdf-mc-code-lua.sty
@@ -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-11-10} {0.98n}
+\ProvidesExplPackage {tagpdf-mc-code-lua} {2023-11-17} {0.98p}
   {tagpdf - mc code only for the luamode }
 \hook_gput_code:nnn{begindocument}{tagpdf/mc}
   {
diff --git a/texmf/tex/latex/tagpdf/tagpdf-ns-latex-book.def b/texmf/tex/latex/tagpdf/tagpdf-ns-latex-book.def
index c5bf7cd3..af69e62d 100644
--- a/texmf/tex/latex/tagpdf/tagpdf-ns-latex-book.def
+++ b/texmf/tex/latex/tagpdf/tagpdf-ns-latex-book.def
@@ -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-11-10} {0.98n}
+%% \ProvidesExplFile {tagpdf-ns-latex-book.def} {2023-11-17} {0.98p}
 %% {latex-book} {https://www.latex-project.org/ns/book/2022}{}
 chapter,       H1,pdf2,
 section,       H2,pdf2,
diff --git a/texmf/tex/latex/tagpdf/tagpdf-ns-latex-inline.def b/texmf/tex/latex/tagpdf/tagpdf-ns-latex-inline.def
index 9750a0e7..8c92a20a 100644
--- a/texmf/tex/latex/tagpdf/tagpdf-ns-latex-inline.def
+++ b/texmf/tex/latex/tagpdf/tagpdf-ns-latex-inline.def
@@ -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-11-10} {0.98n}
+%% \ProvidesExplFile {tagpdf-ns-latex-inline.def} {2023-11-17} {0.98p}
 %% {latex-inline} {https://www.latex-project.org/ns/inline/2022}{}
 chapter,       Span, pdf2,
 section,       Span, pdf2,
diff --git a/texmf/tex/latex/tagpdf/tagpdf-ns-latex.def b/texmf/tex/latex/tagpdf/tagpdf-ns-latex.def
index 5ca20746..771cd992 100644
--- a/texmf/tex/latex/tagpdf/tagpdf-ns-latex.def
+++ b/texmf/tex/latex/tagpdf/tagpdf-ns-latex.def
@@ -19,7 +19,7 @@
 %% and all files in that bundle must be distributed together.
 %% 
 %% File: tagpdf-data.dtx
-%% \ProvidesExplFile {tagpdf-ns-latex.def} {2023-11-10} {0.98n}
+%% \ProvidesExplFile {tagpdf-ns-latex.def} {2023-11-17} {0.98p}
 %% {latex} {https://www.latex-project.org/ns/dflt/2022}{}
 title,        Title,    pdf2,
 part,         Title,    pdf2,
diff --git a/texmf/tex/latex/tagpdf/tagpdf-ns-mathml.def b/texmf/tex/latex/tagpdf/tagpdf-ns-mathml.def
index a9b438a6..545e7c28 100644
--- a/texmf/tex/latex/tagpdf/tagpdf-ns-mathml.def
+++ b/texmf/tex/latex/tagpdf/tagpdf-ns-mathml.def
@@ -19,7 +19,7 @@
 %% and all files in that bundle must be distributed together.
 %% 
 %% File: tagpdf-data.dtx
-%% \ProvidesExplFile {tagpdf-ns-mathml.def} {2023-11-10} {0.98n}
+%% \ProvidesExplFile {tagpdf-ns-mathml.def} {2023-11-17} {0.98p}
 abs,abs,mathml,
 and,and,mathml,
 annotation,annotation,mathml,
diff --git a/texmf/tex/latex/tagpdf/tagpdf-ns-pdf.def b/texmf/tex/latex/tagpdf/tagpdf-ns-pdf.def
index 5417f281..19a28e4f 100644
--- a/texmf/tex/latex/tagpdf/tagpdf-ns-pdf.def
+++ b/texmf/tex/latex/tagpdf/tagpdf-ns-pdf.def
@@ -19,7 +19,7 @@
 %% and all files in that bundle must be distributed together.
 %% 
 %% File: tagpdf-data.dtx
-%% \ProvidesExplFile {tagpdf-ns-pdf.def} {2023-11-10} {0.98n}
+%% \ProvidesExplFile {tagpdf-ns-pdf.def} {2023-11-17} {0.98p}
 %%  {pdf}   {http://iso.org/pdf/ssn}{}
 StructTreeRoot,StructTreeRoot,pdf,D,
 Document,Document,pdf,D,
diff --git a/texmf/tex/latex/tagpdf/tagpdf-ns-pdf2.def b/texmf/tex/latex/tagpdf/tagpdf-ns-pdf2.def
index d0e638da..8fc3602e 100644
--- a/texmf/tex/latex/tagpdf/tagpdf-ns-pdf2.def
+++ b/texmf/tex/latex/tagpdf/tagpdf-ns-pdf2.def
@@ -19,7 +19,7 @@
 %% and all files in that bundle must be distributed together.
 %% 
 %% File: tagpdf-data.dtx
-%% \ProvidesExplFile {tagpdf-ns-pdf2.def} {2023-11-10} {0.98n}
+%% \ProvidesExplFile {tagpdf-ns-pdf2.def} {2023-11-17} {0.98p}
 %%  {pdf2}  {http://iso.org/pdf2/ssn}{}
 Document,Document,pdf2,D,
 Part,Part,pdf2,G,
diff --git a/texmf/tex/latex/tagpdf/tagpdf-parent-child-2.csv b/texmf/tex/latex/tagpdf/tagpdf-parent-child-2.csv
index 297f5cf1..8009e80a 100644
--- a/texmf/tex/latex/tagpdf/tagpdf-parent-child-2.csv
+++ b/texmf/tex/latex/tagpdf/tagpdf-parent-child-2.csv
@@ -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-11-10} {0.98n}
+%% \ProvidesExplFile {tagpdf-parent-child-2.csv} {2023-11-17} {0.98p}
 ,,,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,∅
diff --git a/texmf/tex/latex/tagpdf/tagpdf-parent-child.csv b/texmf/tex/latex/tagpdf/tagpdf-parent-child.csv
index a6eccec1..cf2c9352 100644
--- a/texmf/tex/latex/tagpdf/tagpdf-parent-child.csv
+++ b/texmf/tex/latex/tagpdf/tagpdf-parent-child.csv
@@ -19,7 +19,7 @@
 %% and all files in that bundle must be distributed together.
 %% 
 %% File: tagpdf-data.dtx
-%% \ProvidesExplFile {tagpdf-parent-child.csv} {2023-11-10} {0.98n}
+%% \ProvidesExplFile {tagpdf-parent-child.csv} {2023-11-17} {0.98p}
 ,,,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,∅,∅
diff --git a/texmf/tex/latex/tagpdf/tagpdf.lua b/texmf/tex/latex/tagpdf/tagpdf.lua
index 28362433..875c9df3 100644
--- a/texmf/tex/latex/tagpdf/tagpdf.lua
+++ b/texmf/tex/latex/tagpdf/tagpdf.lua
@@ -24,8 +24,8 @@
 
 local ProvidesLuaModule = {
     name          = "tagpdf",
-    version       = "0.98n",       --TAGVERSION
-    date          = "2023-11-10", --TAGDATE
+    version       = "0.98p",       --TAGVERSION
+    date          = "2023-11-17", --TAGDATE
     description   = "tagpdf lua code",
     license       = "The LATEX Project Public License 1.3c"
 }
diff --git a/texmf/tex/latex/tagpdf/tagpdf.sty b/texmf/tex/latex/tagpdf/tagpdf.sty
index 3f5fadf7..910b8cb5 100644
--- a/texmf/tex/latex/tagpdf/tagpdf.sty
+++ b/texmf/tex/latex/tagpdf/tagpdf.sty
@@ -28,7 +28,7 @@
 %% and all files in that bundle must be distributed together.
 %% 
 %% File: tagpdf.dtx
-\ProvidesExplPackage {tagpdf} {2023-11-10} {0.98n}
+\ProvidesExplPackage {tagpdf} {2023-11-17} {0.98p}
   { A package to experiment with pdf tagging }
 
 \bool_if:nF
@@ -234,8 +234,7 @@
 \cs_set_eq:NN \__tag_prop_item:cn      \prop_item:cn
 \cs_set_eq:NN \__tag_seq_show:N        \seq_show:N
 \cs_set_eq:NN \__tag_prop_show:N       \prop_show:N
-
-\cs_generate_variant:Nn \__tag_prop_gput:Nnn      { Nen , Nee, Nne , cnn, cen, cne, cno}
+\cs_generate_variant:Nn \__tag_prop_gput:Nnn      { Nen , Nee, Nne , cnn, cen, cne, cno, cnx}
 \cs_generate_variant:Nn \__tag_seq_gput_right:Nn  { Ne  , No, cn, ce }
 \cs_generate_variant:Nn \__tag_prop_new:N   { c }
 \cs_generate_variant:Nn \__tag_seq_new:N    { c }
@@ -246,17 +245,20 @@
     \group_begin:
     \bool_set_false:N \l__tag_active_struct_bool
     \bool_set_false:N \l__tag_active_mc_bool
+    \__tag_stop_para_ints:
   }
 \cs_set_eq:NN \tag_stop_group_end: \group_end:
 \cs_set_protected:Npn \tag_stop:
   {
     \bool_set_false:N \l__tag_active_struct_bool
     \bool_set_false:N \l__tag_active_mc_bool
+    \__tag_stop_para_ints:
   }
 \cs_set_protected:Npn \tag_start:
   {
     \bool_set_true:N \l__tag_active_struct_bool
     \bool_set_true:N \l__tag_active_mc_bool
+    \__tag_start_para_ints:
   }
 \cs_set_eq:NN\tagstop\tag_stop:
 \cs_set_eq:NN\tagstart\tag_start:
@@ -267,6 +269,7 @@
       {
         \bool_set_false:N \l__tag_active_struct_bool
         \bool_set_false:N \l__tag_active_mc_bool
+        \__tag_stop_para_ints:
         \prop_gput:Nnn \g__tag_state_prop { #1 }{ 1 }
       }
       {
@@ -280,6 +283,7 @@
       {
         \bool_set_true:N \l__tag_active_struct_bool
         \bool_set_true:N \l__tag_active_mc_bool
+        \__tag_start_para_ints:
       }
   }
 
@@ -1155,6 +1159,7 @@
 \prop_new:N \l__tag_role_debug_prop
 \tl_new:N \l__tag_role_tag_tmpa_tl
 \tl_new:N \l__tag_role_tag_namespace_tmpa_tl
+\tl_new:N \l__tag_role_tag_namespace_tmpb_tl
 \tl_new:N \l__tag_role_role_tmpa_tl
 \tl_new:N \l__tag_role_role_namespace_tmpa_tl
 \seq_new:N\l__tag_role_tmpa_seq
@@ -2388,61 +2393,30 @@
       },
   }
 \int_new:N\g__tag_struct_AFobj_int
-\cs_if_free:NTF \pdffile_embed_stream:nnN
+\cs_generate_variant:Nn \pdffile_embed_stream:nnN {neN}
+\cs_new_protected:Npn \__tag_struct_add_inline_AF:nn #1 #2
  {
-   \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:nee
-              {#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_use:N \c at g__tag_struct_abs_int }
-              { \pdf_object_ref:e {__tag/fileobj\int_use:N\g__tag_struct_AFobj_int} }
-            \__tag_struct_prop_gput:nne
-              { \int_use:N \c at g__tag_struct_abs_int }
-              { 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 {neN}
-     \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:neN
-          {#1}
-          {tag-AFfile\int_use:N\g__tag_struct_AFobj_int.#2}
-          \l__tag_tmpa_tl
-          \__tag_struct_add_AF:ee
-            { \int_use:N \c at g__tag_struct_abs_int }
-            { \l__tag_tmpa_tl }
-          \__tag_struct_prop_gput:nne
-            { \int_use:N \c at g__tag_struct_abs_int }
-            { AF }
-            {
-              [
-                \tl_use:c
-                 { g__tag_struct_\int_eval:n {\c at g__tag_struct_abs_int}_AF_tl }
-              ]
-            }
-        \group_end:
-      }
-   }
+   \group_begin:
+   \int_gincr:N \g__tag_struct_AFobj_int
+   \pdffile_embed_stream:neN
+     {#1}
+     {tag-AFfile\int_use:N\g__tag_struct_AFobj_int.#2}
+     \l__tag_tmpa_tl
+     \__tag_struct_add_AF:ee
+       { \int_use:N \c at g__tag_struct_abs_int }
+       { \l__tag_tmpa_tl }
+     \__tag_struct_prop_gput:nne
+       { \int_use:N \c at g__tag_struct_abs_int }
+       { 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
   {
@@ -2468,9 +2442,9 @@
  {
     AF .code:n        = % AF property
       {
-        \pdf_object_if_exist:nTF {#1}
+        \pdf_object_if_exist:eTF {#1}
           {
-            \__tag_struct_add_AF:ee { \int_use:N \c at g__tag_struct_abs_int }{\pdf_object_ref:n {#1}}
+            \__tag_struct_add_AF:ee { \int_use:N \c at g__tag_struct_abs_int }{\pdf_object_ref:e {#1}}
             \__tag_struct_prop_gput:nne
              { \int_use:N \c at g__tag_struct_abs_int }
              { AF }
@@ -2485,6 +2459,19 @@
              % message?
           }
       },
+    AFref .code:n        = % AF property
+      {
+        \__tag_struct_add_AF:ee { \int_use:N \c at g__tag_struct_abs_int }{#1}
+        \__tag_struct_prop_gput:nne
+          { \int_use:N \c at g__tag_struct_abs_int }
+          { AF }
+          {
+            [
+              \tl_use:c
+              { g__tag_struct_\int_eval:n {\c at g__tag_struct_abs_int}_AF_tl }
+            ]
+          }
+      },
    ,AFinline .code:n =
      {
        \__tag_struct_add_inline_AF:nn {#1}{txt}
@@ -2497,12 +2484,16 @@
     {
       \group_begin:
       \pdfdict_put:nnn { l_pdffile/Filespec }{AFRelationship} { /Source }
-      \pdfdict_put:nne
-        { l_pdffile }{Subtype}
-        { \pdf_name_from_unicode_e:n{application/x-tex} }
       \__tag_struct_add_inline_AF:on {#1}{tex}
       \group_end:
     }
+   ,mathml .code:n =
+     {
+      \group_begin:
+      \pdfdict_put:nnn { l_pdffile/Filespec }{AFRelationship} { /Supplement }
+      \__tag_struct_add_inline_AF:on {#1}{xml}
+      \group_end:
+    }
  }
 \keys_define:nn { __tag / setup }
   {
@@ -3211,6 +3202,115 @@
 \tl_set:Nn  \l__tag_para_tag_tl { \l__tag_para_tag_default_tl }
 \tl_new:N   \l__tag_para_main_tag_tl
 \tl_set:Nn  \l__tag_para_main_tag_tl {text-unit}
+
+\cs_new_protected:Npn \__tag_gincr_para_main_begin_int:
+ {
+   \int_gincr:N \g__tag_para_main_begin_int
+ }
+\cs_new_protected:Npn \__tag_gincr_para_begin_int:
+ {
+   \int_gincr:N \g__tag_para_begin_int
+ }
+\cs_new_protected:Npn \__tag_gincr_para_main_end_int:
+ {
+   \int_gincr:N \g__tag_para_main_end_int
+ }
+\cs_new_protected:Npn \__tag_gincr_para_end_int:
+ {
+   \int_gincr:N \g__tag_para_end_int
+ }
+
+\cs_new_protected:Npn \__tag_start_para_ints:
+ {
+   \cs_set_protected:Npn \__tag_gincr_para_main_begin_int:
+     {
+       \int_gincr:N \g__tag_para_main_begin_int
+     }
+   \cs_set_protected:Npn \__tag_gincr_para_begin_int:
+    {
+      \int_gincr:N \g__tag_para_begin_int
+    }
+   \cs_set_protected:Npn \__tag_gincr_para_main_end_int:
+    {
+      \int_gincr:N \g__tag_para_main_end_int
+    }
+   \cs_set_protected:Npn \__tag_gincr_para_end_int:
+    {
+      \int_gincr:N \g__tag_para_end_int
+    }
+ }
+\cs_new_protected:Npn \__tag_stop_para_ints:
+ {
+   \cs_set_eq:NN \__tag_gincr_para_main_begin_int:\prg_do_nothing:
+   \cs_set_eq:NN \__tag_gincr_para_begin_int: \prg_do_nothing:
+   \cs_set_eq:NN \__tag_gincr_para_main_end_int: \prg_do_nothing:
+   \cs_set_eq:NN \__tag_gincr_para_end_int: \prg_do_nothing:
+ }
+\AddToHook{package/latex-lab-testphase-sec/after}
+ {
+   \cs_set_protected:Npn \@kernel at tag@hangfrom #1
+    {
+     \tagstructbegin{tag=\l__tag_para_tag_tl}
+     \__tag_gincr_para_begin_int:
+     \tagstructbegin{tag=Lbl}
+     \setbox\@tempboxa
+       \hbox
+         {
+           \bool_lazy_and:nnT
+            {\tag_if_active_p:}
+            {\g__tag_mode_lua_bool}
+            {\tagmcbegin{tag=Lbl}}
+           {#1}
+         }
+   \tag_stop:n{hangfrom}
+   \hangindent \wd\@tempboxa\noindent
+   \tag_start:n{hangfrom}
+   \tagmcbegin{}\box\@tempboxa\tagmcend\tagstructend\tagmcbegin{}
+   }
+ }
+\AddToHook{package/latex-lab-testphase-block/after}
+ {
+   \cs_set_protected:Npn \__block_start_para_structure:n #1 {
+     \__block_debug_typeout:n
+        { @endpe = \legacy_if:nTF { @endpe }{true}{false}
+          \on at line }
+     \legacy_if:nF { @endpe }
+       {
+         \bool_if:NF \l__tag_para_flattened_bool
+            {
+              \__tag_gincr_para_main_begin_int:
+              \tag_struct_begin:n{tag=\l__tag_para_main_tag_tl}
+            }
+        }
+     \__tag_gincr_para_begin_int:
+     \__block_debug_typeout:n{increment~ P \on at line }
+     \tag_struct_begin:n
+         {
+            tag=\l__tag_para_tag_tl
+           ,attribute-class=\l_tag_para_attr_class_tl
+         }
+     \__tag_check_para_begin_show:nn {green}{#1}
+     \tag_mc_begin:n {}
+  }
+  \RemoveFromHook{para/end}[latex-lab-testphase-block]
+  \AddToHook{para/end}[latex-lab-testphase-block]
+   {
+    \bool_if:NT \l__tag_para_bool
+      {
+        \__tag_gincr_para_end_int:
+        \__block_debug_typeout:n{increment~ /P \on at line }
+        \tag_mc_end:
+        \__tag_check_para_end_show:nn {red}{}
+        \tag_struct_end:
+        \bool_if:NF \l__tag_para_flattened_bool
+         {
+           \__tag_gincr_para_main_end_int:
+           \tag_struct_end:
+         }
+      }
+   }
+}
+
 \keys_define:nn { __tag / setup }
   {
     paratagging      .bool_set:N = \l__tag_para_bool,
@@ -3251,13 +3351,13 @@
      {
        \bool_if:NF \l__tag_para_flattened_bool
          {
-           \int_gincr:N \g__tag_para_main_begin_int
+           \__tag_gincr_para_main_begin_int:
            \tag_struct_begin:n
              {
                tag=\l__tag_para_main_tag_tl,
              }
          }
-       \int_gincr:N \g__tag_para_begin_int
+       \__tag_gincr_para_begin_int:
        \tag_struct_begin:n {tag=\l__tag_para_tag_tl}
        \__tag_check_para_begin_show:nn {green}{}
        \tag_mc_begin:n {}
@@ -3267,13 +3367,13 @@
   {
     \bool_if:NT \l__tag_para_bool
       {
-        \int_gincr:N \g__tag_para_end_int
+        \__tag_gincr_para_end_int:
         \tag_mc_end:
         \__tag_check_para_end_show:nn {red}{}
         \tag_struct_end:
         \bool_if:NF \l__tag_para_flattened_bool
          {
-           \int_gincr:N \g__tag_para_main_end_int
+           \__tag_gincr_para_main_end_int:
            \tag_struct_end:
          }
       }





More information about the latex3-commits mailing list.