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}
6
  • 3
    Welcome to TeX.SX! None of the packages you're loading defines \N.
    – egreg
    May 22, 2017 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, 2017 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) May 22, 2017 at 21:27
  • @VishnuVenkatesh are you looking for $\mathbb{N}$? May 22, 2017 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 May 22, 2017 at 21:34

1 Answer 1

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .