[Tex/LaTex] Getting extremely large arrows with tikzcd

tikz-arrowstikz-cd

I have a quite large description of an arrow, and row sep = huge does not make the arrow long enough. Is there a way to format this better?

\documentclass{article}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{tikz-cd}
\usepackage{fullpage}
\usepackage{amsthm}
\usepackage{adjustbox}
\usepackage{xcolor}
\begin{document}
\begin{tikzcd}[column sep = huge, row sep = huge]
E \arrow[r, "e"] & \Pi_{i \in ob(\mathcal{E})} F(i) \arrow[r, shift left, " 
{<\pi_{cod(u)} \ | \ u \in \hom(\mathcal{E})>}"] \arrow[r, shift right, "{<F(u) 
\pi_{dom(u)} \ | \ u \in \hom(\mathcal{E})}"'] & {\Pi_{u \in \hom(\mathcal{E}) 
F(cod(u))}} 
\end{tikzcd}
\end{document}

Best Answer

Here are two different ways

enter image description here

\documentclass{article}

\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{tikz-cd}

\DeclareMathOperator{\cod}{cod}
\DeclareMathOperator{\dom}{dom}
\DeclareMathOperator{\ob}{ob}

\begin{document}

Option 1: wide column separation specified by dimension
\begin{equation*}
  \begin{tikzcd}[column sep = 10em]
    E \arrow[r, "e"] & \displaystyle\prod_{i \in
    \ob(\mathcal{E})} \mkern-12mu F(i)
    \arrow[r, shift left, " {\langle\pi_{\cod(u)} \mid u \in
    \hom(\mathcal{E})\rangle}"] \arrow[r, shift right, "{\langle F(u)
    \pi_{\dom(u)} \mid u \in
    \hom(\mathcal{E})\rangle}"']
    & {\displaystyle\prod_{u \in \hom(\mathcal{E})} \mkern-12mu F(\cod(u))}
  \end{tikzcd}
\end{equation*}

Option 2: let arrows cover two (or more) columns
\begin{equation*}
  \begin{tikzcd}[column sep = huge]
    E \arrow[r, "e"]
    & \displaystyle\prod_{i \in \ob(\mathcal{E})} \mkern-12mu F(i)
    \arrow[rr, shift left, " {\langle\pi_{\cod(u)} \mid u \in
    \hom(\mathcal{E})\rangle}"]
    \arrow[rr, shift right, "{\langle F(u) \pi_{\dom(u)}
    \mid u \in \hom(\mathcal{E})\rangle}"']
    && {\displaystyle\prod_{u \in \hom(\mathcal{E})} \mkern-12mu F(\cod(u))}
  \end{tikzcd}
\end{equation*}

\end{document}

The first is simply to specify the column sep as a dimension. The second is to add an extra column under the long arrows, so you have

A \arrow[r] & B \arrow[rr] && C

instead of

A \arrow[r] & B \arrow[r] & C

You can make this wider by using more columns

A \arrow[r] & B \arrow[rrr] &&& C

etc.

Note I have recoded much of your mathematics.

The above solutions corresponding to working with a fixed grid, which is often a good idea for consistent spacing. An alternative is the extra space syntax of egreg's answer:

&[5em]

in the first row, will push the subsequent column 5em to the right and so making the corresponding arrows longer.

Related Question