unicode-math, \mathscr and \mathcal

In the latest version of unicode-math documentation (2018/01/07 v0.8j), it seems to me that \mathcal and \mathscr do not work as expected. See below a screenshot of page 15 of the documentation (note that the "standard" math font is used, no calligraphic or script version).

I guess it is a bug. Is there a workaround / fix?

• If that's in the documentation, maybe that what's expected by definition? That is, how else to know what's expected? Maybe expecting that is the bug?
– cfr
Jan 12, 2018 at 0:11
• I guess it's just a flaw in the documentation, because I get this picture (click) that's the expected output. Jan 12, 2018 at 0:17
• Correction: if I load XITS Math with StylisticSet=1 for range={cal,bfcal}, \mathcal doesn't work, whereas \mathscr does. Jan 12, 2018 at 0:25
• Jan 12, 2018 at 0:37
• @egreg You're right. I should have checked. So I guess we must wait for a fix. Do you think I should clode my question? Jan 12, 2018 at 0:42

It's a bug and the fix will make it to CTAN in the next couple of days. If you need a quick fix for your own documents, find the following snippet in unicode-math-xetex.sty and unicode-math-luatex.sty:

          }

\cs_set_eq:NN \__um_set_mathalphabet_char:nnn \__um_mathmap_parse:nnn
\cs_set_eq:NN \__um_map_char_single:nn \__um_map_char_parse:nn
\__um_mathalph_map:


and replace it with:

        \cs_set_eq:NN \__um_set_mathalphabet_char:nnn \__um_mathmap_parse:nnn
\cs_set_eq:NN \__um_map_char_single:nn \__um_map_char_parse:nn
\__um_mathalph_map:

}


(I.e., just move the closing brace down.) Apologies for the inconvenience.

• Thanks for this quick fix! I won't need to ask to delay my deadline project :-). Jan 12, 2018 at 7:55