You can use \xRightarrow[below]{above}
from the mathtools
(or extpfeil
) package or \xLongrightarrow[below]{above}
from extarrows
. (Have a look at “How to look up a math symbol?” for ideas how you can easily find a particular symbol.)
If you want to keep the the same arrow length as implies, you can use \underset
and \overset
from amsmath
, e.g. \underset{below}{\implies}
, or maybe \underset{\mathclap{below}}{\implies}
(\mathclap
makes it so that “below” doesn’t introduce extra vertical space if it is longer than the arrow. It is included in the immensely useful mathtools
package).
I wrote some functions that allow to lower/raise the text under/above xrightarrow
arrows. It seams that the text typeset using these macros is a little wider but it doesn't look too bad ;)
The code required is:
\usepackage{ifthen}
\usepackage{xargs}
\newcommandx{\yaHelper}[2][1=\empty]{%
\ifthenelse{\equal{#1}{\empty}}%
{ \ensuremath{ \scriptstyle{ #2 } } } % no offset
{ \raisebox{ #1 }[0pt][0pt]{ \ensuremath{ \scriptstyle{ #2 } } } } % with offset
}
\newcommandx{\yrightarrow}[4][1=\empty, 2=\empty, 4=\empty, usedefault=@]{%
\ifthenelse{\equal{#2}{\empty}}
{ \xrightarrow{ \protect{ \yaHelper[ #4 ]{ #3 } } } } % there's no text below
{ \xrightarrow[ \protect{ \yaHelper[ #2 ]{ #1 } } ]{ \protect{ \yaHelper[ #4 ]{ #3 } } } } % there's text below
}
\newcommandx{\yleftarrow}[4][1=\empty, 2=\empty, 4=\empty, usedefault=@]{%
\ifthenelse{\equal{#2}{\empty}}
{ \xleftarrow{ \protect{ \yaHelper[ #4 ]{ #3 } } } } % there's no text below
{ \xleftarrow[ \protect{ \yaHelper[ #2 ]{ #1 } } ]{ \protect{ \yaHelper[ #4 ]{ #3 } } } } % there's text below
}
\newcommandx{\yRightarrow}[4][1=\empty, 2=\empty, 4=\empty, usedefault=@]{%
\ifthenelse{\equal{#2}{\empty}}
{ \xRightarrow{ \protect{ \yaHelper[ #4 ]{ #3 } } } } % there's no text below
{ \xRightarrow[ \protect{ \yaHelper[ #2 ]{ #1 } } ]{ \protect{ \yaHelper[ #4 ]{ #3 } } } } % there's text below
}
\newcommandx{\yLeftarrow}[4][1=\empty, 2=\empty, 4=\empty, usedefault=@]{%
\ifthenelse{\equal{#2}{\empty}}
{ \xLeftarrow{ \protect{ \yaHelper[ #4 ]{ #3 } } } } % there's no text below
{ \xLeftarrow[ \protect{ \yaHelper[ #2 ]{ #1 } } ]{ \protect{ \yaHelper[ #4 ]{ #3 } } } } % there's text below
}
Usage is: yrightarrow[<TEXT-BELOW>][<OFFSET-BELOW>]{<TEXT-ABOVE>}[<OFFSET-ABOVE>}
and similarly for the others.
A working minimal example looks like this:
\documentclass{minimal}
\usepackage{amsmath}
\usepackage{ifthen}
\usepackage{xargs}
\newcommandx{\yaHelper}[2][1=\empty]{%
\ifthenelse{\equal{#1}{\empty}}%
{ \ensuremath{ \scriptstyle{ #2 } } } % no offset
{ \raisebox{ #1 }[0pt][0pt]{ \ensuremath{ \scriptstyle{ #2 } } } } % with offset
}
\newcommandx{\yrightarrow}[4][1=\empty, 2=\empty, 4=\empty, usedefault=@]{%
\ifthenelse{\equal{#2}{\empty}}
{ \xrightarrow{ \protect{ \yaHelper[ #4 ]{ #3 } } } } % there's no text below
{ \xrightarrow[ \protect{ \yaHelper[ #2 ]{ #1 } } ]{ \protect{ \yaHelper[ #4 ]{ #3 } } } } % there's text below
}
\begin{document}
\begin{align*}
A \yrightarrow{\pi \, \text{s.d.r.}}[-2pt] B \, , \: C \yrightarrow[\pi \, \text{s.d.r.}][4pt]{\pi \, \text{s.d.r.}}[-2pt] D
\end{align*}
\end{document}
However, this seems to be a brute force approach and I don't know whether there may be any side-effects (also I'm not doing any math-size checks, the stuff above and below the arrow will be always set in scriptstyle
). And of course it is a "dumb" solution because one has to determine the offset manually. And finally there's no support for the feature suggested by the fifth image.
I'd advise you to accept this answer not (yet) because I hope that somebody can provide a better solution (hopefully including the feature suggested by the fifth image, which possibly could be achieved by printing first the content with a slightly larger font and white colour and then overprint the actual content in black).
Best Answer
The extensible arrow can be easily obtained by copying the definitions in
amsmath
. As for the form of the tip, the problem is to find an adequate font. Themathabx
package provides something more similar to theesvect
arrows, thought it's still no perfect match. Sincemathabx
replaces a lot of symbols, one may decide to import only one, see Importing a Single Symbol From a Different Font.