TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am writing a presentation using the beamer class and XeTeX. I have changed the sans font using \setsansfont. Now some symbols in my equations are rendered using the mono font (like the lowercase letters).

How can I force math mode to render all symbols in the equations in the default Computer Modern, ignoring the font set with \setsansfont?

share|improve this question
Could you pleas edit your question and add that you are seeing this behavior with beamer slides. That would be helpful for people having the same problem and searching for a solution. – Caramdir Feb 7 '11 at 16:07
I changed the tags. – Leo Liu Feb 7 '11 at 16:18

Yes, it was a beamer issue. Using


solves the problem. Thanks for pointing me in the right direction, though.

share|improve this answer
Yes. I didn't noitce it is beamer here. – Leo Liu Feb 7 '11 at 16:01
And you'd use \usefonttheme[onlymath]{serif}. – Leo Liu Feb 7 '11 at 16:12

By default, Beamer does some math font manipulation, because many fonts, such as the cm-sans used by default, don't provide matching mathematical glyphs. If you want the standard Computer Modern (serif) math font, just say


in the preamble. This suppresses any auto-manipulations.

share|improve this answer
Note that you don't have to (and in fact shouldn't) sign with your name since it automatically appears in the lower right corner of your post. – Hendrik Vogt Feb 8 '11 at 16:19
share|improve this answer
This change makes more symbols appear in the sans font, instead of the less, e.g. now numbers are in the sans font. Could this be a beamer issue? – Nickolay Kolev Feb 7 '11 at 15:55

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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