I want to extend the exam class to have more than two parts for the question field. Also, reflect that on the grading table.
Typically, you would write a question given two arguments like this /question[5] The question
(points are optional). This will result in a valid question, and the points will be reflected on the grading table correctly. What I'm seeking is to extend the /question
keyword to take three arguments.
- The question points (just as it works now)
- The question group type (a number we use internally to categorize questions)
- The question-wording (also as it works now).
Thus if you write something like /question[5][1] The question
the desired result would be
(5 points) The question
Where the [1] argument is only visible in the new grading table.
However, the default exam class will have something result on something like this.
(5 points) [1]The question
This is not the only possible issue. When you have a question where you rely on parts to add up points, you don't want to have redundant points entry on the question level. Thus, typically you would skip entering the points like this /question The question
. But once you add an argument for the question grouping, you cannot simply skip it and have the grouping id like this /question [1] The question
, where latex will consider [1] as the question points arguments. Hence, there must be a way to skip the points argument with something like this /question[~][1] The question
. By adding [~]
we will be trying to tell latex to skip the points on the question level and get it from the /part
s points if any.
To have a more concrete example and all the possible issues I'm aware of, the code below shows an example of the code I wrote and how it looks now vs. how I would like it to look (this is not a solution this just a demonstration of the goal).
\documentclass[addpoints]{exam}
\usepackage{enumitem}
\begin{document}
\section{How \emph{exam} class works}
\begin{center}
\gradetable[h][questions]
\end{center}
\begin{questions}
\question[10][2]{First Question?}
\question[~][1]{Second Question (True/False):} % if you put 10 here the total for this question will be 20!
\begin{parts}
\part[5] First statement.
\part[5] Second statement.
\end{parts}
\question[20][3]{Third Question?}
\begin{parts}
\part First part.
\part Second part.
\end{parts}
\end{questions}
\end{document}
Which will result in the following output:
Where the desired output should be as the following: