Bent arrow under a node

How about you set a customized dashing pattern that skips the part where the text occurs, like so:

Output

\documentclass{article}
\usepackage{tikz-cd}
\begin{document}
\[
\begin{tikzcd}
        X \ar[r] & A &\\
        & C\times D\times F &\\ 
        &   &\\
        &   &\\
        &   &\\
        &   & B \ar[luuuuu, bend left, in=190, out=10, dash pattern=on 80pt off 15pt]
\end{tikzcd}
\]  
\end{document}

Just for fun: something very much along the lines of the reverseclip trick. That way you do not have to adjust things by hand.

\documentclass{article}
\usepackage{tikz-cd}
\begin{document}
\[
\begin{tikzcd}[execute at end picture={
\clip (C.north east) rectangle (C.south west)
(current bounding box.south west) -| (current bounding box.north east)
-| cycle;
\draw[->] (B) to[out=110,in=-90] (A);
}]
        X \ar[r] & |[alias=A]|A &\\
        & |[alias=C]| C\times D\times F  &\\ 
        &   &\\
        &   &\\
        &   &\\
        &   & |[alias=B]|B 
\end{tikzcd}
\]  
\end{document}

enter image description here


Whereas I think marmot's solution is neater, here is another trick that might be useful:

\documentclass{article}
\usepackage{tikz-cd}

\begin{document}
\[
\begin{tikzcd}
        X \ar[r] & A &\\
        &   \tikz[remember picture]{\node (P0) at (0,0) {$C\times D\times F$}} &\\ 
        &   &\\
        &   &\\
        &   &\\
        &   & B \ar[luuuuu, bend left, in=190, out=10]
\end{tikzcd}
\]   
\tikz[overlay,remember picture]{\node[fill=white] at (P0) {$C\times D\times F$}};

\end{document}

hybrid solution

The above code defines a tikz node (P0) at the matrix cell, and remembers it. Subsequently, the node is filled the equation and a white background, which is drawn on top of the arrow. Essentially, it is a hybrid solution between tikz-cd and tikz.

At this point, one might also consider going for a full tikz solution, using a matrix of nodes and layers, which is useful if many arrows passing under many nodes will have to be defined:

\documentclass{article}
\usepackage{tikz-cd}
\usetikzlibrary{matrix}

\begin{document}

\pgfdeclarelayer{background}
\pgfsetlayers{background,main}

\begin{tikzpicture}
\matrix (X) [matrix of nodes,column sep=0.8cm,row sep=0.8cm,every node/.style={fill=white}]
{
    $X$ & $A$ \\
    & $C\times D \times F$ \\
    &   &\\
    &   &\\
    &   &\\
    &   & $B$ \\
};

\begin{pgfonlayer}{background}
   \draw[->] (X-1-1) -- (X-1-2) ;
   \draw[->] (X-6-3) to[in=-55, out=125] (X-1-2);
\end{pgfonlayer}
\end{tikzpicture}

\end{document}

fulltikz

An example with multiple arrows and nodes:

\begin{tikzpicture}
\matrix (X) [matrix of nodes,column sep=0.8cm,row sep=0.8cm,every node/.style={fill=white}]
{
    $X$ & $A$ \\
    & $C\times D \times F$ \\
    &  $K\times L \times M \times N$ &\\
    &  $G\times H \times I \times J$ &\\
    &   & \\
    &   & $B$ \\
};
\begin{pgfonlayer}{background}
\draw[->] (X-1-1) -- (X-1-2) ;
\draw[->] (X-6-3) to[in=-55, out=125] (X-1-2);
\draw[->] (X-6-3) to[in=-60, out=150] (X-2-2);
\draw[->] (X-2-2) to[in=120, out=-120] (X-4-2);
\end{pgfonlayer}
\end{tikzpicture}

multiple full tikz

Tags:

Tikz Cd