1

I tried to use the setup from here together with bonus-points, however it doesn't seem to work, it just prints 0 for the bonus points. How can I fix this?

\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}
2
  • You can look at xsim package which is successor to exsheets. In the manual you find examples of bonus points.
    – Krishna
    Commented Feb 29 at 1:33
  • @Krishna But how to replicate the rest of my example with xsim?
    – Julia
    Commented Mar 5 at 7:28

0

You must log in to answer this question.

Browse other questions tagged .