-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pre-hook is not applicable to exercise environment #121
Comments
It seems the support for hook options For
using the current dev (99d8b80, the change in For \documentclass{article}
\usepackage{xsim}
\xsimsetup{
% solution/print=true
}
\xsimsetup{
exercise/pre-hook = {\noindent (pre-exer)},
exercise/begin-hook = {(begin-exer)},
exercise/end-hook = {(end-exer)},
exercise/post-hook = {\noindent (post-exer)},
solution/pre-hook = {\noindent (pre-solu)},
solution/begin-hook = {(begin-solu)},
solution/end-hook = {(end-solu)},
solution/post-hook = {\noindent (post-solu)}
}
\begin{document}
\begin{exercise}[
pre-hook={\noindent (\textbf{special-pre-exer})},
begin-hook=(\textbf{special-begin-exer})%
]
exercise 1
\end{exercise}
\begin{solution}[
pre-hook={\noindent (\textbf{special-pre-solu})},
begin-hook=(\textbf{special-begin-solu})
]
solution 1
\end{solution}
\begin{exercise}
exercise 1
\end{exercise}
\begin{solution}
solution 2
\end{solution}
\printsolutions
\end{document} Using
|
I'm trying to do something similar to https://texwelt.de/fragen/22255/xsim-printcollection-jede-aufgabe-mit-losung-auf-einer-neuen-seite. I'm trying to start some exercises on a new page. However, when I set the exercise hook on the exercise environment itself, it seems that the hook is not applied. Setting the hook globally does work. Setting the hook on the solution environment also works.
Is this expected behaviour that I missed in the docs? Or what am I doing wrong?
I greatly appreciate any help.
The text was updated successfully, but these errors were encountered: