1

Ive worked with Overleaf before and this is the first time ive come accross this error. Ive added as many packages as i could think of. but everytime i try to use a math symbol it throws this error. Thanks in advance!

"Undefined control sequence. \N

l.21 \item 123456 $\N $ " My Code

    \documentclass{article}

    \usepackage[utf8]{inputenc}
    \usepackage[T1]{fontenc}
    \usepackage[english]{babel}
    \usepackage{textcomp}
    \usepackage{amsthm}
    \usepackage{amsmath}
    \usepackage{amssymb}

    \title{MATH 220 - HW 1}
    \author{}
    \date{}

    \begin{document}

        \maketitle

        \section*{1.2}
            \begin{enumerate}
        \item 123456 $\N$
            \end{enumerate}

     \end{document}
  • 3
    Welcome to TeX.SX! None of the packages you're loading defines \N. – egreg May 22 '17 at 21:26
  • 1
    Welcome to LaTeX! Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. The error is due to the \N command not being defined. what output do you expect from it? – Moriambar May 22 '17 at 21:26
  • Not even amsmath? isnt \N for the set of natural numbers part of that package? If so which should I use? ALSO: my original piece of code was $ { x \in S | x \in \N} $ wasnt sure which packages contained thoses symbols, but googling it told me that it was a predefined mathematical symbol (oeis.org/wiki/List_of_LaTeX_mathematical_symbols) – Vishnu Venkatesh May 22 '17 at 21:27
  • @VishnuVenkatesh are you looking for $\mathbb{N}$? – samcarter_is_at_topanswers.xyz May 22 '17 at 21:29
  • Ill check that. well youre right. the link i in an earlier comment had it as "\N" some of the others came with "\mathbb{}" im surprised at the inconsistency – Vishnu Venkatesh May 22 '17 at 21:34
2

You should define the command, ie \newcommand{\N}{\mathbb}{N}

   \documentclass{article}

    \usepackage[utf8]{inputenc}
    \usepackage[T1]{fontenc}
    \usepackage[english]{babel}
    \usepackage{textcomp}
    \usepackage{amsthm}
    \usepackage{amsmath}
    \usepackage{amssymb}
\newcommand{\N}{\mathbb{N}}
    \title{MATH 220 - HW 1}
    \author{}
    \date{}

    \begin{document}

        \maketitle

        \section*{1.2}
            \begin{enumerate}
        \item 123456 $\N$
            \end{enumerate}

     \end{document}

which outputs

enter image description here

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.