How use "align" but with numeration of just some equation?
When using align
or similar environments, \nonumber
suppresses numbering of the given line. You only need \tag
if you need special labelling.
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align}
f(x)&=P(x) \nonumber \\
&=Q(x) \label{eq:2} \\
&=R(x) \nonumber \\
&=S(x) \tag{S}\label{eq:S} \\
&=T(x) \nonumber
\end{align}
Refer to \eqref{eq:2} and \eqref{eq:S}
\end{document}
This does what you want:
\begin{equation}
\begin{aligned}
f(x)&=P(x)\\
&= Q(x)\\
&=R(x)
\end{aligned}
\end{equation}
The equation number is vertically centred by default. You can have it at the top or at the bottom with the options [t]
or [b]
.
I would choose the path of Andrew swann, but instead of removing numbers in align
I would add numbers to align*
this has already been shown, and here I cite the answer from align* but show one equation number at the end :
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.
This answer was given by Ian Thompson