I was working on a project and was trying to give Tikz-cd a shot but I was having trouble with adding a curved arrow beneath from one end to the other.

I have done something similar to this between two nodes before just using tikz, but since nodes aren't necessarily defined the same way when using tikz-cd I wasn't sure how I should go back and add the line. I included the regular tikz example to show how I had done it before and my new diagram exactly as it should appear except for another curved line from 0 to 0. Can anyone help explain how to do this in the new setting? Also, the new arrow does not need to be a \mapsto arrow, but ideally would be.


\lhead{Tikz vs. Tikz-cd}
I have done this using just Tikz in the past.
\[\begin{tikzpicture}[node distance=2cm]
    \node (Q1){$0$};
    \node[right of=Q1] (Q2){$L$};
    \node[right of=Q2] (Q3){$M$};
    \node[right of=Q3] (Q4){$N$};
    \node[right of=Q4] (Q5){$0$};
    \draw[->,thick] (Q1) -- (Q2);
    \draw[->,thick] (Q2) -- node[pos=.5,above]{$\psi$}(Q3);
    \draw[->,thick] (Q3) -- node[pos=.5,above]{$\varphi$}(Q4);
    \draw[->,thick] (Q4) --(Q5);
    \draw [bend left,->,dashed] (Q4) to node[pos=.5,below]{$\alpha$}(Q3);
    \draw [bend left,->,dashed] (Q3) to node[pos=.5,below left]{$\beta$}(Q2);

Now I am trying to switch to using Tikz-cd, and I would like to add a curved under arrow from the zero on one end to the other. I have been able to solve the rest of it but I am not very fluent with the tikz-cd syntax yet.

\[\begin{tikzcd}[node distance=2cm]
   0 \arrow[mapsto]{r}{\varphi^{(1)}_{1}}
& 24 \arrow[mapsto]{r}{\varphi^{(1)}_{1}}
& 17 \arrow[mapsto]{r}{\varphi^{(1)}_{1}}
& 18 \arrow[mapsto]{r}{\varphi^{(1)}_{1}}
& 0


Okay, I was able to add this line:

& 0 \arrow[mapsto, bend left]{l}

which got me the curved line, but only back one node instead of 4 if that helps.


tikz-cd basically a matrix of nodes or, in other words, a table. So if you write \arrow[mapsto, bend left]{l} it goes left (l) only one node, because you're indicating only one cell.

Replace it with \arrow[mapsto, bend left]{llll}.

enter image description here

  • Excellent, that makes sense. I remember reading something in the docs about it having some kind of node matrix but that aspect hadn’t' leapt out at me. – Tristen Mar 25 '16 at 19:56

This can be another approach with tikz-cd. enter image description here



0 \arrow[r, "\varphi^{(1)}_{1}", maps to] & 24 \arrow[r, "\varphi^{(1)}_{1}", maps to] & 17 \arrow[r, "\varphi^{(1)}_{1}", maps to] & 18 \arrow[r, "\varphi^{(1)}_{1}", maps to] & 0 \arrow[llll, maps to, bend left]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.