This repository has been archived by the owner on Feb 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
uvamath.cls
119 lines (100 loc) · 2.79 KB
/
uvamath.cls
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
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{uvamath}[2015/10/27 0.3 Bachelor wiskunde LaTeX document class]
\RequirePackage{graphicx}
\DeclareOption{english}{
% English values for translatable constant text
\def\supervisorstext{Supervisor}
\def\titletext{Title}
\def\authortextsingular{Authors}
\def\authortextplural{Authors}
\def\datetext{Date}
\def\secondgradertext{Second grader}
}
% Default values for translatable constant text
\def\supervisorstext{Begeleiding}
\def\titletext{Titel}
\def\authortextsingular{Auteur}
\def\authortextplural{Auteurs}
\def\datetext{Einddatum}
\def\secondgradertext{Tweede beoordelaar}
\ProcessOptions
\LoadClassWithOptions{scrreprt}
\setkomafont{disposition}{\bfseries}
%\RequirePackage[a4paper]{geometry}
% Variable text commands
\def\institute#1{\gdef\@institute{#1}}
\def\instituteaddress#1{\gdef\@instituteaddress{#1}}
\def\coverimage#1{\gdef\@coverimage{#1}}
\def\what#1{\gdef\@what{#1}}
\def\supervisors#1{\gdef\@supervisors{#1}}
\def\secondgrader#1{\gdef\@secondgrader{#1}}
% Default values for variable text
\institute{
Korteweg-de Vries Instituut voor Wiskunde\\\smallskip
Faculteit der Natuurwetenschappen, Wiskunde en Informatica\\\smallskip
Universiteit van Amsterdam\\\bigskip
\includegraphics[width=0.070\hsize]{uvalogo}
}
\instituteaddress{Korteweg-de Vries Instituut voor Wiskunde\\
Universiteit van Amsterdam\\
Science Park 904, 1098 XH Amsterdam\\
\url{http://www.science.uva.nl/math}{}
}
\coverimage{}
\what{}
\supervisors{\relax}
\secondgrader{\relax}
% Author command
\newcounter{authors}
\def\@authordetails{}
\def\@authors{}
\renewcommand\author[2][\relax]{
\ifnum\value{authors}>0\relax
\addtocounter{authors}{1}
\xdef\@authors{\@authors, #2}
\protected@xdef\@authordetails{\@authordetails\protect{\\}\indent #2\if#1\relax\else{, #1}\fi}
\else
\addtocounter{authors}{1}
\gdef\@authors{#2}
\gdef\@authordetails{#2, #1}
\fi
}
% Maketitle command
\renewcommand{\maketitle}{
\pagestyle{empty}
\vspace*{30pt}
{\centering
{\LARGE \textbf{\bfseries \@title}\par}\bigskip
{\Large \@authors
\par}\bigskip
{\Large \@date\par}\bigskip\bigskip
{\large \@what\par}\medskip
\if\@supervisors\relax\else {\large\supervisorstext: \@supervisors\par}\bigskip\fi
\vspace{\stretch{1}}
\@coverimage
\vspace{\stretch{1}}
\@institute
\vspace{-70pt}
}
\newpage
\pagestyle{plain}
}
% Abstract and info page
\renewenvironment{abstract}{\section*{\abstractname}}{
\vfill
%\section*{Gegevens}
\noindent
\titletext: \@title\\
\ifnum\value{authors} < 2%
\authortextsingular: \@authordetails\\
\else
\authortextplural:\\ \indent\@authordetails\\
\fi
\if\@supervisors\relax\else \supervisorstext: \@supervisors\\ \fi
\if\@secondgrader\relax\else \secondgradertext: \@secondgrader\\ \fi
\datetext: \@date
\bigskip\noindent
\@instituteaddress
\newpage
}
\endinput