aboutsummaryrefslogtreecommitdiff
path: root/exercisesheets.sty
diff options
context:
space:
mode:
Diffstat (limited to 'exercisesheets.sty')
-rw-r--r--exercisesheets.sty20
1 files changed, 11 insertions, 9 deletions
diff --git a/exercisesheets.sty b/exercisesheets.sty
index ee7ccd5..b724dde 100644
--- a/exercisesheets.sty
+++ b/exercisesheets.sty
@@ -1,11 +1,10 @@
%\NeedsTeXFormat{LaTeX2e}[1994/12/01]
\RequirePackage{svn-prov}
-\def\exsh@version{0.5j}
+\def\exsh@version{0.5g}
\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"
@@ -54,12 +53,14 @@
\pgfkeys{/exsh/semester/.initial/.expand once=\@date}
}
\apptocmd{\date}{\pgfkeys{/exsh/semester={#1}}}{}{}
-\def\exsh@patchauthor{%
- \patchcmd{\exsh@author}{\and}{, }{\exsh@patchauthor}{}%
-}
\pgfkeys{/exsh/author/.code={%
\def\exsh@author{#1}%
- \exsh@patchauthor
+ \def\exsh@repeat{1}%
+ \loop\ifnum\exsh@repeat>0
+ \def\exsh@repeat{0}%
+ \patchcmd{\exsh@author}{\and}{, }{\def\exsh@repeat{1}}{}%
+ \repeat
+ \show\exsh@author
},
/exsh/author/.expand once=\@author}
\let\exsh@oldauthor\author
@@ -545,7 +546,7 @@
\@ifnextchar\label{\exsh@label}{\leavevmode\ignorespaces}%
}{}
\newcommand{\exsh@label}[2]{#1{#2}\leavevmode\ignorespaces}
-\providecommand{\exsh@startsection}[2][]{%
+\newcommand{\exsh@startsection}[2][]{%
\@startsection{section}{1}{\z@}%
{\pgfkeysvalueof{/exsh/above exercise skip}}%
{1em}% afterskip corrected below
@@ -565,8 +566,9 @@
\@addtoreset{equation}{section}
\newenvironment{hint}[1][]{%
- \pgfkeys{exsh,every hint,#1,hint font}%
- \par\vskip\pgfkeysvalueof{/exsh/above hint skip}\relax\noindent
+ \par
+ %\pgfkeys{exsh,every hint,#1,hint font}%
+ \vskip\pgfkeysvalueof{/exsh/above hint skip}\relax\noindent
{\pgfkeysvalueof{/exsh/hint title font}\pgfkeysvalueof{/exsh/strings/hint}:}~\ignorespaces
}{%
\par