# How to use \leadsto in LaTeX2e?

I tried to draw an arrow with the command

\leadsto


But I get the following exception:

! LaTeX Error: Command \leadsto not provided in base LaTeX2e.


So how can I draw such an arrow?

I tried to import latexsym

But then I get this error:

! Missing $inserted. <inserted text>$
l.56 ...ecognition, gestures recognition. \leadsto
Multimodal input system & \\

?

-

\leadsto is a math sign and for this only available in math mode.

You must enclose it in dollar signs $...$ (or $$...$$ for inline math or use it in display math like $...$ or the {equation} environment

[…] gestures recognition. $\leadsto$ Multimodal input system & […]

-

The package amssymb provides \leadsto and many other symbols.

A good resource for finding symbols and the packages providing them is the "Comprehensive LaTeX Symbol List" that probably is already on your disk as part of the TeX distribution.

See also How to look up a math symbol

-
I tried this, but then I get the same error as when using latexsym –  RoflcoptrException Oct 3 '11 at 10:06
@Roflcoptr No, the error is different; look at Tobi's answer. –  egreg Oct 3 '11 at 10:14

If you find that you often use this in text mode, I would define a macro as below using the xspace package and always use Leadsto:

\documentclass{article}
\usepackage{amssymb}
\usepackage{xspace}

\begin{document}
Now you can use \Leadsto outside in text mode or $\Leadsto$ in math mode.
\end{document}


The xspace command decides whether to insert a space or not -- see the package documentation. If you don't want to load another package you can use it as \Leadsto{} for the case where you want to insert a trailing space. Alternatively, you could hard code in a space at the end of the definition as I can't think of a case where you'd not have have text following this character -- altough, I prefer the xspace solution.

-
Does xspace work well in math mode? That is, will this give the right spacing when used as $x \Leadsto y$? –  Aditya Oct 5 '11 at 16:39
Seems to for me. Did you try it and found that it did not? –  Peter Grill Oct 5 '11 at 16:43

You can load the amsmath and the amsfonts package.

-
Good advice, amsfonts provides that symbol. However, the answer doesn't solve the problem of the OP because he didn't use it in math mode even when he loaded latexsym which provides such a symbol. –  Stefan Kottwitz Nov 12 '11 at 10:58