Take the 2-minute tour ×
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.

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!

share|improve this question
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 at 8:36

1 Answer 1

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

share|improve this answer

Your Answer

 
discard

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.