This is a follow up question to this rather vague one. The problem is trying to work out where my 16 math alphabets are going. In using egreg's answer to the previous question I have diagnosed something. So check out this madness:
\documentclass{article}
\usepackage{kpfonts}
\newcommand{\PrintMathFonts}[1]{%
\count255=0
\loop\ifnum\count255<16
\typeout{#1 (\the\count255: \fontname\textfont\count255)}
\advance\count255 by 1
\repeat}
\usepackage{siunitx}
\begin{document}
\PrintMathFonts{Initial}
\SI{10}{\celsius}
$X$
\PrintMathFonts{Final}
X
\end{document}
This prints out what math alphabets have been allocated at various points. Here's the relevant part of the log file:
Initial (0: jkpmn7t)
Initial (1: jkpmi)
Initial (2: jkpsy)
Initial (3: jkpex)
Initial (4: jkpmia)
Initial (5: jkpsya)
Initial (6: jkpsyb)
Initial (7: jkpsyc)
Initial (8: jkpexa)
Initial (9: jkpssmn7t)
Initial (10: jkpttmn7t)
Initial (11: nullfont)
Initial (12: nullfont)
Initial (13: nullfont)
Initial (14: nullfont)
Initial (15: nullfont)
Final (0: jkpmn7t)
Final (1: jkpmi)
Final (2: jkpsy)
Final (3: jkpex)
Final (4: jkpmia)
Final (5: jkpsya)
Final (6: jkpsyb)
Final (7: jkpsyc)
Final (8: jkpexa)
Final (9: jkpssmn7t)
Final (10: jkpttmn7t)
Final (11: jkpmn7t)
Final (12: nullfont)
Final (13: nullfont)
Final (14: nullfont)
Final (15: nullfont)
So, before I have typed anything at all TWELVE of my sixteen fonts are already used. siunitx appears to cause the math alphabets to be used before anything is written. OK. That's fine, I'll leave that aside for now. What's doubly weird is that once I've used \SI to typeset so units, another alphabet is used up (position 11). What's odd about this is that it's the same font as position 0. Why is this? Isn't this a waste? Can I don something about it?
Using standard computer modern means only 6 alphabets are used up at Initial and that's the same as at Final. Using fouriernc seems to cause the same problem (duplicate font) as with kpfonts. However, fewer fonts are used up.
siunitxright? – Seamus Jan 12 '12 at 16:45