圆弧段符号

圆弧段符号

有没有表示圆弧的符号?

我的意思是,在三个字母上方放置一个半圆形,类似于\wideparen\frown但底部封闭。(与\overset或 类似的东西一起使用)。

我尝试使用这个技巧用 TikZ 制作一个小符号:

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

但我真的不太满意,有没有什么符号可以表示这一点呢?

这是我用 TikZ 制作的,但它没有很好地居中并且不能与其下方的文本一起缩放。

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

答案1

我会使用我流行的组合\ooalign\mathchoice更多详情请见此处):

在此处输入图片描述

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

答案2

我认为您的定义中的问题在于边界框的指定。如果没有它,可以实现如下效果:

在此处输入图片描述

我想,这就是你的目的。

该代码将您的解决方案与新的解决方案进行比较,并缩放字体:

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

结果:

在此处输入图片描述

答案3

我的半圆(\Rightcircle来自wasysym包裹)在一封信上方。

\documentclass[a4paper,12pt]{article}
\usepackage{amsmath}
\usepackage{wasysym}
\usepackage{graphicx}
\usepackage{stackengine}
\newcommand{\semicircle}{\scalebox{.8}[.35]{\rotatebox[origin=c]{90}{$\Rightcircle$}}}
\newcommand{\semicirc}[1]{\stackon[1pt]{$#1$}{\,\semicircle}}

\begin{document}
\[A\semicirc{H}B\]
\end{document}

在此处输入图片描述

相关内容