From cc2c1ffbfbf7608b6eab95ce57833458fb11a6ec Mon Sep 17 00:00:00 2001 From: Sebastian Kuhnert Date: Thu, 14 Aug 2008 15:39:07 +0000 Subject: exercisesheets.sty: allow \and in \author --- exercisesheets.sty | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'exercisesheets.sty') diff --git a/exercisesheets.sty b/exercisesheets.sty index bbf53a2..42c5d42 100644 --- a/exercisesheets.sty +++ b/exercisesheets.sty @@ -43,7 +43,14 @@ \pgfkeys{/exsh/semester/.initial/.expand once=\@date} } \apptocmd{\date}{\pgfkeys{/exsh/semester={#1}}}{}{} -\pgfkeys{/exsh/author/.initial/.expand once=\@author} +\def\exsh@patchauthor{% + \patchcmd{\exsh@author}{\and}{, }{\exsh@patchauthor}{}% +} +\pgfkeys{/exsh/author/.code={% + \def\exsh@author{#1}% + \exsh@patchauthor + }, + /exsh/author/.expand once=\@author} \let\exsh@oldauthor\author \def\author#1{\exsh@oldauthor{#1}\pgfkeys{/exsh/author={#1}}} @@ -357,7 +364,7 @@ \begingroup\raggedright% {\pgfkeysvalueof{/exsh/subject font}\pgfkeysvalueof{/exsh/subject}}\hfill {\pgfkeysvalueof{/exsh/semester font}\pgfkeysvalueof{/exsh/semester}}\\ - {\pgfkeysvalueof{/exsh/author font}\pgfkeysvalueof{/exsh/author}}\hfill + {\pgfkeysvalueof{/exsh/author font}\exsh@author}\hfill {\pgfkeysvalueof{/exsh/date font}\pgfkeysvalueof{/exsh/date}}\\ \vskip\pgfkeysvalueof{/exsh/above sheet title skip}\relax% \endgroup -- cgit v1.2.3