12

Is there a possibility to change the font-style in the table of contents? Everything I wrote down in my document was written with Times. However, the ToC does not have the same font family. Is there a way to change the font of the ToC to Times New Roman? Thank you : )

enter image description here

\documentclass[a4paper, fontsize=11pt]{scrbook}
\usepackage{geometry} \geometry{a4paper, top=25mm, left=25mm, right=25mm, bottom=20mm, headsep=10mm, footskip=12mm} 
\usepackage[ngerman]{babel} 
\usepackage[T1]{fontenc}       
\usepackage[latin1]{inputenc}
\usepackage{acronym}     
\usepackage{anyfontsize}

\begin{document}

\tableofcontents

\chapter{Test}
Is there a possibility to change the font-style in the table of contents? Everthing I wrote down in my document was written with Times. However, the ToC does not have the same font family. Is there a way to change the font of the ToC to Times New Roman?

\end{document}
4
  • The TOC has the same font as the main document. The reason why you must have something special defined. Show in an example that it is different!
    – user2478
    Feb 13, 2016 at 14:29
  • I just guess you want all chaptertitles to be in roman, not sans: \addtokomafont{chapter}{\rmfamily}
    – Johannes_B
    Feb 13, 2016 at 15:03
  • 1
    Or if the the chapter titles in TOC should be in roman: \addtokomafont{chapterentry}{\rmfamily}. Or all headings in your document: \addtokomafont{disposition}{\rmfamily}
    – esdd
    Feb 13, 2016 at 15:14
  • @esdd Do you wanna write up an answer? We could mark the question by Nico Schlömer in the KOMA tag as a duplicate of this one here. Nico was asking for something about the title, but the question was too unclear to answer.
    – Johannes_B
    Feb 13, 2016 at 16:04

2 Answers 2

12

Use \setkomafont or maybe better \addtokomafont to change the font settings for an element like the chapter heading.

For all headings in the document the element disposition is used first followed by a specific element for the section level. And the element disposition is also used for the chapter entries in TOC. Because it is predefined as \normalcolor\sffamily\bfseries all headings in the document will be sans serif while the normal font in the document is still roman.

enter image description here

If the headings of all section levels including the chapter entries in TOC should be changed to roman use

\addtokomafont{disposition}{\rmfamily}

enter image description here

If the heading of only a specific level should be roman change the settings for its specific element. For example if only the chapter heading should be changed to roman use

\addtokomafont{chapter}{\rmfamily}

enter image description here

If only the font of the chapter entries in TOC should be changed use the element chapterentry

\addtokomafont{chapterentry}{\rmfamily}

enter image description here

You can find a list of predefined elements in the documentation, section »Text markup«.

Code:

\documentclass{scrbook}
%\addtokomafont{disposition}{\rmfamily}
%\addtokomafont{chapter}{\rmfamily}
\addtokomafont{chapterentry}{\rmfamily}
\usepackage{blindtext}% only dummy text
\begin{document}
\tableofcontents
\blinddocument
\end{document}
0
9

If you simply don't want sans serif fonts, use option sfdefaults=false (formerly egregdoesnotlikesansseriftitles):

\documentclass[sfdefaults=false]{scrbook}

\usepackage{mwe}

\begin{document}
\tableofcontents
\blinddocument
\end{document}

The option simply replaces all \sffamily in the default font settings of KOMA-Script. The result would be:

table of contents

chapter, section, subsection

So not only the table of contents will not use sans serif fonts any longer but also the headings of chapter, section, subsection etc. and also, e.g., the labels of description environment.

2
  • 2
    For koma v3.39 or newer there is now the class option sfdefaults=false Jul 4, 2023 at 11:50
  • @samcarter_is_at_topanswers.xyz Thanks for the hint.
    – esdd
    Aug 22, 2023 at 22:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .