[latex3-commits] [git/LaTeX3-latex3-latex2e] everymath: Check for $...$ with empty content (8124ca3f)

Joseph Wright joseph.wright at morningstar2.co.uk
Wed Jan 18 21:39:45 CET 2023


Repository : https://github.com/latex3/latex2e
On branch  : everymath
Link       : https://github.com/latex3/latex2e/commit/8124ca3ffe96f428bd30573adad2ae2d037a290b

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

commit 8124ca3ffe96f428bd30573adad2ae2d037a290b
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Wed Jan 18 20:38:21 2023 +0000

    Check for $...$ with empty content


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

8124ca3ffe96f428bd30573adad2ae2d037a290b
 required/latex-lab/latex-lab-mathcapture.dtx | 25 +++++++++++++++++--------
 1 file changed, 17 insertions(+), 8 deletions(-)

diff --git a/required/latex-lab/latex-lab-mathcapture.dtx b/required/latex-lab/latex-lab-mathcapture.dtx
index 28191619..213cc588 100644
--- a/required/latex-lab/latex-lab-mathcapture.dtx
+++ b/required/latex-lab/latex-lab-mathcapture.dtx
@@ -117,7 +117,7 @@
 % \subsection{File declaration}
 %    \begin{macrocode}
 \ProvidesFile{latex-lab-mathcapture.ltx}
-        [2023-01-06 v0.1a Grab all the math(s)]
+        [2023-01-18 v0.1a Grab all the math(s)]
 %    \end{macrocode}
 %
 %    \begin{macrocode}
@@ -180,9 +180,12 @@
 \cs_new_protected:Npn \@@_grab_dollar:w % $
   #1 $
   {
-    \tl_if_head_eq_meaning:nNF {#1} \m at th
-      { \@@_process:nn { math } {#1} } % $
-    #1 $
+    \tl_if_blank:nF {#1}
+      {
+        \tl_if_head_eq_meaning:nNF {#1} \m at th
+          { \@@_process:nn { math } {#1} } % $
+        #1 $
+      }
   }
 %    \end{macrocode}
 % \end{macro}
@@ -192,8 +195,11 @@
 \cs_new_protected:Npn \@@_grab_dollardollar:w % $$
   #1 $$
   {
-    \@@_process:nn { equation* } {#1} % $$
-    #1 $$
+    \tl_if_blank:nF {#1}
+      {
+        \@@_process:nn { equation* } {#1} % $$
+        #1 $$
+      }
   }
 %    \end{macrocode}
 % \end{macro}
@@ -204,8 +210,11 @@
 \cs_new_protected:Npn \@@_grab_inline:w % \(
   #1 \)
   {
-    \@@_process:nn { math } {#1}
-    $ #1 $
+    \tl_if_blank:nF {#1}
+      {
+        \@@_process:nn { math } {#1}
+        $ #1 $
+      }
     \bool_set_false:N \l_@@_collected_bool
   }
 %    \end{macrocode}





More information about the latex3-commits mailing list.