I'm trying to create an exam with numbered copies in a single file, using the exam package. I've managed to get everything to work, except that the \gradetable contains as many copies of the questions as there are exam copies (NumCopy). Is there any way to reset the grade table?
\documentclass[addpoints]{exam}
\begin{document}
\newcounter{copynum} % copy number, to be printed in the footer
\newcounter{NumCopy} % how many copies do we want?
\setcounter{NumCopy}{3} % we want 3
\whiledo{\thecopynum<\theNumCopy}{%
\setcounter{page}{1} % start numbering pages for the current copy at 1
\addtocounter{copynum}{1} % the number of the current copy
\setcounter{question}{1} % make questions start at 1 again
\setcounter{part}{1} % make parts start at 1 again
...
% exam content goes here
....
\gradetable[v][questions] % BUG: contains NumCopy*(number of questions) many entries
}
\end{document}