I wrote a script with a set of coding problems, and made use of the xsim package to produce an optional sample solution. Until September, this worked fine, especially wrapping a lstlisting-enviroment by the solution-enviroment. After some updates (TexLive, the newest xsim-package, Ubuntu 22.04 LTS), my tex file wont compile when I select the "print solutions" option.
The original file is way to big to include, but I managed to make up a minmal (not working) example
\documentclass[a4paper,11pt,oneside]{scrbook}
\usepackage{listings}
\usepackage{xsim}
\begin{document}
\begin{exercise}
Do this
\end{exercise}
\begin{solution}[print=true]
\begin{lstlisting}
M_total = len(data)-N
M = int(round(0.1*M_total, 0))
\end{lstlisting}
\end{solution}
\end{document}
that gives me the Emergency stop error, as well as the "Text dropped after begin of listing"-error.
In the original file however, where a lot more xsim setup happens, I keep receiving the "Paragraph ended before \lst@next was complete. \end{solution}"-error. This was discussed here, but I cant really wrap my head around this. The basic lstlisting in solution wrapping is just the same.
I found that my desired codeblock solution also does not work in the verbatim enviroment. It seems that the solution enviroment no longer can wrap the other enviroments, which is confusing to me,as up to September, everything worked fine.
Is there maybe another update that I should install? At this point, I am a little bit lost and want to restore Septembers funcionality.
The printed solution used to look like this:
With identical source code (except minor contentwise changes), the output produced now does look like his:
The minimal not-working example does not produce a output file. Thanks for all constructive feedback.
\usepackage[use-files]{xsim}
if you want to use verbatim and listings in the solutions.