2

Let me first give you this minimal example:

\documentclass[11pt]{minimal}
\usepackage[retainmissing, abx]{MnSymbol}
\usepackage{fontspec}

\begin{document}
\[ \mathcal{ABC 123} \]
\end{document}

I'm compiling that with xelatex.

It seems, MnSymbol fails with the abx option when doing a \mathcal{} command. I get many errors, but they all look pretty much the same:

kpathsea: Running mktexmf mathcm10
! I can't find file `mathcm10'. <*> ...ljfour; mag:=1; nonstopmode; input mathcm10 Please type another input file name ! Emergency stop. <*> ...ljfour; mag:=1; nonstopmode; input mathcm10 Transcript written on mfput.log.
grep: mathcm10.log: No such file or directory
mktextfm: `mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input mathcm10' failed to make mathcm10.tfm.
kpathsea: Appending font creation commands to missfont.log.

So, where do I go from here? should I just not use MnSymbol with abx?

polemon
  • 3,555
  • 4
  • 32
  • 42
  • First if all you shouldn't use MnSymbol with XeLaTeX. I'll try to find the thread. – Henri Menke May 30 '14 at 13:25
  • 1
    Related: http://tex.stackexchange.com/questions/152714/possible-to-use-mnsymbol-with-luatex http://tex.stackexchange.com/questions/72948/xelatex-mathspec-and-microtype-weird-error-messages – Henri Menke May 30 '14 at 13:28
  • The package has a few bugs; the font name should be mathc10, not mathcm10; also, mathabx has no bold font. – egreg May 30 '14 at 13:31

1 Answers1

4

The package MnSymbol has very dubious code:

\DeclareOption{abx}{%
  \def\Mn@Load@Cal@Font{%
    \DeclareFontFamily{OT1}{mathc}{}%
    \DeclareFontShape{OT1}{mathc}{m}{n}{ <-> mathcm10 }{}%
    \DeclareFontShape{OT1}{mathc}{b}{n}{ <-> mathcb10 }{}%
    \DeclareMathAlphabet\mathcal{OT1}{mathc}{m}{n}%
    \SetMathAlphabet\mathcal{bold}{OT1}{mathc}{b}{n}}}

There is no mathcm10 font in the mathabx distribution. There are no bold fonts either, so it's absurd to define a bold font.

The relevant font is called mathc10, so you're done with

\documentclass[11pt]{article}
\usepackage[retainmissing]{MnSymbol}

\DeclareFontFamily{OT1}{mathc}{}
\DeclareFontShape{OT1}{mathc}{m}{n}{ <-> mathc10 }{}
\DeclareMathAlphabet\mathcal{OT1}{mathc}{m}{n}

\usepackage{fontspec}

\begin{document}
\[ \mathcal{ABC 123} \]
\end{document}

This is the font table for mathc10

enter image description here

egreg
  • 1,121,712
  • Well, I like MnSymbol because it defines a lot of very nice symbols. Is this pretty much the only way to get the symbols? Is there a "best practice" how to do this? – polemon May 30 '14 at 14:03
  • @polemon See http://tex.stackexchange.com/questions/36006/how-can-i-use-a-symbol-provided-by-a-package-without-changing-the-entire-mathema for how to import individual symbols. I amplified a little bit on that excellent answer, with my answer at http://tex.stackexchange.com/questions/132453/typing-following-notation-in-latex/132456#132456 – Steven B. Segletes May 30 '14 at 14:20
  • Am I right in the assumption, that it is somewhat of an oversight on the developer's side? – polemon May 30 '14 at 18:10
  • I wouldn't talk about oversight: it's just a plain error. – egreg May 30 '14 at 18:14
  • Whether best practice or not, it works for me, and solves my particular problem. Thanks. – polemon May 31 '14 at 13:25
  • One other thing, though: Is it possible to make caligraphic numbers available as well? – polemon Jun 01 '14 at 22:45
  • 1
    @polemon I'll add the font table for mathc10, so you can see what's available. – egreg Jun 01 '14 at 22:46