Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'd like the \vdots in this chain to have the same distance to both of the arrows. I know that I could manually shift the node so that it looks right, but there must be a better solution. How?

\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{chains}
\begin{document}
\begin{tikzpicture}[start chain=going below,every join/.style={->}]
    \node [on chain, join] {A};
    \node [on chain, join] {$\vdots$};
    \node [on chain, join] {B};
\end{tikzpicture}
\end{document}

enter image description here

share|improve this question
add comment

1 Answer

up vote 13 down vote accepted

\vdots has been designed for matrices. You can use a modified version that doesn't add space at its top:

\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{chains}

\makeatletter
\DeclareRobustCommand{\rvdots}{%
  \vbox{
    \baselineskip4\p@\lineskiplimit\z@
    \kern-\p@
    \hbox{.}\hbox{.}\hbox{.}
  }}
\makeatother


\begin{document}
\begin{tikzpicture}[start chain=going below,every join/.style={->}]
    \node [on chain, join] {A};
    \node [on chain, join] {\rvdots};
    \node [on chain, join] {B};
\end{tikzpicture}
\end{document}

enter image description here

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.