# Represent schematically using the tikz package a "commutative" diagram where two of the "arrows" are circular loops

Consider the diagram

\begin{document}

$\begin{tikzcd}[row sep=-.1em, column sep=4.3em] \underset{\scalebox{3}{\ensuremath{\cir}}}{\mathscr{D}_{n,k}[t]} \arrow[rr, above, "\sim", "t\mapsto s-m"'] & & \underset{\scalebox{3}{\ensuremath{\cir}}}{\mathscr{D}_{n,k}[s]}\\ M_{f^t}\arrow[rr, above, "\sim", "{g(t,x)\cdot f^t \mapsto g(s-m,x)\cdot f^{s-m}}"'] & & M_{f^s} \end{tikzcd}$

\end{document}


• Thank you. I will see how this looks.
– Mark
Aug 7 '20 at 20:41
• (After your final edit): Very nice. Thank you so much for your effort and attempt to help me.
– Mark
Aug 7 '20 at 21:30
• @Mark Here we are a very strong and compact group; and it is a pleasure to help others. Aug 7 '20 at 21:38

# Update 1: new loop my loop

as requested by Anush (I hope this will be convenient). The style of the loops is defined with:

\tikzset{my loop/.style={to path={.. controls +(130:2) and +(50:2) .. (\tikztotarget)}}}


\documentclass[border=5mm]{standalone}
\usepackage{amsmath,amssymb,amsfonts}
\usepackage{tikz-cd}
\usepackage{mathrsfs}

\tikzset{my loop/.style={to path={.. controls +(130:2) and +(50:2) .. (\tikztotarget)}}}

\begin{document}

\begin{tikzcd}[row sep=large, column sep=large,]
{\mathscr{D}_{n,k}[t]} \arrow[rr,"\sim", "t\mapsto s-m"'] && {\mathscr{D}_{n,k}[s]}  \\
|[alias=Z]|M_{f^t} \arrow[rr, "\sim","{g(t,x)\cdot f^t \mapsto g(s-m,x)\cdot f^{s-m}}"'] && M_{f^s}
\arrow[my loop, from=2-1, to=2-1
]
\arrow[my loop, from=2-3, to=2-3]
\end{tikzcd}

\end{document}


A solution that uses TikZ's native loops. The style of the loops is defined with: :

\tikzset{every loop/.style ={out=120,in=60,looseness=6,min distance=7mm}}


\documentclass[border=5mm]{standalone}
\usepackage{amsmath,amssymb,amsfonts}
\usepackage{tikz-cd}
\usepackage{mathrsfs}

\tikzset{every loop/.style ={out=120,in=60,looseness=6,min distance=7mm}}

\begin{document}
%$\begin{tikzcd}[row sep=large, column sep=large,] {\mathscr{D}_{n,k}[t]} \arrow[rr,"\sim", "t\mapsto s-m"'] && {\mathscr{D}_{n,k}[s]} \\ M_{f^t} \arrow[rr, "\sim","{g(t,x)\cdot f^t \mapsto g(s-m,x)\cdot f^{s-m}}"'] && M_{f^s} \arrow[loop, from=2-1, to=2-1] \arrow[loop, from=2-3, to=2-3] \end{tikzcd} %$
\end{document}

• I wanted to thank you for answering. That looks really good and would work very well.
– Mark
Aug 7 '20 at 20:59
• You have the best looking loops! The vertical space above the loops looks too much though. I think it should be symmetric above and below the loops. Aug 8 '20 at 7:38
• @Anush Thanks for the compliment. But I didn't quite understand what you mean by "The vertical space above the loops looks too much though. I think it should be symmetric above and below the loops" Aug 8 '20 at 8:38
• @Anush Do you mean that the loop must be at equal distance from the two lines (upper and lower)? Aug 8 '20 at 8:49
• Yes exactly that. Aug 8 '20 at 9:27
\documentclass[a4paper,12pt]{report}
\usepackage{amsmath,amssymb,amsfonts}
\usepackage{tikz-cd}
\usepackage{mathrsfs}

\begin{document}
$\begin{tikzcd}[row sep=large, column sep=large] {\mathscr{D}_{n,k}[t]} \arrow[rr,"\sim", "t\mapsto s-m"'] && {\mathscr{D}_{n,k}[s]}\\ \circleArrow && \circleArrow \\ M_{f^t} \arrow[rr, "\sim","{g(t,x)\cdot f^t \mapsto g(s-m,x)\cdot f^{s-m}}"'] && M_{f^s} \end{tikzcd}$

• This is actually very nice as it shows how the circular arrow can be drawn with tikz instead of relying on \circlearrowleft. I wonder if the vertical space can be reduced. Aug 8 '20 at 18:23
• @corwin.amber You can use the key row sep=tiny. Aug 9 '20 at 10:56