I'm writing a document with a lot of equations and I would like to create new environments to write my equations in. Only for convenience, it works without, but it is fastidious to type. For single equations, I want to number the lines with lineo. With align environment, only use 1 equation number with the split environment, and number the lines. So I can do this in my document:
\usepackage[displaymath, mathlines]{lineno}
\linenumbers
...
\begin{linenomath}
\begin{equation}
\end{equation}
\end{linenomath}
and
\begin{linenomath}
\begin{align
\begin{split}
\end{split}
\end{align}
\end{linenomath}
This works, however, I'm trying to create new environments for it like this:
\newenvironment{my_equation}
{\begin{linenomath}
\begin{equation}
}
{
\end{equation}
\end{linenomath}
}
\newenvironment{my_align}
{\begin{linenomath}
\begin{align
\begin{split}
}
{
\end{split}
\end{align}
\end{linenomath}
}
These do not work. I got an error and the file won't compile. Am I doing things correctly? Which obvious solution did I miss? Thanks for your help!