summaryrefslogtreecommitdiff
path: root/gpcfhw.dtx
blob: 6e14bec2f07419478702d084d3c5d91d7cc59517 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
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
%<class>\NeedsTeXFormat{LaTeX2e}
%<class>\ProvidesClass{gpcfhw}[2016/11/22 GPCF Macros]
%<class>\LoadClass{article}
%%<class>\RequirePackage{beton}
%%<class>\RequirePackage{eulervm}
%<class>\RequirePackage{amsmath}
%<class>\RequirePackage[utf8]{inputenc}
%<class>\RequirePackage[T1]{fontenc}
%<class>\RequirePackage[ngerman]{babel}
%<class>\RequirePackage{amsthm}
%<class>\RequirePackage[activate]{pdfcprot}
%<class>\RequirePackage[left=2.3cm, right=6.7cm, bottom=2cm]{geometry}
%<class>\RequirePackage{amssymb}
%<class>\RequirePackage{fancyhdr}
%<class>\RequirePackage{totcount}
%<class>\RequirePackage{tikz}
%<class>\RequirePackage{calc}
%<class>\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}
%</driver>
% \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: