[latex3-commits] [latex3/latex2e] array: fix so that the code runs when tagging is not used (2a392666)

github at latex-project.org github at latex-project.org
Wed Nov 29 17:32:05 CET 2023


Repository : https://github.com/latex3/latex2e
On branch  : array
Link       : https://github.com/latex3/latex2e/commit/2a392666188e236607b224a8875d34548fcb1d4a

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

commit 2a392666188e236607b224a8875d34548fcb1d4a
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date:   Wed Nov 29 17:32:05 2023 +0100

    fix so that the code runs when tagging is not used


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

2a392666188e236607b224a8875d34548fcb1d4a
 required/tools/array.dtx    | 26 ++++++++++++++++++++++++++
 required/tools/tabularx.dtx | 12 +++++++-----
 2 files changed, 33 insertions(+), 5 deletions(-)

diff --git a/required/tools/array.dtx b/required/tools/array.dtx
index d1480049..32edda8e 100644
--- a/required/tools/array.dtx
+++ b/required/tools/array.dtx
@@ -3215,8 +3215,34 @@
 %  \end{macro}
 %
 %
+%
+%
+%
+%
 % \section{Support for tagged output}
 %
+%  \begin{macro}{\SuspendTagging,\ResumeTagging}
+%    
+%    This should move to tagpdf and to kernel so that one definition
+%    is automatically available!
+%    \begin{macrocode}
+\ExplSyntaxOn
+\cs_if_exist:NTF \tag_stop:n
+  { 
+    \cs_set_eq:NN \SuspendTagging \tag_stop:n  
+    \cs_set_eq:NN \ResumeTagging  \tag_start:n
+  }
+  { 
+    \cs_set_eq:NN \SuspendTagging \use_none:n  
+    \cs_set_eq:NN \ResumeTagging  \use_none:n
+  }
+\ExplSyntaxOff  
+%    \end{macrocode}
+%  \end{macro}
+%
+%
+%
+%
 %
 % The code uses a number of sockets to inject the tagging
 % commands. These can be easily set to a noop-plug in case the
diff --git a/required/tools/tabularx.dtx b/required/tools/tabularx.dtx
index f7177568..410e48fd 100644
--- a/required/tools/tabularx.dtx
+++ b/required/tools/tabularx.dtx
@@ -510,12 +510,13 @@
 %
 %    Here we stop tagging:
 %    \begin{macrocode}
-  \csname tag_stop:n\endcsname {tabularx}%
+   \SuspendTagging {tabularx}%
 %    \end{macrocode}
 %    Next line is a bit too much, we should only disable what needs to
-%    be disabled for tabular. In fact I don't quite understand why
-%    this is needed at all given that tagging is already stopped on
-%    the outside during trial $\to$ ask Ulrike.
+%    be disabled for tabular. In fact disabling all tagging sockets
+%    should go into \cs{SuspendTagging} instead of disabling them
+%    individually because that will otherwise forever change if new
+%    sockets get used.
 %    \begin{macrocode}
    \csname __tag_tbl_disable:\endcsname
 %    \end{macrocode}%
@@ -538,7 +539,7 @@
 %
 %    And now we restart it again.
 %    \begin{macrocode}
-  \csname tag_start:n\endcsname {tabularx}%
+  \ResumeTagging {tabularx}%
   \csname __tag_tbl_enable:\endcsname
 %    \end{macrocode}
 %
@@ -981,6 +982,7 @@
 %    \end{macrocode}
 % \end{macro}
 %
+%
 %    \begin{macrocode}
 %</package>
 %    \end{macrocode}





More information about the latex3-commits mailing list.