I use TeX Live 2020 on Debian Testing; version of amsmath is 2.17e. I have noticed that I get the error
Package amsmath Error: \begin{split} won't work here. \end{split}
whenever there is an \everydisplay command and try to use the split env. within any math environment, whether display math (any delimiter), equation, eqnarray, and their starred versions. Here's a MnWE:
\documentclass{article}
\usepackage{amsmath}
\usepackage{color}
\everydisplay{\color{blue}}
\let\equation\gather
\let\endequation\endgather
\begin{document}
Line.
\begin{equation}
\begin{split}
a & = b\
c & = d
\end{split}
\end{equation}
\end{document}
I tried using the solution here by modifying \equation using \let as seen above, but it doesn't work.
Is this some sort of bug? Should I report this somewhere? Is it just me? The only reference to this error in the amsmath doc. is the description of split ("it is not standalone" etc).
\let\endequatoin\endgather– David Carlisle Aug 30 '20 at 16:55\endequat....part. Though split really does not like that\everydisplay. I hardly ever usesplitanymore, if you don't redefineequationand usealignedinstead ofsplitthen it works just fine. Unrelated: I'd usexcolorinstead ofcolorit can do more. – daleif Aug 30 '20 at 16:55Improper \halign inside $$'s. \next@ ...skip \z@skip \global \row@ \@ne \halign to\displaywidth \bgroup \s.... No matter, the point is that split doesn't work when using\everydisplay. – mathbekunkus Aug 30 '20 at 17:02aligned, but I'd still want to know why this happens. :) – mathbekunkus Aug 30 '20 at 17:11\everydisplay{}. I'll use other environments if I have this command present. Thanks. :) – mathbekunkus Aug 30 '20 at 17:23