I would like a double-headed extensible right-arrow similar to \xrightarrow from amsmath.

I tried using \xtwoheadrightarrow from extpfeil, but the result differs from \xrightarrow in three respects:

  • the arrow head has a different style
  • the arrow itself is longer than I would like it
  • the text above the arrow is too high

enter image description here

What's the most straightforward way of achieving a two-headed version of \xrightarrow?


  & \xrightarrow{ABCD} \\
  & \xtwoheadrightarrow{ABCD}

2 Answers 2


I'd typeset \xrightarrow, back up a little and add \rightarrow:




$A \rightarrowdbl B$

$A \xrightarrow[\beta]{\alpha} B$

$A \xrightarrowdbl[\beta]{\alpha} B$

$A \xrightarrowdbl{\text{overlong text}} B$

enter image description here

  • out of curiosity: Why is it important to treat the \mkern-14mu as a math relation? Mar 1, 2023 at 9:04
  • 1
    @PeterGuthmann TeX doesn't add space between relations. Well, maybe this is not so relevant here, but that's what's always done (see \longrightarrow and similar constructions with \joinrel).
    – egreg
    Mar 1, 2023 at 9:11

Same principle as in egreg's answer, only using the low level command \ooalign to place the arrows.




  A \rightarrow B    &&\qquad A \xrightarrow[C]{D} B    &&\qquad A \xrightarrow{\text{long text}} B    & \\
  A \dhrightarrow B  &&\qquad A \dhxrightarrow[C]{D} B  &&\qquad A \dhxrightarrow{\text{long text}} B  &

enter image description here

  • I think I fractionally prefer this answer, as the text seems to be centered with respect the arrow as a whole. Thanks.
    – Roly
    Aug 9, 2015 at 20:09
  • Apologies, I've changed my mind (again) and after some experimentation prefer the positioning of the text in @egreg's answer.
    – Roly
    Aug 9, 2015 at 20:27
  • @Roly Thanks for pointing out the issue with text placement. I've implemented a fix, so that the text is placed correctly above and below the arrow, as well as corrected the spacing before and after the arrows.
    – sodd
    Aug 9, 2015 at 20:42
  • Actually it wasn't obvious to me that there was a problem (I preferred yours originally) but after some experimentation I realised it makes more sense for the text to be centred along the arrow shaft. Thanks. Both answers are good.
    – Roly
    Aug 9, 2015 at 20:44

You must log in to answer this question.

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