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 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?

share|improve this question
    
Welcome to TeX.SE! –  Mico Jul 17 '12 at 10:54
1  
Typographically speaking it's not a good idea: they are very different serif fonts and the don't mix at all. –  egreg Jul 17 '12 at 20:31
add comment

1 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.

share|improve this answer
    
Thanks very much Mico! One further question: In opposition to my original question, what if I wanted text in my math environments to be in computer modern? –  Sean Cray Jul 17 '12 at 11:02
    
An interesting (and slightly unusual) concern. It wouldn't be hard to achieve: just encase the text in question in \mathrm directives, taking care to specify interword spaces explicitly with \ directives. E.g., $\mathrm{The\ quick\ brown\ fox\ jumps.}$ would be rendered in Computer Modern. –  Mico Jul 17 '12 at 11:14
    
@Mico: You are misusing \mathrm. If the text is really "text" then it should be set in "text" mode (e.g. with \text or \mbox and the font family should be switched like in the text body by using \fontfamily{whatever}\selectfont –  Ulrike Fischer Jul 17 '12 at 11:45
    
@UlrikeFischer -- My follow-up comment was meant only to address a, shall-we say, unusual query from the OP -- about how to typeset some text in a math environment in CM even though the main text font is TR. I actually fully agree with you that if the text font is TR, then text set inside a math expression should also use TR. –  Mico Jul 17 '12 at 12:49
    
I didn't say anything about the sense to use different font families for texts portions. I complained about your method to change the font family. \mathrm is a command for math symbols. It should be used to set the font of a single symbol, but not to set the font of a longer text – even if it looks okay in some cases. Try e.g. \mathrm{abcäöüß} (with and without T1-encoding) to see some of the possible problems. –  Ulrike Fischer Jul 17 '12 at 13:02
show 2 more comments

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.