Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I would like to start each section on a new page. Is adding the following to my preamble this the preferred method, or a hack?

\let\stdsection\section
\renewcommand\section{\newpage\stdsection}
share|improve this question
1  
Perhaps you would like to use \clearpage instead of \newpage if you use floats. –  Stefan Kottwitz Jan 22 '11 at 22:11
    
Why not use a document class that allows chapters, and use them instead (since they automatically start on new page..) –  Seamus Jan 22 '11 at 22:34
    
@Stefan you are correct, although my present document is not using floats. –  David Jan 22 '11 at 22:38
    
ASeamus not a bad idea, but I'd prefer not to have to change the document class –  David Jan 22 '11 at 22:39
    
Alternatively, just find and replace all \section{ with \clearpage\section{ –  Seamus Jan 22 '11 at 22:41

2 Answers 2

up vote 21 down vote accepted

The titlesec package allows to do this with just

\newcommand{\sectionbreak}{\clearpage}

It's cleaner than what you were doing and the package also allows to completely customize sections. Here's a fully compilable code sample showing how it works:

\documentclass{article}

\usepackage{titlesec}
\newcommand{\sectionbreak}{\clearpage}

\begin{document}

Text

\section{Title}
Text
\subsection{Title}
Text
\subsection{Title}
Text

\section{Title}
Text

\end{document}
share|improve this answer
1  
note: if you have a \subsection without content, the \section after it won't be pushed to a new page. I don't know whether this is a bug, expected, or irrelevant, but I thought it's worth mentioning it as first I was a bit puzzled why the \clearpage solution didn't work. –  Karoly Horvath Jul 26 '13 at 17:43
    
@KarolyHorvath: if you look up the code for \ttl@straight@ii in titlesec.sty, you clearly see the explanation for this phenomenon: the \sectionbreak command is only used if the boolean @nobreak is false, which is not the case just after a subsection title (but is once some text has been typesetted). One could easily patch \ttl@straight@ii to behave as you want, but it's probably simpler to use the solution from tex.stackexchange.com/q/47047 –  Philippe Goutet Jul 26 '13 at 19:11

Obligatory ConTeXt solution:

\setuphead[section][page=yes] % or page=right
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.