3

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

  • also, I noticed that something incredibly weird happens when I try to load the mnsymbol package before kpfonts. My temporary solution is definitely to kill mnsymbol for the time being. – donkey kong Mar 02 '12 at 19:52
  • 1
    I can typeset the formula if \mathcal is turned into \mathscr, but all math families are allocated. Do you really need all that stuff? If only a few symbols from MnSymbol are needed, then it's possible to reduce from the four math families it allocates. – egreg Mar 02 '12 at 20:43
  • well, I really use simultaneously mathcal, mathscr, mathbb, mathfrak and mathsf, but MnSymbol is not really essential, I just like the the symbols and arrows a lot better (although it seems to be having some weird behavior, so I'll probably end up not using it) – donkey kong Mar 02 '12 at 23:13
  • If you don't need some of the alphabets in subscripts or superscripts it's possible to avoid loading them as math families. – egreg Mar 02 '12 at 23:18
  • ah, I did not know that! how do you accomplish that? anyawy, I wish there were a trick to tell kpfonts not to load its mathfrak. – donkey kong Mar 02 '12 at 23:43
  • 1
    You can say \newcommand\mathfrak[1]{\mbox{\usefont{U}{euf}{m}{n}#1}}. It's possible to also take care of the math version. Actually, with some overhead, it can be made into working also for subscripts and superscripts. If you are interested, please try and modify your question. – egreg Mar 02 '12 at 23:53
  • This has something to do with TeX's capacity for \fams. This problem is solved in [`XePersian'](http://www.ctan.org/pkg/xepersian), a fascinating tool for Persian typesetting. you might consult the author for solution. – Hasan Zakeri Mar 03 '12 at 08:43

1 Answers1

2

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.

egreg
  • 1,121,712