Question: Is there a way to customize the question numbering for questions within your own "grade range" using the exam
document class and maintain the integrity of the question hyperlinks in \partialgradetable
?
Edit: I just added the line \renewcommand*{\thequestion}{\the\value{question}}
after \setcounter{question}{0}
trying to follow an approach outlined in this post. But I still have the same issue.
The code
\documentclass[addpoints]{exam}
\usepackage[
colorlinks=true,
linkcolor=blue]{hyperref}
\begin{document}
\begin{questions}
\begingradingrange{range1}
\question A question.
\question Another questions.
\question Yet another question.
\endgradingrange{range1}
\setcounter{question}{0}
\renewcommand*{\thequestion}{\the\value{question}}
\begingradingrange{range2}
\question A second question.
\question Another second question.
\endgradingrange{range2}
\end{questions}
\partialgradetable{range1}
\partialgradetable{range2}
\end{document}
produces the following:
As can be seen, the question counter resets properly, but the hyperlink capability in the tables is destroyed. Even though the third question in range1
shows ??
in the table, if you click on the 3
, then you are taken to the third question as you should be; however, if you click on the 1
or 2
in either table, then you are taken to the first or second question in range2
, respectively.
Is there a way to set the counter to maintain the integrity of the question hyperlinks in the partial grade tables? That is, clicking on the 1,2,3
in the first table should take me to those questions in range1
while clicking on 1,2
in the second table should take me to those questions in range2
. Of course, I'd like to also be able to set the counter to something not necessarily 0
or 1
and still have it work properly. Any ideas?