Centering in the \align* environment

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align*}
 a &= (a_1, a_2) \\
 b &= (b_1, b_2) \\
 &\phantom{b=\,} \vdots \\
 z &= (z_1, z_2)
\end{align*}
\end{document}

enter image description here


This question is similar to this question, but to complete this page, I will add a similar answer here.

If you want to center the points unter the equal signs, then you should consider the package mathtools, which provides several corrections for and additions to amsmath.

\usepackage{mathtools}

It also provides a comfortable solution for your problem. You can even choose between a normal (\vdotswithin) and a short (\shortvdotswithin) distance.

\begin{align*}
  a &= b \\
  & \vdotswithin{=} \\
  & = c \\
  \shortvdotswithin{=}
  & = d
\end{align*}

The result convinces.

Example showing vdotswithin and shortvdotswithin

More details can be found in the documentation of the package, section "Centered \vdots", where also the example above is taken from.


I am sure there are plenty of ways of doing this. One of which would be to use \ooalign:

enter image description here

\documentclass{article}
\usepackage{amsmath}% http://ctan.org/pkg/amsmath
\begin{document}
\begin{align*}
  & a = (a_1, a_2) \\
  & b = (b_1, b_2) \\
  & \vdots \\
  & z = (z_1, z_2)
\end{align*}

\begin{align*}
  a &= (a_1, a_2) \\
  b &= (b_1, b_2) \\
  \makebox[0pt][l]{%
    \vphantom{$\vdots$}% For height
    \ooalign{\phantom{$a=(a_1, a_2)$}\cr\hss$\vdots$\hss}}% Centered \vdots
    \phantom{a}% For placement
      & \\
  z &= (z_1, z_2)
\end{align*}
\end{document}​

See this answer for a quick course on \ooalign.

Tags:

Align

Amsmath