I'm currently using \longrightarrow to mean "tends to [some limit]", and sometimes I need to use its negation. I see that there is an \nrightarrow, but unfortunately it doesn't make a matching pair with \longrightarrow, and \not\longrightarrow looks quite bad. What's the easiest way to adjust the position of the little slash so that I can define a \nlongrightarrow? The solution from this related question looks excellent but seems to be overkill for my purposes.
Asked
Active
Viewed 9,375 times
11
2 Answers
18
Generally, you can often achieve better results by using the \centernot macro from the centernot package instead of the normal \not command.
In this case, however, the stmaryrd package offers the special \longarrownot/\Longarrownot macros you can use for this purpose:
\documentclass{article}
\usepackage{amsmath,amssymb}
\usepackage{centernot}
\usepackage{stmaryrd}
\begin{document}
$\centernot\longrightarrow$ % with centernot
$\longarrownot\longrightarrow$ % with stmaryrd
\end{document}
Result:
centernot:
, stmaryrd: 
Andrew Swann
- 95,762
diabonas
- 25,784
3
If you need the symbol only in text size, you can say
\usepackage{stmaryrd}
\newcommand\nlongrightarrow{
\mathrel{\ooalign{$\longrightarrow$\cr
\hskip 0pt plus .5fill $\arrownot$\hskip 0pt plus 2fill\cr}}
}
The skip values were found by trial and error. I would use \rightarrow and \nrightarrow anyway; personal taste, I'd say. :)
egreg
- 1,121,712