Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question

3 Answers 3

up vote 6 down vote accepted

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.

share|improve this answer
    
Thanks! That worked. –  Alejandro Dec 12 '10 at 3:35
    
FWIW, I contacted the author (He's an acquaintance). I'll post updates here if I have them. –  Yossi Farjoun Dec 20 '10 at 16:00
    
@alejandro: The author of the package said that he thinks adding this is a good idea and he will (probably) provide a command \settabletotalpoint that takes one argument. Then hacking the .cls file will not be needed. –  Yossi Farjoun Dec 20 '10 at 23:03
    
That's great! Thanks. –  Alejandro Dec 21 '10 at 2:52
    
@alejandro: Done. See my new answer below. –  Yossi Farjoun Dec 21 '10 at 23:18

After a quick back-and-forth with the class author and maintainer, he added the requested functionality and posted the beta version on his website. Please check and report back (here or directly to him) if there is any trouble.

From the top of the file:

%--------------------------------------------------------------------
% Version 2.315$\beta$, 2010/12/21:
%
% New commands:
%
%  \settabletotalpoints
%  \settabletotalbonuspoints
%
% Each of those takes one argument.  After giving the command
% \settabletotalpoints{numpoints}, any grade or point table (partial
% or full) will list the total points as numpoints instead of the
% actual total number of points in the table.
%
% After giving the command \settabletotalbonuspoints{numbonuspoints},
% any grade or point table will list the total bonus points as
% numbonuspoints instead of the actual total number of bonus points in
% the table.
%
% These commands are intended for exams in which students are asked to
% do some subset of the problems, but not all of them, and so the
% total number of points possible is less than the sum of the points
% for all of the questions.
%
%
% To have one of these commands affect only a single table, confine the
% command and the \gradetable command inside of a group, as in
%
%   \begingroup
%     \settabletotalpoints{100}
%     \gradetable[v][questions]
%   \endgroup
%
% or even just
%
%   \begin{center}
%     \settabletotalpoints{100}
%     \gradetable[v][questions]
%   \end{center}
%
%--------------------------------------------------------------------

I think that that this is what you wanted.

share|improve this answer
    
Exactly what I wanted. Thanks! –  Alejandro Dec 22 '10 at 0:35

Use Bonus Points for the two last questions (changing the text so that it seems the same) then they will not get added.

Alternatively, I think that you can turn off and then back on the summation of point, but this is all from reading the manual...never actually tried it.


edit: now I did a minimal example:

\documentclass[12pt,a4paper,addpoints]{exam}
\usepackage[latin1]{inputenc}
\begin{document}
\bonuspointpoints{point}{points}
\begin{questions}
\question[10]
hello
\bonusquestion[10]
goodbye
\end{questions}
\numpoints
\end{document}

or alternatively

\documentclass[12pt,a4paper,addpoints]{exam}
\usepackage[latin1]{inputenc}
\begin{document}
\bonuspointpoints{point}{points}
\begin{questions}
\question[10]
hello
\bonusquestion[10]
goodbye
\end{questions}
\numpoints
\end{document}

which both result in

alt text

No class editing required!

share|improve this answer
    
The problem with both of these approaches is that in the grade table the last two questions appears with 0 points. I think this is confusing for the student taking the test. –  Alejandro Dec 12 '10 at 3:20
    
ummm. no. check my updated answer. –  Yossi Farjoun Dec 12 '10 at 15:26
    
But check what you get in the grade table (\gradetable). Question 2 appears with 0 points. –  Alejandro Dec 12 '10 at 16:53

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.