我如何才能给我的问题命名,同时在评分表中只显示其编号?例如,在正文中,我希望问题类似于
“问题 1:柯西-施瓦茨不等式.................(10 分)”
但评分表应该只将其称为“1”。
我标记我的问题的唯一方法是 \titledquestion,但这必然会影响评分表。
谢谢!
答案1
环境questions
确实
\def\@currentlabel{\thequestiontitle}
为了在评分表中包含问题标题;您可以修补\questions
并将标签更改为\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}