I know equation numbering is possible in a proof
environment, as shown below in MWE1:
\documentclass[12pt,a4paper]{article}
\usepackage[latin1]{inputenc}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage[left=2.00cm, right=2.00cm, top=2.00cm, bottom=2.00cm]{geometry}
\begin{document}
\begin{proof}
A+B=C
\begin{equation}
G(t)=L\gamma!\,t^{-\gamma}+t^{-\delta}\eta(t) \qedhere
\end{equation}
\end{proof}
\end{document}
But I want the equations to be aligned. Thus I need \begin{align}...\end{align}
, as shown in the MWE2 below:
\documentclass[12pt,a4paper]{article}
\usepackage[latin1]{inputenc}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage[left=2.00cm, right=2.00cm, top=2.00cm, bottom=2.00cm]{geometry}
\begin{document}
\begin{proof}
\begin{align}
\mu &= np \nonumber\\
&= \textonehalf n;\nonumber\\
\begin{equation}
\sigma &= \sqrt{np\left(1-p\right)}\\
\end{equation}
&= \textonehalf \sqrt{n};\nonumber\\
Z &= \dfrac{X-\mu}{\sigma} \nonumber\\
&= \frac{X-\textonehalf n}{\textonehalf \sqrt{n}};\nonumber\\
\vartriangle Z&= \frac{\left(X+1\right)-\textonehalf n}{\textonehalf
\sqrt{n}} - \frac{X-\textonehalf n}{\textonehalf \sqrt{n}} \nonumber\\
\begin{equation}
\vartriangle Z&= \dfrac{1}{\textonehalf \sqrt{n}}\\
\end{equation}
\lim_{n \to \infty} \vartriangle Z &= 0
\end{align}
\end{proof}
\end{document}
But there is an error in MWE2. How do I assign equation numbers to some selected equations in a proof environment while aligning all the equations? I want the equation number so that I can label (\label{}
) such equations and reference (\ref{}
) it within the document. I want the alignment along the equation signs, so that it will look aesthetical and professional.
equation
had not be nested inalign
environment.\textonehalf
should not be used in math mode. If you want a small fraction, use\tfrac{1}{2}
.equation
environment in the first place. The only thing I can think of is that you wanted the numbering provided byequation
. But surely you realize all those\nonumber
commands were what was removing the equation numbers in the first place?