9

The skeleton of my document is:

\documentclass[11pt]{article}
\usepackage{amsmath,textcomp,amssymb,geometry,graphicx}

\begin{document}
\maketitle

\section*{1.}

\begin{itemize}
\item[(a)]
\item[(b)]
\end{itemize}

\section*{2.}

\begin{itemize}
\item[(a)]
\item[(b)]
\end{itemize}

\section*{3.}

\begin{itemize}
\item[(a)]
\item[(b)]
\end{itemize}

\end{document}

I want each section to be on a separate page. How do I do that?

15

why

\section*{1.}

rather than

\section{}

In LaTeX it's almost always better to let LaTeX do the numbering.

However in either case

\let\oldsection\section
\renewcommand\section{\clearpage\oldsection}

will add the page break.

  • I'm not sure why it's \section*{1.}. I just copied this code from someone... Do I add your code snippet to the preamble? – Frank Epps Sep 1 '13 at 0:58
  • 1
    @FrankEpps it's a bad style, it disables the latex cross referencing mechanism as latex doesn't "know" the number and of course it means if you edit in a new section you have to renumber the whole document by hand. – David Carlisle Sep 1 '13 at 1:01
  • @FrankEpps yes adding that to the preamble should work – David Carlisle Sep 1 '13 at 1:02
5

Here's another option using \sectionbreak from the titlesec package:

\documentclass[11pt]{article}
\usepackage{titlesec}

\titleclass{\section}{top}
\newcommand\sectionbreak{\clearpage}

\title{Title}
\author{Author}

\begin{document}
\maketitle

\section{Test section one}
\section{Test section two}
\section{Test section three}
\section{Test section four}

\end{document}
  • Note that this doesn't work if you also use hyperref. Or at least didn't work for me. – user1496984 Jul 9 '16 at 1:39
  • @Gonzalo Do you happen to know, if there is a way to turn this feature of for some specific headings? – lcnittl Dec 12 '17 at 21:32
3

As shown here

If you place each section into its own file and place all the files into the same folder, you can easily determine whether you would like a page break or not between each by using \include{section file} or \input{section file}.

\include{section file} places a page break after each while \input{section file} does not.

\documentclass[notitlepage, 12pt]{article}

\begin{document}

\title{Weekly Homework X}
\author{Tony Stark\\ 
Foundations of Mathematics}

\maketitle

\input{file example 1}
\input{file example 2}
\input{file example 3}

\include{file example 4}

\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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