I want to make the arrows in the following code left, but it gives an error.
\begin{tikzcd}
1 \arrow[rr,shift left,"\lambda"]
\arrow[rr,shift right,swap,"\mu"]
&&
3
\end{tikzcd}
arrowstikz-cd
I want to make the arrows in the following code left, but it gives an error.
\begin{tikzcd}
1 \arrow[rr,shift left,"\lambda"]
\arrow[rr,shift right,swap,"\mu"]
&&
3
\end{tikzcd}
Best Answer
When you do
\arrow[rr]
, that means to draw an arrow from the cell the\arrow
is placed in, to the cell that is two columns right.r
stands for "right", twor
s mean two columns to the right. Similarly,l
means left,u
means up andd
down. I'm assuming you tried something likebut that cannot work because the two arrows are placed in the first column, so there are no columns to the left. To use
ll
you have to move the arrows to the last column, i.e.Another option is to add the
leftarrow
option to the arrows while keepingrr
. This will move the arrow tip to the start of the line, instead of the end.Unrelated note: As egreg mentioned in his comment below, using empty columns to add space is probably not the best approach, it would be better to modify the
column sep
. You can give a specific length (e.g.column sep=1cm
) or use one of the predefined keys (tiny
,small
,scriptsize
normal
,large
,huge
) to set the separation between columns.Complete example with both options for the arrows, and
column sep=huge
instead of the empty column: