From dee8b303267c2567d9bb8e847bcbb45480bacf5c Mon Sep 17 00:00:00 2001
From: Sebastian Kuhnert
Date: Fri, 27 Nov 2009 12:12:00 +0000
Subject: exercisesheets.sty: add ifsolutions key

---
 exercisesheets.tex | 24 +++++++++++++++++++++++-
 1 file changed, 23 insertions(+), 1 deletion(-)

(limited to 'exercisesheets.tex')

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}
-- 
cgit v1.2.3

