When I use the arc symbol in LaTeX, I use this piece of code (adding to the preamble):
\usepackage{scalerel}
\usepackage{stackengine}
\stackMath
\newsavebox\tmpbox
\newcommand\reallywidefrown[1]{
\ThisStyle{
\sbox\tmpbox{$\SavedStyle#1$}
\stackon[0pt]{\usebox{\tmpbox}}{
\stretchto{
\scaleto{
\scalerel*[\wd\tmpbox]{\mkern-.8mu\frown\mkern-.8mu}
{\rule[-\textheight/2]{1ex}{\textheight}}
}{\textheight}
}{0.8ex}
}
}
}
(Source: Steven B. Segletes' answer)
It outputs a very good arc symbol:
\documentclass{article}
\usepackage{scalerel}
\usepackage{stackengine}
\stackMath
\newsavebox\tmpbox
\newcommand\reallywidefrown[1]{
\ThisStyle{
\sbox\tmpbox{$\SavedStyle#1$}
\stackon[0pt]{\usebox{\tmpbox}}{
\stretchto{
\scaleto{
\scalerel*[\wd\tmpbox]{\mkern-.8mu\frown\mkern-.8mu}
{\rule[-\textheight/2]{1ex}{\textheight}}
}{\textheight}
}{0.8ex}
}
}
}
\begin{document}
$\reallywidefrown{AB}$\qquad$\reallywidefrown{ABC}$
\end{document}
Now I am typing a document which is about trigonometry, and the trigonometric arc symbol should look like this
(I use Windows Paint. Sorry for bad quality, but I can't find a better way to illustrate the symbol)
I went to Detexify to get the command \curvearrowright
in the amssymb
package. However, it looks too short:
\documentclass{article}
\usepackage{amsmath}
\usepackage{amssymb}
\begin{document}
$\overset{\curvearrowright}{AB}$\qquad$\overset{\curvearrowright}{ABC}$
\end{document}
Is there any way to define a command like \reallywidecurvearrowright{}
(or shorter like \trigarc{}
😃) so that the length of the symbol suits the length of the letters below it, like what Segletes' \reallywidefrown{}
does?
Actually the task would be much easier to me if I understand what Segletes wrote, but unfortunately I understand nothing ☹️ So I will thank you very much if you show me a brief explaination of the \reallywidefrown{}
definition.
Any help will be highly appreciated!