TeX - LaTeX Asked on February 24, 2021
I have this error Too many math alphabets used in version normal, when I use usepackage{mathrsfs}. I tried in different ways for example I added
newcommandhmmax{0}
newcommandbmmax{0}
in the preamble before including the font packages. And it does not work. This is my preamble
documentclass[11pt,letterpaper,twoside]{report}
usepackage[utf8]{inputenc}
usepackage[T1]{fontenc}
usepackage{amsmath}
usepackage{amsfonts}
usepackage{amssymb}
usepackage{graphicx}
usepackage{biblatex}
usepackage{enumerate}
usepackage[shortlabels]{enumitem}
usepackage{amsthm}
usepackage[nottoc,notlot,notlof]{tocbibind}
usepackage{physics}
usepackage{float}
usepackage{tkz-fct}
usepackage[left=2.50cm, right=2.54cm, top=2.54cm, bottom=2.54cm]{geometry}
usepackage{txfonts}
usepackage{tkz-euclide}
usepackage{tikz-cd}
usepackage{fancyhdr}
pagestyle{fancy}
fancyhf{}
fancyhead[LO]{nouppercaseleftmark} % En las páginas impares, parte izquierda del encabezado, aparecerá el nombre de capítulo
fancyhead[RE]{nouppercaserightmark} % En las páginas pares, parte derecha del encabezado, aparecerá el nombre de sección
fancyhead[RO,LE]{thepage} % Números de página en las esquinas de los encabezados
DeclareSymbolFont{cmsymbols}{OMS}{cmsy}{m}{n}
DeclareSymbolFontAlphabet{mathcal}{cmsymbols}
DeclareMathAlphabet{mathbb}{U}{msb}{m}{n}
setlength{parindent}{0mm}
usepackage[spanish]{babel}
DeclareMathOperator{fr}{fr}
DeclareMathOperator{interior}{int}
DeclareMathOperator{diam}{diam}
newcommand*closure[1]{overline{#1}}
newcommand{bd}{mbox{$bar{d}$}}
usepackage{cleveref}
DeclareSymbolFont{cmsymbols}{OMS}{cmsy}{m}{n}%
SetSymbolFont{cmsymbols}{bold}{OMS}{cmsy}{b}{n}%
DeclareSymbolFont{cmlargesymbols}{OMX}{cmex}{m}{n}%
SetSymbolFont{cmlargesymbols}{bold}{OMX}{cmex}{b}{n}%%
DeclareSymbolFont{CMsymbols}{OMS}{cmsy}{m}{n}
SetSymbolFont{CMsymbols}{bold}{OMS}{cmsy}{b}{n}
DeclareMathSymbol{forall}{mathord}{CMsymbols}{"38}
DeclareMathSymbol{exists}{mathord}{CMsymbols}{"39}
DeclareMathSymbol{pi}{mathord}{letters}{"19}
DeclareSymbolFont{largesymbols}{OMX}{cmex}{m}{n}
DeclareMathDelimiter{rbrace} {mathclose}{cmsymbols}{"67}{cmlargesymbols}{"09}
DeclareMathDelimiter{lbrace} {mathopen}{cmsymbols}{"66}{cmlargesymbols}{"08}
newcommand{R}{mbox{$mathbb{R}$}}
newcommand{C}{mbox{${mathbb C}$}}
newcommand{F}{mbox{${mathbb F}$}}
newcommand{N}{mbox{$mathbb{N}$}}
newcommand{Z}{mbox{${mathbb Z}$}}
newcommand{Q}{mbox{${mathbb Q}$}}
newcommand{ap}{mbox{${phiup}$}}
It’s all the DeclareSymbolFont
commands, on top of packages such as ammsymb
. You only have 16 symbol alphabets in legacy TeX.
One option is to switch to unicode-math
, which removes this limit completely.
You can also remove those redefinitions of symbol alphabets. You don’t appear to actually need them.
Usually, if you’re using PDFTeX, you want to pick one math-font package, a matching text-font package, and then load any other alphabets you need with mathalpha
or isomath
. It is very rare that you would ever want to reload cmex
and so forth. Are you copying-and-pasting from some other template that loaded one or two symbols from Computer Modern?
For example, if you load a Times-like main font, you probably want to load newtxmath
with newtxtext
or tgpagella
in PDFTeX, or set your math font to TeX Gyre Termes Math and your main font to a clone of Times in LuaTeX.
Answered by Davislor on February 24, 2021
You have defined several times the same symbol font; each DeclareSymbolFont
declaration uses up a math family.
I reorganized your preamble in sections, so it's easier to spot duplications.
I also added notes about packages not to use. Finally, defining R
as mbox{$mathbb{R}$}
is wrong: you'll get normal size also in subscripts, for instance. If the aim is to being able to use R
and similar in text, don't: there's no gain in writing the set R{} is interesting
instead of the set $R$ is interesting
(and editors will color your syntax appropriately). I commented out alternative definitions to enable ensuremath
, but, I repeat, don't.
documentclass[11pt,letterpaper,twoside]{report}
usepackage[utf8]{inputenc}
usepackage[T1]{fontenc}
usepackage[spanish]{babel}
usepackage[left=2.50cm, right=2.54cm, top=2.54cm, bottom=2.54cm]{geometry}
usepackage{amsmath}
usepackage{amsthm}
%usepackage{txfonts} % bad spacings
usepackage{newtxtext,newtxmath} % fixes the wrong bits in txfonts
%usepackage{amsfonts} % amssymb does it
%usepackage{amssymb} % not along with newtxmath
usepackage{graphicx}
usepackage{biblatex}
%usepackage{enumerate} % not along with enumitem
usepackage[shortlabels]{enumitem}
usepackage[nottoc,notlot,notlof]{tocbibind}
%usepackage{physics} % are you sure?
usepackage{float}
usepackage{tkz-fct}
usepackage{tkz-euclide}
usepackage{tikz-cd}
usepackage{fancyhdr}
usepackage{cleveref}
%% page styles
pagestyle{fancy}
fancyhf{}
fancyhead[LO]{nouppercaseleftmark} % En las páginas impares, parte izquierda del encabezado, aparecerá el nombre de capítulo
fancyhead[RE]{nouppercaserightmark} % En las páginas pares, parte derecha del encabezado, aparecerá el nombre de sección
fancyhead[RO,LE]{thepage} % Números de página en las esquinas de los encabezados
% different choices for math
DeclareSymbolFont{cmsymbols}{OMS}{cmsy}{m}{n}
SetSymbolFont{cmsymbols}{bold}{OMS}{cmsy}{b}{n}
DeclareSymbolFont{cmlargesymbols}{OMX}{cmex}{m}{n}
SetSymbolFont{cmlargesymbols}{bold}{OMX}{cmex}{b}{n}
DeclareMathAlphabet{mathbb}{U}{msb}{m}{n}
DeclareSymbolFontAlphabet{mathcal}{cmsymbols}
DeclareMathSymbol{forall}{mathord}{cmsymbols}{"38}
DeclareMathSymbol{exists}{mathord}{cmsymbols}{"39}
DeclareMathSymbol{pi}{mathord}{letters}{"19}
DeclareSymbolFont{cmlargesymbols}{OMX}{cmex}{m}{n}
DeclareMathDelimiter{rbrace} {mathclose}{cmsymbols}{"67}{cmlargesymbols}{"09}
DeclareMathDelimiter{lbrace} {mathopen}{cmsymbols}{"66}{cmlargesymbols}{"08}
% personal commands
DeclareMathOperator{fr}{fr}
DeclareMathOperator{interior}{int}
DeclareMathOperator{diam}{diam}
newcommand*closure[1]{overline{#1}}
newcommand{numberset}[1]{mathbb{#1}}
%newcommand{numberset}[1]{ensuremath{mathbb{#1}}}% not recommended
newcommand{R}{numberset{R}}
newcommand{C}{numberset{C}}
newcommand{F}{numberset{F}}
newcommand{N}{numberset{N}}
newcommand{Z}{numberset{Z}}
newcommand{Q}{numberset{Q}}
newcommand{ap}{phiup}
%newcommand{ap}{ensuremath{phiup}}
newcommand{bd}{bar{d}}
%newcommand{bd}{ensuremath{bar{d}}}
% various settings
%setlength{parindent}{0mm} % why?
The highest family number used is 9. You should be OK.
Answered by egreg on February 24, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP