Does Not Divide in LaTeX (\nmid)
- LaTeX command
\nmid- Package
- Add to your preamble:
\usepackage{amssymb} - Mode
- Math mode only
- Copy the Unicode character
- ∤
U+2224
Where it is used
Slashed vertical bar stating that one integer does not divide another.
Number theorists write 3 \nmid 10 and use it in hypotheses such as Fermat's little theorem: if p \nmid a, then a^{p-1} \equiv 1 \pmod p. It is the negation of \mid and has the same relation spacing; \not\mid produces a slash that is often poorly placed, so prefer \nmid. Avoid a plain | with a slash typed by hand. In computer science it appears in conditions on strides, periods and hash table sizes, such as k \nmid n. Related precomposed negations include \nparallel and \nleq.
Also listed under: علوم الحاسوب
Minimal compilable example
Paste this into an empty .tex file and compile it with pdfLaTeX, XeLaTeX or LuaLaTeX.
\documentclass{article}
\usepackage{amssymb,amsmath}
\begin{document}
Does Not Divide: $\nmid$
\[ p \nmid a \implies a^{p-1} \equiv 1 \pmod{p} \]
\end{document}Related symbols
All نظرية الأعداد →Frequently asked questions
- How do I write Does Not Divide in LaTeX?
- Type \nmid in math mode, for example $p \nmid a \implies a^{p-1} \equiv 1 \pmod{p}$. Load amssymb first with \usepackage{amssymb}.
- Which package do I need for \nmid?
- \nmid needs amssymb: add \usepackage{amssymb} to your preamble before the document starts.
- Can I use \nmid in text mode, or only in math mode?
- Only in math mode. Outside $...$ LaTeX stops with "Missing $ inserted", so write $\nmid$ in running text. If you only need the glyph in text, paste the Unicode character ∤ instead (with XeLaTeX or LuaLaTeX and a font that has it).
أفضل محرر LaTeX بالذكاء الاصطناعي، بديل Overleaf
يساعد Octree الباحثين من أكثر من 15 جامعة على كتابة أوراق البحث بشكل أسرع باستخدام الذكاء الاصطناعي
- أنشئ رسوم TikZ جميلة باستخدام الذكاء الاصطناعي
- ارفع صورة وحولها إلى LaTeX بسلاسة
- احصل على مساعدة فورية في كتابة وتنسيق أوراق البحث