[Tex/LaTex] \Rightarrow with text above it

arrowsformattingstacking-symbols

When using the command \Rightarrow is there any way to put text above it? I have tried \overbrace but is there a way to do it without this?

Best Answer

The optional argument is for under:

\documentclass{article}
\usepackage{mathtools}
\begin{document}

$\xrightarrow[\text{world}]{\text{hello}}$
$\xRightarrow[\text{world}]{\text{hello}}$

\bigskip    
$\xrightarrow[g(x)]{f(x)}$
$\xRightarrow[g(x)]{f(x)}$  
\end{document}

enter image description here

Related Question