This question already has an answer here:

I have the following array environment:

0 & = & \text{some equation} \\
0 & = & \text{some other equation} \\
  & \vdots \\
0 & = & \text{last equation}

However, I get lots of spacing around the equal signs here, not unlike when using the eqnarray environment.

I want to use the array environment because \vdots is of smaller width than =, and gets centered under it.

Any help on conforming the padding/spacing to other equations would be greatly appreciated.

marked as duplicate by Werner spacing Jan 7 '16 at 3:01

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


The mathtools provides a \vdotswithin command exactly for this situation:

Sample output




  0 &=  \text{some equation} \\
  0 &=  \text{some other equation} \\
    &\vdotswithin{=} \notag \\
  0 &=  \text{last equation}


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:

enter image description here

\usepackage{amsmath,array}% http://ctan.org/pkg/{amsmath,array}
  a & = & \text{some equation} \\
  b & = & \text{some other equation} \\
    & \vdots \\
  c & = & \text{last equation}

  a &= \text{some equation} \\
  b &= \text{some other equation} \\
    & \vdots \\
  c &= \text{last equation}

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 right-left 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.

\Longstack[r]{0\\0\\ \\0}
\mathrel{\Longstack{=\\=\\ \raisebox{-1.5pt}{\vdots}\\=}}
\Longstack[l]{some equation\\some other equation\\ \\last equation}

enter image description here

  • People who aren't already familiar with the stackengine package and its many capabilities would probably appreciate getting a couple of sentences that explain what your setup is all about. – Mico Oct 20 '13 at 6:07
  • @mico Good point, Mico. Done. – Steven B. Segletes Oct 20 '13 at 11:08
  • 1
    this looks great, but ... consider the plight of a visually impaired reader, who must rely on an audio rendering. unfortunately the important flow of the message is lost. a way to keep the meaning more scrutable would be welcome. – barbara beeton Oct 20 '13 at 12:00
  • @barbarabeeton Thank you for that comment. It is the first time that issue has been brought to my attention, and I must admit I hadn't thought of it before. Sad to say, I'm not sure that issue can be resolved with stacking as the methodology. – Steven B. Segletes Oct 20 '13 at 22:34

Not the answer you're looking for? Browse other questions tagged or ask your own question.