forked from SERG-Delft/thesis-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mscthesis.sty
executable file
·192 lines (167 loc) · 5.48 KB
/
mscthesis.sty
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
%---------------------------------------------------------------------%
% Define header and footer %
%---------------------------------------------------------------------%
%
% Dropped fancy plain as it is essentially included in memoir already.
% So we selectively reuse some settings.
%
%\pagestyle{fancyplain}
\addtolength{\headwidth}{0.5\marginparwidth}
\renewcommand{\chaptermark}[1]{\markboth{\textit{#1}}{}}
\renewcommand{\sectionmark}[1]{\markright{\textit{\thesection{} #1}}}
%\lhead[\fancyplain{}{\rightmark}]{\fancyplain{}{\leftmark}}
%\rhead[\fancyplain{}{\leftmark}]{\fancyplain{}{\rightmark}}
%\cfoot{}
%\lfoot[\thepage]{}
%\rfoot[]{\thepage}
% instead, use memoirs ruled style:
\pagestyle{ruled}
%---------------------------------------------------------------------%
% Chapter headings %
%---------------------------------------------------------------------%
\renewcommand{\printchaptertitle}[1]{\raggedleft{\textbf{\Huge{#1}}}}
\renewcommand{\printchapternonum}{%
\raggedleft\phantom{\textbf{\Huge{Chapter}}}\vskip 5pt
\vskip\onelineskip\hrule\vskip\onelineskip
}
\renewcommand{\afterchapternum}{\vskip\onelineskip\hrule\vskip\onelineskip}%
%---------------------------------------------------------------------%
% Define new variables %
%---------------------------------------------------------------------%
\gdef\theauthor{\@author}
\gdef\@chair{Prof. Dr. A. van Deursen, Faculty EEMCS, TU Delft}
\gdef\@supervisor{Dr. E. Visser, Faculty EEMCS, TU Delft}
\gdef\@colophon{\copyright \the\year \: \theauthor. All rights reserved.}
\gdef\@subtitle{please define subtitle}
\gdef\@authoremail{please define authoremail}
\gdef\@university{please define university}
\gdef\@studentid{please define studentid}
\def\chair#1{\gdef\@chair{#1}}
\def\supervisor#1{\gdef\@supervisor{#1}}
\def\externalsupervisor#1{\gdef\@externalsupervisor{#1}\external@supervisortrue}
\def\committeemember#1{\gdef\@committeemember{#1}\committee@membertrue}
\def\subtitle#1{\gdef\@subtitle{#1}}
\def\authoremail#1{\gdef\@authoremail{#1}}
\def\university#1{\gdef\@university{#1}}
\def\company#1{\gdef\@company{#1}\company@definedtrue}
\def\birthplace#1{\gdef\@birthplace{#1}\birthplace@definedtrue}
\def\studentid#1{\gdef\@studentid{#1}}
\def\colophon#1{\gdef\@colophon{#1}}
\def\coverpicture#1{\gdef\@coverpicture{#1}\cover@picturetrue}
% New if construct: Default condition:
\newif\ifcover@picture \cover@picturefalse
\newif\ifexternal@supervisor \external@supervisorfalse
\newif\ifcommittee@member \committee@memberfalse
\newif\ifcompany@defined \company@definedfalse
\newif\ifbirthplace@defined \birthplace@definedfalse
\university{%
\hskip-10pt{\includegraphics[height=2cm]{img/tudelft_logo_bw.eps}}\\[-8pt]
Software Engineering Research Group \\
Department of Software Technology \\
Faculty EEMCS, Delft University of Technology \\
Delft, the Netherlands \\
\url{www.ewi.tudelft.nl}
}
%---------------------------------------------------------------------%
% Title page %
%---------------------------------------------------------------------%
\date{}
\pretitle{\begin{flushright}\Huge}
\posttitle{%
\par
\rule{\textwidth}{4pt}\par\textit{\Large{\@subtitle}}
\par
\vfill
\ifcover@picture
\@coverpicture
\fi
\vfill
\end{flushright}}
\preauthor{\begin{flushright}\begingroup\Large}
\postauthor{\endgroup\end{flushright}\vskip 1em}
\predate{\begingroup}
\postdate{\endgroup\cleardoublepage}
%-------------------------------------------------------------------%
% Formal Title Pages %
%-------------------------------------------------------------------%
\def\@REPTYPE{MASTER OF SCIENCE}
\def\@MAJOR{COMPUTER SCIENCE}
\def\makeformaltitlepages#1{%
\begingroup\newpage
\thispagestyle{empty}\setcounter{page}{1}
\let\footnotesize\small \let\footnoterule\relax
%\null
\noindent\rule{\textwidth}{1.5pt}
\vskip 1em
\begin{center}
{\Huge \@title \par}
\vskip 1em
\rule{\textwidth}{1.5pt} \par \nobreak
%$\:\underline{~~~~ \mbox{\rule{0in}{0.16in} \hspace{5in}}}\:$ \\
\vskip 4em
{\large THESIS}
\vskip 2em
{\large submitted in partial fulfillment of the \\
requirements for the degree of }
\vskip 2em
{\large \@REPTYPE}
\vskip 2em
in
\vskip 2em
{\large \@MAJOR}
\vskip 2em
by
\vskip 2em
{\large \begin{tabular}[t]{c}
\@author \\
\ifbirthplace@defined
born in \@birthplace{}
\fi
\end{tabular}}
\vfill
\ifcompany@defined
\end{center}
\begin{tabular}{@{}l@{}r@{}}
\begin{minipage}[b]{.54\textwidth}\@university\end{minipage} &
\begin{minipage}[b]{.46\textwidth}\flushright\@company\end{minipage}
\end{tabular}
\else
\@university
\end{center}
\fi
\newpage
\thispagestyle{empty}
\mbox{}
\vfill
\@colophon{}
\cleardoublepage
\thispagestyle{empty}\setcounter{page}{1}
\noindent\rule{\textwidth}{1.5pt}
\begin{center}
{\Huge \@title \par}
\end{center}
\noindent\rule{\textwidth}{1.5pt}
\vskip 3em
\noindent\begin{tabular}{@{}ll@{}}
\\
Author: & \@author \\
Student id: & \@studentid \\
Email: & \@authoremail \\
\end{tabular}
\vskip 3em
\begin{abstract}#1\end{abstract}
\vfill
\noindent\begin{tabular}{@{}ll@{}}
\\
Thesis Committee:\\\\
Chair: & \@chair\\
University supervisor: & \@supervisor\\
\ifexternal@supervisor
Company supervisor: & \@externalsupervisor\\
\fi
\ifcommittee@member
Committee Member: & \@committeemember\\
\fi
\\\\\\\end{tabular}
\cleardoublepage\endgroup
}