# Write on an Arrow math symbols

somebody know how to put math symbols on an arrow of given length ?

I know that I can put symbols on arrow using the command:

\xlongrightarrow{\makebox[2cm]{ 123 }}.


The problem is that I can not put math symbols at the place of '123'.

Thank you very much.

• Use \xrightarrow{abc}; there's no reason for making overlong arrows. – egreg Jan 12 '17 at 17:00

\makekebox turn its content into text mode, so

$\xlongrightarrow{\makebox[2cm]{$\alpha$}}$


will do what you like to obtain:

Complete MWE:

\documentclass[margin=3mm]{standalone}
\usepackage{extarrows}

\begin{document}
$\xlongrightarrow{\makebox[2cm]{$\alpha$}}$
\end{document}


\documentclass[12pt]{article}
\usepackage{amsmath}
\begin{document}
\Huge
$\xrightarrow[\text{bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb}]{\text{ccccccccccccccccccccccccccc}}$
\end{document}


or

\documentclass[12pt]{article}
\usepackage{amsmath}

\begin{document}
\Huge
$\xrightarrow{\text{ooooooooooooooooooooo}}$
\end{document}


or

\documentclass[12pt]{article}
\usepackage{amsmath}
\usepackage[english]{babel}
\begin{document}
\Huge
$\xrightarrow[\text{$\alpha$$\alpha$$\alpha$$\alpha$$\alpha$}]{\text{$\alpha$$\alpha$$\alpha\alpha$}}$
\end{document}

• If I understood the question correctly, the OP wants a long arrow but with math mode symbols over it, rather than text mode. – Nathaniel Jan 12 '17 at 22:55

i only know how to do that with tikz package:

\newcommand{\tikzmark}[2]{%
\tikz[remember picture,baseline=(#1.base)]
\node[text=black,anchor=center,inner sep=1pt] (#1) {#2};}
\begin{align*}
\tikzmark{a}{a}+\tikzmark{b}{b} & =\tikzmark{c}{c} \\[1em]
\tikzmark{sums}{Sumanden} & =\tikzmark{sum}{Summe}
\phantom{\hspace{8cm}} %%<---versatz von rechts (!)
\end{align*}
\tikz[overlay,remember picture]{\draw[blue,thick,->] (sums.north) to [bend left=0] node[anchor=south]{$\pi$}(a.south);}
\tikz[overlay,remember picture]{\draw[blue,thick,->] (sums.north) to [bend left=0] node[anchor=south]{a}(b.south);}
\tikz[overlay,remember picture]{\draw[blue,thick,->] (sum.north) to [bend left=0] node[anchor=south]{$=$}(c.south);}