3

I want to put two parallel arrows (Rightarrow) in a tikz-cd diagram but the node is too far away from the arrows when I shorten them.

\documentclass[utf8]{scrartcl}
\usepackage[T1]{fontenc}
\usepackage{tikz}   
\usepackage{tikz-cd}

\begin{document}
    \begin{tikzcd}
             H \dar[r,Rightarrow,shorten >= 10pt,shift left=1ex] \dar[r,Rightarrow,shorten >= 10pt,shift right=1ex] & F
             \end{tikzcd}
\end{document}

Any tips for improving this? t

4
  • As always on this site, please provide a full minimal example taht we can copy and test as is without having to gess preamble and document class. Plus the code you provide is not even complete.
    – daleif
    Commented Dec 22, 2015 at 16:13
  • 1
    Sorry my fault. I hope it's ok now.
    – Abellan
    Commented Dec 22, 2015 at 16:18
  • 1
    Why do you shorten them? \dar is wrong here. This is a down arrow which you tell to go to the right then... Just do \ar[r] or \arrow{r} or variants of that.
    – LaRiFaRi
    Commented Dec 22, 2015 at 16:20
  • Don't use \dar, but \arrow; remove the shorten key; if you want that the nodes are nearer to each other, change column sep
    – egreg
    Commented Dec 22, 2015 at 16:22

2 Answers 2

2

You shouldn't shorten the arrows, but rather modify the column distance:

\documentclass[utf8]{scrartcl}
\usepackage[T1]{fontenc}
\usepackage{tikz}
\usepackage{tikz-cd}

\begin{document}

\begin{tikzcd}
H \arrow[r,Rightarrow,shift left=1ex] \arrow[r,Rightarrow,shift right=1ex] & F
\end{tikzcd}

\begin{tikzcd}[column sep=small]
H \arrow[r,Rightarrow,shift left=1ex] \arrow[r,Rightarrow,shift right=1ex] & F
\end{tikzcd}

\end{document}

enter image description here

1
  • I didn't know about this. Great!
    – Abellan
    Commented Dec 22, 2015 at 16:25
2

Just as addition to Mr. Gregorio, there is a third version for single columns:

% arara: pdflatex

\documentclass{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{tikz-cd}

\begin{document}
\begin{tikzcd}
    H \arrow[Rightarrow,shift left=1ex]{r} \arrow[Rightarrow, shift right=1ex]{r} & F \arrow[Rightarrow,shift left=1ex]{r} \arrow[Rightarrow, shift right=1ex]{r} & D
\end{tikzcd}

\begin{tikzcd}[column sep=small] % or column sep=0.5em or alike
    H \arrow[Rightarrow,shift left=1ex]{r} \arrow[Rightarrow, shift right=1ex]{r} & F \arrow[Rightarrow,shift left=1ex]{r} \arrow[Rightarrow, shift right=1ex]{r} & D
\end{tikzcd}

\begin{tikzcd}
    H \arrow[Rightarrow,shift left=1ex]{r} \arrow[Rightarrow, shift right=1ex]{r} &[-1em] F \arrow[Rightarrow,shift left=1ex]{r} \arrow[Rightarrow, shift right=1ex]{r} & D
\end{tikzcd}
\end{document}

enter image description here

You must log in to answer this question.

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