12

I am using \documentclass{scrartcl} which I believe is a KOMA-Script type.

I now wish to have each \section{} start in a new page, similar to what \usepackage{titlesec} offers, as shown on this question.

How can I do so?

Currently, I get this warning which is why I asked this question:

Class scrartcl Warning: Usage of package `titlesec' together
(scrartcl) with a KOMA-Script class is not recommended. 
(scrartcl) I'd suggest to use the package only 
(scrartcl) if you really need it, because it breaks several
(scrartcl) KOMA-Script features, i.e., option `headings' and
(scrartcl) the extended optional argument of the section
(scrartcl) commands .
(scrartcl) Nevertheless, using requested
(scrartcl) package `titlesec' on input line 7.

2 Answers2

16

Add a \clearpage to each section:

\documentclass{scrartcl}
\addtokomafont{section}{\clearpage}
\begin{document}

\section{foo}foo
\section{bar}bar
\subsection{foooo} foooo
\section{baz}baz
\section{foobar}foobar

\end{document}
  • What if I wanted to reduce the white space below a section header? \addtokomafont{element }{command} seems to execute whatever instructions command contains before printing the section title. – Janosh Feb 04 '16 at 15:55
  • 1
    Use \ReDeclareSectionCommand –  Feb 04 '16 at 17:25
  • Thanks for the tip. \RedeclareSectionCommand[afterskip=<length>,beforeskip=<length>]{section} worked great. – Janosh Feb 04 '16 at 18:24
2

All credit goes to cgnieder for this solution.

\usepackage{etoolbox}

\preto\section{\clearpage}

\begin{document}
\section{Section One}
\section{Section Two Should Start On Another Page}
\end{document}
  • I don't understand your comment. Herbert's solution is for all intents an purposes identical to this, except that it uses the built-in KOMA hook for modifying the section code (and so is probably to be preferred; it also doesn't require an extra package). There is nothing added each time you make a new section with his code either. – Alan Munn Aug 04 '14 at 23:59
  • @AlanMunn I think it got edited, previously I was under the impression that we had to manually add \clearpage after every section. – Molten Ice Aug 05 '14 at 08:04
  • 1
    @Herbert's solution is better for at least one reason: the KOMA font “section” is also used by \addsec so the addition works for it, too. With etoolbox you'd need to patch it, too. – cgnieder Aug 05 '14 at 08:13