[latex3-commits] [latex3/tagpdf] changetagstop: correct debug message logic (b16b57f)

github at latex-project.org github at latex-project.org
Thu Dec 7 00:40:57 CET 2023


Repository : https://github.com/latex3/tagpdf
On branch  : changetagstop
Link       : https://github.com/latex3/tagpdf/commit/b16b57fa492dbf3e013d50be44d2346929ab6642

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

commit b16b57fa492dbf3e013d50be44d2346929ab6642
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date:   Thu Dec 7 00:40:57 2023 +0100

    correct debug message logic


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

b16b57fa492dbf3e013d50be44d2346929ab6642
 tagpdf-checks.dtx | 4 +++-
 tagpdf.dtx        | 6 +++---
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/tagpdf-checks.dtx b/tagpdf-checks.dtx
index d2411db..4ff52ac 100644
--- a/tagpdf-checks.dtx
+++ b/tagpdf-checks.dtx
@@ -1090,6 +1090,8 @@
  }
 %    \end{macrocode}
 % This tracks tag stop and start.
+% The tag-stop message should go before the int is increased.
+% The tag-start message after the int is decreased.
 %    \begin{macrocode}
 \msg_new:nnn { tag / debug } {tag-stop}
   {
@@ -1097,7 +1099,7 @@
       {#1}
       {Tagging~stopped}
       {Tagging~(not)~stopped~(already~inactive)}\\    
-    level:~\int_eval:n{#1-1}~==>~#1\tl_if_empty:nF{#2}{,~label:~#2}~[\msg_line_context:]
+    level:~#1~==>~\int_eval:n{#1+1}\tl_if_empty:nF{#2}{,~label:~#2}~[\msg_line_context:]
   }
 \msg_new:nnn { tag / debug } {tag-start}
   {
diff --git a/tagpdf.dtx b/tagpdf.dtx
index 7cfa92b..bb8e362 100644
--- a/tagpdf.dtx
+++ b/tagpdf.dtx
@@ -489,11 +489,11 @@
 %<debug>\cs_set_protected:Npn \tag_stop_group_begin:
   {
     \group_begin:
+%<debug>    \msg_note:nnx {tag / debug }{tag-stop}{ \int_use:N \l_@@_tag_stop_int }    
     \int_incr:N \l_@@_tag_stop_int
     \bool_set_false:N \l_@@_active_struct_bool
     \bool_set_false:N \l_@@_active_mc_bool
     \@@_stop_para_ints:
-%<debug>    \msg_note:nnx {tag / debug }{tag-stop}{ \int_use:N \l_@@_tag_stop_int }
   }
 %<package>\cs_set_eq:NN \tag_stop_group_end: \group_end:
 %<debug>\cs_set_protected:Npn \tag_stop_group_end:
@@ -503,11 +503,11 @@
 %<debug>  } 
 \cs_set_protected:Npn \tag_stop:
   {
+%<debug>     \msg_note:nnx {tag / debug }{tag-stop}{ \int_use:N \l_@@_tag_stop_int }      
     \int_incr:N \l_@@_tag_stop_int
     \bool_set_false:N \l_@@_active_struct_bool
     \bool_set_false:N \l_@@_active_mc_bool
     \@@_stop_para_ints:
-%<debug>     \msg_note:nnx {tag / debug }{tag-stop}{ \int_use:N \l_@@_tag_stop_int }    
   }
 \cs_set_protected:Npn \tag_start:
   {
@@ -526,11 +526,11 @@
 %    \begin{macrocode}
 \cs_set_protected:Npn \tag_stop:n #1
   {
+%<debug>    \msg_note:nnxx {tag / debug }{tag-stop}{ \int_use:N \l_@@_tag_stop_int }{#1}           
     \int_incr:N \l_@@_tag_stop_int
     \bool_set_false:N \l_@@_active_struct_bool
     \bool_set_false:N \l_@@_active_mc_bool
     \@@_stop_para_ints:
-%<debug>    \msg_note:nnxx {tag / debug }{tag-stop}{ \int_use:N \l_@@_tag_stop_int }{#1}       
   }
 \cs_set_protected:Npn \tag_start:n #1
   {





More information about the latex3-commits mailing list.