I have multiple occurences of mathcal in my document and they do not use the same style. Consider this MWE:




\setmathfont{XITS Math}
\setmathfont[range={\mathcal},StylisticSet=1]{XITS Math}




MWE Output

As you can see the two "S" charcters are different, which they should not be.

What have I done wrong?

Versions used:

  • XeTeX, Version 3.14159265-2.6-0.99996 (TeX Live 2016)
  • mathtools 2015/11/12 v1.18
  • amsmath 2016/06/28 v2.15d
  • unicode-math 2015/09/24 v0.8c


Loading mathtools after unicode-math solves this problem, but messes up other things. For example \underbrace{X}_{0} then gives:

Underbrace output

  • 3
    Looks okay in texlive 2017. I get the second S in both places. It works in texlive 2016 with unicode-math 2017/01/27 v0.8d too. Oct 1 '17 at 9:55
  • @UlrikeFischer: I finally got around to updating my texlive and indeed now it works fine. Could you expand your comment into an answer for me to accept?
    – bodo
    Oct 10 '17 at 10:24

This was a bug in unicode-math. See for example https://github.com/wspr/unicode-math/issues/356.

While it was fixed in 2017/01/27 v0.8d, it somehow reoccured later on and was finally fixed with https://github.com/wspr/unicode-math/commit/0f245c2ec4c527397a67f3ff04aea8107a6cbe31 and released with 2018/02/01 v0.8l.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.