# Arrows connecting diagrams

I am trying to create a diagram using tikz-cd. I want something similar to the following:

\begin{tikzcd}[column sep=scriptsize]
\& 3 \arrow[rr, dash] \& \arrow[d] \& 2\\
1 \arrow[rr, dash] \& \arrow[d]          \&  4        \&  \\
\&  5                 \&           \&
\end{tikzcd}


This has a gap between the horizontal line and the downward pointing arrow. I also tried this:

\begin{tikzcd}[column sep=scriptsize]
\& 3 \arrow[rr, dash, ""{name=U, below, draw=black}] \& \arrow[d] \& 2\\
1 \arrow[rr, dash, ""{name=V, below, draw=black}] \& \&  4 \arrow[rightarrow, from=U] \&  \\
\&  5 \arrow[rightarrow, from=V]\& \&
\end{tikzcd}


This however creates a square above the downward pointing arrows. I would like the downward pointing arrow to connect to the horizontal bars.

• Welcome to TeX.SX!. You should not escape the ampersand in tikzcd. Use & instead of \& here. Mar 2 '18 at 21:25
• Welcome to TeX.SE. Could you to add a picture (figure) please? Thus I undestand your problem. Thanks. Mar 2 '18 at 21:25

I didn't find a prettier solution. This one requires a little manual labor...

You can use the option shorten <= <dimen> and shorten >= <dimen> to change the length of the arrow. Use negative values to enlarge them.

\documentclass[convert]{standalone}
\usepackage{tikz}
\usetikzlibrary{cd}

\begin{document}

\begin{tikzcd}[column sep=scriptsize]
& 3 \arrow[rr, dash]          & \arrow[d,shorten <= -0.65em] & 2\\
1 \arrow[rr, dash] & \arrow[d,shorten <= -0.65em]&  4        &  \\
&  5                          &           &
\end{tikzcd}

\end{document}