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.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This question was considered in an attempt to achieve what I want: Create a "choose between " questions with exam class

Background: I'm a math teacher with (very) mixed ability classes. I would like to be able to add "choose between A or B" (or C) questions to my tests, where A gives less credit than B.

Consider the MWE

  • I would like to have only the third question to add to the sum of points.
  • It would be nice if the grading table would include all three parts with their points, such that I can fill in the score the student achieved at the question he/she chose.

This MWE is very minimalistic, I honestly have no idea how I'm going to achieve this.


        \question Choose one of the three following questions
        \begin{parts} % only the third part should add to the total sum of points
            \part[1] Option 1
            \part[2] Option 2
            \part[3] Option 3
share|improve this question
I took a quick look on the exam manual and I am not sure, that your request can be fulfilled. The code design does not provide for such a feature of optional questions and listing the credits selectively in the table; at least, I did not find it in the manual. – Christian Hupfer Feb 17 '14 at 15:35

From my understanding of the exam class, you can't do exactly what you want with question parts, because the grading table lists questions and not their component parts. However if you restructure things a bit, I think you can achieve your end (assuming I understand you correctly). Instead of treating these as parts of one question, make them three separate questions and give the instructions to pick one with \uplevel{}. In the grading table, you can set the total point count to whatever value you want with \settabletotalpoints{}. Does the following do what you want?

Edit: added definitions to calculate the final total automatically


\newcommand{\questionintotal}[2]{\addtocounter{mytotal}{#1}\question[#1] #2}
\newcommand{\questionnototal}[2]{\question[#1] #2}



    \uplevel{Choose one of the three following questions}
    \questionnototal{1}{Option 1}
    \questionnototal{2}{Option 2}
    \questionintotal{3}{Option 3}


share|improve this answer
So the alternative is to manually set the total number of points? I had hoped there was some way to avoid the points of alternative A and B to add up to the total amount of points? – Holene Feb 18 '14 at 8:33
Well, you can keep your own counter and create new commands to either add or ignore the points in the overall total. I've modified the code to show a simple possibility. With more work, you could make things more flexible, but I'm a strong proponent of avoiding unnecessary complications in a solution. How elaborate do you really need to be in running through your point sums? – k.t.hagen Feb 18 '14 at 13:25
Yeah I thought one could do something like \nonumber (when numbering equations) when wanting to avoid adding the numbers to the total. – Holene Feb 18 '14 at 16:02

Your Answer


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.