Closed mschneiderwng closed 2 years ago
This is probably the same bug as #95
Currently, the optional argument filters exercises with or. This means an exercise is added if any of the tags match.
I admit that this behaviour is not intuitive and not clearly documented. Also, I think a user should have a choice whether any or all conditions should match.
In the next release the following code:
\documentclass[a4paper]{article}
\usepackage[use-aux]{xsim}
\DeclareExerciseTagging{level}
\DeclareExerciseCollection[topics=algebra,level=1]{easy-algebra}
\xsimsetup{
collection/easy-algebra/match-all ,
collect
}
\begin{document}
\section{Exercises}
\collectexercises{easy-algebra}
\begin{exercise}[topics=algebra, level=1]
algebra question 1 level=1
\end{exercise}
\begin{exercise}[topics=calculus, level=1]
calculus question 1 level=1
\end{exercise}
\begin{exercise}[topics=algebra, level=2]
algebra question 2 level=2
\end{exercise}
\collectexercisesstop{easy-algebra}
\printcollection{easy-algebra}
\end{document}
will give
BTW: match-all
will be the default behaviour
From the example in the manual, I would expect that
selects all exercises which have the topic
algebra
and arelevel 1
questions. However, it seems thatalgebra
or arelevel 1
questions are selected. Is there a way to make the former work such that one the first question is printed in the example below?