The »mathtools« package provides the macros \newtagform
and \usetagform
which allow to do this quite comfortable.
\documentclass[11pt]{article}
\usepackage[T1]{fontenc}
\usepackage{mathtools} % loads »amsmath«
\newtagform{dots}{\ldots(}{)}
\begin{document}
\begin{equation}
(a+b)^2 = a^2+2ab+b^2 \label{eqn:binomi-one}
\end{equation}
\begin{equation}
(a-b)^2 = a^2-2ab+b^2 \label{eqn:binomi-two}
\end{equation}
\begin{equation}
\usetagform{dots}
(a+b)(a-b) = a^2-b^2 \label{eqn:binomi-three}
\end{equation}
%
The Binomi equations~\eqref{eqn:binomi-one},~\eqref{eqn:binomi-two} and~\eqref{eqn:binomi-three}.
\end{document}
Works of course also with the numbering scheme for equations in report
and book
.
The output of eqnarray
is wrong anyway and there's little to do about it. Consider also that it doesn't work with cross-references if hyperref
or cleveref
are involved.
No, there's no reason for using it.
The first example can be dealt with using array
:
\documentclass{article}
\usepackage{amsmath,array}
\begin{document}
\begin{equation*}
\renewcommand{\arraystretch}{1.5}
\begin{array}{@{} r @{} >{{}} c <{{}} @{} l @{} }
2^n
& = & \underbrace{2 \cdot 2 \cdot \ldots \cdot 2}_{n \text{ times}}\\
& \overset{n>3}{=} & 2 \cdot 2 \cdot 2 \cdot 2 \cdot \underbrace{2 \cdot 2 \cdot \ldots \cdot 2}_{n - 4 \text{ times}}\\
& = & 16 \cdot \underbrace{2 \cdot 2 \cdot \ldots \cdot 2}_{n - 4 \text{ times}}\\
& < & 24 \cdot \underbrace{2 \cdot 2 \cdot \ldots \cdot 2}_{n - 4 \text{ times}}\\
& = & 1 \cdot 2 \cdot 3 \cdot 4 \cdot \underbrace{2 \cdot 2 \cdot \ldots \cdot 2}_{n - 4 \text{ times}}\\
& \overset{n>3}{\leq} & 1 \cdot 2 \cdot 3 \cdot 4 \cdot 5 \cdot \ldots \cdot n\\
& = & n!
\end{array}
\end{equation*}
A better proof, by induction, is
\begin{alignat*}{2}
2^4 &= 16 < 4! = 24 \\
2^{n+1} &= 2\cdot 2^n &\quad&\text{for $n>3$} \\
&< 2\cdot n! &\quad&\text{induction hypothesis}\\
&< (n+1)\cdot n! \\
&= (n+1)!
\end{alignat*}
\end{document}
The second example is even easier: use a good alignment point:
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align*}
\sigma =[ &x_1/t_1,x_2/t_2,\\
& x_3/t_3,x_4/t_4]
\end{align*}
\end{document}
More lines can be accommodated:
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align*}
\sigma = [ &x_1/t_1,x_2/t_2, \\
& x_3/t_3,x_4/t_4] \\
\tau = [ &y_1/t_1] \\
\psi = [ &x_1/t_1,x_2/t_2,\\
& x_3/t_3,x_4/t_4]
\end{align*}
\end{document}
Best Answer
amsmath
has an environmentsubequations
that will do what you want:some observations:
\\
at the end of the last line, or you'll end up with too much space below the display.amsmath
rather thaneqnarray
(see this article for the reasons why).to find out what structures are provided by
amsmath
, if you have a tex live installation, typetexdoc amsmath
at a command line prompt.