cgnieder / xsim

eXercise Sheets IMproved
67 stars 23 forks source link

Lstlistings in exercise-environment broken #87

Closed mec0-de closed 3 years ago

mec0-de commented 3 years ago

Hello,

the current published version of xsim in the Mactex-distribution broke my documents where I use lstlistings in exercise environment. Is this a known bug? When will it be fixed?

Latexcode

\begin{document}
    Before exercise
\begin{exercise}
    before listing
\begin{lstlisting}
    in listing
\end{lstlisting}
    after listing
\end{exercise}
    after exercise
\end{document}

Error message is ./DeleteMe.tex:37: LaTeX Error: \begin{lstlisting} on input line 37 ended by \end{addmargin}.

Thanks for your work!

muzimuzhi commented 3 years ago

xsim v0.20, 2021/01/31 made package option `no-files' the default, which will

prevent using verbatim material in exercises and solutions. [doc of xsim, sec. 3.2]

Solution: use package option use-files.

muzimuzhi commented 3 years ago

Note that

... xsim is in an experimental state and actively developed. Many aspects may change from one update to another until a stable version 1 will be reached. However, I will try my best to keep the interface stable. [doc of xsim, sec. 1]

mec0-de commented 3 years ago

Thanks a lot. Didn't recognize that.