[latex3-commits] [latex3/latex2e] testmergearray: add preliminary support for fakemath in tabular (e107e806)
github at latex-project.org
github at latex-project.org
Thu Dec 14 19:37:45 CET 2023
Repository : https://github.com/latex3/latex2e
On branch : testmergearray
Link : https://github.com/latex3/latex2e/commit/e107e8066b89296113f0a008c4b126e3196982dd
>---------------------------------------------------------------
commit e107e8066b89296113f0a008c4b126e3196982dd
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date: Thu Dec 14 19:37:45 2023 +0100
add preliminary support for fakemath in tabular
>---------------------------------------------------------------
e107e8066b89296113f0a008c4b126e3196982dd
required/latex-lab/latex-lab-math.dtx | 11 +++++++++++
required/tools/array.dtx | 9 ++++++++-
2 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/required/latex-lab/latex-lab-math.dtx b/required/latex-lab/latex-lab-math.dtx
index cc79fb3d..6a699392 100644
--- a/required/latex-lab/latex-lab-math.dtx
+++ b/required/latex-lab/latex-lab-math.dtx
@@ -421,6 +421,17 @@
% \end{macrocode}
% \end{variable}
%
+% \begin{macro}{\FakeMathStart,\FakeMathStop}
+% This allows to suppress math grabbing. Currently quite simple minded.
+% But as it currently only needed for a few \$ in tabulars this is perhaps enough.
+% \begin{macrocode}
+\providecommand\FakeMathStop{}
+\providecommand\FakeMathStart{}
+\renewcommand\FakeMathStop {\bool_set_false:N \l_@@_collected_bool }
+\renewcommand\FakeMathStart{\bool_set_true:N \l_@@_collected_bool }
+% \end{macrocode}
+% \end{macro}
+%
% \begin{variable}{\l_@@_fakemath_bool}
% Tracks whether math mode material has been identified as fake math during
% the grabbing phase, which happens currently if the
diff --git a/required/tools/array.dtx b/required/tools/array.dtx
index 34edbacd..222376c0 100644
--- a/required/tools/array.dtx
+++ b/required/tools/array.dtx
@@ -2725,6 +2725,8 @@ Bug reports can be opened (category \texttt{#1}) at\\%
% \begin{macro}{\@tabular}
% The rest of the job is carried out by the =\@tabular= macro:
% \begin{macrocode}
+\providecommand\FakeMathStart{}
+\providecommand\FakeMathStop{}
\def\@tabular{%
% \end{macrocode}
% First of all we have to make sure that we start out in
@@ -2745,7 +2747,12 @@ Bug reports can be opened (category \texttt{#1}) at\\%
% =\d at llar...=.
% \changes{v2.0d}{1990/08/20}{`d at llar local to preamble.}
% \begin{macrocode}
- \hbox \bgroup $\col at sep\tabcolsep \let\d at llarbegin\begingroup
+ \hbox \bgroup
+% \end{macrocode}
+% The dollar should not start math grabbing.
+% \begin{macrocode}
+ \FakeMathStart$\FakeMathStop
+ \col at sep\tabcolsep \let\d at llarbegin\begingroup
\let\d at llarend\endgroup
% \end{macrocode}
% Now everything \textsf{tabular} specific is done and we are able to
More information about the latex3-commits
mailing list.