# \xRightarrow (text)

I know it's possible to have \xrightarrow (text), but if I try to do \xRightarrow (text) I get an error each time. Does anybody know if it's a syntax error or if there is a other way to produce the \Rightarrow with text above?

-

## 2 Answers

Just taking the definition of \xrightarrow and replacing r by R :

\documentclass{article}
\usepackage{amsmath}

\makeatletter
\newcommand{\xRightarrow}[2][]{\ext@arrow 0359\Rightarrowfill@{#1}{#2}}
\makeatother

\begin{document}

$\xrightarrow{hello}$

$\xRightarrow{hello}$

\end{document}

-
oh, please at least make that \mathit{hello} to get rid of the obnoxious math kerning. – barbara beeton Dec 1 '12 at 19:19
As I posted I felt your pain but I had to dash:-) – David Carlisle Dec 1 '12 at 20:52
\documentclass{article}
\usepackage{mathtools}
\begin{document}

$\xrightarrow{\text{hello}}$
$\xRightarrow{\text{hello}}$

\end{document}


-
Why the difference in arrow lengths? The head of the double arrow is under "o" of hello, while "hello" is entirely above the shaft of the single arrow. – Joshua Taylor Sep 1 '14 at 14:59