[latex3-commits] [latex3/latex2e] array: getting there (tabularx) (fd92251f)
github at latex-project.org
github at latex-project.org
Wed Nov 29 13:37:28 CET 2023
Repository : https://github.com/latex3/latex2e
On branch : array
Link : https://github.com/latex3/latex2e/commit/fd92251f1924078a29077303c165ae98331578b0
>---------------------------------------------------------------
commit fd92251f1924078a29077303c165ae98331578b0
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date: Wed Nov 29 13:37:28 2023 +0100
getting there (tabularx)
>---------------------------------------------------------------
fd92251f1924078a29077303c165ae98331578b0
required/latex-lab/latex-lab-table.dtx | 53 ----------------------
.../testfiles-table-luatex/table-004-tabularx.tlg | 44 +++++++++---------
.../testfiles-table-pdftex/table-004-tabularx.tlg | 44 +++++++++---------
required/tools/tabularx.dtx | 30 +++++++-----
4 files changed, 63 insertions(+), 108 deletions(-)
diff --git a/required/latex-lab/latex-lab-table.dtx b/required/latex-lab/latex-lab-table.dtx
index 22a1cfbc..59540487 100644
--- a/required/latex-lab/latex-lab-table.dtx
+++ b/required/latex-lab/latex-lab-table.dtx
@@ -1836,59 +1836,6 @@
% \end{macrocode}
-
-
-
-% \subsection{tabularx}
-%
-% In tabularx we mainly need to ensure that no tagging is done during
-% the trial.
-%
-% \begin{macrocode}
-\def\@@_patch_TX at endtabularx{%
- \expandafter\expandafter\expandafter
- \TX at find@endtabularxa\csname end\TX@\endcsname
- \endtabularx\TX@\endtabularx\TX at find@endtabularxa
- \expandafter\TX at newcol\expandafter{\tabularxcolumn{\TX at col@width}}%
- \let\verb\TX at verb
- \def\@elt##1{\global\value{##1}\the\value{##1}\relax}%
- \edef\TX at ckpt{\cl@@@@ckpt}%
- \let\@elt\relax
- \TX at old@table\maxdimen
- \TX at col@width\TX at target
- \global\TX at cols\@ne
- \TX at typeout@
- {\@spaces Table Width\@spaces Column Width\@spaces X Columns}%
-% \end{macrocode}
-% Here we stop tagging:
-% \begin{macrocode}
- \tag_stop:n{tabularx}
- \TX at trial{\def\NC at rewrite@X{%
- \global\advance\TX at cols\@ne\NC at find p{\TX at col@width}}}%
- \loop
- \TX at arith
- \ifTX@
- \TX at trial{}%
- \repeat
-% \end{macrocode}
-% And now we restart it again.
-% \begin{macrocode}
- \tag_start:n{tabularx}
- {\let\@footnotetext\TX at ftntext\let\@xfootnotenext\TX at xftntext
- \csname tabular*\expandafter\endcsname\expandafter\TX at target
- \the\toks@
- \csname endtabular*\endcsname}%
- \global\TX at ftn\expandafter{\expandafter}\the\TX at ftn
- \ifnum0=`{\fi}%
- \expandafter\expandafter\expandafter
- \TX at find@endtabularxbb
- \expandafter\end\expandafter{\TX@}%
- \endtabularx\TX@\endtabularx\TX at find@endtabularxb
-}
-
-\AddToHook{package/tabularx/after}
- {\cs_set_eq:NN \TX at endtabularx\@@_patch_TX at endtabularx }
-% \end{macrocode}
% \begin{macrocode}
%</package>
% \end{macrocode}
diff --git a/required/latex-lab/testfiles-table-luatex/table-004-tabularx.tlg b/required/latex-lab/testfiles-table-luatex/table-004-tabularx.tlg
index f11dfb75..65ce9b83 100644
--- a/required/latex-lab/testfiles-table-luatex/table-004-tabularx.tlg
+++ b/required/latex-lab/testfiles-table-luatex/table-004-tabularx.tlg
@@ -53,17 +53,6 @@ tagpdf DEBUG Info: Struct end ignored [on line ...]
[Sockets] ==> Socket 'tagsupport/tblrow/end' containing plug 'noop' used.
[Sockets] ==> Socket 'tagsupport/tbl/finalize' containing plug 'noop' used.
[Sockets] ==> Socket 'tagsupport/tblhmode/end' containing plug 'noop' used.
-[Sockets] ==> Replacing plug 'TD' with 'noop' in socket 'tagsupport/tblcell/begin'.
-[Sockets] ==> Replacing plug 'TD' with 'noop' in socket 'tagsupport/tblcell/end'.
-[Sockets] ==> Replacing plug 'TR' with 'noop' in socket 'tagsupport/tblrow/begin'.
-[Sockets] ==> Replacing plug 'TR' with 'noop' in socket 'tagsupport/tblrow/end'.
-[Sockets] ==> Replacing plug 'Table' with 'noop' in socket 'tagsupport/tbl/init'.
-[Sockets] ==> Replacing plug 'Table' with 'noop' in socket 'tagsupport/tbl/finalize'.
-[Sockets] ==> Replacing plug 'Table' with 'noop' in socket 'tagsupport/tbl/finalize/longtable'.
-[Sockets] ==> Replacing plug 'Table' with 'noop' in socket 'tagsupport/tblhmode/begin'.
-[Sockets] ==> Replacing plug 'Table' with 'noop' in socket 'tagsupport/tblhmode/end'.
-[Sockets] ==> Replacing plug 'Table' with 'noop' in socket 'tagsupport/tblvmode/begin'.
-[Sockets] ==> Replacing plug 'Table' with 'noop' in socket 'tagsupport/tblvmode/end'.
[Sockets] ==> Socket 'tagsupport/tblhmode/begin' containing plug 'noop' used.
[Sockets] ==> Socket 'tagsupport/tbl/init' containing plug 'noop' used.
[Sockets] ==> Socket 'tagsupport/tblrow/begin' containing plug 'noop' used.
@@ -106,6 +95,17 @@ tagpdf DEBUG Info: Struct end ignored [on line ...]
[Sockets] ==> Socket 'tagsupport/tblrow/end' containing plug 'noop' used.
[Sockets] ==> Socket 'tagsupport/tbl/finalize' containing plug 'noop' used.
[Sockets] ==> Socket 'tagsupport/tblhmode/end' containing plug 'noop' used.
+[Sockets] ==> Replacing plug 'noop' with 'TD' in socket 'tagsupport/tblcell/begin'.
+[Sockets] ==> Replacing plug 'noop' with 'TD' in socket 'tagsupport/tblcell/end'.
+[Sockets] ==> Replacing plug 'noop' with 'TR' in socket 'tagsupport/tblrow/begin'.
+[Sockets] ==> Replacing plug 'noop' with 'TR' in socket 'tagsupport/tblrow/end'.
+[Sockets] ==> Replacing plug 'noop' with 'Table' in socket 'tagsupport/tbl/init'.
+[Sockets] ==> Replacing plug 'noop' with 'Table' in socket 'tagsupport/tbl/finalize'.
+[Sockets] ==> Replacing plug 'noop' with 'Table' in socket 'tagsupport/tbl/finalize/longtable'.
+[Sockets] ==> Replacing plug 'noop' with 'Table' in socket 'tagsupport/tblhmode/begin'.
+[Sockets] ==> Replacing plug 'noop' with 'Table' in socket 'tagsupport/tblhmode/end'.
+[Sockets] ==> Replacing plug 'noop' with 'Table' in socket 'tagsupport/tblvmode/begin'.
+[Sockets] ==> Replacing plug 'noop' with 'Table' in socket 'tagsupport/tblvmode/end'.
Package tagpdf Info: Parent-Child 'Document' --> 'Part'.
(tagpdf) Relation is 1 (='0..n')
(tagpdf) Rolemapped from: 'Document' --> 'text-unit' on line ..
@@ -1015,17 +1015,6 @@ tagpdf DEBUG Info: Struct end ignored [on line ...]
[Sockets] ==> Socket 'tagsupport/tblrow/end' containing plug 'noop' used.
[Sockets] ==> Socket 'tagsupport/tbl/finalize' containing plug 'noop' used.
[Sockets] ==> Socket 'tagsupport/tblhmode/end' containing plug 'noop' used.
-[Sockets] ==> Replacing plug 'TD' with 'noop' in socket 'tagsupport/tblcell/begin'.
-[Sockets] ==> Replacing plug 'TD' with 'noop' in socket 'tagsupport/tblcell/end'.
-[Sockets] ==> Replacing plug 'TR' with 'noop' in socket 'tagsupport/tblrow/begin'.
-[Sockets] ==> Replacing plug 'TR' with 'noop' in socket 'tagsupport/tblrow/end'.
-[Sockets] ==> Replacing plug 'Table' with 'noop' in socket 'tagsupport/tbl/init'.
-[Sockets] ==> Replacing plug 'Table' with 'noop' in socket 'tagsupport/tbl/finalize'.
-[Sockets] ==> Replacing plug 'Table' with 'noop' in socket 'tagsupport/tbl/finalize/longtable'.
-[Sockets] ==> Replacing plug 'Table' with 'noop' in socket 'tagsupport/tblhmode/begin'.
-[Sockets] ==> Replacing plug 'Table' with 'noop' in socket 'tagsupport/tblhmode/end'.
-[Sockets] ==> Replacing plug 'Table' with 'noop' in socket 'tagsupport/tblvmode/begin'.
-[Sockets] ==> Replacing plug 'Table' with 'noop' in socket 'tagsupport/tblvmode/end'.
[Sockets] ==> Socket 'tagsupport/tblhmode/begin' containing plug 'noop' used.
[Sockets] ==> Socket 'tagsupport/tbl/init' containing plug 'noop' used.
[Sockets] ==> Socket 'tagsupport/tblrow/begin' containing plug 'noop' used.
@@ -1049,6 +1038,17 @@ tagpdf DEBUG Info: Struct end ignored [on line ...]
[Sockets] ==> Socket 'tagsupport/tblrow/end' containing plug 'noop' used.
[Sockets] ==> Socket 'tagsupport/tbl/finalize' containing plug 'noop' used.
[Sockets] ==> Socket 'tagsupport/tblhmode/end' containing plug 'noop' used.
+[Sockets] ==> Replacing plug 'noop' with 'TD' in socket 'tagsupport/tblcell/begin'.
+[Sockets] ==> Replacing plug 'noop' with 'TD' in socket 'tagsupport/tblcell/end'.
+[Sockets] ==> Replacing plug 'noop' with 'TR' in socket 'tagsupport/tblrow/begin'.
+[Sockets] ==> Replacing plug 'noop' with 'TR' in socket 'tagsupport/tblrow/end'.
+[Sockets] ==> Replacing plug 'noop' with 'Table' in socket 'tagsupport/tbl/init'.
+[Sockets] ==> Replacing plug 'noop' with 'Table' in socket 'tagsupport/tbl/finalize'.
+[Sockets] ==> Replacing plug 'noop' with 'Table' in socket 'tagsupport/tbl/finalize/longtable'.
+[Sockets] ==> Replacing plug 'noop' with 'Table' in socket 'tagsupport/tblhmode/begin'.
+[Sockets] ==> Replacing plug 'noop' with 'Table' in socket 'tagsupport/tblhmode/end'.
+[Sockets] ==> Replacing plug 'noop' with 'Table' in socket 'tagsupport/tblvmode/begin'.
+[Sockets] ==> Replacing plug 'noop' with 'Table' in socket 'tagsupport/tblvmode/end'.
[Sockets] ==> Socket 'tagsupport/tblhmode/begin' containing plug 'Table' used.
Package tagpdf Info: TD has been pushed to the mc stack
Package tagpdf Info: Parent-Child 'TD' --> 'Table'.
diff --git a/required/latex-lab/testfiles-table-pdftex/table-004-tabularx.tlg b/required/latex-lab/testfiles-table-pdftex/table-004-tabularx.tlg
index 5d35829b..1f629ad0 100644
--- a/required/latex-lab/testfiles-table-pdftex/table-004-tabularx.tlg
+++ b/required/latex-lab/testfiles-table-pdftex/table-004-tabularx.tlg
@@ -55,17 +55,6 @@ tagpdf DEBUG Info: Struct end ignored [on line ...]
[Sockets] ==> Socket 'tagsupport/tblrow/end' containing plug 'noop' used.
[Sockets] ==> Socket 'tagsupport/tbl/finalize' containing plug 'noop' used.
[Sockets] ==> Socket 'tagsupport/tblhmode/end' containing plug 'noop' used.
-[Sockets] ==> Replacing plug 'TD' with 'noop' in socket 'tagsupport/tblcell/begin'.
-[Sockets] ==> Replacing plug 'TD' with 'noop' in socket 'tagsupport/tblcell/end'.
-[Sockets] ==> Replacing plug 'TR' with 'noop' in socket 'tagsupport/tblrow/begin'.
-[Sockets] ==> Replacing plug 'TR' with 'noop' in socket 'tagsupport/tblrow/end'.
-[Sockets] ==> Replacing plug 'Table' with 'noop' in socket 'tagsupport/tbl/init'.
-[Sockets] ==> Replacing plug 'Table' with 'noop' in socket 'tagsupport/tbl/finalize'.
-[Sockets] ==> Replacing plug 'Table' with 'noop' in socket 'tagsupport/tbl/finalize/longtable'.
-[Sockets] ==> Replacing plug 'Table' with 'noop' in socket 'tagsupport/tblhmode/begin'.
-[Sockets] ==> Replacing plug 'Table' with 'noop' in socket 'tagsupport/tblhmode/end'.
-[Sockets] ==> Replacing plug 'Table' with 'noop' in socket 'tagsupport/tblvmode/begin'.
-[Sockets] ==> Replacing plug 'Table' with 'noop' in socket 'tagsupport/tblvmode/end'.
[Sockets] ==> Socket 'tagsupport/tblhmode/begin' containing plug 'noop' used.
[Sockets] ==> Socket 'tagsupport/tbl/init' containing plug 'noop' used.
[Sockets] ==> Socket 'tagsupport/tblrow/begin' containing plug 'noop' used.
@@ -110,6 +99,17 @@ tagpdf DEBUG Info: Struct end ignored [on line ...]
[Sockets] ==> Socket 'tagsupport/tblrow/end' containing plug 'noop' used.
[Sockets] ==> Socket 'tagsupport/tbl/finalize' containing plug 'noop' used.
[Sockets] ==> Socket 'tagsupport/tblhmode/end' containing plug 'noop' used.
+[Sockets] ==> Replacing plug 'noop' with 'TD' in socket 'tagsupport/tblcell/begin'.
+[Sockets] ==> Replacing plug 'noop' with 'TD' in socket 'tagsupport/tblcell/end'.
+[Sockets] ==> Replacing plug 'noop' with 'TR' in socket 'tagsupport/tblrow/begin'.
+[Sockets] ==> Replacing plug 'noop' with 'TR' in socket 'tagsupport/tblrow/end'.
+[Sockets] ==> Replacing plug 'noop' with 'Table' in socket 'tagsupport/tbl/init'.
+[Sockets] ==> Replacing plug 'noop' with 'Table' in socket 'tagsupport/tbl/finalize'.
+[Sockets] ==> Replacing plug 'noop' with 'Table' in socket 'tagsupport/tbl/finalize/longtable'.
+[Sockets] ==> Replacing plug 'noop' with 'Table' in socket 'tagsupport/tblhmode/begin'.
+[Sockets] ==> Replacing plug 'noop' with 'Table' in socket 'tagsupport/tblhmode/end'.
+[Sockets] ==> Replacing plug 'noop' with 'Table' in socket 'tagsupport/tblvmode/begin'.
+[Sockets] ==> Replacing plug 'noop' with 'Table' in socket 'tagsupport/tblvmode/end'.
Package tagpdf Info: Parent-Child 'Document' --> 'Part'.
(tagpdf) Relation is 1 (='0..n')
(tagpdf) Rolemapped from: 'Document' --> 'text-unit' on line ..
@@ -1063,17 +1063,6 @@ tagpdf DEBUG Info: Struct end ignored [on line ...]
[Sockets] ==> Socket 'tagsupport/tblrow/end' containing plug 'noop' used.
[Sockets] ==> Socket 'tagsupport/tbl/finalize' containing plug 'noop' used.
[Sockets] ==> Socket 'tagsupport/tblhmode/end' containing plug 'noop' used.
-[Sockets] ==> Replacing plug 'TD' with 'noop' in socket 'tagsupport/tblcell/begin'.
-[Sockets] ==> Replacing plug 'TD' with 'noop' in socket 'tagsupport/tblcell/end'.
-[Sockets] ==> Replacing plug 'TR' with 'noop' in socket 'tagsupport/tblrow/begin'.
-[Sockets] ==> Replacing plug 'TR' with 'noop' in socket 'tagsupport/tblrow/end'.
-[Sockets] ==> Replacing plug 'Table' with 'noop' in socket 'tagsupport/tbl/init'.
-[Sockets] ==> Replacing plug 'Table' with 'noop' in socket 'tagsupport/tbl/finalize'.
-[Sockets] ==> Replacing plug 'Table' with 'noop' in socket 'tagsupport/tbl/finalize/longtable'.
-[Sockets] ==> Replacing plug 'Table' with 'noop' in socket 'tagsupport/tblhmode/begin'.
-[Sockets] ==> Replacing plug 'Table' with 'noop' in socket 'tagsupport/tblhmode/end'.
-[Sockets] ==> Replacing plug 'Table' with 'noop' in socket 'tagsupport/tblvmode/begin'.
-[Sockets] ==> Replacing plug 'Table' with 'noop' in socket 'tagsupport/tblvmode/end'.
[Sockets] ==> Socket 'tagsupport/tblhmode/begin' containing plug 'noop' used.
[Sockets] ==> Socket 'tagsupport/tbl/init' containing plug 'noop' used.
[Sockets] ==> Socket 'tagsupport/tblrow/begin' containing plug 'noop' used.
@@ -1099,6 +1088,17 @@ tagpdf DEBUG Info: Struct end ignored [on line ...]
[Sockets] ==> Socket 'tagsupport/tblrow/end' containing plug 'noop' used.
[Sockets] ==> Socket 'tagsupport/tbl/finalize' containing plug 'noop' used.
[Sockets] ==> Socket 'tagsupport/tblhmode/end' containing plug 'noop' used.
+[Sockets] ==> Replacing plug 'noop' with 'TD' in socket 'tagsupport/tblcell/begin'.
+[Sockets] ==> Replacing plug 'noop' with 'TD' in socket 'tagsupport/tblcell/end'.
+[Sockets] ==> Replacing plug 'noop' with 'TR' in socket 'tagsupport/tblrow/begin'.
+[Sockets] ==> Replacing plug 'noop' with 'TR' in socket 'tagsupport/tblrow/end'.
+[Sockets] ==> Replacing plug 'noop' with 'Table' in socket 'tagsupport/tbl/init'.
+[Sockets] ==> Replacing plug 'noop' with 'Table' in socket 'tagsupport/tbl/finalize'.
+[Sockets] ==> Replacing plug 'noop' with 'Table' in socket 'tagsupport/tbl/finalize/longtable'.
+[Sockets] ==> Replacing plug 'noop' with 'Table' in socket 'tagsupport/tblhmode/begin'.
+[Sockets] ==> Replacing plug 'noop' with 'Table' in socket 'tagsupport/tblhmode/end'.
+[Sockets] ==> Replacing plug 'noop' with 'Table' in socket 'tagsupport/tblvmode/begin'.
+[Sockets] ==> Replacing plug 'noop' with 'Table' in socket 'tagsupport/tblvmode/end'.
[Sockets] ==> Socket 'tagsupport/tblhmode/begin' containing plug 'Table' used.
Package tagpdf Info: TD has been pushed to the mc stack
tagpdf DEBUG Info: MC end inserted [on line ...]
diff --git a/required/tools/tabularx.dtx b/required/tools/tabularx.dtx
index 7636c883..f7177568 100644
--- a/required/tools/tabularx.dtx
+++ b/required/tools/tabularx.dtx
@@ -506,6 +506,18 @@
% \begin{macrocode}
\TX at typeout@
{\@spaces Table Width\@spaces Column Width\@spaces X Columns}%
+% \end{macrocode}
+%
+% Here we stop tagging:
+% \begin{macrocode}
+ \csname tag_stop:n\endcsname {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.
+% \begin{macrocode}
+ \csname __tag_tbl_disable:\endcsname
% \end{macrocode}%
% First attempt. Modify the {\ttfamily X} definition to count {\ttfamily
% X} columns.
@@ -523,6 +535,13 @@
\TX at trial{}%
\repeat
% \end{macrocode}
+%
+% And now we restart it again.
+% \begin{macrocode}
+ \csname tag_start:n\endcsname {tabularx}%
+ \csname __tag_tbl_enable:\endcsname
+% \end{macrocode}
+%
% One last time, with warnings back on (see appendix D)
% use {\ttfamily tabular*} to put it in a box of the right size, in case
% the algorithm failed to find the correct size.
@@ -737,17 +756,6 @@
% Make the table, and finish the hbox.
% Since v1.06, "\toks@" contains the preamble specification,
% and possible optional argument, as well as the table body.
-% \begin{macrocode}
-% \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.
-% \begin{macrocode}
- \csname __tag_tbl_disable:\endcsname
-% \AssignSocketPlug{tagsupport/tblhmode/begin}{noop}% FMi tmp
-% \AssignSocketPlug{tagsupport/tblhmode/end}{noop}% FMi tmp
-% \end{macrocode}
%
% \begin{macrocode}
\expandafter\tabular\the\toks@
More information about the latex3-commits
mailing list.