0

I'm using the exam documentclass, and currently have

\pagestyle{headandfoot}
\runningfooter{foo}{Page \thepage\ }{\iflastpage{End of Paper}{bar}}

to instruct students when the exam has ended.

Our university now requires that we print instructions on the back cover of the exam. I want to add these without interfering with the existing footers. Thus, I think I'm looking for something like coverpages, but at the end of the document.

(It would be nice to ensure that the back cover is an even page number, but I'm happy to hardcode that.)

1 Answer 1

3
  • \clearleftpage will ensure that the following text is placed on an even page for two-sided documents or on the next page if one-sided (based on https://tex.stackexchange.com/a/11709/36296)

  • With \AtEndDocument the text is automatically placed at the end without interfering with your footline.


\documentclass[twoside]{exam}

\usepackage{lipsum}

\makeatletter
\newcommand*{\clearleftpage}{%
    \clearpage
    \if@twoside
    \ifodd\c@page
    \hbox{}\newpage
    \if@twocolumn
        \hbox{}\newpage
    \fi
    \fi
    \fi
}
\makeatother

\pagestyle{headandfoot}
\runningfooter{foo}{Page \thepage\ }{\iflastpage{End of Paper}{bar}}

\AtEndDocument{\clearleftpage bla}

\begin{document}

\lipsum
\lipsum

\end{document}

enter image description here

3
  • Thank you @samcarter. Do you know how I can replace the headers and footers in the \AtEndDocument? Commented Feb 21, 2018 at 8:49
  • @ColinRowat You can include setting another page style within the \clearleftpage command Commented Feb 21, 2018 at 9:24
  • @ColinRowat You're welcome! Commented Feb 21, 2018 at 11:06

You must log in to answer this question.

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