# Mathematical fonts in LaTeX

LATEX provides us with a means to typeset mathematics alphabets using various fonts in the math mode.

In LATEX, math mode refers to the environment in which mathematical expressions or equations are written.

We shall be having an overview of the standard mathematical fonts in latex and most importantly, how to typeset mathematics alphabets in these fonts.

Some of the fonts need packages to be loaded in the preamble before the alphabets from the font can be typeset.

## Standard Maths fonts in LaTeX

LaTeX provides us with 7 fonts that enable us to typeset our desired maths alphabets as need arises without the need of loading any package in your preamble. The 7 fonts include.

1. Upright Roman font: Its alphabets are typeset using the command \mathrm{}.

2. Normal math italic font: for typesetting normal mathematics letters. The command is \mathnormal{}. In summary, {$\mathnormal{a}$} is the same as $a$.

3.  Calligraphic font: for typesetting capital letters with a special Calligraphic font. The command here is \mathcal{}.

4. Upright Roman boldface: for typesetting upright roman boldface letters. The command here is \mathbf{}.

5. Upright sans serif: for typesetting upright sans serif letters The command here is \mathsf{}.

6. Italic letters: for typesetting text in italic letters. The command here is \mathit{}.

7. Typewriter type font: for typesetting upright typewriter type letters. The command here is \mathtt{}.

Below are some other fonts to typeset mathematics alphabets, only that these ones require some packages loaded in your preamble before they can typeset.

We have the amsfonts package, which is loaded automatically by amssymb package which gives us access to use(typeset)

1. Fraktur (Gothic) letters, upper and lower case alphabets using the \mathfrak{} command.

2. “blackboard bold” uppercase letters using the \mathbb{} command.

The package mathrsfs makes available the ”Ralph Smith’s Formal Script” font as a math alphabet, with the command \mathrsfs{}, while calrsfs will do the same but also turning \mathcal{} to choose the RSFS font (only uppercase letters).

Package euscript will load a different calligraphic alphabet, Euler Script.

Depending on the options, it will provide \mathscr{}(to go along with the original \mathcal{}) or change \mathcal{} to use Zapf’s font.

\documentclass{article}
\usepackage {eucal}
\usepackage [mathcal] {eucal}
\usepackage [mathscr] {eucal}

The first two calls are equivalent and \mathcal{} will use Euler Script; the last call will provide \mathscr{} for Euler Script and leave \mathcal{} as is.

There are some rules for typesetting these mathematics alphabets in their various fonts.

1. Font command must be in between a pair of dollar signs ($symbol). E.g $\mathbb{Z}$ for printing ℤ and in the case of \boldmath{} command, the argument is to be enclosed by a pair of$ symbol E.g \boldmath{$a,b,c$} for printing abc.

2. The \mathcal{}, \mathbb{}, \Bbb{}, and \mathds{} do not accept lower-case letters.

## Examples making use of mathematics alphabets

1. Indicator function is defined

\documentclass{article}
\usepackage{amsmath, amssymb, dsfont}
\begin{document}
$\mathds{1}_{\mathbb{Q}}(x)=\lim_{k \to \infty}\left(\lim_{j \to \infty}(\cos(k!\pi{x}))^{2j}\right)=\begin{cases} 1 & \text{if}\; x \in \mathbb{Q}\\ 0 & \text{if}\; x \notin \mathbb{Q} \end{cases}$
\end{document}

2. Borel-Cantelli lemma Let then

\documentclass{article}
\usepackage{amsmath, amssymb}
\begin{document}
Let $A_i \in \mathcal{A}, i \in \mathbb{N}$. then
$\sum_{i=1}^{\infty}P(A_i) < \infty \Rightarrow P(\limsup_{i \to \infty }A_I )=0$]
\end{document}

3.

\documentclass{article}
\usepackage{amsmath, amssymb}
\begin{document}
If $\mathbf{x}$ is some vector such t hat $\mathbf{x}=(x_{1}, x_{2} ,\ldots , x_{n})$ , then :
$\| \mathbf{x} \| { \infty }:=\max \left(\left| x_{1}\right| , \ldots ,\left| x_{n}\right| \right) .$
\end{document}

4. Number system is made up of the following sets of numbers: ℕ, ℚ, ℤ, ℝ, and ℂ. The hierarchy is as follows ℕ ⊂ ℤ ⊂ ℚ ⊂ ℝ ⊂ ℂ.

\documentclass{article}
\usepackage{amsmath, amssymb}
\begin{document}
$Number system is made up of the followingsets of number :  \mathbb{N} ,\mathbb{Q} ,\mathbb{Z} ,\mathbb{R}  and  \mathbb{C}  . The hierachy is as follows  \mathbb{N}\subset\mathbb{Z} \subset \mathbb{Q}\subset \mathbb{R} \subset \mathbb{C} .$
\end{document}

Share tutorial

Don't forget to share if I have added any value to your education life. See you again in another tutorial. thank you!

#### Md Jidan Mondal

LaTeX expert with over 10 years of experience in document preparation and typesetting. Specializes in creating professional documents, reports, and presentations using LaTeX.