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.
Asked
Active
Viewed 294 times
2
luki
- 1,796
-
An answer given here might be helpful: Wrong (too much) vertical space above \vdots in small matrix – barbara beeton Apr 27 '21 at 19:18
2 Answers
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}}
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}
egreg
- 1,121,712

