Is there a simple way to have a document created with the exam class show the grade table only when \printanswers is invoked? Wrapping the grade table in a solution environment works but forces me to place it inside a questions environment. I've also tried using \fillin[\gradetable[h][questions]][0em] (which works for hiding question points), but this triggers the error "Missing number, treated as zero." and a few other errors that mystify me.

1 Answer 1


I don't know why you want to hide the grade table, but one way is shown here


\clist_set:NV  \l_tmpe_clist{ \@classoptionslist }
 { \l_tmpe_clist } { answers }
 { \toggletrue{gradation} }



You may consider the packages ifthen or xparse also.

You can also take a look at condition compilation with \ifdef or \ifx

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .