diff options
| author | Sebastian Kuhnert | 2008-11-25 11:37:29 +0000 |
|---|---|---|
| committer | Sebastian Kuhnert | 2008-11-25 11:37:29 +0000 |
| commit | 49ef533b7ec84fb913bbcd73728811166d1b637d (patch) | |
| tree | 2f1477c789c5c2a601f9ab515f7b4bb61831d20b /exercisesheets.sty | |
| parent | e2b140f3d060721714e03b9c35288d368c3ae8d9 (diff) | |
| download | exercisesheets-49ef533b7ec84fb913bbcd73728811166d1b637d.tar.gz exercisesheets-49ef533b7ec84fb913bbcd73728811166d1b637d.tar.bz2 exercisesheets-49ef533b7ec84fb913bbcd73728811166d1b637d.zip | |
exercisesheets.sty: update \pun to \points; improve layout
Diffstat (limited to 'exercisesheets.sty')
| -rw-r--r-- | exercisesheets.sty | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/exercisesheets.sty b/exercisesheets.sty index af902bc..341fabe 100644 --- a/exercisesheets.sty +++ b/exercisesheets.sty @@ -1,5 +1,5 @@ -\def\fileversion{0.5e} -\def\filedate{2008/11/20} +\def\fileversion{0.5f} +\def\filedate{2008/11/25} % TODO: allow \and in author and solutionsby % TODO: fix "above hint skip" @@ -525,7 +525,26 @@ } -\newcommand{\pun}[1][]{\space\hspace*{\fill}{\pgfkeysvalueof{/exsh/points font}\mbox{(#1)}}} +\newcommand{\pun}[1][]{% + \PackageWarning{exercisesheets}{Obsolete \string\pun[] macro used. Please use + something\MessageBreak like \string\points{10} or \string\points{oral} instead.}{}% + \exsh@subexpoints{#1}% +} \newcommand{\points}[1]{% + \ifthenelse{\equal{#1}{oral}}{% + \exshset{oral}% + \exsh@subexpoints{\pgfkeysvalueof{/exsh/strings/oral}}% + }{% + \exshset{points=#1}% + \ifthenelse{\equal{#1}{1}}{% + \exsh@subexpoints{1~\pgfkeysvalueof{/exsh/strings/point}}% + }{% + \exsh@subexpoints{#1~\pgfkeysvalueof{/exsh/strings/points}}% + }% + }% +} \newcommand{\exsh@subexpoints}[1]{% + \unskip\nobreak\space\nobreak\hspace*{\fill}\allowbreak\hspace*{\fill}% + {\pgfkeysvalueof{/exsh/points font}\mbox{(#1)}}% +} \newcommand{\TODO}{% \ifmmode |
