4

How do I use \renewcommand{\familydefault}{} to use the times new roman font every where. I am using the scrreprt document style, which has the sans-serif font in the chapter headings.

3
\documentclass{scrartcl}
\usepackage[T1]{fontenc}
\usepackage{mathptmx}
\addtokomafont{disposition}{\rmfamily}
\begin{document}

\section{Foo bar baz}
foo bar baz

\end{document}

enter image description here

2

You cannot use \renewcommand{\familydefault}{} to change the font used in section headings because that will just change the default family which is TNR in any case if that's what you are using. Instead, you need to use the facilities provided by the class you are using for formatting headings.

I don't use these classes but according to the user manual, the command you want is probably:

\setkomafont{disposition}{\rmfamily}

See p. 93 for details. This should change the font family used for all headings in the document - chapter, section, part etc. (as appropriate to the class you are using - obviously they don't all provide chapter, for example).

If this does not do what you want and you cannot figure it out from the documentation, please post a Minimum Working Example showing what you have tried and explaining how the output differs from what you need.

2

There are some choices.

  1. \usepackage{mathptmx}

  2. \usepackage{mathptmx,tgtermes}

  3. \usepackage{stix}

  4. \usepackage{newtxtext,newtxmath}

Of these, the ones that load mathptmx are the less desirable, because the math support is very limited (and some symbols are really bad). The difference in 2 is that a slightly better text font is loaded.

My preference would go to stix or newtx. Note that the full package of the STIX fonts has been made available for TeX Live just a few days ago.

For the titles using \sffamily, the standard remedy in Koma-Script classes is

\addtokomafont{disposition}{\rmfamily}

Example

\documentclass{scrreprt}
\usepackage{stix}
\addtokomafont{disposition}{\rmfamily}

\begin{document}
\chapter{A chapter}
\section{A section}
\subsection{A subsection}
Some text and a formula $E=mc^{2}$ and
\[
\int_{-\infty}^{\infty}e^{-x^2}\,dx=\sqrt{\pi}
\]
\end{document}

enter image description here

The same with \usepackage{newtxtext,newtxmath}

enter image description here

The same with \usepackage{mathptmx}

enter image description here

1
  • As addition: win­fonts, must be installed separately, works only with pdfTeX (a map file only for this, but the documentation is confusing) and the Truetype versions of supported fonts must be installed on the system. You could try, whether it works on Mac. ;-) – Speravir Jan 21 '14 at 2:37
1

\setkomafont{disposition}{\rmfamily} is useful, but it made the heading appear without their boldface. This one did the trick:

\renewcommand{\sectfont}{\normalfont\bfseries}
1
  • It has reasons, why both egreg and Herbert use \addtokomafont. So the existing definition is not overwritten, only the switch, where you actually add the new definition. But one could also use \setkomafont{\normalfont\rmfamily\bfseries}. I would add a \large or \Large, though, depending on the font. – Speravir Jan 21 '14 at 2:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.