I want to use the xsim
package to write exercises with may contain multiple hints (short and long version) and maybe also solutions. I.e. something like this:
\documentclass{article}
\usepackage{xsim}
\begin{document}
\section{Problems}
\begin{exercise}[subtitle=Pythagoras]
This is the first problem.
\end{exercise}
\begin{hintS}
This is a short hint to the first exercise.
\end{hintS}
\begin{hintL}
This is a long hint to the first exercise.
\end{hintL}
\begin{solution}
This is the solution to the first problem.
\end{solution}
\begin{exercise}[subtitle=Another Problem]
This is the second problem.
\end{exercise}
\begin{hintS}
The second exercise has only a short hint.
\end{hintS}
\begin{solution}
This is the solution to the second problem.
\end{solution}
\begin{exercise}[subtitle=Yet Another Problem]
This is the third problem.
\end{exercise}
\begin{hintL}
The third exercise has only a long hint.
\end{hintL}
\begin{solution}
This is the solution to the third problem.
\end{solution}
\begin{exercise}
Another exercise.
\end{exercise}
\begin{solution}
This exercise has only a solution
\end{solution}
\begin{exercise}
Another exercise.
\end{exercise}
\begin{hintS}
This exercise has only a short hint but no solution and no long hint.
\end{hintS}
\begin{exercise}
Another exercise.
\end{exercise}
\begin{hintL}
This exercise has only a long hint but no solution and no short hint.
\end{hintL}
\begin{exercise}
Another exercise.
\end{exercise}
\begin{hintS}
Short hint.
\end{hintS}
\begin{hintL}
Long hint.
\end{hintL}
\section{Short hints}
\printshorthints
\section{Short long hints}
\printlonghints
\section{Solutions}
\printsolutions[headings=false]
\end{document}
First I thought just to adapt this this, but it didn't compile for me (! LaTeX Error: Something's wrong--perhaps a missing \item.
)