Skip to content

Commit

Permalink
Cover eqnarray
Browse files Browse the repository at this point in the history
  • Loading branch information
josephwright committed Dec 11, 2022
1 parent 74949bb commit 54069eb
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
19 changes: 19 additions & 0 deletions required/latex-lab/latex-lab-mathcapture.dtx
Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions required/latex-lab/testfiles/mathcapture-001.lvt
Expand Up @@ -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
1 change: 1 addition & 0 deletions required/latex-lab/testfiles/mathcapture-001.tlg
Expand Up @@ -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

0 comments on commit 54069eb

Please sign in to comment.