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.
4
  • Welcome to TeX.sx! So your real question is how to have new sections always start on a new page with KOMA-Script?
    – cgnieder
    Commented Aug 3, 2014 at 18:27
  • @cgnieder Hello, yes that's right! :)
    – Molten Ice
    Commented Aug 3, 2014 at 18:29
  • 3
    One way: load the package etoolbox and add \preto\section{\clearpage} to the preamble
    – cgnieder
    Commented Aug 3, 2014 at 18:40
  • @cgnieder That worked! Please post that as the answer and I will mark it as correct. I could answer my own question with this but you deserve the credit!
    – Molten Ice
    Commented Aug 3, 2014 at 18:43

2 Answers 2

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}
3
  • 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
    Commented Feb 4, 2016 at 15:55
  • 1
    Use \ReDeclareSectionCommand
    – user2478
    Commented Feb 4, 2016 at 17:25
  • Thanks for the tip. \RedeclareSectionCommand[afterskip=<length>,beforeskip=<length>]{section} worked great.
    – Janosh
    Commented Feb 4, 2016 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}
3
  • 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
    Commented Aug 4, 2014 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
    Commented Aug 5, 2014 at 8: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
    Commented Aug 5, 2014 at 8:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .