aboutsummaryrefslogtreecommitdiff
path: root/exercisesheets.sty
diff options
context:
space:
mode:
authorSebastian Kuhnert2009-06-16 10:18:06 +0000
committerSebastian Kuhnert2009-06-16 10:18:06 +0000
commit9f1e037ff5af611f3abf38646ef40f00e267fb90 (patch)
treec6ff86b0b1eab4229900252a17a3dfc602c902b6 /exercisesheets.sty
parent8386ad01eabc29665253b2802642db78823ed11d (diff)
downloadexercisesheets-9f1e037ff5af611f3abf38646ef40f00e267fb90.tar.gz
exercisesheets-9f1e037ff5af611f3abf38646ef40f00e267fb90.tar.bz2
exercisesheets-9f1e037ff5af611f3abf38646ef40f00e267fb90.zip
exercisesheets.sty: slight improvements to solutions=nonoral
Diffstat (limited to 'exercisesheets.sty')
-rw-r--r--exercisesheets.sty38
1 files changed, 23 insertions, 15 deletions
diff --git a/exercisesheets.sty b/exercisesheets.sty
index cfa10b5..3d54984 100644
--- a/exercisesheets.sty
+++ b/exercisesheets.sty
@@ -534,25 +534,27 @@
}
\newenvironment{solution}[1][]{%
\pgfkeys{exsh,every solution,#1,solution font}%
- \ifbool{exsh@solutions}{%
- \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@oralsolutions}{%
+ \let\next\exsh@startsolution
}{%
- \ifbool{exsh@nonoralsolutions}{
- \let\next\exsh@startsolution
- }{%
- \let\next\exsh@skipsolution
- }%
+ \let\next\exsh@skipsolution
}%
}{%
- \let\next\next\exsh@skipsolution
+ \ifbool{exsh@nonoralsolutions}{%
+ \let\next\exsh@startsolution
+ }{%
+ \let\next\exsh@skipsolution
+ }%
}%
\next
-}{\ifbool{exsh@solutions}{\par}{}}
+}{%
+ \ifthenelse{\equal{oral}{\pgfkeysvalueof{/exsh/points}}}{%
+ \ifbool{exsh@oralsolutions}{\par}{}%
+ }{%
+ \ifbool{exsh@nonoralsolutions}{\par}{}%
+ }%
+}
\def\exsh@startsolution{\@afterindentfalse
\vskip\pgfkeysvalueof{/exsh/above solution skip}\relax%
@@ -600,4 +602,10 @@
\PackageWarning{exercisesheets}{TODO marker found}%
}
-\newcommand{\ifsolutions}[2]{\ifexsh@solutions #1\else #2\fi}
+\newcommand{\ifsolutions}[2]{%
+ \ifthenelse{\equal{oral}{\pgfkeysvalueof{/exsh/points}}}{%
+ \ifbool{exsh@oralsolutions}{#1}{#2}%
+ }{%
+ \ifbool{exsh@nonoralsolutions}{#1}{#2}%
+ }%
+}