[Tex/LaTex] How to make an overset symbol at the same size and height as \bar except with a different symbol

amsmathmath-modestacking-symbolssymbols

Apologies for the cryptic title, but I was not sure how best to phrase the question in one sentence. I am essentially trying the create a vector symbol with \rightharpoonup as the top instead of the arrow.

The output to the following code will feature an overset harpoon over x, next to a simple \bar{x}. Observe that on the left, the top symbol is significantly higher and bigger than on the right one.

\documentclass{article}

\usepackage{amsmath,amsfonts,amsthm,amssymb}

\newcommand{\vect}[1]{\overset{\rightharpoonup}{#1}}

\begin{document}
$$
\vect{x} \quad \bar{x}
$$
\end{document}

I would like to create something that looks in every way like the right hand symbol, except using something that looks like \rightharpoonup at the top.

If this command sequence already exists in LaTeX, please use that as an answer, because I have searched for and failed to find it so far.

Best Answer

This is a clear case for \accentset from the accents package:

output

\documentclass{article}
\usepackage{accents}
\newcommand{\vect}[1]{\accentset{\rightharpoonup}{#1}}
\begin{document}
$\vect{x}$
\end{document}