What is the latex command for a right arrow with a circle in the middle? I have tried detexify and the comprehensive latex symbols list but did not find.
4 Answers
A simple TikZ version:
The \arrowcircle
allows for some TikZ
options to be specified as optional argument.
\documentclass{article}
\usepackage{tikz}
\newcommand{\arrowcircle}[1][]{%
\begin{tikzpicture}[#1]
\draw[->] (0,0ex) -- (2em,0ex);
\draw (1em,0ex) circle (0.7ex);
\end{tikzpicture}%
}
\begin{document}
Some dummy text \arrowcircle[blue,line width=0.8pt] continues here!
\end{document}
As symbols-a4.pdf says (table 160, stix arrows), it's \circleonrightarrow \circleonleftarrow
It looks like this:
You can also use boisik package and \rightarrowcircle
, which looks like this
With traditional methods:
\documentclass{article}
\makeatletter
\newcommand{\circlearrow}{}% just in case
\DeclareRobustCommand{\circlearrow}{%
\mathrel{\vphantom{\rightarrow}\mathpalette\circle@arrow\relax}%
}
\newcommand{\circle@arrow}[2]{%
\m@th
\ooalign{%
\hidewidth$#1\circ\mkern1mu$\hidewidth\cr
$#1\longrightarrow$\cr}%
}
\makeatother
\begin{document}
\[
A\circlearrow B_{x\circlearrow y}
\]
\end{document}
The kern is to correct the optical effect that makes the circle not to appear centered.
Try this:
\documentclass{article}
\makeatletter
\def\rightarrowfill{\m@th\mathrel-\mkern-6mu\cleaders\hbox{$\mkern-2mu\mathord-\mkern-2mu$}\hfill\mkern-6mu\mathrel\rightarrow}%
\def\circledrightarrow{\put(14,2.5){\circle{10}}{\ooalign{\hb@xt@30\p@{$\rightarrowfill$}}}}%
\makeatother
\begin{document}
$\circledrightarrow$ \circledrightarrow
\end{document}
Output: