[Tex/LaTex] Turn advise on page in exam


I like to have a "turn page around" advise on an exam sheet because it continues. Right now, I do it manually. I need to search where the page ends and put a

\hfill \textit{Please turn \(\hookrightarrow\)}

at the appropriate position. This is not a very neat solution, since the space needed to be adopted so that it doesn't fall onto the next page. And if I would have to do this twice or more, the vertical position should always be the same. Is there a way to achieve this automatically? Here's a minimal working example to play with.



\item[\textbf{Task 1}]


\item[\textbf{Task 2}]


\hfill \textit{Bitte wenden \(\hookrightarrow\)}

\item[\textbf{Task 3}]




Best Answer

The exam class offers precisely this functionality: for instance, you can write



  \oddeven{\iflastpage{}{\textbf{Turn over}}}{}

to put an instruction to turn over only on the right-hand side of double-page spreads, but not on the very last page of the document.

If you want to implement this yourself, you could look at how exam does it, but frankly it's such a useful class for this sort of thing that I would suggest you use it unless you have a pressing reason not to do so.

(Edited to add: if you do want to do this without changing your class, the only bit not in the fancyhdr package is the \iflastpage macro, which is reasonably easy to pull out:



With this in your preamble you could use

\fancyfoot{} % clear everything
\fancyfoot[RO]{\iflastpage{}{\textbf{Turn over}}}

to get something like the effect you're after.)