成绩表中的自动积分和加分问题

成绩表中的自动积分和加分问题

我尝试使用这里和奖励积分一起,但是它似乎不起作用,它只会打印 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}

相关内容