[Tex/LaTex] Remove space before chapter title – with KOMA script (scrbook)

chapterskoma-scriptsectioningvertical alignment

I am using the KOMA script document class scrbook. Is there any way to make the chapter headings appear exactly at the top of the page body just by using KOMA (without using titlesec, fancyhdr, fncychap, … for they would mess up other things in my documents)? Is there any way to change the space between section heading and the following text?

Best Answer

Update

Since KOMA-Script version 3.26 you can option afterindent=false to avoid the paragraph indentation of the first text line after the chapter title.

\documentclass{scrbook}
\usepackage{blindtext}
\usepackage{showframe}
\RedeclareSectionCommand[
  beforeskip=0pt,
  afterindent=false% <- added
  ]{chapter}
\begin{document}
\chapter{foo}
\blindtext
\end{document}​

The result is the same as in the original answer below.

With afterindent=false or afterindent=true a negative value of beforeskip results in a negative skip above the chapter title (needs version 3.26 or newer).

Note: With KOMA-Script versions 3.22 - 3.25 you have to set beforeskip to a negative value to avoid the paragraph indentation in the first text line following the chapter title: beforeskip=-1sp. For more information see the documentation or Adjusting spacing around section/subsection titles with koma-script


Original answer

With KOMA-Script Version 3.15 or newer you can use \RedeclareSectionCommand or \RedeclareSectionCommands to change the space above or below the chapter title.

\RedeclareSectionCommand[beforeskip=0pt]{chapter}

enter image description here

Code:

\documentclass{scrbook}
\usepackage{blindtext}% dummy text
\usepackage{showframe}% to show the page layout
\RedeclareSectionCommand[beforeskip=0pt]{chapter}
\begin{document}
\chapter{foo}
\blindtext
\end{document}​