4a5d36bbda7137554d514b6acc79cdb4dda88549
[gpcfhw.git] / gpcfhw.cls
1 \NeedsTeXFormat{LaTeX2e}
2 \ProvidesClass{gpcfhw}[2016/11/02 GPCF Homework Class]
3
4 \LoadClass{article}
5 \RequirePackage{beton}
6 \RequirePackage{eulervm}
7 \RequirePackage{amsmath}
8 \RequirePackage[utf8]{inputenc}
9 \RequirePackage[T1]{fontenc}
10 \RequirePackage[ngerman]{babel}
11 \RequirePackage{amsthm}
12 %\RequirePackage{palatino}
13 %\RequirePackage{euler}
14 \RequirePackage[activate]{pdfcprot}
15 \RequirePackage[left=2.3cm, right=6.7cm, bottom=2cm]{geometry}
16 \RequirePackage{amssymb}
17 %\title{1. Hausaufgabe}
18 \RequirePackage{fancyhdr}
19 \RequirePackage{totcount}
20 \RequirePackage{tikz}
21 \RequirePackage{calc}
22 \pagestyle{fancy}
23
24 \renewcommand{\headrulewidth}{0.1pt}
25 \date{}
26 \newtheorem{thm}{Satz}
27 \newtheorem{lem}{Lemma}
28 \newtotcounter{exc} % Counter that is incremented with every solution.
29 \newcommand{\thehanr}{}
30 \newcommand{\authori}{}
31 \newcommand{\authork}{}
32 \newcommand{\mati}{}
33 \newcommand{\matk}{}
34 \newcommand{\thetutorium}{}
35 \lhead{\authori}
36 \rhead{\authork}
37
38 \chead{\thehanr. Hausaufgabe}
39 \newcommand{\hanr}[1]{\renewcommand{\thehanr}{#1}
40 \title{\thehanr. Hausaufgabe}}
41 \newcommand{\theex}{\thehanr.\arabic{exc}}
42 \renewcommand{\theequation}{\fnsymbol{equation}}
43 \newcommand{\aufgabe}{\stepcounter{exc}\section*{Aufgabe \theex}}
44 \newcommand{\bonusaufgabe}{\stepcounter{exc}\section*{Bonusaufgabe \theex}}
45 \newcommand{\authors}[2]{\renewcommand{\authori}{#1}\renewcommand{\authork}{#2}}
46 \newcommand{\mats}[2]{\renewcommand{\mati}{#1}\renewcommand{\matk}{#2}}
47 \newcommand{\tutorium}[1]{\renewcommand{\thetutorium}{#1}}
48 \newcommand{\inv}{^{-1}}
49 \newcommand{\Id}{\text{Id}}
50 \newcounter{k}
51 \let\implies\Rightarrow
52 \let\iff\Leftrightarrow
53 \newtheorem{bem}{Bemerkung}
54 \displaywidowpenalty=1000
55 \DeclareUnicodeCharacter{2227}{\land}
56 \DeclareUnicodeCharacter{21D2}{\implies}
57 \DeclareUnicodeCharacter{2208}{\in}
58 \newcommand{\N}{\mathbb{N}}
59 \newcommand{\R}{\mathbb{R}}
60 \newcommand{\Z}{\mathbb{Z}}
61 \newcommand{\I}{\mathcal{I}}
62 \newcommand{\PM}{\mathcal{P}}
63 \renewcommand{\epsilon}{\varepsilon}
64 \renewcommand{\leq}{\leqslant}
65 \renewcommand{\geq}{\geqslant}
66 \mathchardef\arr="017E % character 7E from textfont 1 is the vector arrow
67 \renewcommand\vec[1]{\setbox0=\hbox{$#1$}\lower2ex\hbox to 0pt{\hbox to \wd0{\hss$\arr\;$\hss}\hss}\box0}
68 \renewcommand*\descriptionlabel[1]{\hspace\labelsep
69 \normalfont\it #1}
70 \newcommand{\bigline}{\mbox{\vline height 0.4cm depth 1cm}}
71 \renewcommand{\bfseries}{\rm}
72 \renewcommand{\maketitle}{
73 \newpage
74 \thispagestyle{plain}
75 \vspace{-2cm}
76 {\centering \Large \bf \@title \par}
77 \noindent\authori \hfill \mati \\
78 \noindent\authork \hfill \matk \\
79 \noindent Tutorium: \hfill \thetutorium
80 \vspace{1cm}}
81 \newcommand{\exctable}{
82 \par\noindent\vspace{0.5cm}\bigline\foreach \n in {1, ..., \totvalue{exc}} {%
83 \hfill\n\hfill\bigline%
84 } \hfill$\Sigma$\mbox{}\hfill\mbox{}\bigline\\%
85 \vspace{-2.4cm}\\\mbox{}\hrulefill\\\vspace{1cm}
86 \vspace{-1.3cm}\\\mbox{}\hrulefill\\
87 \vspace{-0.1cm}\\\mbox{}\hrulefill\\\vspace{1cm}
88 }
89 % \newcommand{\exctable}{
90 % \begin{tabular}{c | c | c | c | c | c | c | c | c | c | c | c | c |
91 % c | c}
92
93 % \pgfplotsforeachungrouped \i in {1..\totvalue{exc}} e{\i&}
94 % \end{tabular}}
95 % \newcommand{\samp}{&}
96 % % % \begin{tikzpicture}
97 % % % \foreach \n in {1,...,\totvalue{exc}}{
98 % % % \draw (\n,0) -- (\n,-2);
99 % % % \draw (\n+0.5,0) label above \n}
100 % % % \end{tikzpicture}
101 % \valign{\hrule\vskip 2pt plus 1fil\hbox{\strut\quad ##\quad}\vfill&
102 % \hrule\vskip 2pt plus 1 fil \hbox{\strut\quad ##\quad}
103 % \vskip 1pt plus 1fil\hrule\cr
104 % \foreach \n in {1, ..., \totvalue{exc}} {\n& \cr\noalign{\vrule}}}
105 % }