xHouka
xHouka

Reputation: 11

LaTex Undefined control Sequence while using MikTex

I got an Error message from the MikTex console trying to convert my .tex document in pdf. I used the command: pdflatex Test.tex The Error is Undefined control sequence. It seems LaTex doesn't know the command: \nmid while the command \mid works fine. this is my whole code:

\documentclass [a4paper] {article}
\usepackage{amsmath}
\everymath{\displaystyle}
\begin {document}
$\nmid$
\end{document}

Edit: It seems that i'm very dumb if you include \usepackage{amssymb} in the code it works.

Upvotes: 0

Views: 7132

Answers (1)

Werner
Werner

Reputation: 15065

If you get an error message like

! Undefined control sequence.
<recently read> \nmid 

l.5 $\nmid
          $

it usually means that you've either misspelled the control sequence, or that is spelled correctly but defined elsewhere (in some package, for example).

In your case, \nmid is defined within amssymb. You can also identify this symbol within the Comprehensive LaTeX Symbol List.

Solution: Add \usepackage{amssymb} to your preamble.

Upvotes: 2

Related Questions