[Tex/LaTex] Left/right harpoon arrow with text

arrows

I'd like a left/right harpoon arrow with text above the arrow.

This is the best I have so far, but I'd like the size of the arrow to be dynamic according to the text size.

\documentclass[12pt]{article} 
\usepackage{amsmath, amssymb}
\usepackage{stackrel}
\newcommand{\lrhup}[2]{\ooalign{$#1\leftharpoonup$\cr$#1\rightharpoondown$\cr}}
\newcommand{\hpn}{\mathrel{\mathpalette\lrhup\relax}}
\begin{document}
$\stackrel{ABC}{\hpn}$
\end{document}

Figure

EDIT: I'm also interested in creating this double sided harpoon, but with fixed width, so "ABC" and "A" above the arrow would produce the same arrow, like the above example, but still somewhat wider.

Best Answer

Here is an overlay from mathtools's extensible harpoons:

enter image description here

\documentclass{article}

\usepackage{mathtools}

\newcommand{\xlrharpoonud}[1]{
  \mathrlap{\xleftharpoonup{\phantom{#1}}}%
  \xrightharpoondown{#1}
}
\newcommand{\xlrharpoondu}[1]{
  \mathrlap{\xleftharpoondown{\phantom{#1}}}%
  \xrightharpoonup{#1}
}

\begin{document}

$\xlrharpoonud{abc}\ \xlrharpoondu{abc}\ 
 \xlrharpoonud{\text{something}}\ \xlrharpoondu{\text{something else}}$

\end{document}
Related Question