diff options
Diffstat (limited to 'exercisesheets.tex')
| -rw-r--r-- | exercisesheets.tex | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/exercisesheets.tex b/exercisesheets.tex index 256f7d7..751735a 100644 --- a/exercisesheets.tex +++ b/exercisesheets.tex @@ -404,11 +404,33 @@ The following options allow fine-tuning of the spacing: \ifnonoralsolutions{(*\param{if true}*)}{(*\param{if false}*)} \end{lstlisting} -Example: Only include points for sub-exercises when solutions are typeset: +There are also special options for conditionals to be used in the arguments of +the environments defined by this package: +\begin{description} + \item[\option{ifsolutions=\{\param{options if true}\}\{\param{options if + false}\}}] Execute \param{options if true} if solutions are included in + the current document, \param{options if false} otherwise. + \item[\option{iforalsolutions=\{\param{options if true}\}\{\param{options if + false}\}}] Execute \param{options if true} if solutions for oral exercises + are included in the current document, \param{options if false} otherwise. + \item[\option{ifnonoralsolutions=\{\param{options if true}\}\{\param{options if + false}\}}] Execute \param{options if true} if solutions for non-oral + exercises are included in the current document, \param{options if false} + otherwise. +\end{description} + +Example 1: Only include points for sub-exercises when solutions are typeset: \begin{lstlisting} \ifsolutions{}{\renewcommand{\points}[2][]{}} \end{lstlisting} +Example 2: Modify the sheet header spacing in the non-solution version: +\begin{lstlisting} +\begin{sheet}[ifsolutions={}{above title skip=2ex}]% usually 4ex + \dots +\end{sheet} +\end{lstlisting} + \subsection{Using Hooks} There are several hooks used by \exsh: \begin{description} |
