[Tex/LaTex] Manually setting the total number of points in the exam document class

exam

I am writing an exam using the exam document class. In the exam you only need to answer 10 out of 12 questions (10 points each question). When I create the grade table with the command \gradetable, the total number of points is 120.

How can I manually set the total number of points to 100?

Best Answer

I don't think that this is possible without changing the class file. Since exams with the structure that you describe are pretty common, it might be worth emailing the author of the class to request that he adds this feature.

In the meantime, here is a horribly crude workaround. Make a new copy of exam.cls, and call it something different; say myexam.cls. In your exam, change your document class to myexam, and add something along the lines of

\newcommand{\mytotalpoints}{100}

Then open the myexam.cls file, and search for the string

\prt@hlfcntr{tbl@points}

Replacing the correct instance of this with

\mytotalpoints

will do the trick. Exactly where the change needs to be made depends on the type of gradetable that you use. A bit of trial and error may be needed.