0

For previous versions of xsim, it was possible to have the solution environment within the exercise environment and the global command \xsimsetup{solution/print = true} would print the solutions right after the corresponding exercises (tested with a tex live distribution from 2017). Now (tested with tex live 2021), it only prints the solutions, if the solutions environment is outside of the exercise environment. Otherwise, it ignores the command \xsimsetup{solution/print = true}.

Are there any workarounds? Or did I miss something in the manual? Thanks.

MWE for solution environment within exercise environment:

\documentclass{article}
\usepackage{xsim}
\xsimsetup{solution/print = true}
%
\begin{document}
\begin{exercise}
    %
    QUESTION
%solution within exercise environment
\begin{solution}
    SOLUTION
\end{solution}
\end{exercise}
\end{document}
2
  • 2
    I never intended solution to work inside exercise. That it did in the beginning was by chance... I vaguely remember that there was an issue on github.com/cgnieder/xsim/issues about this but wasn't able to find it right now.
    – cgnieder
    Commented Dec 7, 2021 at 11:20
  • @cgnieder Fair enough; thanks.
    – Manuel
    Commented Dec 7, 2021 at 14:51

1 Answer 1

1

It was never intended for solution to work inside exercise. That it did in the beginning was by chance.

In recent updates the exercise environments changed in a way that it's now impossible.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .