[Tex/LaTex] Circular Segment Symbol

math-modesymbols

is there a symbol for denoting a circular segment?

I mean, a semi-circle to place over three letters, something like \wideparen or \frown but closed on the bottom. (To use with \overset or something similar).

I tried making a little symbol with TikZ using this trick:

http://friggeri.net/blog/custom-symbols-in-latex-using-tikz/

but I'm not really satisfied, so is there a symbol for that?

Here's what I made with TikZ, but it's not well centered and doesn't scale with the text under it.

\newcommand\circsegment{
 \ensuremath{
  \mathop{
   \begin{tikzpicture}[line width=0.05ex]
    \useasboundingbox (-4ex, -0.5ex) rectangle (1ex, 2ex);
    \draw (0,-0.1ex) arc (60:120:4ex) -- (0,-0.1ex);
   \end{tikzpicture}
  }\nolimits
 }
}

Best Answer

I would use my popular combination of \ooalign and \mathchoice (see here for more):

enter image description here

\documentclass{article}

\makeatletter
\newcommand\x@closefrown[3]{\mathrel{\ooalign{$#1\frown$\cr\kern-#3em\raisebox{-#2ex}{$#1-$}\hfil\cr\hfil\raisebox{-#2ex}{$#1-$}\kern-#3em\cr}}}
\newcommand\closefrown{\mathchoice
  {\x@closefrown{\displaystyle}{0.23}{0.02}}%
  {\x@closefrown{\textstyle}{0.23}{0.02}}%
  {\x@closefrown{\scriptstyle}{0.17}{0.01}}%
  {\x@closefrown{\scriptscriptstyle}{0.12}{0.01}}%
}
\newcommand\x@overcf[2]{\overset{\vphantom{x}\smash{\raisebox{-0.3ex}{$#1\closefrown$}}}{#2}}
\newcommand\overcf[1]{\mathpalette\x@overcf{#1}}
\makeatother

\usepackage{mathtools}

\begin{document}

\[ {A\closefrown B}_{{A\closefrown B}_{{A\closefrown B}}} \]

\[ X\overcf{ABC}Y \]

In a text it looks as follows.
In a text it looks as follows.
In a text it looks as follows.
In a text it looks as follows.
In a text it looks as follows.
\( X\overcf{ABC}Y \)
In a text it looks as follows.
In a text it looks as follows.
In a text it looks as follows.
In a text it looks as follows.
In a text it looks as follows.
In a text it looks as follows.

\end{document}