How can you use the symbol \mathtt{A}
and the Package \usepackage{MnSymbol}
?
My code begin with
\PassOptionsToPackage{dvipsnames}{xcolor}
\documentclass[a4paper]{book}
\usepackage{lmodern}
\usepackage{amsmath,amssymb}
\usepackage{amssymb}
\usepackage{amsmath,amscd}
\usepackage{amsfonts}
\usepackage[utf8]{inputenc}
\usepackage{pstricks}
\usepackage{pstricks-add}
\usepackage{tikz}
\usepackage{tensor}
\usepackage{graphicx}
\usepackage{MnSymbol}
\usepackage{stmaryrd}
\usepackage{shuffle}
\usepackage{comment}
\usepackage[frenchb]{babel}
\usepackage{etex}
\usepackage[all]{xy}
\usepackage{float}
\usepackage{blkarray}
\usepackage{lipsum}
%\usepackage{mathtools}
%\usepackage{mathabx}
\usepackage[dvipsnames]{xcolor}
\usepackage{tkz-graph}
\usetikzlibrary{arrows}
\usepackage[french,linesnumbered,algoruled]{algorithm2e}
\usepackage{algorithmic}
\usepackage{pst-node,pstricks,multido,pst-plot,pst-text,pst-3d}%
\usetikzlibrary{arrows}
I get these warnings and errors
! 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.656 \mathtt B
_{n,k}(P_1,\dots,P_m,\dots)=\mathfrak B_{n,k}[\a^{( P)}_{\Ph...
Your command was ignored.
Best Answer
I can reproduce the issue with
where only the math font related packages have been kept.
One has to know that each
\DeclareSymbolFont
declaration uses up one of the available 16 math groups. The default setup allocates groups from 0 to 3, thenamssymb
allocates other two; four are used byMnSymbol
, one bystmaryrd
and one byshuffle
. A total of twelve, so only three additional math alphabets can be used in the document.Some
\mathX
command don't really use a new math alphabet, which is the case for\mathbb
(it shares a math group with those defined byamssymb
) but not of\mathfrak
nor\mathbf
and others. Math alphabets (loaded with\DeclareMathAlphabet
) only allocate a math group at point of usage, so in the code above the first four instructions exhaust the available groups and\mathtt
is not able to find a place for allocating a group.You can avoid wasting math groups with various techniques. For instance, the
shuffle
package can be avoided by defining the symbols it provides in a different way:and now
\mathtt
can be used. This doesn't guarantee that math groups will not be used up again. For the most rarely used commands of the set, you can define (slower) substitutes; for instance, here's the preamble code for not allocating a math group with\mathtt
: