I have the following:
\newenvironment{examplebox}[1]{
\begin{flalign*}
}
{
\end{flalign*}
}
\begin{examplebox}{Test}
& \lim_{x \to 2} f(x)
\end{examplebox}
This results in the following two errors:
LaTeX Error: \begin{examplebox} on input line 47 ended by \end{document}.
LaTeX Error: \begin{flalign*} on input line 47 ended by \end{examplebox}
The environment works fine if I put the flalign in the environment everytime I \begin it. However, I want this to be in a \newenvironemnt because I want to add styling around it and have it be easily reproducable every time I need it. Additionally, I have not decided a style for it because I am focuing more on the content of my document, so I want to be able to change it once and have it change all instances of it.
Is there any particular reason for this error, or is this just a restriction of flalign. If it is a restriction, then are there are alternatives for it?
*