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


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.

\usepackage{amsmath, amssymb}


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





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

Related Question