# How to center cases

Consider the following system

\begin{align}
\begin{cases}
S_0&=\{1,2,3,4\}\\
S_1&=\{1,2,3,4,5,6,7,8 \}\\
S_2&=\{1,2,3,4,5,6,7,8,9,10,11,12\}\\
&\vdots
\end{cases}
\end{align}


which gives

How can I align the equal signs and \vdots such that I get something like this

• you could use \;\vdots or some other space, but why align here? there is no alignment I would use equation Jan 3, 2022 at 15:48

Here are two possible solutions, using the \vdotswithin command, from mathtools. The second solution requires empheq (which loads mathtools):

\documentclass{article}
\usepackage{empheq}

\begin{document}

\begin{cases} \begin{aligned} S_0&=\{1,2,3,4\}\\ S_1&=\{1,2,3,4,5,6,7,8 \}\\ S_2&=\{1,2,3,4,5,6,7,8,9,10,11,12\}\\ &\vdotswithin{=} \end{aligned} \end{cases}

or, with a shorter spacing:
\begin{empheq}[left=\empheqlbrace]{align*}
S_0&=\{1,2,3,4\}\\
S_1&=\{1,2,3,4,5,6,7,8 \}\\
S_2&=\{1,2,3,4,5,6,7,8,9,10,11,12\}\\
&\shortvdotswithin{=}
\end{empheq}

\end{document}


• +1. I think alignat works the same way. Perhaps the only problem would be centering the vertical dots at the equal symbol. Jan 3, 2022 at 16:34