[Tex/LaTex] upright sans serif fonts in mathematics (computer modern)

fontsmath-modesans-serif

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.

Best Answer

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:

\renewcommand{\encodingdefault}{T1}
\usepackage[T1]{fontenc}
\renewcommand{\familydefault}{\sfdefault}
\usepackage{eulervm}