## 2010年12月12日星期日

### Number sets (prime, natural, integer, rational, real and complex) in Latex

Number sets such as natural numbers ($\mathbb{N}$) or complex numbers ($\mathbb{C}$) are not provided by default by Latex. It doesn’t mean that Latex doesn’t know those sets, or more importantly their symbols…

There are two packages which provide the same set of symbols. You can choose either of them:

\usepackage{amsfonts}

or

\usepackage{amssymb}.

Now, you have access to all the different sets through the command:

\mathbb{set}

Examples:

$\mathbb{P}$ for prime numbers using \mathbb{P},$\mathbb{N}$ for natural numbers using \mathbb{N},$\mathbb{Z}$ for integers using \mathbb{Z},$\mathbb{I}$ for irrational numbers using \mathbb{I},$\mathbb{Q}$ for rational numbers using \mathbb{Q},$\mathbb{R}$ for real numbers using \mathbb{R} and$\mathbb{C}$ for complex numbers using \mathbb{C}.

Positive real numbers can now be easily expressed :

$\mathbb{R}_{\geq0}$ by typing \mathbb{R}_{\leq0}.