# Clearing point column in exam document class

Question: Is there a way to "clear" the contents of the points column using the gradetable for the exam document class?

Edit (2): I was able to use some code from exam.cls to print a table that uses a given number (9 in this case), but I'd like to not default to 0 if no point value is given for a question but just an empty space. If I try that instead of the 9, then I get ! Missing number, treated as zero error. I feel like I am close to a solution to my problem, but I am having a hard time working it out. (See end of this question for new code and output.)

Using the code

\documentclass[addpoints]{exam}

\begin{document}
\begin{questions}
\question[10] Question 1
\question[20] Question 2
\end{questions}
\end{document}


produces

Though it may sound odd, I'd like to be able to clear out the contents of the points column (so I only have empty boxes or spaces). I tinkered with a number of things including \pointformat and looked at a few questions on TeX.SE about how to "hide" the point totals in the document body itself (i.e., not printing the points in the margin), but I cannot come up with any fix to have each point value printed in the table as {} or something similar.

Is there a way to do this using \renewcommand or something of that nature? [I don't have the know-how to fully understand the package code itself to know what command to "renew" that ends up printing the point values in the table.] (I'm ultimately trying to take advantage of the exam gradetable structure, but I cannot figure out a way to alter the table as communicated.)

Edit (2):

The above is produced by the following:

\documentclass[addpoints]{exam}

\makeatletter
\renewcommand*\set@hlfcntr[2]{%
\begingroup
\global\csname #1@halffalse\endcsname
% If there as a \half' present, it will be executed
% right after the assignment of the digit part of #2
% to the counter #1.
\def\half{%
\global\csname #1@halftrue\endcsname
}%
% We insert a 0' in case there are no digits present:
% We avoid using \setcounter, because calc.sty redefines
% \setcounter in a way that conflicts with the \half trick
% we're using:
%    \setcounter{#1}{0#2}\relax
%%%\global\csname c@#1\endcsname 0#2\relax%%% <== ORIGINAL CODE
\global\csname c@#1\endcsname 9\relax
\endgroup
}% set@hlfcntr
\makeatother

\begin{document}
\begin{questions}
\question Question 1
\question Question 2
\end{questions}
\end{document}

• Stating the obvious: Without the points and scores is just a simple (mostly empty) table. Wouldn't it be easier just type yourself a normal table that dismember \gradetable ? – Fran Sep 5 '17 at 17:29

Updated to also cover partial tables. Note that the order of the arguments for \emptypartialgradetable and \emptypartialbonusgradetable differs from the corresponding macros in the class - here, the optional arguments come first, before the range. That is because I used \newcommandtwoopt to define them.

\documentclass[addpoints]{exam}
\usepackage{twoopt}

\makeatletter

\renewcommand{\pointsofquestion}[1]{}
\renewcommand{\prt@tablepoints}{}
\@scorestrue
\@bonusfalse
\@partialfalse
\@combinedfalse
\ii@gtable{#1}[#2]%
}}

\renewcommand{\bonuspointsofquestion}[1]{}
\renewcommand{\prt@tablebonuspoints}{}
\@scorestrue
\@bonustrue
\@partialfalse
\@combinedfalse
\ii@gtable{#1}[#2]%
}}

\renewcommand{\pointsofquestion}[1]{}
\renewcommand{\prt@tablepoints}{}
\@scorestrue
\@bonusfalse
\@partialtrue
\@combinedfalse
\def\tbl@range{#3}%
\ii@gtable{#1}[#2]%
}}%

\renewcommand{\bonuspointsofquestion}[1]{}
\renewcommand{\prt@tablebonuspoints}{}
\@scorestrue
\@bonustrue
\@partialtrue
\@combinedfalse
\def\tbl@range{#3}%
\ii@gtable{#1}[#2]%
}}%

\makeatother

\begin{document}

\bigskip

\bigskip

\bigskip

\bigskip

\begin{questions}
\question[10] Question 1
\question[20] Question 2


• Ah, OK, I didn't realise one could drop one's comments. I got something out of this, too - I have to give exams also, but so far had not come across the exam class, which seems very handy. Now if it could also take care of the marking ;) – Michael Palmer Sep 6 '17 at 18:21