add author to letter env

This commit is contained in:
Benjamin Kellermann 2017-02-21 00:34:17 +01:00
parent f06568f9b7
commit f68f286b6a
1 changed files with 19 additions and 2 deletions

View File

@ -236,13 +236,30 @@
\stepcounter{NumOfLetters}%
}{%
}
\newenvironment{question}{%
\newcommand{\@letterauthor}{}
\define@key{DSletterKeys}{author}{\renewcommand{\@letterauthor}{#1}}%
\newenvironment{question}[1][]{%
\setkeys{DSletterKeys}{#1}%
}{%
\ifthenelse{%
\equal{\@letterauthor}{}
}{%
}{%
\textit{<\@letterauthor>}%
}
\par
}
\newenvironment{answer}{%
\newenvironment{answer}[1][]{%
\setkeys{DSletterKeys}{#1}%
\itshape%
}{%
\ifthenelse{%
\equal{\@letterauthor}{}
}{%
}{%
\textit{<\@letterauthor>}%
}
}
%%%%%%%%