I find the vertical spacing of amsmath's \xrightarrow too large for the underset. Is there an easy way to reduce it (i.e. put "below" close to the arrow, in the example)?


I looked at the arrow definition (ext@arrow, e.g. discussed in Understanding ext@arrows) and there, \limits^{}_{} is used.

PS. I am interested in a short and simple solution. I know how to built a new extensible arrow from scratch, but wanted to know if there is an easier solution.


2 Answers 2


Remedied the valid comment of mh256, creating macro \xxrightarrow[]{} that reduces the space of the underset, but allows for the length of the underset.

EDITED to make it \mathrel and also to use temp \box2 instead of \box0, which appears to be also used by \xrightarrow.

\parskip 3pt

\fbox{$\xxrightarrow[\fbox{below is a long text}]{\fbox{above}}$}

$ x \xxrightarrow[bottom]{top} y$

$x \xxrightarrow[a]{a} y$

$x \xrightarrow[a]{a} y$


enter image description here

  • This is't an extensible arrow. The text below does not influence the length of the arrow in any way.
    – mh256
    Commented Mar 7, 2015 at 19:05
  • @mh256 That is a good point. I will work to resolve that. Commented Mar 7, 2015 at 19:41
  • @mh256 See revision. Commented Mar 7, 2015 at 19:52
  • That's better. I don't understand why your solution has a minimum length of the arrow. ($x \xxrightarrow[a]{a} y$)
    – mh256
    Commented Mar 7, 2015 at 22:03
  • @mh256 Apparently \box0 is already being used by \xrightarrow, so I merely changed over to \box2 to take care of the $x \xxrightarrow[a]{a} y$ use case. Also, I made the relation a \mathrel to obtain proper surrounding spacing. Commented Mar 8, 2015 at 2:26

Here is my solution.


Advantage: Command with just one line

Disadvantage: Line height is not as small as it could be (see aaa example).

enter image description here

You must log in to answer this question.

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