2

I need to stack a large number of expressions below a sum sign. Using \substack and \vdots as in the code below
\sum_{\substack{a_1 \in A_1\\ \vdots \\ a_k \in A_k}}
gives a pretty awful result, as the vertical dots are much closer to the bottom line than to the top one.
Is there a way to center the dots between the two lines? I tried to use \mathstrut to increase a little bit the spacing between the dots and the bottom line, but the increase is too small and apparently it does not stack up when repeating the command.

1

2 Answers 2

1

You may want smaller and less spaced dots. Here's a way, which mimicks the definition of \vdots.

\documentclass{article}
\usepackage{amsmath}

\makeatletter
\newcommand{\svdots}{%
  \vbox{\fontsize{\sf@size}{\sf@size pt}\linespread{0.3}\selectfont
    \kern0.2\baselineskip
    \hbox{.}\hbox{.}\hbox{.}%
    \kern0.1\baselineskip
  }%
}
\makeatother

\begin{document}

\[
\sum_{\substack{a_1  \in  A_1\\ \svdots  \\  a_k  \in A_k}}
\]

\end{document}

enter image description here

1
  • It actually looks even better. Grazie, leggenda! Apr 28, 2021 at 20:38
2

You can fine-tune vertical spacing after \\ with \\[...] like:

\sum_{\substack{a_1  \in  A_1\\[-4pt] \vdots  \\[2pt]  a_k  \in A_k}}

Result: enter image description here

1
  • Wow, thank you very much! Apr 27, 2021 at 15:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .