Circular arrow in commutative diagram using tikz

commutative-diagramstikz-cd

I am using tikz and the following code to make a commutative diagram.

 \documentclass{article}
 \usepackage{tikz-cd, mathtools} 
 \usetikzlibrary{calc}
 \usetikzlibrary{arrows}

 \begin{document}

 \begin{equation*}
 \begin{tikzcd}
 V^{1*} \arrow{r}{\Pi_1(T)} \arrow[dashed, swap]{dr}{g} & V^{2} \\
 & U \arrow[dashed, swap]{u}{h} 
 \end{tikzcd} \hspace{10mm} \text{dim}(U) = r
 \end{equation*}

 \end{document}

enter image description here

I am trying to place a circular arrow in the diagram to indicate that it is commutative. Any help would be greatly appreciated!

Best Answer

One way to do this is to name the arrow labeled g. Then a phantom arrow from the 1,2-entry to the name can be labeled with a circular arrow. A phantom arrow is used so only the label appears.

enter image description here

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

\begin{document}

\[
\begin{tikzcd}
    V^{1*} \arrow{r}{\Pi_1(T)} \arrow[dashed, swap, ""{name=G}]{dr}{g} & V^{2} \\
    & U \arrow[dashed, swap]{u}{h} \arrow[from=1-2, to=G, pos=.4, phantom, "\circlearrowleft"]
\end{tikzcd} \hspace{10mm} \dim(U) = r
\]

\end{document}

I positioned the circle arrow 40% along the phantom arrow, but you can adjust as you like.

The amssymb package is needed for \circlearrowleft. Also, \dim is already defined, so you don't need to use \text.

Related Question