I would like to conditionally add text (for example, "- Answers") to my exercise sheet title based on the global solution/print option set in \xsimsetup.
My goal is to have the title change automatically when I toggle the option, without any manual edits. I have tried many conditionals in the documentation, such as \ExerciseParameterIfSetTF but couldn't manage to make it work. I think it just work inside exercise environment.
\documentclass{article}
\usepackage{xsim}
\xsimsetup{
solution/print = true
}
\begin{document}
{\Huge My Awesome Exercise Sheet : \ExerciseParameterIfSetTF{solution}{print}{Answers}{ }}
\begin{exercise}[title=First Question]
What is the result of $2+2$?
\end{exercise}
\begin{solution}
The result is $4$.
\end{solution}
\end{document}
