cgnieder / xsim

eXercise Sheets IMproved
65 stars 20 forks source link

Example file xsim.issue-49.tex does not produce expected output #96

Closed wwywong closed 2 years ago

wwywong commented 2 years ago

The file xsim.issue-49.tex does not produce the output included in the repository. Exercises 6, 7, and 8 have repeated choice labels. (See also https://tex.stackexchange.com/q/630848/119 )

Built using:

This is pdfTeX, Version 3.141592653-2.6-1.40.23 (TeX Live 2021/Arch Linux) (preloaded format=pdflatex)
 restricted \write18 enabled.
entering extended mode
(./xsimtest2.tex
LaTeX2e <2021-11-15> patch level 1
L3 programming layer <2021-11-22>

xsim version: Package: xsim 2021/02/03 v0.20c eXercise Sheets IMproved tasks version: Package: tasks 2021/02/20 v1.3a lists with columns filled horizontally

wwywong commented 2 years ago

I am guessing this is broken by some change to the tasks package.

Replacing the definition of \correct to add \refstepcounter seems to fix the problem.

\newcommand*\correct{\refstepcounter{task}\thetask\expanded{\SetExerciseProperty{choice}{\thetask}}}
muzimuzhi commented 2 years ago

The change came from a fixed problem in tasks. According to cgnieder/tasks#24, the \refstepcounter is now required since tasks v1.4 (2022/01/08).

cgnieder commented 2 years ago

Thanks. Fixed for the next release.