aboutsummaryrefslogtreecommitdiff
path: root/exercisesheets.sty
diff options
context:
space:
mode:
authorSebastian Kuhnert2010-04-29 12:29:47 +0000
committerSebastian Kuhnert2010-04-29 12:29:47 +0000
commitd8ab76db54f37af41a1f434335e0288d2653eeaa (patch)
tree57d1cf31efdda366cb003285fbfb56406b3efcc0 /exercisesheets.sty
parent7f2c4c60c9c9ad47c413032092373faebeba3d71 (diff)
downloadexercisesheets-d8ab76db54f37af41a1f434335e0288d2653eeaa.tar.gz
exercisesheets-d8ab76db54f37af41a1f434335e0288d2653eeaa.tar.bz2
exercisesheets-d8ab76db54f37af41a1f434335e0288d2653eeaa.zip
make lstlinsting environment work at the beginning of a solution
Diffstat (limited to 'exercisesheets.sty')
-rw-r--r--exercisesheets.sty14
1 files changed, 11 insertions, 3 deletions
diff --git a/exercisesheets.sty b/exercisesheets.sty
index a3b4d6b..a18768b 100644
--- a/exercisesheets.sty
+++ b/exercisesheets.sty
@@ -604,9 +604,17 @@
\def\exsh@startsolution{\@afterindentfalse
\vskip\pgfkeysvalueof{/exsh/above solution skip}\relax%
{\parindent \z@
- \pgfkeysvalueof{/exsh/solution title font}\nobreak
- \pgfkeysvalueof{/exsh/strings/solution}:\par\nobreak}\nobreak%
- \@afterheading
+ \pgfkeysvalueof{/exsh/solution title font}%
+ \pgfkeysvalueof{/exsh/strings/solution}:\par}\nobreak%
+ \@nobreaktrue
+ \everypar{%
+ \if@nobreak
+ \@nobreakfalse
+ \clubpenalty \@M
+ \else
+ \clubpenalty \@clubpenalty
+ \everypar{}%
+ \fi}%
}%
\long\def\exsh@skipsolution#1{%