From 73f5279fe5a5e0a37bd9bd41630f4fc97427605d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20P=C3=A9rez-Cerezo?= Date: Sun, 19 Feb 2017 20:27:02 +0100 Subject: Made this a proper documented package --- gpcfhw.dtx | 203 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 203 insertions(+) create mode 100644 gpcfhw.dtx (limited to 'gpcfhw.dtx') diff --git a/gpcfhw.dtx b/gpcfhw.dtx new file mode 100644 index 0000000..6e14bec --- /dev/null +++ b/gpcfhw.dtx @@ -0,0 +1,203 @@ +\iffalse meta-comment +Copyright (C) hyear i by hyour namei +This file may be distributed and/or modified under the +conditions of the LaTeX Project Public License, either +version 1.3 of this license or (at your option) any later +version. The latest version of this license is in: +http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of +LaTeX version 2005/12/01 or later. +\fi +% \iffalse +%\NeedsTeXFormat{LaTeX2e} +%\ProvidesClass{gpcfhw}[2016/11/22 GPCF Macros] +%\LoadClass{article} +%%\RequirePackage{beton} +%%\RequirePackage{eulervm} +%\RequirePackage{amsmath} +%\RequirePackage[utf8]{inputenc} +%\RequirePackage[T1]{fontenc} +%\RequirePackage[ngerman]{babel} +%\RequirePackage{amsthm} +%\RequirePackage[activate]{pdfcprot} +%\RequirePackage[left=2.3cm, right=6.7cm, bottom=2cm]{geometry} +%\RequirePackage{amssymb} +%\RequirePackage{fancyhdr} +%\RequirePackage{totcount} +%\RequirePackage{tikz} +%\RequirePackage{calc} +%\RequirePackage{gpcfmac} + + +%<*driver> +\documentclass{ltxdoc} +\usepackage[ngerman]{babel} +\usepackage{gpcfmac} +\usepackage{pgffor} +\newcommand{\bigline}{\mbox{\vline height 0.45cm depth 1cm}} +\newcommand{\exctaable}{ + \par\noindent\vspace{0.5cm}\bigline\foreach \n in {1, ..., 5} {% + \hfill\n\hfill\bigline% +} \hfill$\Sigma$\mbox{}\hfill\mbox{}\bigline\\% +\vspace{-2.4cm}\\\mbox{}\hrulefill\\\vspace{1cm} +\vspace{-1.2cm}\\\mbox{}\hrulefill\\ +\vspace{-0.0cm}\\\mbox{}\hrulefill\\\vspace{1cm} +} +\EnableCrossrefs +\CodelineIndex +\RecordChanges +\begin{document} +\DocInput{gpcfhw.dtx} +\PrintIndex +\end{document} +% +% \fi +% +% \CheckSum{0} +% +% \CharacterTable +% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +% Digits \0\1\2\3\4\5\6\7\8\9 +% Exclamation \! Double quote \" Hash (number) \# +% Dollar \$ Percent \% Ampersand \& +% Acute accent \' Left paren \( Right paren \) +% Asterisk \* Plus \+ Comma \, +% Minus \- Point \. Solidus \/ +% Colon \: Semicolon \; Less than \< +% Equals \= Greater than \> Question mark \? +% Commercial at \@ Left bracket \[ Backslash \\ +% Right bracket \] Circumflex \^ Underscore \_ +% Grave accent \` Left brace \{ Vertical bar \| +% Right brace \} Tilde \~} +% +% \changes{v1.0}{2016/11/22}{Erste Version} +% +% \GetFileInfo{gpcfhw.sty} +% +% \DoNotIndex{\#,\$,\%,\&,\@,\\,\{,\},\^,\_,\~,\ ,\newcommand} +% \title{\texttt{gpcfhw} -- Klasse für Mathematikhausaufgaben} +% +% \author{Gabriel Pérez-Cerezo \texttt{gabriel@gpcf.eu}} +% \maketitle +% +%\section{Nutzung} +% +% +%\subsection{Einrichtung des Dokuments} +% +%\DescribeMacro{\hanr}\marg{Nummer} \verb|\hanr| setzt die +%Hausaufgabennummer. Nutzung: \verb|\hanr|\marg{Nummer}. +% +% +%\DescribeMacro{\authors}\marg{Autor1}\marg{Autor2} Mit dem +%\verb|\authors|-Befehl werden die Autoren des Dokuments +%angegeben. \texttt{gpcfhw} ist derzeit darauf ausgelegt, dass jedes +%Dokument genau zwei Autoren besitzt. Beispiel: +%\begin{verbatim} +% \authors{Max Mustermann}{Slartibartfast} +%\end{verbatim} + +%\DescribeMacro{\mats}\marg{Autor1}\marg{Autor2} Mit dem Befehl +%\verb|\mats| gibt man die Matrikelnummern der Autoren an. Zum +%Beispiel: +% \begin{verbatim} +% \mats{000123}{123954} +% \end{verbatim} +% +%\DescribeMacro{\maketitle} Wie sonst auch, generiert +% \verb|\maketitle| den Titel des Dokuments. Bei \texttt{gpcfhw} wird +% zusätzlich noch eine Tabelle eingetragen, die die Punktzahlen +% enthält. Sie sieht ungefähr so aus und enthält automatisch für jede +% Aufgabe ein eigenes Kästchen. +% +% \vspace{0.1cm} +% \exctaable +% +% \subsection{Macros im Dokument} +% \DescribeMacro{\aufgabe}\DescribeMacro{\bonusaufgabe} Mit dem Macro +% \verb|\aufgabe| signalisiert man, dass man die nächste Aufgabe +% beginnen möchte. Analog existiert \verb|\bonusaufgabe|, damit +% markiert man, dass man eine Zusatzaufgabe beginnen möchte. +% \section{Quellcode} +% \subsection{Ästhetische Aspekte} +% \subsubsection{Setzen der Kopfzeile} +% \begin{macrocode} +\pagestyle{fancy} +\renewcommand{\headrulewidth}{0.1pt} +\lhead{\authori} +\rhead{\authork} +\chead{\thehanr. Hausaufgabe} +% \end{macrocode} +%\subsubsection{Umdefinitionen} +%Nun werden die Pfeilsymbole aus Ästhetischen Gründen umdefiniert, +%sowie das Epsilon. +%\begin{macrocode} +\let\implies\Rightarrow +\let\iff\Leftrightarrow +\renewcommand{\epsilon}{\varepsilon} +% +\displaywidowpenalty=1000 + +\date{} +\newtheorem{thm}{Satz} +\newtheorem{lem}{Lemma} +\newtotcounter{exc} % Counter that is incremented with every solution. +\newcommand{\thehanr}{} +\newcommand{\authori}{} +\newcommand{\authork}{} +\newcommand{\mati}{} +\newcommand{\matk}{} +\newcommand{\thetutorium}{} +\newcommand{\hanr}[1]{\renewcommand{\thehanr}{#1} + \title{\thehanr. Hausaufgabe}} +\newcommand{\theex}{\thehanr.\arabic{exc}} +\renewcommand{\theequation}{\fnsymbol{equation}} +\newcommand{\aufgabe}{\stepcounter{exc}\section*{Aufgabe \theex}} +\newcommand{\bonusaufgabe}{\stepcounter{exc}\section*{Bonusaufgabe \theex}} +\newcommand{\authors}[2]{\renewcommand{\authori}{#1}\renewcommand{\authork}{#2}} +\newcommand{\mats}[2]{\renewcommand{\mati}{#1}\renewcommand{\matk}{#2}} +\newcommand{\tutorium}[1]{\renewcommand{\thetutorium}{#1}} +\newcounter{k} +\newtheorem{bem}{Bemerkung} +\renewcommand*\descriptionlabel[1]{\hspace\labelsep + \normalfont\it #1} +\newcommand{\bigline}{\mbox{\vline height 0.4cm depth 1cm}} + +\newcommand{\exctaable}{ + \par\noindent\vspace{0.5cm}\bigline\foreach \n in {1, ..., \totvalue{exc}} {% + \hfill\n\hfill\bigline% +} \hfill$\Sigma$\mbox{}\hfill\mbox{}\bigline\\% +\vspace{-2.4cm}\\\mbox{}\hrulefill\\\vspace{1cm} +\vspace{-1.2cm}\\\mbox{}\hrulefill\\ +\vspace{-0.0cm}\\\mbox{}\hrulefill\\\vspace{1cm} +} + +\renewcommand{\bfseries}{\rm} +\newcommand{\exct@ble}{ + \par\noindent\vspace{0.5cm}\bigline\foreach \n in {1, ..., \totvalue{exc}} {% + \hfill\n\hfill\bigline% +} \hfill$\Sigma$\mbox{}\hfill\mbox{}\bigline\\% +\vspace{-2.4cm}\\\mbox{}\hrulefill\\\vspace{1cm} +\vspace{-1.3cm}\\\mbox{}\hrulefill\\ +\vspace{-0.1cm}\\\mbox{}\hrulefill\\\vspace{1cm} +} +\renewcommand{\exct@ble}{\exctaable} +\newcommand{\exctable}{} +\renewcommand{\maketitle}{ + \newpage + \thispagestyle{plain} + \vspace{-2cm} + {\centering \Large \bf \@title \par} + \noindent\authori \hfill \mati \\ + \noindent\authork \hfill \matk \\ + \noindent Tutorium: \hfill \thetutorium + \vspace{1cm} +\exct@ble} + +% \end{macrocode} +% \endinput +% Local Variables: +% mode: doctex +% TeX-master: t +% End: -- cgit v1.2.3