In the example below, an error is caused by \begin{align}
and \end{align}
but I do not see why:
\documentclass{book}
\usepackage{amsmath}
\newenvironment{subalign}{\begin{subequations}\begin{align}}{\end{align}\end{subequations}}
\begin{document}
\begin{subalign}
a&=b\\
&=b
\end{subalign}
\end{document}
align
in particular (see tex.stackexchange.com/questions/112558/…). For example, if you replacedalign
byequation
, then your code would work (or, rather, complain about misplaced alignment characters).align
environment behaves this way.