On this page:
I needed to draw an arrow that meant the opposite of $rightarrow$
, but there wasn’t one, unless I used a chemical arrow meaning a failed reaction. I didn’t want to do that, so I defined my own:
\def\nrightarrow{\ensuremath{\arrownot\rightarrow}}
I can’t remember where I found out how to do this, but you can imagine how pleased I was to find there was an $\arrownot$
already defined! Note that it requires maths mode, hence the \ensuremath
.
Example
Here is the arrow being defined and used in a file in text mode and in maths mode.
\documentclass[a4paper,12pt]{article}
\usepackage{stmaryrd}% Defines \arrownot
\def\nrightarrow{\ensuremath{\arrownot\rightarrow}}
\begin{document}
C \nrightarrow\ B
$C \nrightarrow\ B$
\end{document}
\arrownot does not appear to be included by default in my installation…
I searched for a bit, and downloaded a package from MikTeX called mathabx, which includes no \arrownot, but does include pre-made negated arrows like \nRightarrow (that one, at least, works in math mode but not in normal text)
So you need to add
\usepackage{mathabx}
before your \begin{document}
Ah, you’re right, there is! I must have missed it when looking in the really useful symbols document. Thank you.
I have done a bit of searching myself, and found
\arrownot
is defined in the stmaryrd package.