diff options
| author | Sebastian Kuhnert | 2009-11-27 12:12:00 +0000 |
|---|---|---|
| committer | Sebastian Kuhnert | 2009-11-27 12:12:00 +0000 |
| commit | dee8b303267c2567d9bb8e847bcbb45480bacf5c (patch) | |
| tree | 53e3a114f98439310169013838551ba7e7c2d3ac /exercisesheets.tex | |
| parent | 3e740e37fd6d69f13faf19ee2efacd1d585fe16d (diff) | |
| download | exercisesheets-dee8b303267c2567d9bb8e847bcbb45480bacf5c.tar.gz exercisesheets-dee8b303267c2567d9bb8e847bcbb45480bacf5c.tar.bz2 exercisesheets-dee8b303267c2567d9bb8e847bcbb45480bacf5c.zip | |
exercisesheets.sty: add ifsolutions key
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} |
