Quantcast
Viewing all articles
Browse latest Browse all 3

Answer by esdd for How to change the font style of elements in KOMA-Script?

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.

Image may be NSFW.
Clik here to view.
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}

Image may be NSFW.
Clik here to view.
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}

Image may be NSFW.
Clik here to view.
enter image description here

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

\addtokomafont{chapterentry}{\rmfamily}

Image may be NSFW.
Clik here to view.
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}

Viewing all articles
Browse latest Browse all 3

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>