[latex3-commits] [git/LaTeX3-latex3-latex2e] testnewpara: update tagpdf (3918f85c)

Ulrike Fischer fischer at troubleshooting-tex.de
Sat Mar 4 00:34:28 CET 2023


Repository : https://github.com/latex3/latex2e
On branch  : testnewpara
Link       : https://github.com/latex3/latex2e/commit/3918f85c1f55848391684bedd4635414befea9b7

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

commit 3918f85c1f55848391684bedd4635414befea9b7
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date:   Sat Mar 4 00:34:28 2023 +0100

    update tagpdf


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

3918f85c1f55848391684bedd4635414befea9b7
 texmf/tex/latex/tagpdf/tagpdf-base.sty  |  3 +++
 texmf/tex/latex/tagpdf/tagpdf-debug.sty | 28 ++++++++++++++++++++++++++++
 texmf/tex/latex/tagpdf/tagpdf.sty       |  7 +++++--
 3 files changed, 36 insertions(+), 2 deletions(-)

diff --git a/texmf/tex/latex/tagpdf/tagpdf-base.sty b/texmf/tex/latex/tagpdf/tagpdf-base.sty
index 3ba34d0d..5a2e18a2 100644
--- a/texmf/tex/latex/tagpdf/tagpdf-base.sty
+++ b/texmf/tex/latex/tagpdf/tagpdf-base.sty
@@ -60,12 +60,14 @@
 \int_gzero:N \c at g__tag_struct_abs_int
 \tl_new:N  \g__tag_struct_stack_current_tl
 \tl_gset:Nn \g__tag_struct_stack_current_tl {\int_use:N\c at g__tag_struct_abs_int}
+\prop_new:N \g__tag_struct_dest_num_prop
 \cs_new:Npn \__tag_get_data_struct_num:
   {
     \g__tag_struct_stack_current_tl
   }
 \cs_new_protected:Npn \tag_struct_begin:n #1 {\int_gincr:N \c at g__tag_struct_abs_int}
 \cs_new_protected:Npn \tag_struct_end:{}
+\cs_new_protected:Npn \tag_struct_end:n{}
 \cs_new_protected:Npn \tag_struct_use:n #1 {}
 
 %% File: tagpdf-checks.dtx
@@ -108,6 +110,7 @@
   {
     \tag_struct_use:n {#1}
   }
+\bool_new:N \l__tag_para_flattened_bool
 \newcommand\tagpdfparaOn {}
 \newcommand\tagpdfparaOff{}
 %% File: tagpdf-roles.dtx
diff --git a/texmf/tex/latex/tagpdf/tagpdf-debug.sty b/texmf/tex/latex/tagpdf/tagpdf-debug.sty
index 659ca6f0..1c9099e2 100644
--- a/texmf/tex/latex/tagpdf/tagpdf-debug.sty
+++ b/texmf/tex/latex/tagpdf/tagpdf-debug.sty
@@ -80,6 +80,10 @@
   {
     Struct~end~#1~[\msg_line_context:]
   }
+\msg_new:nnn { tag / debug } {struct-end-wrong}
+  {
+    Struct~end~'#1'~doesn't~fit~start~'#2'~[\msg_line_context:]
+  }
 
 \cs_new_protected:Npn \__tag_debug_struct_begin_insert:n #1
  {
@@ -111,6 +115,24 @@
         \msg_note:nnn { tag / debug } {struct-end } {ignored}
      }
  }
+\cs_new_protected:Npn \__tag_debug_struct_end_check:n #1
+ {
+   \int_compare:nNnT { \l__tag_loglevel_int } > {0}
+    {
+      \seq_get:NNT \g__tag_struct_tag_stack_seq \l__tag_tmpa_tl
+        {
+          \str_if_eq:eeF
+           {#1}
+           {\exp_last_unbraced:NV\use_i:nn \l__tag_tmpa_tl}
+           {
+             \msg_warning:nnxx { tag/debug }{ struct-end-wrong }
+              {#1}
+              {\exp_last_unbraced:NV\use_i:nn \l__tag_tmpa_tl}
+           }
+        }
+     }
+ }
+
 %% File: tagpdf-user.dtx
 
 
@@ -250,6 +272,12 @@
 {\__tag_debug_struct_end_ignore:}
   }
 
+\cs_set_protected:Npn \tag_struct_end:n #1
+ {
+\__tag_debug_struct_end_check:n{#1}
+   \tag_struct_end:
+ }
+
 %% File: tagpdf-space.dtx
 %% 
 %%
diff --git a/texmf/tex/latex/tagpdf/tagpdf.sty b/texmf/tex/latex/tagpdf/tagpdf.sty
index aeb2dbd9..5a87550c 100644
--- a/texmf/tex/latex/tagpdf/tagpdf.sty
+++ b/texmf/tex/latex/tagpdf/tagpdf.sty
@@ -1872,7 +1872,6 @@
 \tl_new:N \g__tag_struct_tag_NS_tl
 \tl_new:N \l__tag_struct_key_label_tl
 \bool_new:N \l__tag_struct_elem_stash_bool
-\prop_new:N \g__tag_struct_dest_num_prop
 \prop_new:N \g__tag_struct_ref_by_dest_prop
 \cs_new:Npn \__tag_struct_output_prop_aux:nn #1 #2 %#1 num, #2 key
   {
@@ -2560,6 +2559,11 @@
           }
       }
   }
+
+\cs_set_protected:Npn \tag_struct_end:n #1
+ {
+   \tag_struct_end:
+ }
 \cs_set_protected:Npn \tag_struct_use:n #1 %#1 is the label
   {
     \__tag_check_if_active_struct:T
@@ -3002,7 +3006,6 @@
      }
   }
 \bool_new:N \l__tag_para_bool
-\bool_new:N \l__tag_para_flattened_bool
 \bool_new:N \l__tag_para_show_bool
 \int_new:N  \g__tag_para_begin_int
 \int_new:N  \g__tag_para_end_int





More information about the latex3-commits mailing list.