[latex3-commits] [git/LaTeX3-latex3-latex2e] everymath: Delay redefining \measure@ (c6246bb4)

Joseph Wright joseph.wright at morningstar2.co.uk
Thu Jan 5 16:38:02 CET 2023


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

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

commit c6246bb4329de59834570610250ca81c731ad86f
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Thu Jan 5 15:35:40 2023 +0000

    Delay redefining \measure@


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

c6246bb4329de59834570610250ca81c731ad86f
 required/latex-lab/latex-lab-mathcapture.dtx     | 11 +++++++----
 required/latex-lab/testfiles/mathcapture-001.tlg |  1 +
 required/latex-lab/testfiles/mathcapture-002.tlg |  4 ++++
 required/latex-lab/testfiles/mathcapture-003.tlg |  4 ++++
 4 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/required/latex-lab/latex-lab-mathcapture.dtx b/required/latex-lab/latex-lab-mathcapture.dtx
index 0cde5e7e..d0d9284a 100644
--- a/required/latex-lab/latex-lab-mathcapture.dtx
+++ b/required/latex-lab/latex-lab-mathcapture.dtx
@@ -321,11 +321,14 @@
 %   The \pkg{amsmath} environments use a common internal command that is a
 %   useful place to pick up the content.
 %    \begin{macrocode}
-\cs_new_eq:NN \@@_measure@:n \measure@
-\cs_gset_protected:Npn \measure@ #1
+\tl_gput_right:Nn \@kernel at before@begindocument
   {
-    \@@_process:n {#1}
-    \@@_measure@:n {#1}
+    \cs_new_eq:NN \@@_measure@:n \measure@
+    \cs_gset_protected:Npn \measure@ #1
+      {
+        \@@_process:n {#1}
+        \@@_measure@:n {#1}
+      }
   }
 %    \end{macrocode}
 % \end{macro}
diff --git a/required/latex-lab/testfiles/mathcapture-001.tlg b/required/latex-lab/testfiles/mathcapture-001.tlg
index 336db034..ebab25f0 100644
--- a/required/latex-lab/testfiles/mathcapture-001.tlg
+++ b/required/latex-lab/testfiles/mathcapture-001.tlg
@@ -3,6 +3,7 @@ Don't change this file in any respect.
 y = mx + c
 y = mx + c
 y = mx + c \quad \hbox {for all $c$}
+a + b &= c \\ d + e &= f \\
 g_{\hbox {foo$b$}}
 \alpha 
 a = b \\ c = d
diff --git a/required/latex-lab/testfiles/mathcapture-002.tlg b/required/latex-lab/testfiles/mathcapture-002.tlg
index e861176e..7f51f641 100644
--- a/required/latex-lab/testfiles/mathcapture-002.tlg
+++ b/required/latex-lab/testfiles/mathcapture-002.tlg
@@ -12,3 +12,7 @@ Definitely broken because it should not capture math!
 -----------------------------------
 \sin ^2\eta +\cos ^2\eta = 1
 ??????????????????????? nothing else shows
+-----------------------------------
+(a + b)^3 &= (a + b) (a + b)^2 \\ &= (a + b)(a^2 + 2ab + b^2) \\ &= a^3 + 3a^2b + 3ab^2 + b^3
+-----------------------------------
+x^2 + y^2 & = 1 \\ x & = \sqrt {1-y^2}
diff --git a/required/latex-lab/testfiles/mathcapture-003.tlg b/required/latex-lab/testfiles/mathcapture-003.tlg
index 4e5b2a57..f88d9920 100644
--- a/required/latex-lab/testfiles/mathcapture-003.tlg
+++ b/required/latex-lab/testfiles/mathcapture-003.tlg
@@ -1,3 +1,7 @@
 This is a generated file for the l3build validation system.
 Don't change this file in any respect.
+-----------------------------------
+\text {Compare } x^2 + y^2 &= 1 & x^3 + y^3 &= 1 \\ x &= \sqrt {1-y^2} & x &= \sqrt [3]{1-y^3}
+-----------------------------------
+x &= y & X &= Y & a &= b+c \\ x' &= y' & X' &= Y' & a' &= b \\ x + x' &= y + y' & X + X' &= Y + Y' & a'b &= c'b
 ??????????????????????? nothing shows at all





More information about the latex3-commits mailing list.