2

I'm looking for a symbol for an arrow whose shaft "goes through a loop" in the middle. Ideally the arrow should be just like a normal arrow symbol with a straight shaft, but in the middle it "curls" into a loop that ends on the same height as it began. Then the shaft continues until it ends in the head. Is there a symbol at least somewhat like this (I checked the comprehensive symbol list and couldn't find one)? If not, I thought about making one by putting a horizontally inverted $\hookrightarrow$ symbol together with a straight $\hookrightarrow$, so that the hooks assemble into a loop, but I would have to cut out some of the length of the arrows so that the composite isn't way too long. Is there a way I can do that?

1
  • 1
    One could always do this with PGF/TikZ but a solution like Thruston's is most likely preferred since it uses available glyphs. Nov 29, 2022 at 10:29

2 Answers 2

3

Like this?

\documentclass[border=3mm]{standalone}
\newcommand{\rightlooparrow}{\mathbin{
    \vbox{\openup-10.25pt\halign{\hss$##$\hss\cr\circ\cr\longrightarrow\cr}}
}}
\begin{document}
$A \rightlooparrow B$
\end{document}

enter image description here

If you want it to work in different sizes (subscript etc) you would need to make a mathpalette version.

1
3

You can smash a bit the circle. The following also works in all math styles.

\documentclass{article}
\usepackage{amsmath}
\usepackage{graphicx}

\makeatletter
\newcommand{\smashed@circ}{\mathpalette\smashed@@circ\relax}
\newcommand{\smashed@@circ}[2]{%
  \scalebox{1}[0.5]{$\m@th#1\circ$}%
}

\newcommand{\loop@arrow}[3]{%
  \mathrel{\mathpalette\loop@@arrow{{#1}{#2}{#3}}}%
}
\newcommand{\loop@@arrow}[2]{\loop@@@arrow#1#2}
\newcommand{\loop@@@arrow}[4]{%
  \ooalign{%
    \loop@raise{#1}%
    \hidewidth\raisebox{\loop@raise@amount}{$\m@th#1#3\smashed@circ#4$}\hidewidth\cr
    $\m@th#1#2$\cr
  }%
}
\newcommand{\loop@raise}[1]{%
  \settowidth\dimen@{$\m@th#1\mspace{1mu}$}%
  \edef\loop@raise@amount{%
    \ifx#1\displaystyle\the\dimexpr4\dimen@\else
    \ifx#1\textstyle\the\dimexpr4\dimen@\else
    \ifx#1\scriptstyle\the\dimexpr3.5\dimen@\else
    \the\dimexpr3\dimen@\fi\fi\fi
  }%
}
\newcommand{\looprightarrow}{\loop@arrow{\rightarrow}{\!}{}}
\newcommand{\loopleftarrow}{\loop@arrow{\leftarrow}{}{\!}}
\newcommand{\looplongrightarrow}{\loop@arrow{\longrightarrow}{\!}{}}
\newcommand{\looplongleftarrow}{\loop@arrow{\longleftarrow}{}{\!}}
\makeatother

\begin{document}

$A\looprightarrow B$
$\scriptstyle A\looprightarrow B$
$\scriptscriptstyle A\looprightarrow B$

$A\looprightarrow B\loopleftarrow C$

$A\looplongrightarrow B\looplongleftarrow C$

\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.