-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEPFLreport.sty
211 lines (188 loc) · 5.23 KB
/
EPFLreport.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
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% EPFL report package
% Goal: provide formatting for theses and project reports
% Author: Mathias Payer <[email protected]>
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
% of this license or (at your option) any later version.
% The latest version of this license is in
% http://www.latex-project.org/lppl.txt
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ProvidesPackage{EPFLreport}
\usepackage[absolute]{textpos}
\usepackage{graphicx}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[tracking=true,kerning=true,spacing=true]{microtype}
\usepackage[DIV=14,BCOR=2mm,headinclude=true,footinclude=false]{typearea}
\usepackage[
backend=biber,
style=numeric-comp,
hyperref=true,
%style=numeric,
%sorting=ydnt,
defernumbers=true,
maxbibnames=99,
]{biblatex}
\addbibresource{thesis.bib}
\setcounter{biburllcpenalty}{7000}
\setcounter{biburlucpenalty}{8000}
\sloppy
\usepackage[french,german,english]{babel}
\usepackage{utopia}
\usepackage{setspace} % slightly larger spacing
\setstretch{1.1}
\usepackage{hyperref}
\hypersetup{pdfborder={0 0 0}, colorlinks=true, linkcolor=black, citecolor=black, urlcolor=black}
\newif\if@epflmscthesis
\newif\if@epflbscthesis
\newif\if@epflmscproject
\newif\if@epflbscproject
\DeclareOption{MScThesis}{\@epflmscthesistrue}
\DeclareOption{BScThesis}{\@epflbscthesistrue}
\DeclareOption{MScProject}{\@epflmscprojecttrue}
\DeclareOption{BScProject}{\@epflbscprojecttrue}
\newif\if@lablogo
\DeclareOption{lablogo}{\@lablogotrue}
\ProcessOptions\relax
\newcommand{\projectterm}{Project Report}
\if@epflmscthesis
\renewcommand{\projectterm}{Master Thesis}
\fi
\if@epflbscthesis
\renewcommand{\projectterm}{Bachelor Thesis}
\fi
\if@epflmscproject
\renewcommand{\projectterm}{Master Project Report}
\fi
\if@epflbscproject
\renewcommand{\projectterm}{Bachelor Project Report}
\fi
\def\@adviser{Thesis Advisor}
\newcommand{\adviser}[1]{
\def\@adviser{#1}
}
\def\@supervisor{Thesis Supervisor}
\newcommand{\supervisor}[1]{
\def\@supervisor{#1}
}
\def\maketitle{\par
\begingroup
\renewcommand\thefootnote{\fnsymbol{footnote}}%
\def\@makefnmark{\hbox to\z@{$\m@th^{\@thefnmark}$\hss}}%
\long\def\@makefntext##1{\parindent 1em\noindent
\hbox to1.8em{\hss$\m@th^{\@thefnmark}$}##1}%
\if@twocolumn
\twocolumn[\@maketitle]%
\else \newpage
\global\@topnum\z@
\@maketitle \fi\@thanks
\endgroup
\setcounter{footnote}{0}%
\let\maketitle\relax
\let\@maketitle\relax
\let\thanks\relax}
\def\@maketitle{
\setlength{\parindent}{0pt}
\setlength{\parskip}{0pt}
\newlength{\drop}
\newlength{\tpheight}\setlength{\tpheight}{0.9\textheight}
\newlength{\txtheight}\setlength{\txtheight}{0.9\tpheight}
\begingroup
\thispagestyle{empty}
\drop=0.1\txtheight
\begin{textblock*}{4in}[0.3066,0.39](1.5in,0.85in)
\includegraphics[width=2.5in]{EPFLlogo}
\end{textblock*}
\if@lablogo
\begin{textblock*}{4in}[0.3066,0.39](5.7in,0.85in)
\includegraphics[width=3in]{LABlogo}
\end{textblock*}
\fi
\vspace*{\drop}
\centering
{\LARGE École Polytechnique Fédérale de Lausanne}\\[2\baselineskip]
{\LARGE\sffamily \@title}\\[2\baselineskip]
by \@author\par
\vfill
{\LARGE \projectterm}\par
\vspace{\drop}
\flushleft
{Approved by the Examining Committee:}\par
\vspace{1.5\baselineskip}
\@adviser\\
Project Advisor \\[1\baselineskip]
\@supervisor\\
Project Supervisor\par
\centering
\vspace{1\baselineskip}
EPFL IC IINFCOM HEXHIVE \\
BC 160 (Bâtiment BC) \\
Station 14 \\
CH-1015 Lausanne \\[\baselineskip]
\today
\par
\vfill
\endgroup
}
\def\@dedication{%
\begin{raggedleft}
Follow the white rabbit...\\
--- The Matrix\\
\end{raggedleft}
\vspace{4cm}
\begin{center}
Dedicated to my pet bunny.
\end{center}
The dedication is usually a short inspirational quote.
Define your dedication in \texttt{\textbackslash{}dedication\{...\}}
and show them with \texttt{\textbackslash{}makededication}.
}
\newcommand{\dedication}[1]{
\def\@dedication{#1}
}
\def\makededication{\par
% Dedication and acknowledgments
\cleardoublepage
\thispagestyle{empty}
\vspace*{3cm}
\@dedication
\setcounter{page}{0}
}
\def\@acknowledgments{%
I would like to thank the whole HEXHIVE group for supporting and guiding me for
this project. In particular, I would like to thank Dr. Marcel Busch, for which
I have the utmost admiral, for sharing his research and deep knowledge of
the field with me. I would also like to thank Prof. Dr. sc. ETH Mathias Payer
for his Software Security class at EPFL which has been of tremendous help
for my improvement in the field.
This report was written using \href{https://github.com/HexHive/thesis_template}{HexHive thesis template.}
}
\newcommand{\acknowledgments}[1]{
\def\@acknowledgments{#1}
}
\def\makeacks{\par
% Achnowledgments
\cleardoublepage
\section*{Acknowledgments}
\@acknowledgments
\bigskip
\noindent\textit{Lausanne, \today}
\hfill \@author
\newpage
}
\def\frenchabstract{\begin{otherlanguage}{french}
\cleardoublepage
\chapter*{Résumé}
\markboth{Résumé}{Résumé}}
\def\endfrenchabstract{\end{otherlanguage}}
\def\maketoc{
\cleardoublepage
\pdfbookmark{\contentsname}{toc}
\tableofcontents
\newpage
\setlength{\parskip}{1em}
}
\endinput