# Using Times Roman (mathptmx package) in the text but keeping default LaTeX font for math mode

I would like to use Times Roman font for the main text, but keeping the standart LaTeX font for math mode. I tried the mathptmx package but it changes both main text and math mode font. I know which the times package produces the desired result, but it is now obsolete. Any suggestion?

Thanks!

• Welcome to TeX.SX! The shapes of the standard math fonts don't blend at all with Times New Roman. – egreg Jul 31 '15 at 12:32

If you really want this (questionable) combination using the package times is ok (but check if the sans serif and typewriter is too your liking).

You can also simply add \renewcommand{\rmdefault}{ptm} to your preamble if you only want to change the roman font.

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[scale=0.9]{tgheros}%% TeX Gyre Sans Serif
\usepackage{tgtermes}%%           TeX Gyre Times
\begin{document}

foo \textsf{bar} \textbf{baz}

$\int_1^\infty \frac{1}{x^2}\mathrm{d}x = 1$

\end{document}