[latex3-commits] [latex3/latex2e] array: simplify tabularx (ee8c964d)
github at latex-project.org
github at latex-project.org
Fri Dec 1 21:53:54 CET 2023
Repository : https://github.com/latex3/latex2e
On branch : array
Link : https://github.com/latex3/latex2e/commit/ee8c964db2aba7c40a4a2c992ac28a79861dfdc9
>---------------------------------------------------------------
commit ee8c964db2aba7c40a4a2c992ac28a79861dfdc9
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date: Fri Dec 1 21:53:54 2023 +0100
simplify tabularx
>---------------------------------------------------------------
ee8c964db2aba7c40a4a2c992ac28a79861dfdc9
base/lttag.dtx | 19 +++++++++++++++++--
required/tools/tabularx.dtx | 11 +----------
2 files changed, 18 insertions(+), 12 deletions(-)
diff --git a/base/lttag.dtx b/base/lttag.dtx
index 05606f8d..558bf440 100644
--- a/base/lttag.dtx
+++ b/base/lttag.dtx
@@ -75,8 +75,23 @@
\AddToHook{begindocument/before}{
\cs_if_exist:NT \tag_stop:n
{
- \cs_set_eq:NN \SuspendTagging \tag_stop:n
- \cs_set_eq:NN \ResumeTagging \tag_start:n
+ \cs_set:Npn \SuspendTagging #1 {
+ \tag_stop:n {#1}
+% \end{macrocode}%
+% Next line is is incomplete (only disables table sockets) and
+% should instead be done in the above command instead of disabling them
+% individually because that will otherwise forever change if new
+% sockets get used.
+% \begin{macrocode}
+ \__tag_tbl_disable:
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \cs_set:Npn \ResumeTagging #1 {
+ \tag_start:n {#1}
+ \__tag_tbl_enable:
+ }
}
}
\ExplSyntaxOff
diff --git a/required/tools/tabularx.dtx b/required/tools/tabularx.dtx
index 410e48fd..50370bb0 100644
--- a/required/tools/tabularx.dtx
+++ b/required/tools/tabularx.dtx
@@ -508,18 +508,10 @@
{\@spaces Table Width\@spaces Column Width\@spaces X Columns}%
% \end{macrocode}
%
-% Here we stop tagging:
+% While we do trial typesetting we stop suspend any tagging:
% \begin{macrocode}
\SuspendTagging {tabularx}%
% \end{macrocode}
-% Next line is a bit too much, we should only disable what needs to
-% 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}%
% First attempt. Modify the {\ttfamily X} definition to count {\ttfamily
% X} columns.
% \begin{macrocode}
@@ -540,7 +532,6 @@
% And now we restart it again.
% \begin{macrocode}
\ResumeTagging {tabularx}%
- \csname __tag_tbl_enable:\endcsname
% \end{macrocode}
%
% One last time, with warnings back on (see appendix D)
More information about the latex3-commits
mailing list.