[Tex/LaTex] \clearpage after every subsubsection

page-breakingsectioningtitlesec

I'd like to clear the page at the end of every \subsubsection. I tried

\usepackage{titlesec}
\newcommand{\subsubsectionbreak}{\clearpage}

But this appears to force a \clearpage at the start of every \subsubsection. Is it possible to force a \clearpage at the end?

Best Answer

You could include the following instructions in your document's preamble:

\usepackage{titlesec}
\newcommand\sectionbreak{\ifnum\value{section}>1\clearpage\fi}
\newcommand\subsectionbreak{\ifnum\value{subsection}>1\clearpage\fi}
\newcommand\subsubsectionbreak{\ifnum\value{subsubsection}>1\clearpage\fi}

This will insert a page break every time a \section, \subsection, or \subsubsection command is encountered if the corresponding counter is greater than 1. I.e., every \section command after the very first such command will trigger a page break; every \subsection command after the very first such command within a given section will trigger a page break, etc.

This method assumes that your document class uses "plain" counter variables for section, subsection and subsubsection. If that's not the case, please indicate how you've set up those variables.

Related Question