[Tex/LaTex] Section open right in scrbook

double-sidedkoma-scriptpage-breakingscrbooksectioning

Using scrbook, I would like sections to open on a new odd page, like chapters do. How can I achieve that?

Best Answer

Just add \cleardoublepage to the action of \section.

No packages:

\long\expandafter\def\expandafter\section\expandafter{%
  \expandafter\cleardoublepage\section}

Shorter:

\usepackage{etoolbox}
\preto\section{\cleardoublepage}

Note: the \section command has (in the standard classes and also in the KoMa-script classes) a definition without arguments. The arguments are absorbed by other macros called by it.

If you want to respect the openany or openright option, then \cleardoublepage is not the correct command. Thus

\usepackage{etoolbox}
\makeatletter
\preto\section{\if@openright\cleardoublepage\else\clearpage\fi}
\makeatother

should be used.

The "no package" version of this one might be

\makeatletter
\toks0={\if@openright\cleardoublepage\else\clearpage\fi}
\toks2=\expandafter{\section}
\long\edef\section{\the\toks0 \the\toks2 }
\makeatother
Related Question