diff options
| author | Sebastian Kuhnert | 2009-10-23 13:07:16 +0000 |
|---|---|---|
| committer | Sebastian Kuhnert | 2009-10-23 13:07:16 +0000 |
| commit | c1b2dd5579aec0f82462f99be13e7ea1170f04dd (patch) | |
| tree | 654bd6238ffa8273c9099730365f3865f83b3bb2 | |
| parent | 816f7d93d5e2670885766e699f77e91f03ceb844 (diff) | |
| download | exercisesheets-c1b2dd5579aec0f82462f99be13e7ea1170f04dd.tar.gz exercisesheets-c1b2dd5579aec0f82462f99be13e7ea1170f04dd.tar.bz2 exercisesheets-c1b2dd5579aec0f82462f99be13e7ea1170f04dd.zip | |
fix \points macro; add \iforalsolutions and \ifnonoralsolutions
| -rw-r--r-- | exercisesheets.sty | 16 | ||||
| -rw-r--r-- | exercisesheets.tex | 2 |
2 files changed, 11 insertions, 7 deletions
diff --git a/exercisesheets.sty b/exercisesheets.sty index 159cf43..f19228d 100644 --- a/exercisesheets.sty +++ b/exercisesheets.sty @@ -600,6 +600,7 @@ \exsh@subexpoints{#1}% } \newcommand{\points}[2][]{% + \exshset{points=#2}% \bgroup \exshset{#1}% \ifthenelse{\equal{}{\pgfkeysvalueof{/exsh/pointsinfo}}}{% @@ -608,10 +609,8 @@ \def\exsh@tmp{, \pgfkeysvalueof{/exsh/pointsinfo}}% }% \ifthenelse{\equal{#2}{oral}}{% - \exshset{oral}% \exsh@subexpoints{\pgfkeysvalueof{/exsh/strings/oral}\exsh@tmp}% }{% - \exshset{points=#2}% \ifthenelse{\equal{#2}{}}{% \exsh@subexpoints{\pgfkeysvalueof{/exsh/pointsinfo}}% }{% @@ -639,9 +638,12 @@ } \newcommand{\ifsolutions}[2]{% - \ifthenelse{\equal{oral}{\pgfkeysvalueof{/exsh/points}}}{% - \ifbool{exsh@oralsolutions}{#1}{#2}% - }{% - \ifbool{exsh@nonoralsolutions}{#1}{#2}% - }% + \ifbool{exsh@solutions}{#1}{#2}% +} + +\newcommand{\iforalsolutions}[2]{% + \ifbool{exsh@oralsolutions}{#1}{#2}% +} +\newcommand{\ifnonoralsolutions}[2]{% + \ifbool{exsh@nonoralsolutions}{#1}{#2}% } diff --git a/exercisesheets.tex b/exercisesheets.tex index 81dec8f..9ebf550 100644 --- a/exercisesheets.tex +++ b/exercisesheets.tex @@ -397,6 +397,8 @@ The following options allow fine-tuning of the spacing: \subsection{Special Code for Solutions} \begin{lstlisting} \ifsolutions{(*\param{if true}*)}{(*\param{if false}*)} +\iforalsolutions{(*\param{if true}*)}{(*\param{if false}*)} +\ifnonoralsolutions{(*\param{if true}*)}{(*\param{if false}*)} \end{lstlisting} Example: Only include points for sub-exercises when solutions are typeset: |
