[Tex/LaTex] RedeclareSectionCommand, beforeskip not working

koma-scriptsectioningspacing

I am trying to have sections have space before them using \RedeclareSectionCommand. beforeskip will work for this, but I also want the section to start on a new page and when I put it onto a new page, the beforeskip disappears. Does anyone know a way around this?

I am using KOMA version 3.25.

Example:

\documentclass{scrreprt}

\begin{document}
\RedeclareSectionCommand[beforeskip=2in,afterskip=0pt]{section}

\tableofcontents

\newpage
\section{Section 1}

\end{document}

Best Answer

If you want all sections to start a new page, you can change the style of sections from section to chapter:

\documentclass{scrreprt}[2018/12/30]% new KOMA-Script release needed
\usepackage{blindtext}% only for some dummy text
\begin{document}
\RedeclareSectionCommand[style=chapter,beforeskip=2in,afterskip=0pt,afterindent=false]{section}

\tableofcontents

\chapter{Chapter 1}
\blindtext
\section{Section 1}
\blindtext
\section{Section 2}
\blindtext

\end{document}

Please note, this suggestion needs at least KOMA-Script 3.26, because of option afterindent=false. With an old KOMA-Script you can use:

\documentclass{scrreprt}
\usepackage{blindtext}% only for some dummy text
\begin{document}
\RedeclareSectionCommand[style=chapter,beforeskip=-2in,afterskip=0pt]{section}

\tableofcontents

\chapter{Chapter 1}
\blindtext
\section{Section 1}
\blindtext
\section{Section 2}
\blindtext

\end{document}

to get the same result:

two section pages

The second code example uses a negative beforeskip value to avoid the indent of the first paragraph after the heading. I do like the solution with an explicit afterindent=false more.

Related Question