0

Whenever a solution is not provided, XSIM is repeating the statement of the exercise as its solution. This only happens for custom exercise types. In the example below, it should not show the "hint for task 2".

\documentclass{article}

\usepackage{xsim}

\DeclareExerciseType{task}{
  exercise-env = task ,
  solution-env = taskhint ,
  exercise-name = Task ,
  solution-name = Hint for task ,
  exercise-template = default ,
  solution-template = default
}

\begin{document}

    \section*{Tasks}

        \begin{task}
            Statement of task 1.
        \end{task}

        \begin{taskhint}
            Hint for task 1.
        \end{taskhint}

        \begin{task}
            Statement of task 2.
        \end{task}

        \begin{task}
            Statement of task 3.
        \end{task}

        \begin{taskhint}
            Hint for task 3.
        \end{taskhint}

    \section*{Hints}

    \printallsolutions

\end{document}

The statement of task 2 is shown as its hint.

4
  • I can not reproduce the issue using xsim.sty 2022/02/12 v0.21 Nov 22, 2022 at 19:23
  • This is the compiler and package information in my log file: "This is LuaHBTeX, Version 1.14.0 (TeX Live 2022/dev/Debian) (format=lualatex 2022.11.17) 22 NOV 2022 16:42 Package: xsim 2021/02/03 v0.20c eXercise Sheets IMproved" Nov 22, 2022 at 19:53
  • I'm using TeXMaker in Ubuntu 22.04. Nov 22, 2022 at 19:54
  • 1
    It fails with version 0.20c. Update the xsim package to the latest version v0.21. Nov 22, 2022 at 20:08

0

You must log in to answer this question.

Browse other questions tagged .