Solutions not printed
GMS103 opened this issue · comments
Guillermo Moreno-Socías commented
Sorry if this is a stupid question, but I am unable to solve it.
When defining a new exercise type, the solutions are not printed.
\documentclass{article}
\usepackage{xsim}
\xsimsetup{solution/print=true}
\DeclareExerciseType{problem}{
exercise-env = problem ,
solution-env = answer ,
exercise-name = Problem ,
solution-name = Answer ,
exercise-template = default ,
solution-template = default
}
\begin{document}
\begin{exercise}
Plain exercise.
\end{exercise}
\begin{solution}
Plain solution.
\end{solution}
\begin{problem}
Plain problem.
\end{problem}
\begin{answer}
Plain answer.
\end{answer}
\end{document}
Clemens Niederberger commented
You need \xsimsetup{answer/print=true}
(of course placed after the \DeclareExerciseType
statement).
Guillermo Moreno-Socías commented
That was my mistake: I was putting \xsimsetup{answer/print=true}
before the declaration (and getting an error).
Thanks.