I'm having a problem when I try to use too many different types of math symbols in LaTeX, such as in this example:
\documentclass[a4paper,12pt]{article}
\usepackage{amsmath}
\usepackage{latexsym}
\usepackage{dsfont}
\usepackage{gensymb}
\usepackage{amssymb}
\usepackage{authblk}
\usepackage{amstext}
\usepackage{amsfonts}
\usepackage{amsthm}
\usepackage{mathtools}
\usepackage{upgreek}
\usepackage{textcomp}
\usepackage{bm}
\usepackage[mathscr]{euscript}
\let\euscr\mathscr \let\mathscr\relax
\usepackage[scr]{rsfso}
\usepackage{siunitx}
\usepackage[e]{esvect}
\begin{document}
$\mathbb{R}\mathscr{P}\euscr{B}\mathcal{C}\vv{x_0}$
\end{document}
When I try to compile that, the following error message appears in the terminal:
! LaTeX Error: Too many math alphabets used in version normal.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.21 $\mathbb{R}\mathscr{P}
\euscr{B}\mathcal{C}\vv{x_0}$
?
What can I do to use more alphabets? I actually need all of those math symbols in my document.
Best Answer
First of all, remove
latexsym
andgensymb
that add nothing really useful: the former is covered byamssymb
and the latter’s symbols can easily be produced in a different way.This already saves two math groups. Also loading
dsfont
is dubious, unless you want two different doublestroke fonts.Probably also
upgreek
is inessential.As a side note,
amsfonts
is automatically loaded byamssymb
andamstext
byamsmath
.With this, the last allocated math group is 14. If you get into troubles later on, the only feasible alternative is to define some of the calligraphic fonts in a different way.
No bold version, but I don't think you need it: it's already difficult to distinguish between
\euscr{C}
and\mathcal{C}
.