11

If one uses \vdots in a smallmatrix-environment the vertical spacing above the dots is too large. It is the same spacing as in a normally sized matrix-environment.

Minimal working example:

\documentclass{minimal}
%\usepackage[T1]{fontenc}
%\usepackage{lmodern}
\usepackage{amsmath,amssymb}
%\usepackage[utf8]{inputenc}
%\usepackage{icomma}
%\usepackage[final]{microtype}
%\usepackage{mathtools}
\usepackage{mathdots}

\begin{document}

Normally sized vector
\begin{equation}
\begin{pmatrix} 0 \\ \vdots \\ 0 \end{pmatrix}
\end{equation}

Small vector with too much vertical spacing above the dots.
\begin{equation}
\left(\begin{smallmatrix} 0 \\ \vdots \\ 0 \end{smallmatrix}\right)
\end{equation}

\end{document}

(In the end, I need all the packages above, but the error already occurs in the minimal setup.)

How do I reduce the spacing (for now)? Is it eventually a package implementation error? Should I report upstream?

1 Answer 1

14

the latex definition of \vdots is identical to the one defined by knuth in plain.tex, except that it is made robust. it is constructed from three periods stacked one above the other in a \vbox. the "extra" space at the top is the consequence of the full height of a "normal" character being used for the topmost period, whereas the actual height is much less.

here is a hack that smashes the \vdots and substitutes a vertical phantom of a height that yields a more pleasing result. unfortunately, i couldn't find just a single substitution that works equally well in both situations.

\begin{document}

Normally sized vector
\begin{equation}
\begin{pmatrix} 0 \\ \vphantom{\int^0}\smash[t]{\vdots} \\ 0 \end{pmatrix}
\end{equation}

Small vector with too much vertical spacing above the dots.
\begin{equation}
\left(\begin{smallmatrix} 0 \\
 \vphantom{\int\limits^x}\smash{\vdots} \\
 0 \end{smallmatrix}\right)
\end{equation}

\end{document}

output of example code

1
  • OK, thanks. I am not sticked to use \vdots. If there is an alternative command (e.g. from another package) does not have the drawbacks of Knuth's orginal implementation, I am glad to use that. Actually, I am using the font Libertine (rm font), Biolinum (sf font) and Consolas (tt font) together with the newmathtx package. Libertine is also used as math font and it has a special unicode character for vertical dots. Is there any way to actual use that font symbol instead of an composed character out of three dots?
    – nagmat84
    Oct 14, 2014 at 14:45

You must log in to answer this question.

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