There is the command \xrightarrow that inserts an arrow that extends with the text you put above and/or under it.
There is also the command \rightleftarrows (notice the "s" at the end) that display two arrows, one under the other, although they are not extensible and (if I'm not mistaken) require additionally the mathtools package. (The above is of course also valid for the "dual" leftarrows)

As far as I know, there isn't a command \xrightarrows that extends with the text above/under it and creates and arrow like \rightleftarrows (I googled it and couldn't find any straightforward solution). Maybe it is contained in some obscure package - but if the package isn't already in my distribution I would prefer not haveing to install it (because if I want to compile my document somewhere else, problems might crop up!).

Therefore: How can one program this \xrightarrows command in TikZ such that

  • the arrow tips look exactly like the LaTeX arrow tips (and if I change the LaTeX font the arrow tips from the TikZ drawing also change accordingly)
  • the arrows themselves look exactly like the ones \xrightarrows produces, when the parameters for the text under or above are empty (i.e. not text is present) or there is so little text that the arrows don't have to extend.
  • \rightleftarrows needs amssymb.
    – user11232
    Commented Apr 7, 2014 at 10:11

1 Answer 1


Here it is. This should start as the starting point.

\usepackage{mathtools,amssymb}     %% this is not needed. just for demo
\NewDocumentCommand{\xrightarrows}{ O{}O{} }{%
  \node[minimum width=1cm,minimum height=1ex,anchor=south,align=center] (a){\text{\vphantom{hg}#1}\\[0.5ex] \vphantom{hg}#2};
  \draw[<-] ([yshift=0.35ex]a.west) -- ([yshift=0.35ex]a.east);
  \draw[->] ([yshift=-0.35ex]a.west) -- ([yshift=-0.35ex]a.east);

  $\xrightarrow[under]{over} \rightleftarrows$

  Now the new arrows

  $A \xrightarrows B$  \quad $A \xrightarrows[some ght][some text again] B$ 

  $A \xrightarrows[some text here] B$  \quad $A \xrightarrows[][some text again] B$

enter image description here

  • This was really useful to me too ! Commented Jun 24, 2017 at 11:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .