# conflict between mathpazo and amssymb

I like Palatino so I used mathpple. But it seems to be obsoleted. So I try to replace it with mathpazo. The problem is that I have the error message " too many's alphabets..." When I remove amssymb, it works. But amssymb is great... Any idea?

Edit: The problem is more general. In the example when you remove only one of the package the problem disappears.

minimal example:

\documentclass[10pt,a4paper,landscape,twocolumn]{article}

\usepackage[sc]{mathpazo}
\usepackage{amssymb}
\usepackage{skull}
\usepackage{stmaryrd}
\usepackage{wasysym}
\usepackage{bm}
\usepackage{siunitx}
\DeclareSymbolFont{mathb}{U}{mathb}{m}{n}

\usepackage{lipsum}
\begin{document}
\lipsum
\end{document}

• Welcome to TeX.SE. Please tell us if you currently load amssymb before or after mathpazo. Incidentally, if you're worried about using obsolote or nearly-obsolete packages, don't bother with mathpazo. Instead, load the newpxtext and newpxmath packages. Note that they should be loaded after amssymb. – Mico Jul 4 at 4:36
• Can you provide a minimal example? I cannot reproduce this behaviour. – Ralf Stubner Jul 4 at 10:09
• @Mico: I tried both, same result. But when trying to provide a minimal example I understood why you cannot reproduce this behavior Ralf. The problem is more general. In the example when you remove only one of the package the problem disappears. – entr0pie Jul 4 at 15:39

mathpazo.sty has

\DeclareSymbolFont{operators}     {OT1}{pplx}{m}{n}
\DeclareSymbolFont{upright}       {OT1}{zplm}{m}{n}
\DeclareSymbolFont{letters}       {OML}{zplm}{m}{it}
\DeclareSymbolFont{symbols}       {OMS}{zplm}{m}{n}
\DeclareSymbolFont{largesymbols}  {OMX}{zplm}{m}{n}


one more than the standard. Next amssymb.sty (actually amsfonts.sty) has

\DeclareSymbolFont{AMSa}{U}{msa}{m}{n}
\DeclareSymbolFont{AMSb}{U}{msb}{m}{n}


One more is declared by skull.sty

\DeclareSymbolFont{SKULL}{U}{skulls}{m}{n}


One more with stmaryrd.sty

\DeclareSymbolFont{stmry}{U}{stmry}{m}{n}


Next wasysym.sty

\DeclareSymbolFont{wasy}{U}{wasy}{m}{n}


Now let's look at the math alphabets in mathpazo.sty

\DeclareMathAlphabet{\mathit}     {OT1}{pplx}{m}{it}
\DeclareMathAlphabet{\mathbf}     {OT1}{zplm}{b}{n}
\DeclareMathAlphabet{\mathbold}   {OML}{zplm}{b}{it}


This brings the total to 14. Next amssymb.sty (better, amsfonts.sty):

\DeclareMathAlphabet{\mathfrak}{U}{euf}{m}{n}


However, there are other math alphabets, namely \mathsf and \mathtt, which siunitx triggers the loading of. This makes 17: too many.

What can you do? You can easily avoid wasting a math group for skull. If you load amsmath (you should anyway), you can replace \usepackage{skull} with

\DeclareFontFamily{U}{skulls}{}
\DeclareFontShape{U}{skulls}{m}{n}{ <-> skull }{}
\DeclareSymbolFont{SKULL}{U}{skulls}{m}{n}
\DeclareRobustCommand{\skull}{\text{\usefont{U}{skulls}{m}{n}\symbol{'101}}}


Avoiding the dreaded symbol altogether would be better.

Also, \DeclareSymbolFont{mathb}{U}{mathb}{m}{n} does nothing at all and indeed you receive a message saying that U/cmr/m/n is used.

• Thanks, I use \DeclareSymbolFont{mathb}{U}{mathb}{m}{n} because without it \DeclareMathSymbol{\Earth}{3}{mathb}{"43} don't work. I load amsmath but I left in the example only package which produce the error. – entr0pie Jul 5 at 19:27
• @entr0pie Just one symbol can be dealt with the method I suggested for \skull. – egreg Jul 5 at 19:29
• Don't understand, I did as you said for \skull but I'm going to erase it because I never use it. I prefer use \bcattention. However I use wasysym only for one symbol which is \astrosun. – entr0pie Jul 5 at 19:38

In the modern toolchain, you can load an OpenType font based on Palatino and completely remove this problem.

\usepackage{unicode-math}

\defaultfontfeatures{Scale = MatchLowercase}
\setmainfont{TeX Gyre Pagella}
\setmathfont{Asana Math}


This requires LuaLaTeX or XeLaTeX, and includes all symbols from mathpazo, amssymb, and most other packages you include. Any modern math font will have more symbols and more consistency than any combination of legacy packages.

You could replace TeX Gyre Pagella with Palatino Linotype or Palatino if you have them, or Asana Math with TeX Gyre Pagella Math.

If you want to continue to use legacy font packages, you can replace both mathpazo and amssymb with the newer newpxmath, then load either tgpagella or newpxtext as your main font. There are the options nosymbolsc and noamssymbols to free up math alphabets.