diff options
Diffstat (limited to 'exercisesheets.sty')
| -rw-r--r-- | exercisesheets.sty | 35 |
1 files changed, 19 insertions, 16 deletions
diff --git a/exercisesheets.sty b/exercisesheets.sty index c616277..3cbdce2 100644 --- a/exercisesheets.sty +++ b/exercisesheets.sty @@ -1,5 +1,5 @@ -\def\fileversion{0.5c} -\def\filedate{2008/11/03} +\def\fileversion{0.5d} +\def\filedate{2008/11/13} % TODO: allow \and in author and solutionsby @@ -77,6 +77,7 @@ note/.initial={}, % % additional exercise info + name/.initial={}, firstline/.initial={}, points/.initial={}, oral/.style={/exsh/points=oral},oral/.value forbidden, @@ -440,23 +441,25 @@ \pgfkeysvalueof{/exsh/points font}}% \appto\exsh@points{\egroup}% }% - \refstepcounter{section}% \ifthenelse{\equal{}{\pgfkeysvalueof{/exsh/firstline}}}{% - \@startsection{section}{1}{\z@}% - {\pgfkeysvalueof{/exsh/above exercise skip}}% - {1em}% - {\pgfkeysvalueof{/exsh/exercise title font}}% - [\pgfkeysvalueof{/exsh/strings/exercise}~\arabic{section}\exsh@shortpoints]{\noindent% - \pgfkeysvalueof{/exsh/strings/exercise}~\arabic{section}\exsh@points}% + \def\exsh@firstline{}% + }{% + \edef\exsh@firstline{\pgfkeysvalueof{/exsh/firstline}}% + \preto\exsh@firstline{\quad\bgroup\normalfont\normalsize}% + \appto\exsh@firstline{\egroup}% + }% + \ifthenelse{\equal{}{\pgfkeysvalueof{/exsh/name}}}{% + \def\exsh@exname{}% }{% - \@startsection{section}{1}{\z@}% - {\pgfkeysvalueof{/exsh/above exercise skip}}% - {1em}% - {\pgfkeysvalueof{/exsh/exercise title font}}% - [\pgfkeysvalueof{/exsh/strings/exercise}~\arabic{section}\exsh@shortpoints]{\noindent% - \pgfkeysvalueof{/exsh/strings/exercise}~\arabic{section}\quad% - {\normalfont\normalsize\pgfkeysvalueof{/exsh/firstline}}\exsh@points}% + \edef\exsh@exname{\space(\pgfkeysvalueof{/exsh/name})}% }% + \refstepcounter{section}% + \@startsection{section}{1}{\z@}% + {\pgfkeysvalueof{/exsh/above exercise skip}}% + {1em}% afterskip corrected below + {\pgfkeysvalueof{/exsh/exercise title font}}% + [\pgfkeysvalueof{/exsh/strings/exercise}~\arabic{section}\exsh@exname\exsh@shortpoints]{\noindent% + \pgfkeysvalueof{/exsh/strings/exercise}~\arabic{section}\exsh@exname\exsh@firstline\exsh@points}% \unskip\vskip\pgfkeysvalueof{/exsh/below exercise title skip}\relax \@afterindentfalse \ignorespaces |
