[Tex/LaTex] kpfonts, MnSymbol, eufrak and too many math alphabets

errorsfontsmath-mode

I'm having problems with kpfonts' \mathfrak and MnSymbol.
This example produces the "too many math alphabets" error:

\documentclass{amsart}
\newcommand{\PrintMathFonts}{%
  \typeout{*** Math fonts list ***}
  \count255=0
  \loop\ifnum\count255<16
    \typeout{(\the\count255: \the\textfont\count255=\fontname\textfont\count255)}        \advance\count255 by 1
  \repeat
  \typeout{***}}
\usepackage{MnSymbol}
\usepackage[light,onlyrm,notext,noamsmath,notextcomp,sfmathbb,frenchstyle]{kpfonts}
\DeclareMathAlphabet\mathfrak{U}{euf}{m}{n}
\SetMathAlphabet\mathfrak{bold}{U}{euf}{b}{n}
\begin{document}
  \PrintMathFonts
  \begin{align*}
    \mathfrak{Suca}\amalg A = x-2 \neq\mathcal{A}=\mathscr{F}=
      \mathbb{R}=\mathsf{C} \rightarrow \rightrightarrows
  \end{align*}
\end{document}

My goal is to disregard kpfonts' \mathfrak in favor of eufrak, but if I want to use MnSymbol as well then it doesn't work. I also tried the cmsy option of MnSymbol, and various kpfonts options but nada.

p.s. the solution to this question kpfonts with eufrak doesn't seem to work and the solution provided by the other answer works, unless you load too many alphabets.

p.p.s. I got the \PrintMathFonts trick from this answer Diagnosing the "too many math alphabets" error

Best Answer

Allocating a new math alphabet is handy, but can lead to the infamous "Too many math alphabets" error. However, if only text size for Fraktur letters is needed, one can quite well get away by

\newcommand\mathfrak[1]{\mbox{\usefont{U}{euf}{m}{n}#1}}

which won't waste a math alphabet.

I really don't think that MnSymbol goes along finely with Kp fonts. If only a restricted number of symbols from MnSymbol are needed, it's possible to use them without allocating a math group. But one should know what symbols you're using for giving precise advice.