![試卷中的自動點數和獎勵問題](https://rvso.com/image/472712/%E8%A9%A6%E5%8D%B7%E4%B8%AD%E7%9A%84%E8%87%AA%E5%8B%95%E9%BB%9E%E6%95%B8%E5%92%8C%E7%8D%8E%E5%8B%B5%E5%95%8F%E9%A1%8C.png)
我嘗試使用以下設置這裡與獎勵積分一起使用,但它似乎不起作用,它只是列印 0 作為獎勵積分。我怎樣才能解決這個問題?
\documentclass{scrartcl}
\usepackage{exsheets}[2015/11/18]% need v0.20
% define a new heading container which fetches the points of a question:
\DeclareExSheetsHeadingContainer{autopoints}{%
\points{\GetQuestionProperty{points}{\CurrentQuestionID}}%
}
% define a variant of the `block' heading which uses the new container instead
% of the usual one for points:
\DeclareInstance{exsheets-heading}{myblock}{default}{
join = { title[r,B]number[l,B](1ex,0pt) } ,
attach = {
main[l,vc]title[l,vc](0pt,0pt) ;
main[r,vc]autopoints[l,vc](\marginparsep,0pt)
}
}
% setup exsheets to use the new heading:
\SetupExSheets{
headings = myblock ,
question/print=true ,
solution/print=true
}
\begin{document}
\begin{question}
\begin{enumerate}
\item \addpoints{1}
Question 1
\item \addpoints{2}
Question 2
\end{enumerate}
\end{question}
\begin{question}
\begin{enumerate}
\item \addpoints{3}
Question II.1
\item \addpoints{4}
Quesion II.2
\end{enumerate}
\end{question}
\begin{question}{+3} %% This doesn't work
Bonus Question
\end{question}
\totalpoints %% This works
\end{document}