summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/feupphdteses/feupphdteses.sty
blob: 2e5e3655a1b4a13d34d38dd744dbeb789521a672 (plain)
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
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
%% PhD FEUP THESIS STYLE for LaTeX2e
%% Based on "feuptese.sty" by jcl and jcf at fe.up.pt
%%
%% Faculdade de Engenharia da Universidade do Porto
%% Programa Doutoral em Engenharia Biomedica
%% Mario Saenz Espinoza
%%
%% PLEASE send improvements to mario.espinoza at fe.up.pt
%%
%% Special thanks to Prof. Joao Correia Lopes, FEUP

%% LOG
	% March 20, 2013: 
		% Added "RequirePackage{tabularx}"
		% Added "RequirePackage{array}"
		% Moved "RequirePackage{longtable}" after "RequirePackage{array}" and "RequirePackage{tabularx}"
		% Added "RequirePackage{xtab}"
		% Added "RequirePackage{tabu}"
	% March 22, 2013:
		% Added "RequirePackage{siunitx}"
			% Setup comma as decimal separator
			% Setup minimum group of three
			% Setup font to match text
	% March 28, 2013:
		% Added \bstctlcite part of bibliography
	% April 2, 2013:
		% Added \RequirePackage{arydshln}
		% Added \RequirePackage{dashrule}
			% Didn't work, took it out
		% Moved `\modulolinenumbers[2]' from the required packages section (between siunitx and hyperref)
		% Removed \Requirepackage{tabu}
		% Added \RequirePackage{ltxtable}
	% April 3, 2013:
		% Added \RequirePackage{subcaption}
	% April 5, 2013:
		% Removing pdftex option (as described by: http://tex.stackexchange.com/questions/106159/why-i-shouldnt-load-pdftex-option-with-hyperref)
			% in graphicx package
			% in hyperref package
	% April 6, 2013:
		% Removed \RequirePackage{ltxtable}
	% April 10, 2013:
		% Added \RequirePackage{tikz}
	% April 11, 2013:
		% Removed \sisetup{detect-all}
	% April 12, 2013:
		% Added \RequirePackage{floats}
		% Added \RequirePackage{pdfpages}
	% April 22, 2013:
		% Added \RequirePackage{placeins}
		% Added option 'linenum' to include line numbers
		% Added \RequirePackage{grffile}
		% Removed option 'working'
	% April 28, 2013:
		% Added \RequirePackage{ltxtable}
		% Added \RequirePackage{adjustbox}
		% Removed \RequirePackage{ltxtable} (not working along with other packages)
		% Added \RequirePackage{wrapfig}
		% Removed \RequirePackage{wrapfig} (not treated as floats)
	% April 29, 2013:
		% Added \RequirePackage{amsmath}
	% May 1, 2013:
		% Added \RequirePackage{xcolor}
		% Added \RequirePackage{pgfgantt}
		% Added \RequirePackage{pdflscape}
	% May 3, 2013:
		% Added \usetikzlibrary{decorations.pathreplacing}
		% Added \newcommand{citeauthorlist}
		% Added \newcommand{citetlist}
	% May 7, 2013:
		% Added \RequirePackage{bookmark}
	% May 12, 2013:
		% Added \RequirePackage[inline]{enumitem}
	% May 15, 2013:
		% Added \newcommand*{\compressitem}{\@minipagetrue}
		% Added \RequirePackage{booktabs}
	% May 17, 2013:
		% Added \RequirePackage{tabuarly}
		% Removed \RequirePackage{arydshln} (incompatibility with tabulary)
	% May 24, 2013:
		% Added '~' on backrefs
	% May 28,2013:
		% Added fix for 'showframe' of geometry package
	% May 30, 2013:
		% Added \urlstyle{same}
	% May 31, 2013:
		% Added \usetikzlibrary{positioning,fit,backgrounds}
		% Added \usetikzlibrary{matrix}
	% June 12, 2013:
		% Added \RequirePackage{listings}	
	% June 13, 2013:
		% Added \RequirePackage{pgfplots}	
%%

\NeedsTeXFormat{LaTeX2e}
\def \filename {feupphdteses.sty}
\def \filedate {2013/06/13}
\def \fileversion {1.26}	
\ProvidesPackage {feupphdteses}[\filedate\space\fileversion\space]
\typeout {Document Style `FEUP PhD Teses' \fileversion\space <\filedate> by Mario Saenz Espinoza}


%%%%%%%%%%%%%%%%%%%%%%%%% Document Class %%%%%%%%%%%%%%%%%%%%%%%%%

%% Make sure that report has been loaded and pdf package is in place
\@ifundefined{chapter}{\@latexerr{The `feupphdteses' option should be used only with the `report' document style}{}}{}
\RequirePackage{ifpdf}
\ifpdf
	\relax
\else
  \@latexerr{The 'feupphdteses' package may only be used with pdflatex}{Please process this file with pdflatex.}
\fi


%%%%%%%%%%%%%%%%%%%%%%%%% Encoding %%%%%%%%%%%%%%%%%%%%%%%%%

%% Ensure correct font encoding
\RequirePackage[T1]{fontenc}
\RequirePackage[utf8]{inputenc}


%%%%%%%%%%%%%%%%%%%%%%%%% Declare General Input Options %%%%%%%%%%%%%%%%%%%%%%%%%

%% Option jury
\newif\if@jury
\@juryfalse
\DeclareOption{jury}{\@jurytrue}

%% Option final
\newif\if@final
\@finalfalse
\DeclareOption{final}{\@finaltrue}

%% Option backrefs
\newif\if@backrefs
\@backrefsfalse
\DeclareOption{backrefs}{\@backrefstrue}

%% Option for print on paper
\newif\if@onpaper
\@onpaperfalse
\DeclareOption{onpaper}{\@onpapertrue}

%% Option libre
\newif\if@libre
\@librefalse
\DeclareOption{libre}{\@libretrue}

%% Option linenum
\newif\if@linenum
\@linenumfalse
\DeclareOption{linenum}{\@linenumtrue}

%% Doctoral Programs at FEUP

	% Option PRODEB
	\newif\if@prodeb
	\@prodebfalse
	\DeclareOption{prodeb}{\@prodebtrue}

	% Option PRODEF
	\newif\if@prodef
	\@prodeffalse
	\DeclareOption{prodef}{\@prodeftrue}

	% Option PDEQB
	\newif\if@pdeqb
	\@pdeqbfalse
	\DeclareOption{pdeqb}{\@pdeqbtrue}
	
	% Option PDEEC
	\newif\if@pdeec
	\@pdeecfalse
	\DeclareOption{pdeec}{\@pdeectrue}


%%%%%%%%%%%%%%%%%%%%%%%%% Internal Options %%%%%%%%%%%%%%%%%%%%%%%%%

%% Internal option: committeepage
\newif\if@committeepage
\@committeepagefalse

%% Internal option: provisional
\newif\if@provisional
\@provisionalfalse

%% Internal option: uselineno
\newif\if@uselineno
\@uselinenofalse

\ProcessOptions\relax


%%%%%%%%%%%%%%%%%%%%%%%%% Global Packages of the document %%%%%%%%%%%%%%%%%%%%%%%%%

%% General packages
\RequirePackage[english]{babel}
\RequirePackage[outer=25mm,inner=35mm,vmargin=20mm,includehead,includefoot,headheight=15pt]{geometry}		% Geometry package, %showframe option
\RequirePackage{xcolor}																											% Different Colors
\RequirePackage{mathptmx}																										% Font:Times
\RequirePackage[scaled]{couriers}  																					% Font: Courier
\RequirePackage[scaled]{helvet}    																					% Font: Helvetica
\RequirePackage{graphicx}																										% Graphics
\RequirePackage{grffile}																										% larger range of file names (dots and spaces)
\RequirePackage{amsmath}																										% Math and equations
\RequirePackage{tikz}																												% To make graphics
\RequirePackage{pgfplots}																										% To import figures from Matlab
\RequirePackage{url}																												% To handle URLs
\RequirePackage{setspace}																										% Controls line spacing
\RequirePackage{makeidx}																										% Index
\RequirePackage[tableposition=top,figureposition=bottom]{caption}						% Tables' captions
\RequirePackage{multirow}																										% Tables with multiple rows
\RequirePackage{eurosym}																										% Currency: Euro
\RequirePackage{array}																											% Needed for 'tabularx'
\RequirePackage{tabularx}																										% Tables' width can be set
\RequirePackage{tabulary}																										% Columns' width can be set to length
\RequirePackage{longtable}																									% Tables can break into two pages
\RequirePackage[pagewise,switch*]{lineno}																		% Line numbers
\RequirePackage{siunitx}																										% SI units
\RequirePackage{float}																											% To be able to use the 'Here' specification
\RequirePackage{subcaption}																									% Subcaptions in subfigures
\RequirePackage{adjustbox}																									% Alignment of cells in tables
\RequirePackage[inline]{enumitem}																						% Itemize, enumerate, lists, etc.
\RequirePackage[section]{placeins}																					% To prevent floats going over different sections
\RequirePackage{booktabs}																										% To use toprule, midrule, bottomrule
\RequirePackage{pgfgantt}																										% Create Gantt diagrams
\RequirePackage{pdflscape}																									% Landscape mode
\RequirePackage{pdfpages}																										% To include .pdf (papers) at the end as appendix
\RequirePackage{listings}																										% To include code
\RequirePackage[pdfpagelabels,bookmarks,hyperindex,hyperfigures]{hyperref}	% Hyper References
\RequirePackage{bookmark}																										% For resetting bookmarks

%% Special declarations

	%Line Numbers
	\modulolinenumbers[2]		% Set counter multiple
	
	%Graphics
	\DeclareGraphicsExtensions{.pdf,.jpeg,.png,.jpg}		% Consider all these extensions as graphics
	
	%SI units
	\sisetup{output-decimal-marker = {.}} % Use comma as decimal point (as described by the SI)
	\sisetup{group-minimum-digits = 3}		% \num{1234} should be 1 234, not 1234 (as described by the SI)
	%\sisetup{separate-uncertainty}				% for using \pm in the uncertainty instead of ()
	
	%Tikz Calendar
	%\usetikzlibrary{calendar,shapes.geometric} (Podria llegar a ser util para calendarios)
	\usetikzlibrary{decorations.pathreplacing}
	\usetikzlibrary{positioning,fit,backgrounds}
	\usetikzlibrary{matrix}
	
	%Colors
	\definecolor{barblue}{RGB}{153,204,254}
	
	%URL
	\urlstyle{same}


%%%%%%%%%%%%%%%%%%%%%%%%% Title, Program, Degree, Date, Supervisor, etc. Spaces %%%%%%%%%%%%%%%%%%%%%%%%%

%% University
\gdef\@school{Faculdade de Engenharia da Universidade do Porto}
\def\school#1{\gdef\@school{#1}}

%% Thesis date
\gdef\@thesisdate{\today}
\def\thesisdate#1{\gdef\@thesisdate{#1}}

%% Program
	% Programa Doutoral em Engenharia Biomedica
	\if@prodeb
		\gdef\@program{Programa Doutoral em Engenharia Biom\'{e}dica}
		\gdef\@department{Biomedical Engineering}
	\fi

	% Programa Doutoral em Engenharia Fisica
	\if@prodef
		\gdef\@program{Programa Doutoral em Engenharia F\'{i}sica}
		\gdef\@department{Physics Engineering}
	\fi

	% Programa Doutoral em Engenharia Quimica e Biologica
	\if@pdeqb
		\gdef\@program{Programa Doutoral em Engenharia Qu\'{i}mica e Biol\'{o}gica}
		\gdef\@department{Chemical Engineering}
	\fi
	
	% Programa Doutoral em Engenharia Electrotecnica e de Computadores
	\if@pdeec
		\gdef\@program{Programa Doutoral em Engenharia Electrot\'{e}cnica e de Computadores}
		\gdef\@department{Electronic \& Computer Engineering}
	\fi

%% Degree
	\gdef\@degree{Doctor Philosophiae in \@department}
	\def\degree#1{\gdef\@degree{#1}}

%% Provisional text space
\gdef\@provisionaltext{\@empty}
\def\additionalfronttext#1{\gdef\@provisionaltext{#1}}

%% Committee text
\newbox\@vivatext 

	\def\committeetext#1{%
  \setbox\@vivatext\vbox
  {\Large\noindent #1
  \par\vskip 0.5\baselineskip}}
	
	% For more than 1 member
	\def\committeemember#1#2{%
  \setbox\@vivatext\vbox
  {\unvbox\@vivatext
  \vskip 0.5\baselineskip%
  \par%
  {\noindent\large #1: #2}}}
	
	%Space for signatures
	\def\signature{%
  \setbox\@vivatext\vbox
  {\unvbox\@vivatext
  \vskip 2\baselineskip%
  {\hfill \rule{0.75\linewidth}{0.2mm}}
  \vskip 2\baselineskip}}

%% Supervisor text
\newbox\@supervisorstext 

\def\supervisor#1#2{%
  \setbox\@supervisorstext\vbox%
  {\unvbox\@supervisorstext
  \vskip 0.5\baselineskip%
  \par%
  \center{\noindent\large #1: #2}}}
	

%%%%%%%%%%%%%%%%%%%%%%%%% Versions & Options Do %%%%%%%%%%%%%%%%%%%%%%%%%

%% Working version
\if@final
  \relax
\else
	\if@jury
		\relax
	\else
		\additionalfronttext{Working version}
	\fi
\fi

%% Jury version
\if@jury
	\def\committeetext#1{\gdef\@committeetext{#1}}
	\@committeepagetrue
	\additionalfronttext{For Jury Evaluation}
\fi

%% Final version
\if@final
	\additionalfronttext{}
	\@committeepagetrue
\fi

%% Libre version
\if@libre
	\@committeepagefalse
\fi

%% Backrefs version
\if@backrefs
	\RequirePackage[hyperpageref]{backref}
	\renewcommand*{\backref}[1]{}
	\renewcommand*{\backrefalt}[4]{%
			\ifcase #1 %
			\or
			{\footnotesize Cited on page~#2.}%
			\else
				{\footnotesize Cited on pages~#2.}%
			\fi
	}
\fi

%% Line number version
\if@linenum
	\@uselinenotrue
\fi

%% Onpaper version
\if@onpaper
  \hypersetup{%
    plainpages=false, 
    pdfpagelayout=SinglePage,
    bookmarksopen=false,
    bookmarksnumbered=true,
    breaklinks=true,
    linktocpage,
    colorlinks=false,
    pdfborder=0 0 0
		}
\else
  \hypersetup{%
    plainpages=false, 
    pdfpagelayout=SinglePage,
    bookmarksopen=false,
    bookmarksnumbered=true,
    breaklinks=true,
    linktocpage,
    colorlinks=true,
    linkcolor=blue,
    urlcolor=blue,
    citecolor=blue,
    anchorcolor=green
		}
\fi


%%%%%%%%%%%%%%%%%%%%%%%%% Copyright Info %%%%%%%%%%%%%%%%%%%%%%%%%

\gdef\@permission{\null}
\def\permission#1{\gdef\@permission{#1}}

%% define a copyrightnotice variable and initialize it
\gdef\@copyrightnotice{}
\def\copyrightnotice#1{\gdef\@copyrightnotice{\copyright\ #1\par\@permission}}

\copyrightnotice{\@author: \@thesisdate}


%%%%%%%%%%%%%%%%%%%%%%%%% Title %%%%%%%%%%%%%%%%%%%%%%%%%

\def\maketitle{%
\newbox\@crestbox

%% Title page
\begin{titlepage}

\hbox to \textwidth
{
	\setbox\@crestbox=\vbox{\includegraphics[scale=0.82]{uporto-feup.pdf}}	% University Logo
	%\setbox\@crestbox=\vbox{\includegraphics[width=90mm]{uporto-feup.pdf}}	% University Logo
	\box\@crestbox%
}
\vfill%

%\vspace*{20mm}%
{\def\baselinestretch{1.2}\Huge\bf \@title \par}	% Title
\vskip 25mm%

{\huge\bf \@author}																% Author
\vskip 10mm%


{\Large\textsc \@provisionaltext}									% Provisional text
\vfill

\unvbox\@supervisorstext													% Supervisor
\vskip 5mm

{\large \@program}																% Program
%\vskip 30mm
\vfill

\@thesisdate																			% Date

\end{titlepage}


%%%%%%%%%%%%%%%%%%%%%%%%% Copyright Page %%%%%%%%%%%%%%%%%%%%%%%%%

%% copyright page
\ifx\@copyrightnotice\@empty
  \relax
\else
  \vspace*{\fill}
  \par
  \begin{center}
    \@copyrightnotice
  \end{center}
\fi
\clearpage
} % maketitle


%%%%%%%%%%%%%%%%%%%%%%%%% Second Page %%%%%%%%%%%%%%%%%%%%%%%%%
%\newpage
\def\committeepage
{%
	\cleardoublepage
	\thispagestyle{empty}
	\begin{center}%
		\null\vskip 12mm
		{\Large\textnormal{\@school}}\\[16mm]
		{\LARGE\bf \@title}\\[16mm]
		{\Large\bf \@author}\\[16mm]
		%{\Large \@degree}%
	\end{center}
	\vspace*{\fill}
	
	\begin{center}
		Dissertation submitted to Faculdade de Engenharia da Universidade do Porto\\ to obtain the degree of
		\vskip 3mm
		\large{\textbf{Doctor Philosophiae in \@department}}
	\end{center}
	
	\unvbox\@supervisorstext
	\vspace*{\fill}
	
	\unvbox\@vivatext
	
	\begin{center}
		\@thesisdate
	\end{center}
}

%% Second Title Page Grooming 
\def\titlepage
{
	\cleardoublepage\centering
  \thispagestyle{empty}
  \parindent 0pt \parskip 10pt plus 1fil minus 1fil
  \def\baselinestretch{1}\@normalsize\vbox to \vsize\bgroup\vbox to 9in\bgroup
}

%% The \kern0pt pushes any depth into the height.  Thanks to Richard Stone.
\def\endtitlepage{\par\kern 0pt\egroup\vss\egroup\clearpage}


%%%%%%%%%%%%%%%%%%%%%%%%%% General Layout %%%%%%%%%%%%%%%%%%%%%%%%%

%% Avoid widows and orphans
\clubpenalty=6000
\widowpenalty=6000

%% Headers
\RequirePackage{fancyhdr}
\pagestyle{fancy}

%% Remember chapter title
\renewcommand{\chaptermark}[1]{\markboth{#1}{#1}}

%% Section number and title
\renewcommand{\sectionmark}[1]{\markright{{\ifnum \c@secnumdepth >\z@ \thesection\ \fi #1}}}

%% Two sided printinig
\if@twoside
  \lhead[\fancyplain{}{\rm\thepage}]{\fancyplain{}{\sl\rightmark}}
  \chead{}
  \rhead[\fancyplain{}{\sl\leftmark}]{\fancyplain{}{\rm\thepage}}
  \lfoot{}
  \cfoot{\fancyplain{\rm\thepage}{}}
  \rfoot{}
\else
  \lhead{\fancyplain{}{\sl\ifodd\c@page\rightmark\else\leftmark\fi}}
  \chead{}
  \rhead[]{\fancyplain{}{\rm\thepage}}
  \lfoot{}
  \cfoot{\fancyplain{\rm\thepage}{}}
  \rfoot{}
\fi

%% Renew some commands
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\addtolength{\headheight}{0.5pt}

%% changes to report.sty
\lineskip 1pt
\normallineskip 1pt
\onehalfspacing										% One and a half line spacing
\setcounter{secnumdepth}{3}      	% To number subsubsections
\setcounter{tocdepth}{2}         	% Sets the depth of sectional units listed in the toc
\setcounter{topnumber}{1}        	% Maximum number of floats at top of page
\renewcommand{\topfraction}{0.8} 	% Maximum fraction of the page occupied by floats

%% Fix pagenumbering so that it works even when the \pagenumbering command is in a file that has not been \include-d
\def\c@pagenumbering{arabic}
\def\@pagenumbering#1{\gdef\thepage{\csname @#1\endcsname \c@page}
\gdef\c@pagenumbering{#1}}
\def\pagenumbering#1{\global\c@page\@ne \@pagenumbering{#1}}


%%%%%%%%%%%%%%%%%%%%%%%%%% New Commands & Environments %%%%%%%%%%%%%%%%%%%%%%%%%

%% Some new commands
\newcommand{\Activate@lineno}{\if@uselineno\linenumbers\switchlinenumbers*\fi}
\newcommand{\@StartPrelim}{\cleardoublepage\pagenumbering{roman}\setcounter{page}{1}\pagestyle{fancy}}
\newcommand{\clearemptydoublepage}{\newpage{\pagestyle{empty}\cleardoublepage}}
\newcommand{\StartBody}{\cleardoublepage\pagenumbering{arabic}\setcounter{page}{1}\pagestyle{fancy}\Activate@lineno}
\newcommand{\@StartDoc}{\setcounter{page}{-3}\pagestyle{empty}\pdfbookmark[0]{Front Page}{init}}
\newcommand{\PrintIndex}{\cleardoublepage\phantomsection\addcontentsline{toc}{chapter}{Index}\begin{singlespace}\printindex\end{singlespace}}
\newcommand*{\compressitem}{\@minipagetrue}

%% Some new columns
\newcolumntype{P}[1]{>{\endgraf\vspace*{-\baselineskip}}p{#1}} % For itemize inside a longtable

%% Prolog
\newenvironment{Prolog}
{
	\maketitle
	\if@committeepage
		\committeepage
	\fi
	\@StartPrelim
	\begin{singlespace}
}
{\end{singlespace}}


%%%%%%%%%%%%%%%%%%%%%%%%% Bibbliography %%%%%%%%%%%%%%%%%%%%%%%%%

%% Bibliography Style
\RequirePackage[]{natbib}

\newcommand\MidSep{, }% separator for two elements, not the last two (for citeauthorlist and citetlist)
\newcommand\LastSep{ and }% separator for last two elements

%citeauthorlist
\newcommand\citeauthorlist[1]{%
  \let\last@elem\relax
  \let\last@sep\relax
  \@for\@list:=#1\do{%
    \ifx\last@elem\relax\else
      \ifx\last@sep\relax
        \def\last@sep{\LastSep}% the separator between the last two elements should is "and"
      \else\MidSep  % the separator between two elements (not the two last) is a comma
      \fi
      \citeauthor{\last@elem}%
    \fi
    \let\last@elem\@list
  }% the last element of the list:
  \ifx\last@elem\relax\else
    \last@sep\citeauthor{\last@elem}%
  \fi
}

%citetlist
\newcommand\citetlist[1]{%
  \let\last@elem\relax
  \let\last@sep\relax
  \@for\@list:=#1\do{%
    \ifx\last@elem\relax\else
      \ifx\last@sep\relax
        \def\last@sep{\LastSep}% the separator between the last two elements should is "and"
      \else\MidSep  % the separator between two elements (not the two last) is a comma
      \fi
      \citet{\last@elem}%
    \fi
    \let\last@elem\@list
  }% the last element of the list:
  \ifx\last@elem\relax\else
    \last@sep\citet{\last@elem}%
  \fi
}

%%%citeplist  %Still work in progress
%%\newcommand\citeplist[1]{%
  %%\let\last@elem\relax
  %%\let\last@sep\relax
  %%\@for\@list:=#1\do{%
    %%\ifx\last@elem\relax\else
      %%\ifx\last@sep\relax
        %%\def\last@sep{\LastSep}% the separator between the last two elements should is "and"
      %%\else\MidSep  % the separator between two elements (not the two last) is a comma
      %%\fi
      %%\citep{\last@elem}%
    %%\fi
    %%\let\last@elem\@list
  %%}% the last element of the list:
  %%\ifx\last@elem\relax\else
    %%\last@sep\citep{\last@elem}%
  %%\fi
%%}

\def\bstctlcite{\@ifnextchar[{\@bstctlcite}{\@bstctlcite[@auxout]}}
\def\@bstctlcite[#1]#2{\@bsphack
	\@for\@citeb:=#2\do{%
		\edef\@citeb{\expandafter\@firstofone\@citeb}%
		\if@filesw\immediate\write\csname #1\endcsname{\string\citation{\@citeb}}\fi}%
\@esphack}

%%%%%%%%%%%%%%%%%%%%%%%%% Fixes %%%%%%%%%%%%%%%%%%%%%%%%%

% 'showframe' of geometry package
\newcommand*{\gmshow@textheight}{\textheight}
\newdimen\gmshow@@textheight
\g@addto@macro\landscape{%
  \gmshow@@textheight=\hsize
  \renewcommand*{\gmshow@textheight}{\gmshow@@textheight}%
}
\def\Gm@vrule{%
  \vrule width 0.2pt height\gmshow@textheight depth\z@
}%

%%%%%%%%%%%%%%%%%%%%%%%%% Go, go, go! %%%%%%%%%%%%%%%%%%%%%%%%%
\AtBeginDocument{\@StartDoc}

\endinput