# [Tex/LaTex] How to change the font of section numbers such as \thechapter

fontskoma-scriptnumberingscrbooksectioning

I would like to change the font of the chapter and section numbers appearing in my titles. I found that I can change the number style from arabic to roman etc. but I couldn't find a way to change the font of the number itself.

When I tried changing the font of the chapter heading it changed only the heading title text and not the numbering. So I get "1.1" in times roman and "section name" in sans serif :/

I tried using sectsty, titlesec and renewing the \chapter command.

class definition is: \documentclass[twoside,12pt,a4paper,pointlessnumbers,headsepline,idxtotoc]{scrbook}

Any tips or advice would be great!

From the tagging, it seems that you are using KOMAscript and the class scrbook. Then you change the font either with \setkomafont or \addtokomafont (see section 3.6, page 51 in the revised manual), and with the modifier chapterprefix. Try:

\setkomafont{chapterprefix}{\rmfamily\Large\bfseries}


or, to change to a serif typeface only:

\addtokomafont{chapterprefix}{\rmfamily}


To change all sectioning to the default Roman font, reverse all font changes you have done to chapter, and try

\addtokomafont{sectioning}{\rmfamily}


It seems from your comment that somebody has tampered with the definitions in your classfile. This minimal example works for me, giving me sans serif in heading and body text.

\documentclass[twoside,12pt,a4paper,pointlessnumbers,headsepline,idxtotoc]{scrb‌​ook}
\usepackage{fixltx2e}
\usepackage[UKenglish]{babel}
\usepackage{tgheros}
\renewcommand*\familydefault{\sfdefault}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{blindtext}

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


In your document, comment out (or delete) all usepackage{secsty} etc. that changes the headings. Or add packages and commands from you preamble to my code.

If you are going to use Helvetica as sans serif font, I suggest using the Tex-Gyre version instead, by loading the package tgheros. I have changed my MWE correspondingly.