LATEX enables typesetting mathematical alphabets with various fonts in math mode.
Math mode is used for writing mathematical expressions and equations.
This guide explores standard mathematical fonts in LaTeX and how to use them effectively.
Some fonts require specific packages to be loaded in the preamble before use.
Standard Math fonts in LaTeX
LaTeX offers seven built-in fonts for typesetting mathematical alphabets without requiring additional packages.
1.Roman: Use \mathrm{}
to typeset its alphabets.
2.Normal Math Font: Used for standard mathematical letters. The command \mathnormal{}
produces the same result as writing $a$
, meaning {$\mathnormal{a}$}
is equivalent to $a$.
3.Calligraphic: Used for typesetting capital letters in a decorative style with \mathcal{}
.
4. Upright Roman Boldface: Used for bold, upright Roman letters in math mode. The command is \mathbf{}
.
5. Upright Sans Serif: Used for typesetting upright sans serif letters. The command is \mathsf{}
.
6. Italic Letters: Used for typesetting text in italics. The command is \mathit{}
.
7. Typewriter Font: Used for upright typewriter-style letters. The command is \mathtt{}
.
Additional fonts for mathematical alphabets require specific packages to be loaded in the preamble.
The amsfonts package, automatically included with amssymb, provides access to more font styles.
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).
For example $\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}