11

How can I give my question a name and a the same time show in the grading table only its number? For example, in the main text I'd like the question to be something like

"Question 1: Cauchy-Schwartz Inequality.................(10 points)"

but the grading table should just refer to it as "1".

The only way I could label my question was \titledquestion, but this necessarily influences the grading table.

Thanks!

2
  • 1
    Welcome to the TeX.SX! Could you please add a fully compilable (minimum working) example (MWE) to your post by editing it? It would help the solvers to start trying their ideas.
    – Malipivo
    Apr 17, 2014 at 8:36
  • Please mark the answer as accepted if it suits your needs Jan 9, 2016 at 11:10

1 Answer 1

11

The questions environment does

\def\@currentlabel{\thequestiontitle}

in order to have the question title in the grading table; you can patch \questions and change the label to \thequestion:

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

\makeatletter
\patchcmd{\questions}
  {\def\@currentlabel{\thequestiontitle}}
  {\def\@currentlabel{\thequestion}}
  {}
  {}
\makeatother

\qformat{Question~\thequestion:~\thequestiontitle\dotfill (\thepoints)}

\begin{document}

\begin{questions}
\titledquestion{Cauchy--Schwartz inequality}[10]
Why is there air?
\titledquestion{Air}[15]
How much wood would a woodchuck chuck if a woodchuck could chuck
wood?
\titledquestion{Compute}[10] Compute $\displaystyle\int_0^1 x^2 \, dx$.
\end{questions}

\gradetable[v][questions]

\end{document}

enter image description here

You must log in to answer this question.

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