As described in Multiple split equations I want to create an equation environment that inserts aligned and lets me split equations with \n. The solution I found there is a bit hackish I guess, but works in the general case.
Now curiously, if I only put a single line (i.e. one aligned, split by \n or not) into the environment, like this:
\documentclass{article}
\usepackage[fleqn]{amsmath}
\usepackage{environ}
\makeatletter
\NewEnviron{multeq}{%
\let\n\math@cr
\begin{gather}
\def\math@cr{\end{aligned}\n\begin{aligned}}
\begin{aligned}
\BODY
\end{aligned}
\end{gather}
}
\makeatother
\begin{document}
\begin{multeq}
1-1=9
\end{multeq}
\end{document}
compilation will fail with an error like
! Missing $$ inserted.
<to be read again>
\egroup
l.20 \end{multeq}
So the question, I can't figure out is: What is the difference when there is only one aligned?
Also there seem to be issues with using \intertext and \shortintertext inside of multeq now. If somebody has a suggestion for improvement, that would be great!
