Sign up ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I need a dotted or dashed arrow with text like \xrightarrow.

I am aware of the MnSymbol package, but \dashedrightarrow does not allow me to write text on the arrow. Is there a package to accomplish what I want to do?

share|improve this question

1 Answer 1

up vote 10 down vote accepted

The following example uses \dashrightarrow and \dashleftarrow from AMS fonts (package amsfonts):


\newcommand*{\da@rightarrow}{\mathchar"0\hexnumber@\symAMSa 4B }
\newcommand*{\da@leftarrow}{\mathchar"0\hexnumber@\symAMSa 4C }
  % #1: below
  % #2: above
  % #3: arrow left
  % #4: arrow right
  % #5: space left 
  % #6: space right
  % #7: math style 
  \dimen@=\wd0 %
  \ifdim\wd2 >\dimen@
    \dimen@=\wd2 %   
  \count@=2 %


\[ X \xrightarrow{} Y \xrightarrow[\text{below}]{\text{above}} Z \]

\[ X \xdashrightarrow{} Y \xdashrightarrow[\text{below}]{\text{above}} Z \]

\[ X \xleftarrow{} Y \xleftarrow[\text{below}]{\text{above}} Z \]

\[ X \xdashleftarrow{} Y \xdashleftarrow[\text{below}]{\text{above}} Z \]




  • \dashrightarrow and \dashleftarrow are internally composed of the dash \dabar@ and the arrow. This is used to extend the dashes as needed.
  • \mathpalette is needed for size adaptation according to the current math style.
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.