[latex3-commits] [git/LaTeX3-latex3-latex2e] everymath: Cover eqnarray (54069eb2)

Joseph Wright joseph.wright at morningstar2.co.uk
Sun Dec 11 23:58:31 CET 2022


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

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

commit 54069eb22152287eba9e6b8b51ce1ff2f7fee4d9
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Sun Dec 11 22:58:31 2022 +0000

    Cover eqnarray


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

54069eb22152287eba9e6b8b51ce1ff2f7fee4d9
 required/latex-lab/latex-lab-mathcapture.dtx     | 19 +++++++++++++++++++
 required/latex-lab/testfiles/mathcapture-001.lvt |  7 +++++++
 required/latex-lab/testfiles/mathcapture-001.tlg |  1 +
 3 files changed, 27 insertions(+)

diff --git a/required/latex-lab/latex-lab-mathcapture.dtx b/required/latex-lab/latex-lab-mathcapture.dtx
index 2cb3ac2c..d3eb3c73 100644
--- a/required/latex-lab/latex-lab-mathcapture.dtx
+++ b/required/latex-lab/latex-lab-mathcapture.dtx
@@ -340,6 +340,25 @@
 % \end{macro}
 % \end{macro}
 %
+% \begin{macro}{\eqnarray, \@@_eqnarray_begin:}
+% \begin{macro}{\endeqnarray, \@@_eqnarray_end:}
+%   We need to cover this even though it is of course not encouraged.
+%    \begin{macrocode}
+\cs_new_eq:NN \@@_eqnarray_begin: \eqnarray
+\cs_new_eq:NN \@@_eqnarray_end: \endeqnarray
+\RenewDocumentEnvironment { eqnarray } { b }
+  {
+    \bool_set_true:N \l_@@_collected_bool
+    \@@_process:n {#1}
+    \@@_eqnarray_begin:
+    #1
+    \@@_eqnarray_end:
+  }
+  { }
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
 % Places where math mode is (ab)used.
 %    \begin{macrocode}
 \clist_map_inline:nn
diff --git a/required/latex-lab/testfiles/mathcapture-001.lvt b/required/latex-lab/testfiles/mathcapture-001.lvt
index ab15345f..b9e11536 100644
--- a/required/latex-lab/testfiles/mathcapture-001.lvt
+++ b/required/latex-lab/testfiles/mathcapture-001.lvt
@@ -50,4 +50,11 @@ Try $g_{\hbox{foo$b$}}$
 
 Some text \ensuremath{\alpha}.
 
+Oh no!
+\begin{eqnarray}
+  a = b \\
+  c = d
+\end{eqnarray}
+Argh.
+
 \END
diff --git a/required/latex-lab/testfiles/mathcapture-001.tlg b/required/latex-lab/testfiles/mathcapture-001.tlg
index 74cbb99d..9ebbb7a8 100644
--- a/required/latex-lab/testfiles/mathcapture-001.tlg
+++ b/required/latex-lab/testfiles/mathcapture-001.tlg
@@ -5,3 +5,4 @@ y = mx + c
 y = mx + c \hskip 1em\relax \hbox {for all $c$}
 g_{\hbox {foo$b$}}
 \alpha 
+a = b \\ c = d





More information about the latex3-commits mailing list.