-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEPFLreport.sty
243 lines (218 loc) · 6.13 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
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
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% EPFL report package
% Goal: provide formatting for theses and project reports
% Author: Mathias Payer <mathias.payer@epfl.ch>
%
% 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}
\microtypecontext{spacing=nonfrench}
\usepackage[DIV=14,BCOR=2mm,headinclude=true,footinclude=false]{typearea}
\usepackage[
backend=biber,
style=numeric-comp,
hyperref=true,
%style=numeric,
sorting=none,
defernumbers=true,
maxbibnames=99,
]{biblatex}
% Hide notes, "visited on..." and the url (except for software and websites)
\AtEveryBibitem{
\ifentrytype{software}{}{
\ifentrytype{online}{}{
\clearfield{url}
}
}
\clearfield{urldate}
\clearfield{urlmonth}
\clearfield{urlyear}
\clearfield{note}
}
% Defined in main file
%\addbibresource{thesis.bib}
\setcounter{biburllcpenalty}{7000}
\setcounter{biburlucpenalty}{8000}
\sloppy
\usepackage[french,german,english]{babel}
\usepackage{csquotes}
\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}
\usepackage{xspace}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{calrsfs}
\usepackage{booktabs} % For \toprule, \midrule and \bottomrule
\usepackage{pgfplotstable} % Generates table from .csv
\usepackage[ruled,vlined]{algorithm2e}
\renewcommand*{\algorithmautorefname}{Algorithm}
% \usepackage{siunitx} % Formats the units and values
% \sisetup{
% round-mode = places, % Rounds numbers
% round-precision = 2, % to 2 places
% }
\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\@epflsupervisor{EPFL Supervisor}
\newcommand{\epflsupervisor}[1]{
\def\@epflsupervisor{#1}
}
\def\@companysupervisor{Company Supervisor}
\newcommand{\companysupervisor}[1]{
\def\@companysupervisor{#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
\vspace{1.5\baselineskip}
\@epflsupervisor\\
EPFL Supervisor \\[1\baselineskip]
\@companysupervisor\\
Company Supervisor\par
\centering
\vspace{1\baselineskip}
Ketl \\
33 Rue des Bains \\
1205 Genève, Switzerland \\[\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{%
This is where you thank those who supported you on this journey. Good examples
are your significant other, family, advisers, and other parties that inspired
you during this project. Generally this section is about 1/2 page to a page.
Consider acknowledging the use and location of this thesis package.
Define your acknowledgments in \texttt{\textbackslash{}acknowledgments\{...\}}
and show them with \texttt{\textbackslash{}makeacks}.
}
\newcommand{\acknowledgments}[1]{
\def\@acknowledgments{#1}
}
\def\makeacks{\par
% Achnowledgments
\cleardoublepage
\chapter*{Acknowledgments}
\markboth{Acknowledgments}{Acknowledgments}
\addcontentsline{toc}{chapter}{Acknowledgments}
\@acknowledgments
\bigskip
\noindent\textit{Lausanne, \today}
\hfill \@author
}
\def\abstract{\cleardoublepage
\chapter*{Abstract}
\markboth{Abstract}{Abstract}
\addcontentsline{toc}{chapter}{Abstract}}
\def\endabstract{}
\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
\setlength{\parskip}{1em}
}
\endinput