TeX - LaTeX Asked by StiggyStardust on May 21, 2021
In physics, it’s sometimes useful to draw an arrow over a letter to represent the torch around that point. I’ve seen this in multiple textbooks and would like to know how to do it myself in LaTeX documents. Anyone who knows a solution for this?
Note that this isn’t just about putting a curverarrow above a letter, but surrounding the letter by the curved arrow like in the picture I attached below.
Thanks in advance for the help and have a good day 🙂
Something like this, with the nccircle
command from pst-node
?
documentclass[12pt]{article}
usepackage{pst-node}
begin{document}
psset{arrowinset=0.1}
$psDefBoxNodes{A}{A}nccircle[nodesep =5pt]{->}{A:bC}{0.6em}$%
end{document}
Answered by Bernard on May 21, 2021
You could use curvearrowleft
from AMS Symbols, e.g.:
documentclass{article}
usepackage{amssymb}
newcommand{curvearrow}[1]{ooalign{kern1pt ensuremath{#1}crhidewidthraise.8exhbox{$curvearrowleft$}hidewidth}}
begin{document}
$curvearrow{a}, curvearrow{b}, curvearrow{c}$
end{document}
Perhaps you have to tweak the distances, e.g. to cover capital letters.
Answered by Matthias on May 21, 2021
Not sure if this looks too appealing but maybe this goes in the right direction.
documentclass{article}
usepackage{mathtools}
usepackage{amssymb}
usepackage{scalerel}
newcommandOverCurveArrowRight[2][n]{%
setbox0hbox{scalerel*{curvearrowright}{overset{#1}{#2}}}copy0%
mathllap{mathmakebox[wd0]{#2hskip0.2wd0}}}
newcommandOverCurveArrowLeft[2][n]{%
setbox0hbox{scalerel*{curvearrowleft}{overset{#1}{#2}}}copy0%
mathllap{mathmakebox[wd0]{hskip0.2wd0#2}}}
begin{document}
abc $OverCurveArrowRight{A}$ $OverCurveArrowLeft{A}$
[OverCurveArrowRight{A}toOverCurveArrowLeft{A}]
[OverCurveArrowRight[int]{int}toOverCurveArrowLeft{A}]
end{document}
Answered by user237299 on May 21, 2021
Starting from the code of the answer of the user @egreg in this question How to write a character overlapping another character I have adapted this using the packages graphicx
, scalerel
to have a little big arrow and to rotate the symbol circlearrowleft
of 170 degrees (for example).
documentclass[a4paper,12pt]{article}
usepackage{newtxtext,newtxmath}
usepackage{graphicx,scalerel}
makeatletter
DeclareRobustCommand{as}[1]{
{vphantom{#1}mathpaletteerel@as{#1}}%
}
newcommand{cla}{rotatebox[origin=c]{170}{hstretch{1}{$scaleobj{1.5}{circlearrowleft}$}}}
newcommand{erel@as}[2]{%
ooalign{hfil$m@th#1cla$hfilcrhfil$m@th#1#2$hfilcr}%
}
makeatother
begin{document}
$as{A}$
end{document}
Answered by Sebastiano on May 21, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP