6

I messed with various chapter title formats and now that I want to go back to default i.e

Chapter 1

Title

I only get

1.Title

which misses "Chapter 1" appearing before the chapter title. I tried to use titlesec like this:

\titleformat{\chapter}[display]%
{\normalfont\huge\bfseries}{%
\chaptertitlename\ \achapter
}{20pt}{\Huge\bfseries\filcenter}%

It does look similar but not the same. How can I go back to default? I am using scrbook

2 Answers2

3

The normal behavior with scrbook is not the one you've mentioned, but this one:

enter image description here

obtained with

\documentclass{scrbook}

\begin{document}
\chapter{Test}
\end{document}

I think you want scrbook to simulate the standard book class.

Using titlesec, which is not completely advised when using KOMA classes, you can obtain something similar (respecting the font used in KOMA classes) with the following definition:

\titleformat{\chapter}[display]
{\normalfont\huge\bfseries\sffamily}{\chaptertitlename\ \thechapter}{20pt}{\Huge}

Complete MWE:

\documentclass{scrbook}

\usepackage{titlesec}
\titleformat{\chapter}[display]
{\normalfont\huge\bfseries\sffamily}{\chaptertitlename\ \thechapter}{20pt}{\Huge}

\begin{document}
\chapter{Test}
\end{document} 

Output:

enter image description here

The right way with scrbook is to load it with the option chapterprefix=true, as stated in Thorsten's answer.

If you want to obtain almost exactly the same format as in the book class, you can add the following lines in your preamble:

\usepackage{etoolbox}
\makeatletter
\patchcmd{\@@makechapterhead}
  {\vskip.5\baselineskip}
  {\vskip20pt}
  {}
  {}
\makeatother

\renewcommand{\chapterheadstartvskip}{\vspace*{50pt}}
\renewcommand{\chapterheadendvskip}{\vspace*{50pt}}

\addtokomafont{chapterprefix}{\huge}
\addtokomafont{chapter}{\Huge}

MWE:

\documentclass[chapterprefix=true]{scrbook}

\usepackage{etoolbox}
\makeatletter
\patchcmd{\@@makechapterhead}
  {\vskip.5\baselineskip}
  {\vskip20pt}
  {}
  {}
\makeatother

\renewcommand{\chapterheadstartvskip}{\vspace*{50pt}}
\renewcommand{\chapterheadendvskip}{\vspace*{50pt}}

\addtokomafont{chapterprefix}{\huge}
\addtokomafont{chapter}{\Huge}

\begin{document}
\chapter{Test}
\end{document} 

Result:

enter image description here

karlkoeller
  • 124,410
3

Turn on this chapter prefix by loading the class with the chapterprefix option. For details please have a look at the »KOMA-Script« user guide.

\documentclass[chapterprefix=on]{scrbook}
\usepackage[T1]{fontenc}
\usepackage{blindtext}

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

enter image description here