-
Notifications
You must be signed in to change notification settings - Fork 0
/
ISTPhDCover.sty
511 lines (441 loc) · 16.9 KB
/
ISTPhDCover.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
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
% ------------------------------------------------------------------
% IST PhD Cover Package
% ------------------------------------------------------------------
% Author: Marco M. Morgado, Bruno Guerreiro
%
% Date: 2011/05/2011
%
% Files: You need the following files
% 1) ISTPhDCover.sty
% 2) logo_ist_web.pdf
%
% Package Options:
% \usepackage[SCR]{ISTPhDCover}
% \usepackage[DraftPhD]{ISTPhDCover}
% \usepackage[FinalPhD]{ISTPhDCover}
%
%
%
% Note: The following commands are defined, in a similar fashion to
% the existing commands \author, \title, and \date
%
% \authordegree ... degree of the author
% \major ... major of the thesis
% \advisor ... PhD advisor
% \coadvisor ... PhD co-advisor
% \SCmemberone ... First member of the CAT
% \SCmembertwo ... Second member of the CAT
% \SCmemberthree ... Third member of the CAT
% \SCmemberfour ... Fourth member of the CAT
% \jurypresident ... President of the jury
% \jurymemberone ... First member of the jury
% \jurymembertwo ... Second member of the jury
% \jurymemberthree ... Third member of the jury
% \jurymemberfour ... Fourth member of the jury
% \jurymemberfive ... Fifth member of the jury
% \jurymembersix ... Sixth member of the jury
%
% \classification ... Final classification of the PhD
%
% ------------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{ISTPhDCover}[2011/05/10, Marco M. Morgado, Bruno J. N. Guerreiro]
% Cover Page Commands
% ------------------------------------------------------------------
% Title of the thesis
\let\@title\@empty
% Author of the thesis
\let\@author\@empty
% Degree of the author
\let\@authordegree\@empty
% Homepage of the author
\let\@authorhome\@empty
% Major of the thesis
\let\@major\@empty
% Advisor of the thesis
\let\@advisor\@empty
% Co-advisor of the thesis
\let\@coadvisor\@empty
% Members of the CAT
\let\@SCmemberone\@empty
\let\@SCmembertwo\@empty
\let\@SCmemberthree\@empty
\let\@SCmemberfour\@empty
% President of the jury
\let\@jurypresident\@empty
% Members of the jury
\let\@jurymemberone\@empty
\let\@jurymembertwo\@empty
\let\@jurymemberthree\@empty
\let\@jurymemberfour\@empty
\let\@jurymemberfive\@empty
\let\@jurymembersix\@empty
\let\@jurymemberoneinfo\@empty
\let\@jurymembertwoinfo\@empty
\let\@jurymemberthreeinfo\@empty
\let\@jurymemberfourinfo\@empty
\let\@jurymemberfiveinfo\@empty
\let\@jurymembersixinfo\@empty
% Classification of the PhD
\let\@classification\@empty
% Date of the thesis
\let\@date\@empty
\let\@coverfigurefile\@empty
% Command definitions
\newcommand{\authordegree} [1]{\gdef\@authordegree{#1}}
\newcommand{\authorhome} [1]{\gdef\@authorhome{#1}}
\newcommand{\major} [1]{\gdef\@major{#1}}
\newcommand{\advisor} [1]{\gdef\@advisor{#1}}
\newcommand{\coadvisor} [1]{\gdef\@coadvisor{#1}}
\newcommand{\SCmemberone} [1]{\gdef\@SCmemberone{#1}}
\newcommand{\SCmembertwo} [1]{\gdef\@SCmembertwo{#1}}
\newcommand{\SCmemberthree} [1]{\gdef\@SCmemberthree{#1}}
\newcommand{\SCmemberfour} [1]{\gdef\@SCmemberfour{#1}}
\newcommand{\jurypresident} [1]{\gdef\@jurypresident{#1}}
\newcommand{\jurymemberone} [1]{\gdef\@jurymemberone{#1}}
\newcommand{\jurymembertwo} [1]{\gdef\@jurymembertwo{#1}}
\newcommand{\jurymemberthree} [1]{\gdef\@jurymemberthree{#1}}
\newcommand{\jurymemberfour} [1]{\gdef\@jurymemberfour{#1}}
\newcommand{\jurymemberfive} [1]{\gdef\@jurymemberfive{#1}}
\newcommand{\jurymembersix} [1]{\gdef\@jurymembersix{#1}}
\newcommand{\jurymemberoneinfo} [1]{\gdef\@jurymemberoneinfo{#1}}
\newcommand{\jurymembertwoinfo} [1]{\gdef\@jurymembertwoinfo{#1}}
\newcommand{\jurymemberthreeinfo} [1]{\gdef\@jurymemberthreeinfo{#1}}
\newcommand{\jurymemberfourinfo} [1]{\gdef\@jurymemberfourinfo{#1}}
\newcommand{\jurymemberfiveinfo} [1]{\gdef\@jurymemberfiveinfo{#1}}
\newcommand{\jurymembersixinfo} [1]{\gdef\@jurymembersixinfo{#1}}
\newcommand{\classification} [1]{\gdef\@classification{#1}}
\newcommand{\coverfigurefile} [1]{\gdef\@coverfigurefile{#1}}
\newcommand{\mymargin}[0]{3cm}
\newcommand{\mywidth}[0]{15cm}
\newcommand{\myhskip}[0]{\hspace*{0.5cm}}
% Package textpos
% ------------------------------------------------------------------
\RequirePackage[absolute]{textpos}
% Set origin for the textpos package
\textblockorigin{0cm}{0cm}
% default:
\newcommand{\dateplace}[0]{27.5cm}
%\newcommand{\coverscale}[0]{1.0}
% \scalebox{\coverscale}{ }
%define title page common components
\newcommand{\maketitlepageheader}[0]
{
% IST Logo
% ----------------------------------------------------------------
\begin{textblock*}{2.5cm}(2.5cm, 1cm)
\noindent\includegraphics[width=2.5cm]{logo_ist_color}
\end{textblock*}
% UTL and IST Stamps
% ----------------------------------------------------------------
\begin{textblock*}{13.5cm}(5cm, 2.5cm)
\noindent
\begin{minipage}[c]{13.5cm}
\begin{center}
{\LARGE \textbf{UNIVERSIDADE T\'{E}CNICA DE LISBOA}}\\
\vspace{0.5cm}
{\LARGE \textbf{INSTITUTO SUPERIOR T\'{E}CNICO}}
\end{center}
\end{minipage}
\end{textblock*}
% % IST Logo with university and institute titles
% % ----------------------------------------------------------------
% \begin{textblock*}{\textwidth}(2.5cm, 2cm)
% \noindent\includegraphics[width=\textwidth]{logo_ist_web}
% \end{textblock*}
}
\newcommand{\maketitlepagefigure}[0]
{
% Cover Image
% ----------------------------------------------------------------
\ifx\empty\@coverfigurefile
\else
\begin{textblock*}{\mywidth}(\mymargin, 6cm)
\noindent
\begin{minipage}[c]{\mywidth}
\begin{center}
\includegraphics[height=8cm]{\@coverfigurefile}
\end{center}
\end{minipage}
\end{textblock*}
\fi
}
\newcommand{\maketitlepagetitle}[2]
{
% Thesis Title
% ----------------------------------------------------------------
\begin{textblock*}{\mywidth}(\mymargin, #1)
\noindent
\begin{minipage}[c]{\mywidth}
\begin{center}
\renewcommand{\baselinestretch}{1}
\rmfamily\LARGE \textbf{\@title}
\vspace*{#2}
\end{center}
\end{minipage}
% Thesis Author
% ----------------------------------------------------------------
\noindent
\begin{minipage}[c]{\mywidth}
\begin{center}
\renewcommand{\baselinestretch}{1}
\rmfamily\Large \textbf \@author
\vspace*{1cm}
\end{center}
\end{minipage}
% Advisor and Co-advisor
% ----------------------------------------------------------------
\noindent
\begin{minipage}[c]{\mywidth}
\begin{center}
\rmfamily \large \textbf{Supervisor:} \@advisor\\
\ifx\empty\@coadvisor
\else
\rmfamily \Large \textbf{Co-Orientador:} \@coadvisor
\fi
\end{center}
\end{minipage}
\end{textblock*}
}
\newcommand{\maketitlepagedate}[0]
{
% Date
% ----------------------------------------------------------------
\begin{textblock*}{\mywidth}(\mymargin, \dateplace)
\noindent
\centering
\begin{minipage}[c]{\mywidth}
\begin{center}
\large \textbf{\@date}
\end{center}
\end{minipage}
\end{textblock*}
}
% Package Options
% ------------------------------------------------------------------
% Steering Committee Report
\DeclareOption{SCR}
{
\newcommand{\ISTPhDCoverMakeType}[0]
{
\maketitlepageheader
\maketitlepagefigure
\maketitlepagetitle{14.5cm}{1cm}
\begin{textblock*}{13cm}(4cm, 21cm)
\noindent
\begin{minipage}[c]{13cm}
\begin{center}
\large \textbf{Relat\'{o}rio CAT}
\end{center}
\end{minipage}
\end{textblock*}
% Thesis Steering Committee
% ----------------------------------------------------------------
\begin{textblock*}{15cm}(3cm, 23cm)
\noindent
\begin{minipage}[c]{15cm}
\begin{center}
\textbf{Comiss\~{a}o de Acompanhamento de Tese}
\end{center}
\end{minipage}
\end{textblock*}
\begin{textblock*}{15cm}(3cm, 23.75cm)
\begin{minipage}[c]{15cm}
\begin{tabular}{ll} %\vspace{-0.2cm}
\textbf{Membros:} & \@SCmemberone \\ %\vspace{-0.2cm}
& \@SCmembertwo \\ %\vspace{-0.2cm}
& \@SCmemberthree \\ %\vspace{-0.2cm}
& \@SCmemberfour \\ %\vspace{-0.2cm}
\end{tabular}
\end{minipage}
\end{textblock*}
\maketitlepagedate
}
}
% Draft PhD Thesis
\DeclareOption{DraftPhD}
{
\newcommand{\ISTPhDCoverMakeType}[0]
{
\maketitlepageheader
\maketitlepagefigure
\maketitlepagetitle{15cm}{1cm}
% Phd Thesis Dissertation Stamp and Major
% ----------------------------------------------------------------
\begin{textblock*}{\mywidth}(\mymargin, 22cm)
\noindent
\begin{minipage}[c]{\mywidth}
\begin{center}
\large \textbf{ Thesis specifically prepared to obtain the PhD Degree in\\
\@major}
\end{center}
\end{minipage}
\vspace*{2cm}
\noindent
\begin{minipage}[c]{\mywidth}
\begin{center}
\Large \textbf{Draft}
\end{center}
\end{minipage}
\end{textblock*}
\maketitlepagedate
}
}
% Final PhD Thesis
\DeclareOption{FinalPhD}
{
\newcommand{\ISTPhDCoverMakeType}[0]
{
\maketitlepageheader
\maketitlepagefigure
\maketitlepagetitle{14.5cm}{1cm}
% Phd Thesis Dissertation Stamp and Major
% ----------------------------------------------------------------
\begin{textblock*}{\mywidth}(\mymargin, 19.5cm)
\noindent
\begin{minipage}[c]{\mywidth}
\begin{center}
{\large \textbf{ Thesis approved in public session to obtain the PhD Degree in \\
\@major}}\\
\vspace*{0.5cm}
{\large \textbf{ Jury final classification: \@classification}}\\
\end{center}
\end{minipage}
\vspace*{1cm}
\noindent
\begin{minipage}[c]{\mywidth}
\begin{center}
% Jury
% ----------------------------------------------------
{\large \textbf{Jury}}\\
\vspace*{0.2cm}
\begin{tabular}{ll}
\textbf{Chairperson:} & \@jurypresident \\ %\vspace{-0.4cm}
\multicolumn{2}{l}{ \textbf{Members of the comitee:} } \\ %\vspace{-0.2cm}
& \@jurymemberone \\ %\vspace{-0.2cm}
& \@jurymembertwo \\ %\vspace{-0.2cm}
& \@jurymemberthree \\ %\vspace{-0.2cm}
& \@jurymemberfour \\
\ifx\empty\@jurymemberfive\else \vspace{-0.0cm} & \@jurymemberfive \\ \fi
\ifx\empty\@jurymembersix\else \vspace{-0.0cm} & \@jurymembersix \\ \fi
\end{tabular}
\end{center}
\end{minipage}
\end{textblock*}
\maketitlepagedate
% Force 2 white pages
\thispagestyle{empty}\ \clearpage
\thispagestyle{empty}\ \cleardoublepage
%------------------------------------
% Make second cover page:
\maketitlepageheader
\maketitlepagetitle{8cm}{2cm}
% Phd Thesis Dissertation Stamp and Major
% ----------------------------------------------------------------
\begin{textblock*}{\mywidth}(\mymargin, 15cm)
\noindent
\begin{minipage}[c]{\mywidth}
\begin{center}
{\large \textbf{ Thesis approved in public session to obtain the PhD Degree in \\
\@major}}\\
\vspace*{0.5cm}
{\large \textbf{ Jury final classification: \@classification}}\\
\end{center}
\end{minipage}
\vspace*{1cm}
\noindent
\begin{minipage}[c]{\mywidth}
\begin{center}
% Jury
% ----------------------------------------------------
{\large \textbf{Jury}}\\
\vspace*{0.5cm}
\begin{tabular}{ll}
\multicolumn{2}{l}{ \textbf{Chairperson:} \hspace*{0.5cm} \@jurypresident} \\
\multicolumn{2}{l}{ \textbf{Members of the comitee:} } \\
\hspace*{0.7cm} & \@jurymemberone \\
& \myhskip\@jurymemberoneinfo \\
& \@jurymembertwo \\
& \myhskip\@jurymembertwoinfo \\
& \@jurymemberthree \\
& \myhskip\@jurymemberthreeinfo \\
& \@jurymemberfour \\
& \myhskip\@jurymemberfourinfo \\
\ifx\empty\@jurymemberfive\else & \@jurymemberfive \\ \fi
\ifx\empty\@jurymemberfiveinfo\else & \myhskip\@jurymemberfiveinfo \\ \fi
\ifx\empty\@jurymembersix\else & \@jurymembersix \\ \fi
\ifx\empty\@jurymembersixinfo\else & \myhskip\@jurymembersixinfo \\ \fi
\end{tabular}
\end{center}
\end{minipage}
\vspace*{1cm}
\noindent
\begin{minipage}[c]{\mywidth}
\begin{center}
% Jury
% ----------------------------------------------------
{\large \textbf{Funding Institutions:}}\\
\vspace*{0.2cm}
Fundação para a Ciência e a Tecnologia
\end{center}
\end{minipage}
\end{textblock*}
\maketitlepagedate
}
}
% Copyright options
\newcommand{\ISTPhDCoverMakeCopyright}[0]{}
\DeclareOption{CopyrightCC} % Creative commons (requires image "by-nc-sa_eu.eps")
{
\renewcommand{\ISTPhDCoverMakeCopyright}[0]
{
%% Copyright Page
\begin{textblock*}{\mywidth}(\mymargin, 23cm)
\noindent
\centering
\begin{minipage}[c]{\mywidth}
\begin{center}
\includegraphics[width=3cm]{by-nc-sa_eu.eps}
\vspace{0.5cm}
This dissertation by
\href{\@authorhome}
{\@author} is licensed under a
\href{http://creativecommons.org/licenses/by-nc-sa/3.0}
{Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License}.
Permissions beyond the scope of this license may be available by contacting the author.
To view a copy of this license, visit
\url{http://creativecommons.org/licenses/by-nc-sa/3.0/} or
\url{http://creativecommons.org/licenses/by-nc-sa/3.0/pt}.
\end{center}
\end{minipage}
\end{textblock*}
}
}
\DeclareOption{CopyrightAll}
{
\renewcommand{\ISTPhDCoverMakeCopyright}[0]
{
%% Copyright Page
\begin{textblock*}{\mywidth}(\mymargin, 25cm)
\noindent
\centering
\begin{minipage}[c]{\mywidth}
\begin{center}
Copyright, \href{\@authorhome}{\@author}, all rights reserved.
\end{center}
\end{minipage}
\end{textblock*}
}
}
% Process Options
\ProcessOptions\relax
% Command \maketitle
% ------------------------------------------------------------------
\renewcommand{\maketitle}
{
\ISTPhDCoverMakeType
% Force 2 white pages (put copyright if option selected
\thispagestyle{empty}\ \clearpage
\ISTPhDCoverMakeCopyright
\thispagestyle{empty}\ \cleardoublepage
}