[Tex/LaTex] ‘Nudging’ overset characters downwards

accentsamsmathsymbols

I am trying to make a vector-like symbol to use in a paper I'm writing. I am actually able to make almost exactly what I want in Mathematica, in which it looks like this:

enter image description here

In TeX I am using $\overset{\rightharpoonup}{\Gamma_{\! G}}$, which yields:

enter image description here

The harpoon on top is set too high.

Also, the high harpoon makes problems with line spacing, which should be evident from the following image:

enter image description here

How do I "nudge" the \rightharpoonup down so it isn't set so high above the \Gamma?

Best Answer

\documentclass{minimal}
\usepackage{amsmath}
\usepackage{lipsum}
\usepackage{tikz}

% Adjust the -0.75ex to taste
\newcommand{\tightoverset}[2]{%
  \mathop{#2}\limits^{\vbox to -.5ex{\kern-0.75ex\hbox{$#1$}\vss}}}

% Just for fun, a tikz solution
\newcommand{\tikzoverset}[2]{%
  \tikz[baseline=(X.base),inner sep=0pt,outer sep=0pt]{%
    \node[inner sep=0pt,outer sep=0pt] (X) {$#2$}; 
    \node[yshift=1pt] at (X.north) {$#1$};
}}

\begin{document}
\lipsum[1]
$\overset{\rightharpoonup}{\Gamma_{\!G}}$
$\tightoverset{\rightharpoonup}{\Gamma_{\!G}}$
$\tikzoverset{\rightharpoonup}{\Gamma_{\!G}}$
\lipsum[2]

\end{document}

(This will also give you a larger harpoon, which is closer to your Mathematica example.)

enter image description here