[latex3-commits] [latex3/latex2e] latex-lab/uf-review-05: add fakemath boolean (a8cd3654)

github at latex-project.org github at latex-project.org
Wed Nov 15 16:47:57 CET 2023


Repository : https://github.com/latex3/latex2e
On branch  : latex-lab/uf-review-05
Link       : https://github.com/latex3/latex2e/commit/a8cd3654e63b7ace17a24a3d450d9a4303b8b05c

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

commit a8cd3654e63b7ace17a24a3d450d9a4303b8b05c
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date:   Wed Nov 15 16:47:57 2023 +0100

    add fakemath boolean


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

a8cd3654e63b7ace17a24a3d450d9a4303b8b05c
 required/latex-lab/latex-lab-math.dtx | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/required/latex-lab/latex-lab-math.dtx b/required/latex-lab/latex-lab-math.dtx
index 6467f9b0..a852f33b 100644
--- a/required/latex-lab/latex-lab-math.dtx
+++ b/required/latex-lab/latex-lab-math.dtx
@@ -328,12 +328,23 @@
 % \begin{variable}{\l_@@_collected_bool}
 %   Tracks whether math mode material has been collected, which happens inside
 %   \pkg{amsmath} environments as well as those handled directly here.
+%   If true following math will not grab and/or process. 
+%   See \ref{sec:mathcapture} for details.
+%    \begin{macrocode}
+\bool_new:N \l_@@_collected_bool
+%    \end{macrocode}
+% \end{variable}
 % 
+% \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 
+%   grabbed contents contains the \cs{m at th} token.
 %
 %    \begin{macrocode}
-\bool_new:N \l_@@_collected_bool
+\bool_new:N \l_@@_fakemath_bool
 %    \end{macrocode}
 % \end{variable}
+
 %
 % It must be possible to suppress both the collecting and the tagging of math. 
 % Currently both tasks are still connected and controlled by the boolean
@@ -379,7 +390,8 @@
   {
     \legacy_if:nF { measuring@ }
       {
-        \tl_if_in:nnF {#2} { \m at th }
+        \tl_if_in:nnTF {#2} { \m at th }
+          { \bool_set_true:N\l_@@_fakemath_bool }
           { \tl_trim_spaces_apply:nN {#2} \@@_process_auxi:nn {#1} }
       }
   }





More information about the latex3-commits mailing list.