0

According to the exam class documentation §11.6, the behaviour of the coverpages environment is defined as such:

Note that if your document has a coverpages environment (see section 12), then those pages will not be counted in \numpages; ...

Now, I want to specifically override this particular behaviour: in other words, the page(s) containing \begin{coverpages} ... \end{coverpages} to be page 1 (and so on), and all other pages following it to be page (last cover page number + 1) and so on.

Furthermore, I would like all page numbering to have the format: Page x of y, where x and y are Hindu-Arabic numerals. This is trivial for the actual question pages, but I also wished to redefine the numbering of the coverpages environment to be arabic instead of roman, which is apparently hard-coded into the exam class.

A small M(N)WE [minimum (not) working example]:

\documentclass{exam}

% \addtocounter{... content page + number of cover pages? }
\coverfooter{}{Page \thepage{} of \totalnumpages{}}{}
\footer{}{Page \thepage{} of \totalnumpages{}}{}

\begin{document}
\begin{coverpages}
    Here is my cover page. 
\end{coverpages}

\begin{questions}
    \question[]{
        ...
    }
\end{questions}
\end{document}

On a partially related note, I found that both the titlepage environment as well as maketitle exhibit similar behaviour by resetting the page counter, so I have two 'page 1's.

1 Answer 1

0

An answer on Reddit, courtesy of /u/JimH10:

You are going to want to find the cls file. I get this.

$ kpsewhich exam.cls
/usr/share/texlive/texmf-dist/tex/latex/exam/exam.cls

Open it in your editor and save it, perhaps under the name myexam.cls, in the directory containing the document file.

Now have some fun. I had a quick look and it seems to be a very well-written class file. For example, under \newenvironment{coverpages} in line 1022 it says this.

\pagenumbering{roman}%

I think you want to try changing that to arabic.

You must log in to answer this question.

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