While creating presentations with beamer, I have the problem described in
broken matrix gaps in brackets. Using the solution proposed by Loop
Space, I discovered that \vdots have an annoying whitepsace in tikz matrices (wich is also discussed here).
Now I wonder, why those whitespaces are not displayed when you use the standard bmatrix
and how I can avoid these whitespaces in the tikz matrix.
Here is a MWE that shows the difference:
\documentclass{standalone}
\usepackage{amsmath}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[every node/.style={draw}, baseline=(dots)]
\matrix [draw=red]
{
\node{Hallo}; \fill[blue!50] (0,0) circle (2pt); \\
\fill[blue!50] (0,0) circle (2pt); \node(dots) {$\vdots$}; \\
\node{g}; \fill[blue!50] (0,0) circle (2pt); \\
};
\end{tikzpicture}
$
\begin{bmatrix}
\text{Hallo} \\
\vdots \\
\text{g}
\end{bmatrix}
$
\end{document}
Which results


\text{world}in the middle row: you'll see the vertical space inserted by\vdotsas well. – egreg Dec 10 '15 at 08:39bmatrix, and the\vdotsdon't look perfectly centered if you write an uppercase letter below it. But how is the spacing computed in thebmatrixthen? For usage with the tikz matrix I implemented a solution by redefining the\vdotscommand:\renewcommand{\vdots} { \tikz{ \fill(0,0)rectangle++(0.75pt,0.75pt); \fill(0,4pt)rectangle++(.75pt,.75pt); \fill(0,8pt)rectangle++(.75pt,.75pt); } }which works perfect in the tikz matrix. Unfortunatelly, using it in thebmatrixleads to an asymetric (shifted up) placement of the dots. – Ktree Dec 10 '15 at 09:46bmatrixremains. The dots look good in tikz, but why are they somehow shifted upwards inbmatrix? – Ktree Dec 10 '15 at 10:01