What's a good way to write "x does not divide y"?
An alternative to \nmid
is to use the \centernot
command from the centernot package. The resulting \centernot\mid
symbol aligns perfectly with \mid
and has a more pronounced slash than \nmid
:
(On the right, the image shows how the commands behave in sub/superscript.)
$x\nmid y$
saves the day.
Another good looking (best to me) and easy option is to use the command \notdivides
from the mathabx
package. The code
\documentclass{article}
\usepackage{mathabx}
\begin{document}
\[ \prod_{a \notdivides b}^{a \notdivides b} a \notdivides b \]
\end{document}
creates the output
The negating line is longer than \nmid
's but shorter than \centernot
's.