[Tex/LaTex] Different Font in a Math Environment

fontsmath-mode

I would like to use two different fonts in my document, differentiated as follows: In the body/text of my document, I would like to use Times, and in the equations I would like to default to standard computer modern. Additionally, if any text should appear in my math environments, I would like that to be rendered in Times as well. How can this be done?

Best Answer

To change just the text-mode font to Times, while leaving the math-mode font family at its default (i.e., Computer Modern), you could issue the command

\renewcommand{\rmdefault}{ptm}

in your document's preamble.

As the name of the command suggests, this instruction only changes the font for the "roman" text font. As such, the default sans-serif and monospaced font families are also left untouched. If you also wanted to change the sans-serif font family from Computer Modern to, say, Helvetica, you could add the command

\usepackage[scale=0.86]{helvet}

where the 0.86 scaling factor is chosen to equalize the "x-heights" of Times Roman and Helvetica. At a given "point size", the x-height of Helvetica is about 20 percent larger than that of Times Roman; if there's a chance that both fonts will occur side by side in a line of text, it's imperative to scale one font or the other so that the x-heights are (roughly) equal.

For the sake of completeness: assuming you have an up-to-date TeX distribution (such as TeXLive2012, or MikTeX2.9 with all packages fully updated) on your computer, you could also issue the command

\usepackage{newtxtext}

to switch the document's text-mode font to Times Roman. Any differences between the Times Roman text families of the ptm and newtxtext groups will be very subtle.