Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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
 }
}
share|improve this question
1  
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 '13 at 8:36
1  
Yes, thanks I didn't think of that :) –  AkiRoss Jan 11 '13 at 8:36
1  
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 '13 at 8:41
add comment

2 Answers

up vote 4 down vote accepted

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}
share|improve this answer
    
@cmhughes If there were signatures on this site, it would certainly go there. –  tohecz Jan 11 '13 at 15:52
add comment

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

enter image description here

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:

enter image description here

share|improve this answer
    
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 '13 at 9:19
1  
@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 '13 at 10:29
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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