aboutsummaryrefslogtreecommitdiff
path: root/exercisesheets.sty
diff options
context:
space:
mode:
authorSebastian Kuhnert2009-06-16 09:28:44 +0000
committerSebastian Kuhnert2009-06-16 09:28:44 +0000
commit8386ad01eabc29665253b2802642db78823ed11d (patch)
tree9c3469148d187b672fc8a2d954d756461e617921 /exercisesheets.sty
parent13e30a050c500c515031a586daf4aa1ced8f0d78 (diff)
downloadexercisesheets-8386ad01eabc29665253b2802642db78823ed11d.tar.gz
exercisesheets-8386ad01eabc29665253b2802642db78823ed11d.tar.bz2
exercisesheets-8386ad01eabc29665253b2802642db78823ed11d.zip
exercisesheets.sty: add solutions=nonoral option
Diffstat (limited to 'exercisesheets.sty')
-rw-r--r--exercisesheets.sty20
1 files changed, 13 insertions, 7 deletions
diff --git a/exercisesheets.sty b/exercisesheets.sty
index e075b6a..cfa10b5 100644
--- a/exercisesheets.sty
+++ b/exercisesheets.sty
@@ -22,12 +22,14 @@
% configuration keys
\newif\ifexsh@solutions
-\newif\ifexsh@nonoralsolutions\exsh@nonoralsolutionstrue
+\newif\ifexsh@oralsolutions
+\newif\ifexsh@nonoralsolutions
\pgfkeys{/exsh/.is family,/exsh,
solutions/.is choice,
- solutions/true/.code=\exsh@solutionstrue\exsh@nonoralsolutionstrue,
- solutions/oral/.code=\exsh@solutionstrue\exsh@nonoralsolutionsfalse,
- solutions/false/.code=\exsh@solutionsfalse\exsh@nonoralsolutionsfalse,
+ solutions/true/.code=\exsh@solutionstrue\exsh@oralsolutionstrue\exsh@nonoralsolutionstrue,
+ solutions/oral/.code=\exsh@solutionstrue\exsh@oralsolutionstrue\exsh@nonoralsolutionsfalse,
+ solutions/nonoral/.code=\exsh@solutionstrue\exsh@oralsolutionsfalse\exsh@nonoralsolutionstrue,
+ solutions/false/.code=\exsh@solutionsfalse\exsh@oralsolutionsfalse\exsh@nonoralsolutionsfalse,
solutions/.default=true,
only/.initial={-},
all/.style={/exsh/only={-}},all/.value forbidden,
@@ -533,10 +535,14 @@
\newenvironment{solution}[1][]{%
\pgfkeys{exsh,every solution,#1,solution font}%
\ifbool{exsh@solutions}{%
- \ifbool{exsh@nonoralsolutions}{%
- \let\next\exsh@startsolution
+ \ifthenelse{\equal{oral}{\pgfkeysvalueof{/exsh/points}}}{%
+ \ifbool{exsh@oralsolutions}{
+ \let\next\exsh@startsolution
+ }{%
+ \let\next\exsh@skipsolution
+ }%
}{%
- \ifthenelse{\equal{oral}{\pgfkeysvalueof{/exsh/points}}}{%
+ \ifbool{exsh@nonoralsolutions}{
\let\next\exsh@startsolution
}{%
\let\next\exsh@skipsolution