cgnieder / xsim

eXercise Sheets IMproved
65 stars 20 forks source link

Unexpected side effect of new version V0.20c #82

Closed marvinmarvin closed 3 years ago

marvinmarvin commented 3 years ago

With the attached minimal example I am used to get Exercise 1 Version B, but with the new version I get Exercise 2 Version B – obviously Version A is counted but – as expected – not shown.
What is the reason for this change in behaviour? – And how to get back the old behaviour?

\documentclass[fontsize=12pt,paper=a4]{scrartcl}
% 
\usepackage{iftex}
\ifluatex
\RequirePackage{unicode-math}
\else
\usepackage[T1]{fontenc}    
\fi

\usepackage{xsim}

\DeclareExerciseTagging{Version}

\xsimsetup{Version=Zwei}

\begin{document}
\begin{exercise}[subtitle={Version A},points=10,Version={Eins}]
  Solve first exercise  
\end{exercise}
\begin{solution}
  solution 1
\end{solution}

\begin{exercise}[subtitle={Version B},points=10,Version={Zwei}]
  Solve second exercise  
\end{exercise}
\begin{solution}
  solution 2
\end{solution}
\end{document}
cgnieder commented 3 years ago

Actually the behavior now matches the description in the manual more closely but I can see how that is not the wanted behavior.

It should be rather easy to implement options to choose how \xsimsetup{<tag>=<value>} should influence usage vs. printing of an exercise.

What is the reason for this change in behaviour?

Active development as described in section 1 (README) of the manual

And how to get back the old behaviour?

Report such things here and if all works out well wait for the next update.

cgnieder commented 3 years ago

The next version will again default to your expected behavior, with an option to change to the current one on a per-tag basis