-
Notifications
You must be signed in to change notification settings - Fork 0
/
hydrothesis.cls
executable file
·244 lines (195 loc) · 6.69 KB
/
hydrothesis.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
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
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
%% hydrothesis.cls
%% LaTeX template for creating PhD theses.
%% This file is a modification of the Hagenberg Thesis package (https://github.com/Digital-Media/HagenbergThesis) for creating bachelors's and masters's theses
%% Author: Robin Schwemmle ([email protected])
%% File encoding: ASCII
%% Package Information --------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{hydrothesis}[2018/02/08]
\RequirePackage{xifthen}
\RequirePackage{ifpdf} % for checking PDF mode
\ifpdf{}% \typeout{hydrothesis: *** LaTeX in PDF mode ***}
\else{\errmessage{hydrothesis: *** LaTeX NOT running in PDF mode ***}}
\fi
%% Commands for Title Pages (used in class options) ---------------------------
\newcommand{\hydro@MainLanguage}{english} % also referenced in hydro.sty
\newcommand{\@mastertitlepages}{}
\newcommand{\@maketitlepages}{\@mastertitlepages} %Default: Master's thesis
\newcommand{\@titlepagefont}{\sffamily}
%% Class options --------------------------------------------------------------
\DeclareOption{master}{
\renewcommand{\@maketitlepages}{\@mastertitlepages}
}
\DeclareOption{english}{%
\renewcommand{\hydro@MainLanguage}{english}
}
\DeclareOption*{%
\ClassWarning{hydrothesis}{Unknown document option '\CurrentOption'.}
}
\ProcessOptions
%% Paper Options and Style File -----------------------------------------------
\LoadClass[a4paper,12pt,openany]{book}
\RequirePackage[top=30mm,bottom=30mm,left=30mm,right=30mm]{geometry} %showframe
\RequirePackage{hydro} % load associated style file hydro.sty
%% Setup for Pages in the Front Matter ----------------------------------------
% General Commands
\newcommand{\@institute}{\@MissingArg{Institute not specified!}}
\newcommand{\institute}[1]{%
\renewcommand{\@institute}{#1}
}
\newcommand{\@university}{\@MissingArg{University not specified!}}
\newcommand{\university}[1]{%
\renewcommand{\@university}{#1}
}
\newcommand{\@place}{\@MissingArg{Place not specified!}}
\newcommand{\place}[1]{%
\renewcommand{\@place}{#1}
}
\newcommand{\@datetitle}{\@MissingArg{Date not specified!}}
\newcommand{\datetitle}[1]{%
\renewcommand{\@datetitle}{#1}
}
\newcommand{\@datesub}{\@MissingArg{Date of Submission not specified!}}
\newcommand{\datesub}[1]{%
\renewcommand{\@datesub}{#1}
}
\newcommand{\@datedefense}{\@MissingArg{Date of Defense not specified!}}
\newcommand{\datedefense}[1]{%
\renewcommand{\@datedefense}{#1}
}
\newcommand{\@dean}{\@MissingArg{Dean not specified!}}
\newcommand{\dean}[1]{%
\renewcommand{\@dean}{#1}
}
\newcommand{\@supervisor}{\@MissingArg{Supervisor not specified!}}
\newcommand{\supervisor}[1]{%
\renewcommand{\@supervisor}{#1}
}
\newcommand{\@cosupervisor}{\@MissingArg{Co-Supervisor not specified!}}
\newcommand{\cosupervisor}[1]{%
\renewcommand{\@cosupervisor}{#1}
}
\newcommand{\@secondreviewer}{\@MissingArg{Second reviewer not specified!}}
\newcommand{\secondreviewer}[1]{%
\renewcommand{\@secondreviewer}{#1}
}
\newcommand{\@titleimage}[0]{}
\newcommand{\titleimage}[1]{%
\renewcommand{\@titleimage}{#1}
}
%% Commands for Creating the Title Pages --------------------------------------
%% adds blank space after each letter (http://stackoverflow.com/a/3951837)
\newcommand{\@addspaces}[1]{%
\@tfor\letter:=#1\do{%
\letter\thinspace% %\space
}%
}
%% First Title Page ------------------------------------
\newcommand{\@mastertitleone}{%
\begin{titlepage}%
\rule{0mm}{1mm}
\vspace*{0mm}
\begin{center}%
\@titlepagefont %\normalfont
\setlength{\unitlength}{1cm}
\vskip 25mm%
\begin{spacing}{2.0}
{\LARGE\@title}
\end{spacing}
\vskip 25mm%
{Thesis submitted in partial fulfillment of the requirements of}
\vskip 2mm%
{the degree Doctor rer. nat. of the}
\vskip 2mm%
{Faculty of Environment and Natural Resources,}
\vskip 2mm%
{Albert-Ludwigs-University}
\vskip 2mm%
{Freiburg im Breisgau, Germany}%
\vskip 25mm%
{by}%
\vskip 4mm%
{\@author}%
\vskip 4mm%
{{\@place}, {\@datetitle}}%
\end{center}%
\vfil%
\end{titlepage}%
}
%% Second Title Page ------------------------------------
\newcommand{\@mastertitletwo}{%
\begin{titlepage}%
\rule{0mm}{1mm}
\vspace*{0mm}
\begin{flushleft}%
\@titlepagefont %\normalfont
\setlength{\unitlength}{1cm}
\vskip 160mm%
{{Dean: }\@dean}%
\vskip 4mm%
{{Supervisor: }\@supervisor}%
\vskip 4mm%
{{Second supervisor: }\@cosupervisor}%
\vskip 4mm%
{{Second reviewer: }\@secondreviewer}%
\vskip 4mm%
{{Date of disputation: }\@datedefense}%
\end{flushleft}%
\vfil%
\end{titlepage}%
}
%% Declaration Page ------------------------------------
\newcommand{\leadingzero}[1]{\ifnum #1<10 0\the#1\else\the#1\fi}
\newcommand{\@declarationpage}{%
\begin{english}
\chapter*{Declaration of Authorship}
\noindent
I, xxx, hereby declare that I have written this thesis independently,
that I neither have used other sources than the ones mentioned in the text,
nor that I have used unauthorized assistance and that I have not submitted this thesis previously
in any form to another examination commission in Germany or another country for a doctoral degree.
\par
\vspace{10mm}
\noindent
This thesis contains no material previously published or written by another person except where
proper acknowledgement is made. Chapters x to x of this thesis are a series of manuscripts that
are published or being currently under review in peer-reviewed journals. I am the main author of Chapters x to x,
for which I have contributed to the development of the study concept and modelling experiments,
made the tables, figures, and supporting information. I have written all manuscripts. Details about
the contributions of all co-authors are stated under Manuscripts and authors' contributions.
\par
\vspace{10mm}
\noindent
%\@placeanddate, \the\year-\leadingzero{\month}-\leadingzero{\day} %http://de.wikibooks.org/wiki/LaTeX-W%F6rterbuch:_today
\@place, \@datesub
\par
\vspace{12mm}
\noindent
\@author
\end{english}
}
%% Assembly of title pages ----------------------------------------------------
\renewcommand{\@mastertitlepages}{
\@mastertitleone
\@mastertitletwo
\@declarationpage
}
% Add PDF meta data and create title pages
\renewcommand{\maketitle}{ %replace standard LaTeX-command
\hypersetup{
pdftitle={\@title},
pdfauthor={\@author},
pdfsubject={Hydrology, \@place, \@datetitle},
pdfcreator={LaTeX using class hydrothesis [\hydroDate]},
pdfproducer={pdflatex},
pdfkeywords={}
}%
\@maketitlepages
}
%% Additional packages ----------------------------------------------
\RequirePackage{hydromath}
\RequirePackage{hydroheadings}
\RequirePackage{hydroabbrev}
\RequirePackage{hydrolistings}
\RequirePackage{hydrobib}
\endinput