From 6c90182268f883be4c3776d34631bac75e894dab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Ke=C3=9Fler?= Date: Fri, 17 Sep 2021 22:26:53 +0200 Subject: [PATCH] provide exsheet class for handling of exercise sheets --- wip/mkessler-exsheet.sty | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 wip/mkessler-exsheet.sty diff --git a/wip/mkessler-exsheet.sty b/wip/mkessler-exsheet.sty new file mode 100644 index 0000000..f7c59f7 --- /dev/null +++ b/wip/mkessler-exsheet.sty @@ -0,0 +1,25 @@ +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{mkessler-exsheet} + +\newif\ifmkessler@exsheet@english\mkessler@exsheet@englishtrue +\DeclareOption{german}{\mkessler@exsheet@englishfalse} +\DeclareOption{english}{\mkessler@exsheet@englishtrue} + +\DeclareOption*{\PackageWarning{mkessler-exsheet}{Unknown '\CurrentOption'}} +\ProcessOptions\relax + +\RequirePackage{mkessler-fancythm} + +\newcounter{mkessler@exsheet@sheet} + +\declaretheorem[style=thmgreenmargin, numberwithin=mkessler@exsheet@sheet, name=\ifmkessler@exsheet@english Exercise\else Aufgabe\fi]{mkessler@exsheet@aufgabe} + +\usepackage{xkeyval} + +\NewDocumentEnvironment{aufgabe}{O{}}{ +\begin{mkessler@exsheet@aufgabe\expandafter}\if\relax\detokenize{#1}\relax\else[#1]\fi\label{aufgabe-\themkessler@exsheet@aufgabe} +}{ + \end{mkessler@exsheet@aufgabe\expandafter}\relax +} + +\newcommand\blatt{\refstepcounter{mkessler@exsheet@sheet}\subsection*{\themkessler@exsheet@sheet. Übungsblatt}\addcontentsline{toc}{subsection}{\themkessler@exsheet@sheet. Übungsblatt}}