tikz-arrows – Label Positioning on Bent Arrow in tikz-cd

tikz-arrowstikz-cd

In the following diagram, I would like to get the label G^F on the dashed arrow to be centered:

enter image description here

However, modifying pos doesn't seem to work as there seems to be a "jump" between pos=0.41 and pos=0.42.

enter image description here (pos=0.41) enter image description here (pos=0.42)

Is there some way to make the label centered? (Actually, I am curious why it is not centered by default or with pos=0.5)

Below is a MWE.

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

\begin{tikzcd}
    & A \\
    C & \widehat{C}
    \arrow["{F}", from=2-1, to=1-2]
    \arrow["{Y}"', from=2-1, to=2-2]
    \arrow["{N^F}"', "{\vdash}"{inner sep=.3ex}, from=1-2, to=2-2]
    \arrow["{G^F}"'{pos=.41}, dashed, bend right, from=2-2, to=1-2]
\end{tikzcd}

\end{document}

Best Answer

This is an issue with curved arrows when they are very short. Two suggestions:

  1. Increase sep so the nodes are farther apart.
  2. Reduce the bend angle. I used bend right=15 in the diagram. (Then you'll probably want to shift the arrow right also.)

enter image description here

Here is the code:

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

\begin{tikzcd}[sep=large]
    & A \\
    C & \widehat{C}
    \arrow["F", from=2-1, to=1-2]
    \arrow["Y"', from=2-1, to=2-2]
    \arrow["N^F"', "{\vdash}"{inner sep=.3ex}, from=1-2, to=2-2]
    \arrow["G^F"', dashed, bend right=15, shift right=1.5, from=2-2, to=1-2]
\end{tikzcd}

\end{document}