add tag
topnush
I am writing and exam and I want page # of ## in the middle bottom of every page, including the front page. I need "Question continues..." in the bottom right of pages where a question has not finished. Here is my MWE:

```
\documentclass[answers, addpoints]{exam}
\usepackage{lipsum}
\usepackage{pdfpages}

\pagestyle{headandfoot}
\cfoot{} % Empty center footer

\footer{}{\iflastpage{\vspace{-10cm}END OF EXAM}{\textit{Page \thepage{} of \numpages}}}
{\ifincomplete{\textit{Question continues...}}{\textit{Page \thepage{} of \numpages}}}

\begin{document}
	\includepdf[pages=-,pagecommand={\thispagestyle{headandfoot}}]{frontpage.pdf}
	
	\begin{questions}
		\question
		\lipsum[1-10]
	\end{questions}
\end{document}
```


This works ok except it gives me page 1 of 3 in both the middle bottom and the bottom right on page 1. I want it only once and in the middle.
Top Answer
samcarter
You could remove the `\textit{Page \thepage{} of \numpages}` from the right footer:

```
\documentclass[answers, addpoints]{exam}
\usepackage{lipsum}
\usepackage{pdfpages}

\pagestyle{headandfoot}
\footer{}{\textit{Page \thepage{} of \numpages}}{\ifincomplete{\textit{Question continues...}}{}}

\AddToHook{env/document/end}{\vskip3cm\centering END OF EXAM}

\begin{document}
	\includepdf[pages=-,pagecommand={\thispagestyle{headandfoot}}]{example-image}
	
	\begin{questions}
		\question
		\lipsum[1-10]
	\end{questions}
\end{document}
```

Enter question or answer id or url (and optionally further answer ids/urls from the same question) from

Separate each id/url with a space. No need to list your own answers; they will be imported automatically.