# Circular Segment Symbol

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
}
}

-
Since you say you are not satisfied, would you please include your code? Maybe others can just improve it, not having to start from the very beginning. –  tohecz Jan 11 at 8:36
Yes, thanks I didn't think of that :) –  AkiRoss Jan 11 at 8:36
Hi AkiRoss. Usually, we don't put a greeting or a "thank you" in our posts. While this might seem strange at first, it is not a sign of lack of politeness, but rather part of our trying to keep everything very concise. Upvoting is the preferred way here to say "thank you" to users who helped you. –  Claudio Fiandrino Jan 11 at 8:41

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

\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}

-
@cmhughes If there were signatures on this site, it would certainly go there. –  tohecz Jan 11 at 15:52

I think the problem in your definition is the specification of the bounding box. Without of it, it is possible to achieve something like:

that, I guess, is your purpose.

The code compares your solution and the new one also scaling the font:

\documentclass[a4paper,11pt]{article}
\usepackage{amsmath}
\usepackage{tikz}

\def\mathvertalign{-\the\dimexpr\fontdimen22\textfont2\relax}
% exact setting for the alignment; see:
% http://tex.stackexchange.com/questions/59658/use-of-tikzpicture-matrix-in-align-or-gather-environment/59660#comment126261_59660

% new definition without specifying directly the bounding box
\newcommand\circsegment{
\ensuremath{
\mathop{
\begin{tikzpicture}[line width=0.05ex, baseline=\mathvertalign]
\draw (0,-0.1ex) arc (60:120:4ex) -- (0,-0.1ex);
\end{tikzpicture}
}\nolimits
}
}

% old definition that provides a specific bounding box
\newcommand\oldcircsegment{
\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
}
}

\begin{document}
$x\overset{y}{\circsegment} \hspace{1cm} x\overset{y}{\oldcircsegment}$
\begin{Huge}
$x\overset{y}{\circsegment} \hspace{1cm} x\overset{y}{\oldcircsegment}$
\end{Huge}
\end{document}


The result:

-
Thanks, but I'd use it over a text, like \overset{\circlesegment}{ABC}. About this, do you know how to make it wide as the text below it? Like knowing in tikz code how wide the symbol will be. Anyway this helped :) Thanks –  AkiRoss Jan 11 at 9:19
@AkiRoss: unfortunately is not so simple set the symbol with the exact dimensions of the text in an automatic way. I've tried also with the shape semicircle and the key minimum width, but I'm not completely satisfied. –  Claudio Fiandrino Jan 11 at 10:29