You can lengthen the arrows with the parameters row sep
and column sep
which define the distance between two nodes/cells in your diagram.
Here a quote from the excellent documentation:
In your case, large
or huge
would do the trick if you want to stick to predefined values (nice for consistency):
% arara: pdflatex
\documentclass{article}
\usepackage{tikz-cd}
\parindent0pt
\begin{document}
\texttt{row sep=large, column sep=large}\\
\begin{tikzcd}[row sep=large, column sep = large]
F_n \otimes M \arrow{r}[name=U]{\phi_n \otimes M} & F_{n-1}\otimes M \\
F_n\otimes L \arrow[hookrightarrow]{u}{\tilde{\iota}_n} \arrow[swap]{r}[name=D]{\phi_n \otimes L} & F_{n-1}\otimes L \arrow[hookrightarrow,swap]{u}{\tilde{\iota}_{n-1}}
\end{tikzcd}\\
\texttt{row sep=huge, column sep=huge}\\
\begin{tikzcd}[row sep=huge, column sep = huge]
F_n \otimes M \arrow{r}[name=U]{\phi_n \otimes M} & F_{n-1}\otimes M \\
F_n\otimes L \arrow[hookrightarrow]{u}{\tilde{\iota}_n} \arrow[swap]{r}[name=D]{\phi_n \otimes L} & F_{n-1}\otimes L \arrow[hookrightarrow,swap]{u}{\tilde{\iota}_{n-1}}
\end{tikzcd}
\end{document}
You can go further by setting any other measure like row sep=5cm
. It is considered good practise to stick to relative lengths. This would be em
for horizontal (e.g. column sep=10em
) and ex
for vertical (e.g. row sep=10ex
) values.
If you prefer to set the distance between the node centres (not between their edges), you might choose something like \begin{tikzcd}[row sep={40,between origins}, column sep={40,between origins}]
. This example uses the TikZ unit (1cm is default, I believe).
In case you just want to change the length between two columns resp. rows, you can do this like the following:
% arara: pdflatex
\documentclass{article}
\usepackage{tikz-cd}
\begin{document}
\begin{tikzcd}
A \rar &[20em] B \rar & C \\
D \rar & E \rar & F
\end{tikzcd}
\end{document}
or
\begin{tikzcd}
A \dar & B \dar \\[20ex]
C \dar & D \dar \\
E & F
\end{tikzcd}
If you want to change the length of single arrows, you have to shorten them. You can do this in negative direction (elongation) as well.
% arara: pdflatex
\documentclass{article}
\usepackage{tikz-cd}
\begin{document}
\begin{tikzcd}
A \rar[shorten <= 2em]\dar[shorten <= 2ex] & B \rar[shorten >= 2em]\dar[shorten >= 2ex] & C \rar[shorten <= 1em, shorten >= 1em]\dar[shorten <= 1ex, shorten >= 1ex] & D\dar[shorten <= -.7ex, shorten >= -.7ex] \\
E \rar[shorten <= -.5em] & F \rar[shorten >= -.4em] & G \rar[shorten <= -.5em, shorten >= -.5em] & H
\end{tikzcd}
\end{document}
Best Answer
Improved version
In this improved version, you can apply a scaling factor to the arrow:
The idea is to measure the path length using a decoration and
\pgfdecoratedpathlength
and to place two marks along the path such that the distance between those marks is the path length scaled by the desired factor.This is achieved by using a "phantom" arrow with the
scalearrow
style; in this style you set the scaling factor (first argument for the style) and two names internally used for the start and end of the scaled path so, for example,places a downwards arrow from the current node (let's refer to it as
X
) to the node below it (let's refer to it asY
) and sets two internal coordinates calledname1
andname2
at the exact position along the path fromX
toY
in such a way that now you can use those names to draw the scaled arrow (using a factor of0.3333
for the scaling) using, for exampleFirst version
One option using
shorten
: