TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The wikepedia page Folge has this formula (under Formale Definition)

\begin{matrix} a:&\N &\to &X\\ & i &\mapsto &a_i, \end{matrix} 

where \N is used for the set of natural numbers. I am able to create its symbol with a \mathbb{N}. But when I use \N, I get the error ! Undefined control sequence..

I assume I need to use a specific package in order to have \N defined. Is this so and if so, which one is it?

share|improve this question
no just define \N yourself: \usepackage{amsfonts} \newcommand\N{\mathbb{N}} – David Carlisle Dec 21 '12 at 12:53
I see. Does wikipedia do this definition "behind the scenes"? – René Nyffenegger Dec 21 '12 at 12:57
Instead of that font I use dsfonts package, which defines \mathds{} instead of \mathbb{} and gives you better output (in my opinion). – Manuel Dec 21 '12 at 14:38
up vote 3 down vote accepted

You could also define that yourself:


I am not aware of any package that will define \N for you, but if it does, it will probably look like the definition I gave.

share|improve this answer
Isn't necessary to load amsfonts first, like in David Carlisle's comment to the question? – mbork Dec 21 '12 at 12:54
@mbork Yes and no. Any package that defines \mathbb will do: amsfonts, mbboard, mathbbol, bbold ... Chose what you like more. – mafp Dec 21 '12 at 13:00
ah well you need to load some package to define \mathbb (nut same is true of matrix) . It is the amsfonts package (if you want the ams version of mathbb) that actually defines \mathbb although some of the other ams packages load this automatically of course/ – David Carlisle Dec 21 '12 at 13:01

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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