4

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?

2
  • 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
6

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

\usefonttheme{professionalfonts}

in the preamble. This suppresses any auto-manipulations.

1
  • 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
5

Yes, it was a beamer issue. Using

\documentclass[onlymath]{beamer}
\usefonttheme{serif}

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

2
  • Yes. I didn't noitce it is beamer here. – Leo Liu Feb 7 '11 at 16:01
  • 1
    And you'd use \usefonttheme[onlymath]{serif}. – Leo Liu Feb 7 '11 at 16:12
2
\usepackage[cm-default,no-math]{fontspec}
1
  • 1
    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 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.