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.
Asked
Active
Viewed 1,156 times
2
Poliane Lima
- 21
1 Answers
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:
Raaja_is_at_topanswers.xyz
- 648
- 4
- 20
- 53
-
thanks. it works. however the lenght of the arrow does not grows according to the lenght of the text above/below, differently of the case of
\xrightarrow{\text{a}}{\text{a}}. – Poliane Lima Feb 14 '19 at 13:09 -
@PolianeLima That is a completely different question instead. – Raaja_is_at_topanswers.xyz Feb 14 '19 at 13:11
-
-
@PolianeLima If you can post it as a new question, I or someone else can try to answer it. If you prefer
TikZway of doing it, then it is definitely possible ;) – Raaja_is_at_topanswers.xyz Feb 14 '19 at 13:26 -
Yes - it has already been answered in TikZ - see https://tex.stackexchange.com/questions/60216/how-to-create-a-squiggle-arrow-with-some-text-on-it-in-tikz – James Mar 04 '21 at 11:33

\overset{}there. I suppose you suggest$\underset{b}{\overset{a}{\rightsquigarrow}}$. – Sigur Feb 14 '19 at 13:02