How can I typeset this equation:
-
1You should provide an example of what you have tried... nevertheless, I have a similar thing, so I'll answer. – Rmano Jul 30 '15 at 11:01
Since this seems to be a commutative diagram, you should use a dedicated tools for those kind of diagrams such as tikz-cd
. Since the package already offers you the required elements, the code now is a one-liner:
\documentclass{standalone}
\usepackage{tikz-cd}
\begin{document}
\begin{tikzcd}[column sep=small]
S\ar[r] & K\ar[r]\ar[loop,"D",swap,looseness=4] & S
\end{tikzcd}
\end{document}
\documentclass{article}
\usepackage{stackengine,amssymb,graphicx}
\newcommand\blivet[2]{\stackengine{-.3ex}{#1}{\stackon[1pt]{\CAL}{#2}}{O}{c}{F}{T}{L}}
\newcommand\CAL{\scalebox{2}{\rotatebox[origin=center]{170}{$\circlearrowleft$}}}
\stackMath
\begin{document}
\begin{equation}
S\rightarrow \blivet{K}{D}\rightarrow S
\end{equation}
\end{document}
Note: EDITED to tweak the parameters a little.
Here is a version with a slightly smaller loop, whose line thickness is better matched to the line thickness of \rightarrow
.
\documentclass{article}
\usepackage{stackengine,amssymb,graphicx}
\newcommand\blivet[2]{\stackengine{-.1ex}{#1}{\stackon[.5pt]{\CAL}{#2}}{O}{c}{F}{T}{L}}
\newcommand\CAL{\scalebox{1.7}{\rotatebox[origin=center]{170}{$\circlearrowleft$}}}
\stackMath
\begin{document}
\begin{equation}
S\rightarrow \blivet{K}{D}\rightarrow S
\end{equation}
\end{document}
-
1Thanks, I prefer this one as it looks more like the other equations. – Yan King Yin Jul 30 '15 at 11:29
It's a tikz
graphic, but:
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{positioning}
\begin{document}
\begin{tikzpicture}
\node (A) {A};
\node (B) [right= of A] {B};
\node (C) [right= of B] {C};
\draw [->] (A) -- (B);
\draw [->] (B) -- (C);
\draw [->] (B) edge [loop, out=45, in=135, looseness=5] node [above] {D} (B);
\end{tikzpicture}
\end{document}