[XeTeX] \setmathrm with fontspec has no affect on \mathrm{x}?

Khaled Hosny khaledhosny at eglug.org
Sat Dec 17 14:53:21 CET 2011

On Sat, Dec 17, 2011 at 09:37:54PM +0800, Daniel Greenhoe wrote:
> If I use \setmathrm{fontx} in the preamble, shouldn't I expect fontx
> to be invoked when I use $\mathrm{x}$ in the document body? But that
> isn't the case. Why is that and how do I get what I expect without
> exiting math mode? Here is an example (see also attachments):
> \documentclass[12pt]{book}
> \usepackage{fontspec}
> \usepackage{unicode-math}

IIUC, when fontspec detects that unicode-math is loaded (and few other
packages that deal with math fonts), no-math option is implied and thus
various math setting commands are (silently?) ignored.

You are better using unicode-math's range option to achieve what you


More information about the XeTeX mailing list