aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--exercisesheets.sty17
1 files changed, 9 insertions, 8 deletions
diff --git a/exercisesheets.sty b/exercisesheets.sty
index d9e9614..2a967c9 100644
--- a/exercisesheets.sty
+++ b/exercisesheets.sty
@@ -1,9 +1,9 @@
%\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-%\RequirePackage{svn-prov}
-\def\exsh@version{0.5i}
-%\ProvidesPackageSVN{$Id$}[\exsh@version\space Typesetting of exercise sheets \revinfo]
-%\GetFileInfoSVN*
-%\message{`Typesetting of exercise sheets' \exsh@version\space <\filedate> (SVN Rev: \filerev)}
+\RequirePackage{svn-prov}
+\def\exsh@version{0.5j}
+\ProvidesPackageSVN{$Id$}[\exsh@version\space Typesetting of exercise sheets \revinfo]
+\GetFileInfoSVN*
+\message{`Typesetting of exercise sheets' \exsh@version\space <\filedate> (SVN Rev: \filerev)}
% TODO: allow \and in author and solutionsby
% TODO: fix "above hint skip"
@@ -531,10 +531,11 @@
\pgfkeysvalueof{/exsh/strings/exercise}~\arabic{section}\exsh@exname\exsh@firstline\exsh@points}%
\unskip\vskip\pgfkeysvalueof{/exsh/below exercise title skip}\relax
\@afterindentfalse
- % ensure proper distances above environments that start with a new \par
- \leavevmode
- \ignorespaces
+ % Use \leavevmode to ensure proper distances above environments that start
+ % with a new \par. Make sure that a \label does not mess up the layout.
+ \@ifnextchar\label{\exsh@label}{\leavevmode\ignorespaces}%
}{}
+\newcommand{\exsh@label}[2]{#1{#2}\leavevmode\ignorespaces}
\providecommand{\exsh@startsection}[2][]{%
\@startsection{section}{1}{\z@}%
{\pgfkeysvalueof{/exsh/above exercise skip}}%