2

is it possible to write a text above and below the \rightsquigarrow? I am trying \xrightsquigarrow[\text{b}]{\text{a}}, but it is not working.

1 Answers1

3

You can define a new command to achieve it using:

\documentclass{article}
\usepackage{amssymb}
\usepackage{stackengine}
%https://tex.stackexchange.com/questions/123219/writing-above-and-below-a-symbol-simultaneously
\newcommand\stackrqarrow[2]{%
    \mathrel{\stackunder[2pt]{\stackon[4pt]{$\rightsquigarrow$}{$\scriptscriptstyle#1$}}{%
            $\scriptscriptstyle#2$}}}
\begin{document}
$   x \stackrqarrow{a}{b} y$
\end{document}

to get:

enter image description here