Array padding not right
The mathtools
provides a \vdotswithin
command exactly for this situation:
\documentclass{article}
\usepackage{mathtools}
\begin{document}
\begin{align}
0 &= \text{some equation} \\
0 &= \text{some other equation} \\
&\vdotswithin{=} \notag \\
0 &= \text{last equation}
\end{align}
\end{document}
The appropriate spacing in an array
environment requires you to remove the default array
column separation (\arraycolsep
) and insert empty groups where needed so the binary relations/operators can space themselves. This is easily achieved via array
's \newcolumntype
.
Below the new column type C
inserts {}
to the left (using >
) and right (using <
) of its contents:
\documentclass{article}
\usepackage{amsmath,array}% http://ctan.org/pkg/{amsmath,array}
\newcolumntype{C}{>{{}}c<{{}}}
\begin{document}
\[
\begin{array}{c@{}C@{}c}
a & = & \text{some equation} \\
b & = & \text{some other equation} \\
& \vdots \\
c & = & \text{last equation}
\end{array}
\]
\begin{align*}
a &= \text{some equation} \\
b &= \text{some other equation} \\
& \vdots \\
c &= \text{last equation}
\end{align*}
\end{document}
While you're still left with padding on the array
ends, it doesn't make a difference in terms of the alignment, as you can see in comparison to using align
.
There are advantages to using array
above align
, but there are also drawbacks. One advantage is an easy alignment change to suit your needs compared to the fixed r
ight-l
eft alignment of align
. However, align
provides flexibility when you have multiple alignment points, together with interspersed text-capability, page-breakability, vertical spread-out-i-ness (somewhat achievable via \renewcommand{\arraystretch}{1.2}
when using array
), ... So, all-in-all, align
works better.
In this solution, I use the features of the stackengine
package to create vertical stacks. A "Long stack" as defined by the package, creates stacks whose inter-item baseline is constant and settable (default \baselineskip
). It can be told to stack its arguments in text mode (default) or math mode.
So this solution is composed of three stacks: a stack of right-aligned zeros (with a blank line where the vdots
are; a stack of center-aligned equal signs with slightly-shifted \vdots
, enclosed in a \mathrel
for proper horizontal spacing; and a stack of left-aligned text sentences.
\documentclass{article}
\usepackage[usestackEOL]{stackengine}[2013-10-15]
\begin{document}
\[
\stackMath
\Longstack[r]{0\\0\\ \\0}
\mathrel{\Longstack{=\\=\\ \raisebox{-1.5pt}{\vdots}\\=}}
\stackText
\Longstack[l]{some equation\\some other equation\\ \\last equation}
\]
\end{document}