Some vectorlike overset

Is there some method to write the following ?

I have searched a lot but couldnt find anything.

2 Answers

Using MnSymbol, you can access it using \overlinesegment{abc}, as you can see

Here is the list of symbols: from CTAN.

• Thanks. I get the following error "! LaTeX Error: File MnSymbol.sty' not found.". A first glance on google results gives me the impression that many other people get the same error. Is there some easy way to fix this ? – Epsilon Oct 24 '13 at 15:52
• You have to install that package ctan.org/pkg/mnsymbol – Sigur Oct 24 '13 at 15:53
• The usual caveat applies: MnSymbol changes all the math symbols. – egreg Oct 24 '13 at 15:57

These are made from scratch, so there is no worry of changing other math symbols. The rule thickness is governed by length \thk, while the vertical height of the end bars is dictated by \rlht. The macro \overlinesegment, in addition to its mandatory argument takes an optional argument to define the stacking gap. That stacking gap can be defined as relative to the top of the characters (\def\stacktype{S}) or relative to the baseline (\def\stacktype{L}). The default stacking gap can be defined using the methods intrinsic to the stackengine package.

\documentclass{article}
\usepackage{stackengine}[2013-10-15]
\usepackage{calc}
\newlength\thk
\newlength\rlht
\setlength\thk{1pt}
\setlength\rlht{1ex}
\def\vrl{\rule[-.5\rlht+.5\thk]{\thk}{\rlht}}
\newcommand\overlinesegment[2][\stackgap]{%
\stackon[#1]{#2}{\vrl\rule{\widthof{#2}}{\thk}\vrl}
}
\parskip 1ex
\begin{document}
Vary overheight with optional argument:
\overlinesegment{abc} \overlinesegment[1pt]{abc}

placed relative to top of text
\overlinesegment{PdQ} \overlinesegment{anw}

placed relative to baseline\def\stacktype{L}
\overlinesegment{PdQ} \overlinesegment{anw}
\end{document}


• Thanks. How can I install this package (stackengine) ? I downloaded it from CTAN but dont know where to copy the files. – Epsilon Oct 25 '13 at 7:28
• @A.S. Initially, you can just place the .sty file in your current directory. Where it resides permanently depends on your TeX installation. For MikTex,for example, the default package directory is C:\Users\[your name]\AppData\Roaming\MiKTeX\2.9\tex\latex`. Once placed in the proper location, you typically have to update your package database to complete the installation. – Steven B. Segletes Oct 25 '13 at 10:40