summaryrefslogtreecommitdiff
path: root/gpcfhw.cls
blob: 4a5d36bbda7137554d514b6acc79cdb4dda88549 (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
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{gpcfhw}[2016/11/02 GPCF Homework Class]

\LoadClass{article}
\RequirePackage{beton}
\RequirePackage{eulervm}
\RequirePackage{amsmath}
\RequirePackage[utf8]{inputenc}
\RequirePackage[T1]{fontenc}
\RequirePackage[ngerman]{babel}
\RequirePackage{amsthm}
%\RequirePackage{palatino}
%\RequirePackage{euler}
\RequirePackage[activate]{pdfcprot}
\RequirePackage[left=2.3cm, right=6.7cm, bottom=2cm]{geometry}
\RequirePackage{amssymb}
%\title{1. Hausaufgabe}
\RequirePackage{fancyhdr}
\RequirePackage{totcount}
\RequirePackage{tikz}
\RequirePackage{calc}
\pagestyle{fancy}

\renewcommand{\headrulewidth}{0.1pt}
\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}{}
\lhead{\authori}
\rhead{\authork}

\chead{\thehanr. Hausaufgabe}
\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}}
\newcommand{\inv}{^{-1}}
\newcommand{\Id}{\text{Id}}
\newcounter{k}
\let\implies\Rightarrow
\let\iff\Leftrightarrow
\newtheorem{bem}{Bemerkung}
\displaywidowpenalty=1000
\DeclareUnicodeCharacter{2227}{\land}
\DeclareUnicodeCharacter{21D2}{\implies}
\DeclareUnicodeCharacter{2208}{\in}
\newcommand{\N}{\mathbb{N}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\I}{\mathcal{I}}
\newcommand{\PM}{\mathcal{P}}
\renewcommand{\epsilon}{\varepsilon}
\renewcommand{\leq}{\leqslant}
\renewcommand{\geq}{\geqslant}
\mathchardef\arr="017E % character 7E from textfont 1 is the vector arrow 
\renewcommand\vec[1]{\setbox0=\hbox{$#1$}\lower2ex\hbox to 0pt{\hbox to \wd0{\hss$\arr\;$\hss}\hss}\box0}
\renewcommand*\descriptionlabel[1]{\hspace\labelsep
                                \normalfont\it #1}
\newcommand{\bigline}{\mbox{\vline height 0.4cm depth 1cm}}
\renewcommand{\bfseries}{\rm}
\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}}
\newcommand{\exctable}{
  \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}
}
% \newcommand{\exctable}{
%   \begin{tabular}{c | c | c | c | c | c | c  | c | c | c | c | c | c |
%     c | c}

% \pgfplotsforeachungrouped \i in {1..\totvalue{exc}} e{\i&}
% \end{tabular}}
% \newcommand{\samp}{&}
% %   % \begin{tikzpicture}
% %   %   \foreach \n in {1,...,\totvalue{exc}}{
% %   %     \draw (\n,0) -- (\n,-2);
% %   %     \draw (\n+0.5,0) label above \n}
% %   % \end{tikzpicture}
%   \valign{\hrule\vskip 2pt plus 1fil\hbox{\strut\quad ##\quad}\vfill&
%     \hrule\vskip 2pt plus 1 fil \hbox{\strut\quad ##\quad}
%     \vskip 1pt plus 1fil\hrule\cr
%   \foreach \n in {1, ..., \totvalue{exc}} {\n& \cr\noalign{\vrule}}}
% }