5

I've got a problem, that I can't fix. As soon as I try to use Cambria Math as font for \mathscr and \mathbfscr I get a

"missing \endcsname inserted"

as error. I'm new to LuaLaTeX so I simply copied this line from a pdf document that I've found. Everything works fine when I use Cambria Math directly with \setmathfont instead of xits. So the font itself seems to be installed correctly.

\documentclass{scrbook}
\usepackage{fontspec}
\usepackage{unicode-math}
\setmathfont{Cambria Math}
\setmathfont[range={\mathscr,\mathbfscr}]{Cambria Math}

\begin{document}
    Hello world!
\end{document}

Maybe someone can help me with that.

closed as off-topic by Andrew Swann, Joseph Wright Dec 28 '14 at 16:52

  • This question does not fall within the scope of TeX, LaTeX or related typesetting systems as defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

  • Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. Thanks for including an example with your question. Could you make it a minimum working example and take out any lines that aren't necessary to reproduce the problem? – darthbith Jul 1 '14 at 12:24
  • If I keep only the document class (without options), the amsmath package, the unicode-math package, and the line setting the math font to Cambria Math (I don't have the xits fonts, so I had to comment out those lines) I cannot reproduce this error. I did note some similar error with the polyglossia package in my brief tests... – darthbith Jul 1 '14 at 12:27
  • 1
    According to the last commit, the fixltx2e package is no longer loaded by fontspec. If I put \RequirePackage{fixltx2e}[2006/03/24] before \documentclass, the MWE compiles successfully (NB the commit message of that commit notes that it is recommended to load fixltx2e before \documentclass). – darthbith Jul 1 '14 at 15:12
  • 1
    This post appears to be off-topic because it is about an issue in unicode-math that has been fixed: github.com/wspr/fontspec/issues/178 github.com/wspr/unicode-math/commit/… (@Sebastian Don't worry, this is just for house-keeping. Good question!) – darthbith Jul 2 '14 at 14:47
  • 1
    This question appears to be off-topic because it is about a now resolved bug – Andrew Swann Dec 28 '14 at 16:28

Browse other questions tagged or ask your own question.