2

I'd like to know how to make two arrows: one above another where the lower arrow is the dashed one.

I came up with a code like this:

$$
    f_n \overset{\rightarrow}\dashrightarrow f
$$

which evaluates to:

enter image description here

And I would like it to look like this:

enter image description here

There is a thread where it was discussed how to print arrows like these above a letter (linked), but the solution was quite long.

I believe there must be an easier way to do it.

Notes:

Mateusz Piotrowski
  • 357
  • 1
  • 5
  • 16

2 Answers2

2

You could accomplish this with tikz:

\documentclass{article}
\usepackage{tikz}

\begin{document}
\[ f_n\; \tikz{\draw[dashed, ->] (0,0) -- ++(0.35cm, 0);\draw[->] (0,0.125cm) -- ++(0.35cm,0);}\; f \]

\end{document}

Or make it a macro:

\documentclass{article}
\usepackage{tikz}

\newcommand{\stackedarrow}{\ensuremath{\;}\tikz{\draw[dashed, ->] (0,0) -- ++(0.35cm, 0);\draw[->] (0,0.125cm) -- ++(0.35cm,0);}\ensuremath{\;}}

\begin{document}
\[ f_n \stackedarrow f \]

\end{document}

Either way will look identical, like this: stackedarrow

I know this doesn't satisfy the "easier way to do it", but it works!

Paul Stiverson
  • 925
  • 4
  • 11
2

For MathJax, the following might be useful, \substack puts the symbols over each other, \textstyle enlarges the font, \mathrel fixes the horizontal spacing:

f_n\mathrel{\substack{\textstyle\rightarrow\\\textstyle\dashrightarrow}} f

Result image from MathJax Live Demo:

Result MathJax

But it would look quite ugly in LaTeX:

Result LaTeX

  • \longrightarrow would be better, but the then the arrow would be a little bit too large.

  • The arrow heads are quite different. And they are different from \rightrightarrows.

  • Depending on the other arrows in your document, it might be wise to redraw all arrows in TikZ or other drawing package to get a consistent appearance of the arrows.

Heiko Oberdiek
  • 271,626