[Tex/LaTex] Extensible \rightrightharpoons and \leftleftharpoons

arrowsmathabxmathtools

How to achieve extensible double-harpoons in the style of the \xleftrightharpoons family of arrows from mathtools, but with both harpoons pointing in the same direction?

enter image description here

Preferably without Tikz.

Best Answer

Something like this? A quick and dirty method...

\documentclass[12pt]{article}
\usepackage{stackengine}
\usepackage{mathtools}


\newcommand{\xrightharpoonupdown}[2][-12pt]{%
\stackunder[#1]{$\xrightharpoonup{\text{#2}}$}{$\xrightharpoondown{\text{\phantom{#2}}}$}%
}%


\begin{document}


\xrightharpoonupdown{but with longer harpoons}%

\end{document}

enter image description here

Explanation:

Give the text to be harpooned as 2nd argument, in the first optional you can reduce the vertical spacing between the up and the down harpoon. If omitted, a default value of -10pt is used. This could be changed in command definition or when appropiate during usage of the command.