5

Instead of manually putting a \newpage before \begin{appendices}, how can I tell the appendix package to do this ?

9

If you have a chaptered document class, this would be the default behaviour. In documents with top level structure section there is no way to tell the appendix package to insert a page break. That is because sections usually do not start new pages. So you need to manually add a \clearpage.

0

The etoolbox package provides commands for inserting commands around/within environments. I've included some related (commented) commands you may find useful.

\documentclass{article}

\usepackage{appendix}
\usepackage{etoolbox}

% Inserts \clearpage before \begin{appendices}
\BeforeBeginEnvironment{appendices}{\clearpage}
% Inserts \clearpage after \end{appendices}
%\AfterEndEnvironment{appendices}{\clearpage}

% Inserts \clearpage before every \section within appendices environment
%\AtBeginEnvironment{appendices}{\pretocmd{\section}{\clearpage}{}{}}{}

\begin{document}
    \section{Pre1}
    \section{Pre2}

    \begin{appendices}
        \section{App1}
        \section{App2}
    \end{appendices}

    \section{Post1}
    \section{Post2}
\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.