1

The following code

\begin{equation*}
\begin{tikzcd}
x \ar[loop,out=150,in=210,distance=20,swap,"g_1\circ f"] \ar[r,"f"] & y \ar[l,bend right=70,swap,"g_1"] \ar[l,bend left=70,"g_2"]
\ar[loop,out=30,in=-30,distance=20,"f\circ g_2"]
\end{tikzcd}
\end{equation*}

generate enter image description here

My problem is that g_2 (below the bent arrow from y to x) is not center in the same vertical along with g_1 and f. How could I fix this?

1 Answer 1

1

I tried specifying pos=0.5, midway, and even pos=0.499, but all to no avail. I'm not sure of the actual problem (perhaps the glyph height of g_2?), but pos=0.49 is one ugly fix:

(Also remember to make all MWEs compilable.)

\documentclass{standalone}
\usepackage{tikz-cd}
\usetikzlibrary{cd}

\begin{document}

\begin{tikzcd}
x \ar[loop,out=150,in=210,distance=20,swap,"g_1\circ f"] \ar[r,"f"] & y \ar[l,bend right=70,swap,"g_1"] \ar[l,bend left=70,pos=0.49,"g_2"]
\ar[loop,out=30,in=-30,distance=20,"f\circ g_2"]
\end{tikzcd}

\end{document}

enter image description here

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .