How to prepare document with Computer Modern fonts (using MikTeX 2.9) with upright sans serif fonts. Has anybody got an idea how to do it?

I've tried sfmath package, but it produces sans serif italics and I don't know how to get rid of the italics.

Let me be more specific. I have a LaTeX document which I want to format in a special way: the document font should be standard serif CM font, but what's between $ $ (and [ ]) should be typeset in sans serif upright font. Any package I tried doesn't help, cmbright and sfmath can produce a sans serif font but in italics.

  • did you try putting \usepackage{cmbright} in your document preamble?
    – percusse
    Aug 16, 2011 at 14:32
  • @user7313: If you register your account, a moderator can merge the account with the unregistered one from yesterday so that you regain control over your question.
    – Caramdir
    Aug 18, 2011 at 6:00
  • I now merged the two accounts together. Aug 18, 2011 at 9:05
  • Since you have some responses below that seem to answer your question, please consider marking one of them as ‘Accepted’ by clicking on the tickmark below their vote count (see How do you accept an answer?). This shows which answer helped you most, and it assigns reputation points to the author of the answer (and to you!). Sep 17, 2012 at 22:23

2 Answers 2


If I understand your question correctly, you are trying to get a document typeset using a sans-serif font rather than the "ordinary" serif font. In addition, you want the font that's used in math to be upright rather than "slanted". The only math font I'm familiar with that's upright rather than slanted is the so-called "Euler" font; it goes reasonably well with Computer Modern fonts, both serif and sans-serif. If the Euler font suits your needs, you should add the following commands to the preamble of your document:


Upright, sans-serif fonts in mathematics can be accessed within the sfmath package by using the command \mathrm{…} within the $…$ structure


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .