Using the scrreprt
document class, I get a table of contents that uses non serif fonts for everything, except for sections:
Now I've been asked to change this to non serif for the sections as well. tex --version
says TeX 3.14159265 (TeX Live 2015/Debian)
on my machine, but from what I've seen on my search for a solution, this actually appears to be the intended default behavior, so it should be reproducible on other machines using this MWE:
\documentclass[toc=chapterentrywithdots]{scrreprt}
\begin{document}
\tableofcontents
\chapter{Testing Text Chapter 1}
Testing Text Chapter 1
\section{Testing Text Section 1}
Testing Text Section 1
\section{Testing Text Section 2}
Testing Text Section 2
\end{document}
The more common question regarding this topic appears to be how to change the font to non serif only or serif only for the whole document, but this is not what I want to achieve. Currently, I have non serif headers and serif text throughout my complete document, and it should stay this way. Only the sections in the table of contents should be non serif, preferably using a clean solution instead of a dirty hack.