4

I want to type the notation same as the below picture.

enter image description here

  • I take it \overarc won't do. The Comprehensive Symbol List had nothing better. You could create one with TikZ. – John Kormylo May 1 '18 at 3:14
4

Here is an overkill proposal, based on TikZ, which is somewhat inspired by this post.

enter image description here

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{arrows.meta}
\newcommand{\overarcarrow}[1]{\ifmmode%
\tikz [baseline = (N.base)] {
      \node [inner sep = 0pt] (N) {$#1$};
      \draw [line width = 0.4pt,-{Stealth[scale=0.6]}] 
         ([xshift=0.1ex,yshift=0.3ex]N.north west) to[out=15,in=165]
         ([yshift=0.3ex]N.north east);
   }
\else   
\tikz [baseline = (N.base)] {
      \node [inner sep = 0pt] (N) {#1};
      \draw [line width = 0.4pt,-{Stealth[scale=0.6]}] 
         ([xshift=0.1ex,yshift=0.3ex]N.north west) to[out=15,in=165]
         ([yshift=0.3ex]N.north east);
   }
\fi   
}

\begin{document}
$\overline{AB}$ $\overarcarrow{AB}$ \overarcarrow{AB}
\end{document}

ADDENDUM: A special version for @John Kormylo.

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{arrows.meta}
\newcommand{\overarcarrow}[1]{\ifmmode\mathchoice{%
\tikz [baseline = (N.base)] {
      \node [inner sep = 0pt] (N) {$\displaystyle#1$};
      \draw [line width = 0.4pt,-{Stealth[scale=0.6]}] 
         ([xshift=0.1ex,yshift=0.3ex]N.north west) to[out=15,in=165]
         ([yshift=0.3ex]N.north east);
   }
}{%
\tikz [baseline = (N.base)] {
      \node [inner sep = 0pt] (N) {$\textstyle#1$};
      \draw [line width = 0.4pt,-{Stealth[scale=0.6]}] 
         ([xshift=0.1ex,yshift=0.3ex]N.north west) to[out=15,in=165]
         ([yshift=0.3ex]N.north east);
   }
}{%
\tikz [baseline = (N.base)] {
      \node [inner sep = 0pt] (N) {$\scriptstyle#1$};
      \draw [line width = 0.3pt,-{Stealth[scale=0.6]}] 
         ([xshift=0.1ex,yshift=0.3ex]N.north west) to[out=15,in=165]
         ([yshift=0.3ex]N.north east);
   }
}{%
\tikz [baseline = (N.base)] {
      \node [inner sep = 0pt] (N) {$\scriptscriptstyle#1$};
      \draw [line width = 0.213pt,-{Stealth[scale=0.6]}] 
         ([xshift=0.1ex,yshift=0.3ex]N.north west) to[out=15,in=165]
         ([yshift=0.3ex]N.north east);
   }
}   
\else   
\tikz [baseline = (N.base)] {
      \node [inner sep = 0pt] (N) {#1};
      \draw [line width = 0.4pt,-{Stealth[scale=0.6]}] 
         ([xshift=0.1ex,yshift=0.3ex]N.north west) to[out=15,in=165]
         ([yshift=0.3ex]N.north east);
   }
\fi   
}

\begin{document}
$\overline{AB}$ $\overarcarrow{AB}$ \overarcarrow{AB}
$X_{\overarcarrow{AB}}$ $X_{Y_{\overarcarrow{AB}}}$
\end{document}

enter image description here

  • 1
    Reformulate it for all 4 math styles using \mathchoice and it will be perfect ;-) – John Kormylo May 1 '18 at 4:05
  • 1
    @JohnKormylo Thanks but I believe you're too optimistic, please see this answer. It is nontrivial to make the TikZ adopt the settings of the ambient world. – user121799 May 1 '18 at 4:10
  • I am impressed! Admit it, you feel better now. – John Kormylo May 1 '18 at 12:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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