Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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
add comment

3 Answers

Yes, it was a beamer issue. Using

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

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
1  
And you'd use \usefonttheme[onlymath]{serif}. –  Leo Liu Feb 7 '11 at 16:12
add comment

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.

Alexander

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
add comment
\usepackage[cm-default,no-math]{fontspec}
share|improve this answer
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
add comment

Your Answer

 
discard

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.