Mathematical Fonts in LaTeX: Complete Typography Guide
Date Published

Mathematical Fonts in LaTeX
LaTeX offers a rich variety of mathematical fonts for different purposes. Here's your complete guide to mathematical typography.
Quick answer: How do you change math fonts in LaTeX? Wrap the letter in a math alphabet command inside math mode: \mathcal{L} for calligraphic, \mathbb{R} for blackboard bold (amssymb), \mathfrak{g} for Fraktur (amssymb), \mathscr{F} for script (mathrsfs), \mathbf{v} for bold upright, and \boldsymbol{\alpha} (amsmath) or \bm{\alpha} (bm) for bold italic and bold Greek.
LaTeX Math Fonts Cheat Sheet
Every math font command in one document. It compiles as written; each package is commented with the commands it provides:
1\documentclass{article}2\usepackage{amsmath} % \boldsymbol3\usepackage{amssymb} % \mathbb, \mathfrak4\usepackage{mathrsfs} % \mathscr5\usepackage{bm} % \bm6\begin{document}7\[8 \mathcal{L} \quad \mathbb{R} \quad \mathfrak{g} \quad \mathscr{F} \quad9 \boldsymbol{\alpha} \quad \bm{x} \quad \mathbf{A} \quad10 \mathrm{d}x \quad \mathsf{T} \quad \mathtt{true}11\]12\end{document}
Try this in Octree — free LaTeX editor with AI, compiles in your browser
Default Math Fonts
In math mode, LaTeX automatically uses italic for variables:
$x + y = z$ renders with italic letters.
For upright text in math, use \text{} or \mathrm{}:
$\text{speed} = \frac{\text{distance}}{\text{time}}$
Calligraphic Letters in LaTeX (\mathcal)
The calligraphic font is perfect for sets, categories, and special mathematical objects:
$\mathcal{A}, \mathcal{B}, \mathcal{C}, \mathcal{L}, \mathcal{F}$
Common uses: - Lagrangian: $\mathcal{L}$ - Fourier transform: $\mathcal{F}$ - Categories: $\mathcal{C}$ - Power set: $\mathcal{P}(A)$
Note: \mathcal only works with uppercase letters.
Calligraphic letters need no package: $\mathcal{A}$ works in plain LaTeX. Use them only for capital letters, since lowercase input gives unpredictable symbols. If you want a rounder, more slanted calligraphic style, \usepackage[mathcal]{euscript} replaces \mathcal with Euler Script, and \mathscr from mathrsfs (below) gives the ornate script form.
Blackboard Bold (\mathbb)
Blackboard bold represents number sets and special spaces:
$\mathbb{R}, \mathbb{C}, \mathbb{Z}, \mathbb{Q}, \mathbb{N}$
Requires \usepackage{amssymb}
Common uses: - Real numbers: $\mathbb{R}$ - Complex numbers: $\mathbb{C}$ - Integers: $\mathbb{Z}$ - Rationals: $\mathbb{Q}$ - Natural numbers: $\mathbb{N}$ - Expectation: $\mathbb{E}[X]$
Fraktur Font (\mathfrak)
Fraktur (Gothic) letters for Lie algebras and ideals:
$\mathfrak{a}, \mathfrak{g}, \mathfrak{sl}, \mathfrak{so}$
Requires \usepackage{amssymb}
Common uses: - Lie algebras: $\mathfrak{g}, \mathfrak{sl}(n)$ - Ideals in ring theory: $\mathfrak{p}, \mathfrak{m}$
Script Font (\mathscr)
More ornate than calligraphic:
$\mathscr{A}, \mathscr{B}, \mathscr{L}$
Requires \usepackage{mathrsfs}
Bold Math in LaTeX (\mathbf, \boldsymbol, \bm)
For vectors and matrices:
$\mathbf{A}, \mathbf{x}, \mathbf{v}$ — bold upright
$\boldsymbol{\alpha}, \boldsymbol{\beta}$ — bold italic (for Greek)
\mathbf gives bold upright Latin letters and digits only; it has no effect on Greek lowercase letters or symbols such as \nabla. For bold italic vectors and bold Greek, use \boldsymbol{\mu} from amsmath or the shorter \bm{\mu} from the bm package, which handles spacing slightly better. To make a whole equation bold, put \boldmath before it outside math mode.
Sans-Serif Math (\mathsf)
Often used for categories and tensors:
$\mathsf{T}, \mathsf{Set}, \mathsf{Grp}$
Typewriter/Monospace (\mathtt)
For code-like elements in math:
$\mathtt{true}, \mathtt{false}$
Quick Reference Table
Command | Style | Package | Typical use |
|---|---|---|---|
| Calligraphic | none | Lagrangian, sets, categories |
| Blackboard bold | amssymb | Number sets ℝ ℂ ℤ ℚ ℕ |
| Fraktur | amssymb | Lie algebras, ideals |
| Script | mathrsfs | Sheaves, σ-algebras, transforms |
| Bold upright | none | Vectors, matrices |
| Bold italic / bold Greek | amsmath | Bold Greek and symbols |
| Bold italic / bold Greek | bm | Same as \boldsymbol, shorter |
| Upright roman | none | Differentials, units, operators |
| Sans-serif | none | Tensors, categories |
| Typewriter | none | Code-like identifiers |
Font Packages Summary
\usepackage{amsmath} — enhanced math (\boldsymbol) \usepackage{amssymb} — \mathbb, \mathfrak \usepackage{mathrsfs} — \mathscr
LaTeX Math Fonts FAQ
How do you write calligraphic letters in LaTeX?
Use $\mathcal{L}$ in math mode; it needs no package and works for uppercase letters. For the more ornate script style use $\mathscr{L}$ with \usepackage{mathrsfs}.
How do you make math bold in LaTeX?
Use \mathbf{x} for bold upright letters and \boldsymbol{\alpha} (amsmath) or \bm{\alpha} (bm) for bold italic letters and bold Greek. \mathbf does not make Greek lowercase letters bold.
What is the difference between \mathcal and \mathscr?
Both are capital-only script alphabets. \mathcal is the built-in, simpler calligraphic style; \mathscr (mathrsfs) is a fancier, more flowing script. Many authors use both in one paper to tell two families of objects apart, such as a category 𝒞 and a sheaf ℱ.
Why does \mathbb{1} or a lowercase \mathbb letter not work?
The amssymb blackboard bold font only contains capital letters. For the indicator function 𝟙 use \mathbbm{1} from the bbm package or \mathds{1} from dsfont.
Beautiful Math Typography with Octree
Octree makes mathematical fonts easy:
- AI suggests appropriate font styles - Real-time preview of all math fonts - Auto-loads required packages - Professional typesetting instantly
Try it at https://useoctree.com
Try this in Octree — free LaTeX editor with AI, compiles in your browser

Dot product in LaTeX: \vec{a} \cdot \vec{b}; cross product: \vec{a} \times \vec{b}. Vectors in LaTeX with \vec, \mathbf, the physics package, and common fixes.

Colored boxes in LaTeX with tcolorbox: color box background and frame, titles, drop shadows, rounded corners, plus \colorbox, \fcolorbox, \fbox and Beamer.