[Tex/LaTex] align* but show one equation number at the end

alignamsmathequationsnumberingpage-breaking

I am using align*, but I still need an equation number. I know one solution is to use align and add \nonumber to all lines but the last. Is there a 'lazy' way to do it?

I searched a little and found similar ones suggesting use split:
Show equation number only once in align environment

Unfortunately, due to the page break issue I have, I need to use align, because split won't auto page break, as described in Long equation does not page break.

Best Answer

Use \tag:

\documentclass{article}
\usepackage{amsmath}
\newcommand\numberthis{\addtocounter{equation}{1}\tag{\theequation}}
\begin{document}
\begin{align*}
a &=b \\
  &=c \numberthis \label{eqn}
\end{align*}
Equation \eqref{eqn} shows that $a=c$.
\begin{equation}
d = e
\end{equation}
\end{document}

See page 3 of the amsmath package documentation for details.