-
Notifications
You must be signed in to change notification settings - Fork 0
/
ThesisPUC.cls
1409 lines (1196 loc) · 41.5 KB
/
ThesisPUC.cls
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
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
%% -*- coding: utf-8; -*-
%% This is file `ThesisPUC.cls'.
%%
%% Any modified versions of this file must be renamed
%% with new filenames distinct from ThesisPUC.cls.
%%
%% ----------------------------------------------------------------------------
%%
%% Thomas Lewiner
%% Marcelo Roberto Jimenez
%% David Pirotte
%% Javier Guillot Jiménez
%%
%% LaTeX document class for typesetting theses of the PUC
%%
%% Copyright (C) 2015, 2017, 2020 PUC-Rio
%%
%% ----------------------------------------------------------------------------
%%
%%
%% \CharacterTable
%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%% Digits \0\1\2\3\4\5\6\7\8\9
%% Exclamation \! Double quote \" Hash (number) \#
%% Dollar \$ Percent \% Ampersand \&
%% Acute accent \' Left paren \( Right paren \)
%% Asterisk \* Plus \+ Comma \,
%% Minus \- Point \. Solidus \/
%% Colon \: Semicolon \; Less than \<
%% Equals \= Greater than \> Question mark \?
%% Commercial at \@ Left bracket \[ Backslash \\
%% Right bracket \] Circumflex \^ Underscore \_
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
%%
\newcommand{\docdate}{} % See the renewcommands below,
\newcommand{\filedate}{} % these contain the content;-))
\newcommand{\fileversion}{}
\renewcommand{\docdate}{2017/11/12}
\renewcommand{\filedate}{2017/11/12}
\renewcommand{\fileversion}{1.0.6}
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{ThesisPUC}%
[\filedate\space v\fileversion\space Thesis PUC-Rio document class]
%%%
%%% style options
%%%
%% booleans
%% \makeatletter
\RequirePackage{ifthen}
\RequirePackage{nth}
% hyphenation
\RequirePackage[brazilian, american]{babel}
% PhD thesis or MsC dissertation
\newboolean{puc@phd}
\setboolean{puc@phd}{false}
\DeclareOption{msc}{\setboolean{puc@phd}{false}}
\DeclareOption{master}{\setboolean{puc@phd}{false}}
\DeclareOption{phd}{\setboolean{puc@phd}{true}}
% tight or wide page layout
\newboolean{puc@tight}
\setboolean{puc@tight}{false}
\DeclareOption{wide}{\setboolean{puc@tight}{false}}
\DeclareOption{tight}{\setboolean{puc@tight}{true}}
\newboolean{puc@authordate}
\setboolean{puc@authordate}{false}
\DeclareOption{numeric}{\setboolean{puc@authordate}{false}}
\DeclareOption{authordate}{\setboolean{puc@authordate}{true}}
% hyphenation
\newcommand{\llocale}{brazilian}
\newboolean{puc@localebr}
\setboolean{puc@localebr}{true}
\newboolean{puc@localeus}
\setboolean{puc@localeus}{false}
\DeclareOption{american}%
{\PassOptionsToPackage{american, brazilian}{babel}%
\setboolean{puc@localeus}{true}%
\setboolean{puc@localebr}{false}%
\renewcommand{\llocale}{american}%
}
\DeclareOption{brazilian}%
{\PassOptionsToPackage{brazilian, american}{babel}%
\setboolean{puc@localebr}{true}%
\setboolean{puc@localeus}{false}%
\renewcommand{\llocale}{brazilian}%
}
%%\DeclareOption{german}%
%% {\PassOptionsToPackage{geran, brazilian, american}{babel}}
%%\DeclareOption{french}%
%% {\PassOptionsToPackage{french, brazilian, american}{babel}}
% twoside
\newboolean{puc@twoside}
\setboolean{puc@twoside}{false}
\DeclareOption{twoside}{\setboolean{puc@twoside}{true}}
\DeclareOption{oneside}{\setboolean{puc@twoside}{false}}
% draft for debugging overful boxes
\newboolean{puc@draft}
\setboolean{puc@draft}{false}
\DeclareOption{draft}{\setboolean{puc@draft}{true}}
% translations
\DeclareOption{dissertacao}{\setboolean{puc@phd}{false}}
\DeclareOption{mestrado}{\setboolean{puc@phd}{false}}
\DeclareOption{tese}{\setboolean{puc@phd}{true}}
\DeclareOption{doutorado}{\setboolean{puc@phd}{true}}
\DeclareOption{modelo1}{\setboolean{puc@tight}{false}}
\DeclareOption{modelo2}{\setboolean{puc@tight}{true}}
\DeclareOption{frenteverso}{\setboolean{puc@twoside}{true}}
\DeclareOption{rascunho}{\setboolean{puc@draft}{true}}
\ProcessOptions\relax
%%%
%%% base style
%%%
\ifthenelse{\boolean{puc@twoside}}{%
\LoadClass[a4paper,12pt\ifpuc@draft,draft\else\fi]{book}%
\raggedbottom%
}{%
\LoadClass[a4paper,12pt\ifpuc@draft,draft\else\fi]{report}%
}
%%\makeatother
%%%
%%% required packages
%%%
% fonts and symbols
\RequirePackage{amsfonts}
\RequirePackage[utf8]{inputenc}
\RequirePackage[T1]{fontenc} %% OT1 has 127 characters only
\RequirePackage{lmodern} %% tex modern font version
% graphics inclusion (in particular the PUC logo)
\RequirePackage[pdftex]{graphicx}
% subfigure loaded here for spacing definition
\RequirePackage[FIGBOTCAP, TABBOTCAP]{subfigure}
% Section titles
\RequirePackage[clearempty, compact]{titlesec}
% table of contents
\RequirePackage[subfigure]{tocloft}
% dynamically change margins
% \RequirePackage{changepage}
% line spacing
\RequirePackage{setspace}
% header and footer
\RequirePackage{fancyhdr}
% front matter inclusion and space in environment
\RequirePackage{atbeginend}
% indent first line of sections and chapters
\RequirePackage{indentfirst}
% number of pages
\RequirePackage{lastpage}
% manipulate strings of tokens
\RequirePackage{xstring}
% hyperlink and pdf bookmarks
\RequirePackage[%
%backref,%
pdftex,%
colorlinks=true,%
bookmarksopen=true,%
breaklinks=true,%
linkcolor=black,% blue
anchorcolor=black,%
citecolor=black,% cyan
urlcolor=black,% red
bookmarksnumbered=false%
]{hyperref}
\ifthenelse{\boolean{puc@authordate}}
{\RequirePackage[round]{natbib}}
{}
%% \makeatletter
%%%
%%% page layout
%%%
\setlength{\parindent}{1cm}
\setlength{\voffset}{-1in}
\setlength{\topmargin}{20pt}
\setlength{\topskip}{0.001cm}
\addtolength{\headheight}{2.5pt}
% Copy of some of the code from the ifmtarg package to save requiring
% ifmtarg
\begingroup
\catcode`\Q=3
\long\gdef\@ifmtarg#1{\@xifmtarg#1QQ\@secondoftwo\@firstoftwo\@nil}
\long\gdef\@xifmtarg#1#2Q#3#4#5\@nil{#4}
\endgroup
% Set the page output parameters
\DeclareRobustCommand{\ch@ngetext}{%
\setlength{\@colht}{\textheight}\setlength{\@colroom}{\textheight}%
\setlength{\vsize}{\textheight}\setlength{\columnwidth}{\textwidth}%
\if@twocolumn%
\advance\columnwidth-\columnsep \divide\columnwidth\tw@%
\@firstcolumntrue%
\fi%
\setlength{\hsize}{\columnwidth}%
\setlength{\linewidth}{\hsize}}
%\newcommand{\setpage}[9]{%
\DeclareRobustCommand{\setpage}[9]{%
\@ifmtarg{#1}{}{\setlength{\textheight}{#1}}%
\@ifmtarg{#2}{}{\setlength{\textwidth}{#2}}%
\@ifmtarg{#3}{}{\setlength{\evensidemargin}{#3}}%
\@ifmtarg{#4}{}{\setlength{\oddsidemargin}{#4}}%
\@ifmtarg{#5}{}{\setlength{\columnsep}{#5}}%
\ch@ngetext%
\@ifmtarg{#6}{}{\setlength{\topmargin}{#6}}%
\@ifmtarg{#7}{}{\setlength{\headheight}{#7}}%
\@ifmtarg{#8}{}{\setlength{\headsep}{#8}}%
\@ifmtarg{#9}{}{\setlength{\footskip}{#9}}%
}
\newcommand{\puc@setallmargins}[5]{%
% declare length
\expandafter\newlength\csname puc@topmargin@#1\endcsname%
\expandafter\newlength\csname puc@bottommargin@#1\endcsname%
\expandafter\newlength\csname puc@leftmargin@#1\endcsname%
\expandafter\newlength\csname puc@rightmargin@#1\endcsname%
\expandafter\newlength\csname puc@textwidth@#1\endcsname%
\expandafter\newlength\csname puc@oddsidemargin@#1\endcsname%
\expandafter\newlength\csname puc@evensidemargin@#1\endcsname%
\expandafter\newlength\csname puc@textheight@#1\endcsname%
\expandafter\newlength\csname puc@headsep@#1\endcsname%
%
% adjust margins
\expandafter\setlength{\csname puc@topmargin@#1\endcsname}{#2}%
\expandafter\setlength{\csname puc@bottommargin@#1\endcsname}{#3}%
\expandafter\setlength{\csname puc@leftmargin@#1\endcsname}{#4}%
\expandafter\setlength{\csname puc@rightmargin@#1\endcsname}{#5}%
%
% converts margins to text size
\expandafter\setlength{\csname puc@textwidth@#1\endcsname}{\paperwidth}%
\expandafter\addtolength{\csname puc@textwidth@#1\endcsname}{-\csname puc@leftmargin@#1\endcsname}%
\expandafter\addtolength{\csname puc@textwidth@#1\endcsname}{-\csname puc@rightmargin@#1\endcsname}%
%
\expandafter\setlength{\csname puc@oddsidemargin@#1\endcsname}{\csname puc@leftmargin@#1\endcsname}%
\expandafter\addtolength{\csname puc@oddsidemargin@#1\endcsname}{-1in}%
\expandafter\addtolength{\csname puc@oddsidemargin@#1\endcsname}{-\hoffset}%
%
\ifthenelse{\boolean{puc@twoside}}{%
\expandafter\setlength{\csname puc@evensidemargin@#1\endcsname}{\csname puc@rightmargin@#1\endcsname}%
}{%
\expandafter\setlength{\csname puc@evensidemargin@#1\endcsname}{\csname puc@leftmargin@#1\endcsname}%
}%
\expandafter\addtolength{\csname puc@evensidemargin@#1\endcsname}{-1in}%
\expandafter\addtolength{\csname puc@evensidemargin@#1\endcsname}{-\hoffset}%
%
\expandafter\setlength{\csname puc@headsep@#1\endcsname}{\csname puc@topmargin@#1\endcsname}%
\expandafter\addtolength{\csname puc@headsep@#1\endcsname}{-1in}%
\expandafter\addtolength{\csname puc@headsep@#1\endcsname}{-\voffset}%
\expandafter\addtolength{\csname puc@headsep@#1\endcsname}{-\topmargin}%
\expandafter\addtolength{\csname puc@headsep@#1\endcsname}{-\headheight}%
%
\expandafter\setlength{\csname puc@textheight@#1\endcsname}{\paperheight}%
\expandafter\addtolength{\csname puc@textheight@#1\endcsname}{-\csname puc@topmargin@#1\endcsname}%
\expandafter\addtolength{\csname puc@textheight@#1\endcsname}{-\csname puc@bottommargin@#1\endcsname}%
%
% dynamic margin adjustment
\expandafter\newcommand\csname puc@setmargins@#1\endcsname{%
\setpage%
{\csname puc@textheight@#1\endcsname}%
{\csname puc@textwidth@#1\endcsname}%
{\csname puc@evensidemargin@#1\endcsname}%
{\csname puc@oddsidemargin@#1\endcsname}%
{}{}{}%
{\csname puc@headsep@#1\endcsname}%
{}%
}%
}
% text
\ifthenelse{\boolean{puc@tight}}{%
\puc@setallmargins{text}{2.5cm}{2.5cm}{3.5cm}{7.0cm}%
}{%
\puc@setallmargins{text}{2.5cm}{2.5cm}{3.0cm}{4.0cm}%
}
% cover
\puc@setallmargins{cover}{7.0cm}{3.0cm}{7.0cm}{2.0cm}
% front
\puc@setallmargins{front}{2.5cm}{2.5cm}{6.0cm}{4.0cm}
% dedication
\puc@setallmargins{dedication}{2.5cm}{2.5cm}{3.0cm}{4.0cm}
%%%
%%% To debug the layout
%%%
%\newcommand{\puc@leftmargin}[1]{\noindent\fbox{\begin{minipage}[top]{\textwidth}#1\end{minipage}}}
%\newcommand{\puc@rightmargin}[1]{\noindent\fbox{\begin{minipage}[top]{\textwidth}\begin{flushright}#1\end{flushright}\end{minipage}}}
\newcommand{\puc@leftmargin}[1]{\noindent\begin{minipage}[top]{\textwidth}#1\end{minipage}}
\newcommand{\puc@rightmargin}[1]{\puc@leftmargin{\begin{flushright}#1\end{flushright}}}
%%%
%%% line spacing
%%%
\ifthenelse{\boolean{puc@tight}}{}{\onehalfspacing}
\frenchspacing
\clubpenalty=2000
\emergencystretch=20pt
\pretolerance=500
\tolerance=2500
\widowpenalty=2000
%%%
%%% number of floats per page
%%%
\renewcommand{\floatpagefraction}{.7}
\renewcommand{\topfraction}{.7}
\renewcommand{\bottomfraction}{.7}
\renewcommand{\textfraction}{.3}
\setcounter{totalnumber}{10}
\setcounter{topnumber}{10}
\setcounter{bottomnumber}{10}
%%%
%%% subfigures
%%%
\renewcommand{\thesubfigure}{\thefigure (\alph{subfigure})}
\renewcommand{\@thesubfigure}{\thesubfigure:\space}
\renewcommand{\p@subfigure}{}
%%%
%%% Fonts
%%%
%% \newcommand{\arial}{\fontfamily{arial}}
\newcommand{\arial}{\sf}
%%%
%%% Section titles
%%%
%% \newcommand{\autolabel}[1]{\label{sec:#1}#1}
\titleformat{name=\chapter} %% the command
[display] %% the shape
%% {\singlespacing\large\fontfamily{arial}\bfseries\selectfont}
%% %% the format (whole title)
{\singlespacing\large\arial\bfseries} %% the format (whole title)
{\thechapter} %% the label
{0pt} %% label title sep (space)
{} %% {\autolabel} %% before (code)
{} %% after (code)
\titlespacing{\chapter} %% command
{0pt} %% left
{-1.6em} %% before [pagestyle is not empty]
{84pt} %% after
%% [] %% right
\titleformat{name=\section}
[display]
{\penalty -5000\singlespacing\normalsize\arial\bfseries}
{\thesection}
{0pt}
{} %% {\autolabel}
{}
\titleformat{name=\section,numberless}
[display]
{\penalty -5000\singlespacing\normalsize\arial\bfseries}
{}
{0pt}
{}
{}
\titleformat{name=\subsection}
[display]
{\penalty -4000\singlespacing\normalsize\arial\bfseries}
{\thesubsection}
{0pt}
{} %% {\autolabel}
{}
\titleformat{name=\subsection,numberless}
[display]
{\penalty -4000\singlespacing\normalsize\arial\bfseries}
{}
{0pt}
{}
{}
\titleformat{name=\subsubsection}
[display]
{\penalty -3000\singlespacing\normalsize\arial\bfseries}
{\thesubsubsection}
{0pt}
{} %% {\autolabel}
{}
\titleformat{name=\subsubsection,numberless}
[display]
{\penalty -3000\singlespacing\normalsize\arial\bfseries}
{\thesubsubsection}
{0pt}
{} %% {\autolabel}
{}
\titleformat{name=\paragraph}
[runin]
{\singlespacing\normalsize\arial\bfseries}
{}
{2\wordsep}
{}
{}
\titleformat{name=\subparagraph}
[runin]
{\singlespacing\normalsize\arial\bfseries}
{}
{2\wordsep}
{}
{}
%%%
%%% page styles
%%%
%%\makeatletter%
\newcommand{\puc@setpagestyle}{%
\pagestyle{fancy}%
\fancyhf{}% delete current setting for header and footer
\fancyfoot{}%
\ifthenelse{\boolean{puc@twoside}}{%
\fancyhead[LE]{\arial\footnotesize \nouppercase{\puc@title}}%
\fancyhead[RE]{\arial\footnotesize \thepage}%
\fancyhead[RO]{\arial\footnotesize \thepage}%
\fancyhead[LO]{\arial\footnotesize \nouppercase{\leftmark}}%
}{
\fancyhead[L]{\arial\slshape \nouppercase{\leftmark}}%
\fancyhead[R]{\thepage}%
}
\renewcommand{\headrulewidth}{0pt}%
}
\fancypagestyle{empty}{\fancyhead{} \fancyfoot{} \renewcommand{\headrulewidth}{0pt}}%
\fancypagestyle{plain}{\fancyhead{} \fancyfoot{} \renewcommand{\headrulewidth}{0pt}}%
%%%
%%% table of contents
%%%
\setcounter{tocdepth}{3}
\setcounter{lofdepth}{3}
\setcounter{lotdepth}{3}
\setcounter{secnumdepth}{3}
\renewcommand{\cfttoctitlefont}{\large \arial \bfseries}
\setlength{\cftbeforetoctitleskip}{0pt}
\renewcommand{\cftloftitlefont}{\large \arial \bfseries}
\setlength{\cftbeforeloftitleskip}{0pt}
\renewcommand{\cftlottitlefont}{\large \arial \bfseries}
\setlength{\cftbeforelottitleskip}{0pt}
\renewcommand{\cftdot}{}
\renewcommand{\cftsecfont}{}
\setlength{\cftbeforesecskip}{\parskip}
\setlength{\cftbeforesubsecskip}{0pt}
\setlength{\cftchapnumwidth}{1.9em}
\setlength{\cftsecnumwidth}{2.5em}
\setlength{\cftsubsecnumwidth}{3.1em}
\setlength{\cftsubsubsecnumwidth}{3.7em}
\renewcommand{\cftchapindent}{0pt}
\renewcommand{\cftsecindent}{0pt}
\renewcommand{\cftsubsecindent}{0pt}
\renewcommand{\cftsubsubsecindent}{0pt}
%\renewcommand{\cftchapfont}{\arial}
%\renewcommand{\cftsecfont}{\arial}
%\renewcommand{\cftsubsecfont}{\arial}
%\renewcommand{\cftsubsubsecfont}{\arial}
%\renewcommand{\cftfigfont}{\arial}
%\renewcommand{\cfttabfont}{\arial}
%%%
%%% citations
%%%
\def\@cite#1#2{[{#1\if@tempswa , #2\fi}]}
\def\@citeb#1#2{({#1\if@tempswa , #2\fi})}
%%%
%%% theorems environments
%%%
\renewcommand{\theequation}{\thechapter-\arabic{equation}}
\ifthenelse{\boolean{puc@localebr}}
{\newtheorem{definition}{Definição}[chapter]}
{\newtheorem{definition}{Definition}[chapter]}
\ifthenelse{\boolean{puc@localebr}}
{\newtheorem{theorem}[definition]{Teorema}}
{\newtheorem{theorem}[definition]{Theorem}}
\ifthenelse{\boolean{puc@localebr}}
{\newtheorem{proposition}[definition]{Proposição}}
{\newtheorem{proposition}[definition]{Proposition}}
\ifthenelse{\boolean{puc@localebr}}
{\newtheorem{corollary}[definition]{Corolário}}
{\newtheorem{corollary}[definition]{Corollary}}
\ifthenelse{\boolean{puc@localebr}}
{\newenvironment{proof}{\par \noindent \textit{Prova}.}{\hfill $\blacksquare$}}
{\newenvironment{proof}{\par \noindent \textit{Proof}.}{\hfill $\blacksquare$}}
%%%
%%% space in environment
%%%
\AfterBegin{itemize}{\addtolength{\itemsep}{-0.5em}}
\renewcommand{\labelitemi}{--}
\BeforeBegin{equation}{\vspace{-0.5em}}
\BeforeEnd{equation}{\vspace{-0.5em}}
\BeforeBegin{theorem}{\vspace{-0.4em}}
\BeforeEnd{theorem}{\vspace{-0.2em}}
\BeforeBegin{definition}{\vspace{-0.4em}}
\BeforeEnd{definition}{\vspace{-0.2em}}
\BeforeBegin{corollary}{\vspace{-0.4em}}
\BeforeEnd{corollary}{\vspace{-0.2em}}
\BeforeBegin{proposition}{\vspace{-0.4em}}
\BeforeEnd{proposition}{\vspace{-0.2em}}
%%%
%%% Front matter elements
%%%
%%\makeatletter
\newcommand{\puc@usecolour}{false}
\newcommand{\usecolour}[1]{\renewcommand{\puc@usecolour}{#1}}
\newcommand{\puc@bibliographicdatalabel}{}
\newcommand{\puc@author}{}
\renewcommand{\author}[1]{\renewcommand{\puc@author}{#1}}
\newcommand{\puc@authorR}{}
\newcommand{\authorR}[1]{\renewcommand{\puc@authorR}{#1}}
\newcommand{\puc@advisor}{}
\newcommand{\puc@advisorT}{}
\newcommand{\advisor}[2]{%
\renewcommand{\puc@advisor}{#1}%
\renewcommand{\puc@advisorT}{#2}}
\newcommand{\puc@advisorlabel}{}
\newcommand{\puc@advisorlabellc}{}
\newcommand{\puc@advisorR}{}
\newcommand{\advisorR}[1]{\renewcommand{\puc@advisorR}{#1}}
%% the advisor's institution and symbol if not the university itself
\newcommand{\puc@advisorInst}{}
\newcommand{\puc@advisorInstS}{}
\newcommand{\advisorInst}[2]{%
\renewcommand{\puc@advisorInst}{#1}%
\renewcommand{\puc@advisorInstS}{#2}}
\newcommand{\puc@coadvisor}{}
\newcommand{\puc@coadvisorT}{}
\newcommand{\coadvisor}[2]{%
\renewcommand{\puc@coadvisor}{#1}%
\renewcommand{\puc@coadvisorT}{#2}}
\newcommand{\puc@coadvisorlabel}{}
\newcommand{\puc@coadvisorlabellc}{}
\newcommand{\puc@coadvisorR}{}
\newcommand{\coadvisorR}[1]{\renewcommand{\puc@coadvisorR}{#1}}
\newcommand{\puc@coadvisorInst}{}
\newcommand{\puc@coadvisorInstS}{}
\newcommand{\coadvisorInst}[2]{%
\renewcommand{\puc@coadvisorInst}{#1}%
\renewcommand{\puc@coadvisorInstS}{#2}}
\newcommand{\puc@coadvisorII}{}
\newcommand{\puc@coadvisorIIT}{}
\newcommand{\coadvisorII}[2]{%
\renewcommand{\puc@coadvisorII}{#1}
\renewcommand{\puc@coadvisorIIT}{#2}}
\newcommand{\puc@coadvisorIIR}{}
\newcommand{\coadvisorIIR}[1]{\renewcommand{\puc@coadvisorIIR}{#1}}
\newcommand{\puc@coadvisorIIInst}{}
\newcommand{\puc@coadvisorIIInstS}{}
\newcommand{\coadvisorIIInst}[2]{%
\renewcommand{\puc@coadvisorIIInst}{#1}
\renewcommand{\puc@coadvisorIIInstS}{#2}}
\newcommand{\puc@coadvisorIII}{}
\newcommand{\puc@coadvisorIIIT}{}
\newcommand{\coadvisorIII}[2]{%
\renewcommand{\puc@coadvisorIII}{#1}
\renewcommand{\puc@coadvisorIIIT}{#2}}
\newcommand{\puc@coadvisorIIIR}{}
\newcommand{\coadvisorIIIR}[1]{\renewcommand{\puc@coadvisorIIIR}{#1}}
\newcommand{\puc@coadvisorIIIInst}{}
\newcommand{\puc@coadvisorIIIInstS}{}
\newcommand{\coadvisorIIIInst}[2]{%
\renewcommand{\puc@coadvisorIIIInst}{#1}
\renewcommand{\puc@coadvisorIIIInstS}{#2}}
\newcommand{\puc@title}{}
\renewcommand{\title}[1]{\renewcommand{\puc@title}{#1}}
\newcommand{\puc@titleuk}{}
\newcommand{\titleuk}[1]{\renewcommand{\puc@titleuk}{#1}}
\newcommand{\puc@subtitle}{}
\newcommand{\subtitle}[1]{\renewcommand{\puc@subtitle}{#1}}
\newcommand{\puc@day}{}
\renewcommand{\day}[1]{\renewcommand{\puc@day}{#1}}
\newcommand{\puc@month}{}
\renewcommand{\month}[1]{\renewcommand{\puc@month}{#1}}
\newcommand{\puc@year}{}
\renewcommand{\year}[1]{\renewcommand{\puc@year}{#1}}
\newcommand{\puc@city}{Rio de Janeiro}
\newcommand{\city}[1]{\renewcommand{\puc@city}{#1}}
\newcommand{\puc@department}{}
\newcommand{\department}[1]{\renewcommand{\puc@department}{#1}}
\newcommand{\puc@program}{}
\newcommand{\program}[1]{\renewcommand{\puc@program}{#1}}
\newcommand{\puc@school}{}
\newcommand{\school}[1]{\renewcommand{\puc@school}{#1}}
\newcommand{\puc@university}{Pontifícia Universidade Católica do Rio de Janeiro}
\newcommand{\university}[1]{\renewcommand{\puc@university}{#1}}
\newcommand{\puc@uni}{PUC-Rio}
\newcommand{\uni}[1]{\renewcommand{\puc@uni}{#1}}
\newcommand{\puc@CDD}{}
\newcommand{\CDD}[1]{\renewcommand{\puc@CDD}{#1}}
\newcommand{\jurymember}[4]{}
\newcommand{\puc@jury}{}
\newcommand{\jury}[1]{\renewcommand{\puc@jury}{#1}}
\newcommand{\puc@resume}{}
\newcommand{\resume}[1]{\renewcommand{\puc@resume}{#1}}
\newboolean{hasdedication}
\setboolean{hasdedication}{false}
\newcommand{\puc@dedication}{}
\newcommand{\dedication}[1]{%
\renewcommand{\puc@dedication}{#1}%
\setboolean{hasdedication}{true}%
}
\newcommand{\puc@acknowledgment}{}
\newcommand{\acknowledgment}[1]{\renewcommand{\puc@acknowledgment}{#1}}
\newcommand{\catalogprekey}[1]{}
\newcommand{\puc@catalogprekeywords}{}
\newcommand{\catalogprekeywords}[1]{\renewcommand{\puc@catalogprekeywords}{#1}}
\newcommand{\key}[1]{}
\newcommand{\puc@keywords}{}
\newcommand{\keywords}[1]{\renewcommand{\puc@keywords}{#1}}
\newcommand{\puc@keywordsuk}{}
\newcommand{\keywordsuk}[1]{\renewcommand{\puc@keywordsuk}{#1}}
\newcommand{\puc@abstract}{}
\ifthenelse{\boolean{puc@twoside}}{%
\newcommand{\abstract}[1]{\renewcommand{\puc@abstract}{#1}}%
}{%
\renewcommand{\abstract}[1]{\renewcommand{\puc@abstract}{#1}}%
}
\newcommand{\puc@abstractuk}{}
\newcommand{\abstractuk}[1]{\renewcommand{\puc@abstractuk}{#1}}%
\newcommand{\puc@tablesmode}{figtab}
\newcommand{\tablesmode}[1]{\renewcommand{\puc@tablesmode}{#1}}
\newcommand{\puc@abreviationsmode}{use}
\newcommand{\abreviationsmode}[1]{\renewcommand{\puc@abreviationsmode}{#1}}
\newboolean{hasepigraph}
\setboolean{hasepigraph}{false}
\newcommand{\puc@epigraph}{}
\newcommand{\epigraph}[1]{%
\renewcommand{\puc@epigraph}{#1}%
\setboolean{hasepigraph}{true}%
}
\newcommand{\puc@epigraphauthor}{}
\newcommand{\epigraphauthor}[1]{\renewcommand{\puc@epigraphauthor}{#1}}
\newcommand{\puc@epigraphbook}{}
\newcommand{\epigraphbook}[1]{\renewcommand{\puc@epigraphbook}{#1}}
\newcommand{\puc@abreviationstitle}{Lista de Abreviaturas}
\newcommand{\abreviationstitle}[1]{\renewcommand{\puc@abreviationstitle}{#1}}%
\newcommand{\puc@abreviationstitleuk}{List of Abreviations}
\newcommand{\abreviationstitleuk}[1]{\renewcommand{\puc@abreviationstitleuk}{#1}}%
%%%
%%% translations
%%%
\newcommand{\autor}[1]{\author{#1}}
\newcommand{\autorR}[1]{\authorR{#1}}
\newcommand{\orientador}[2]{\advisor{#1}{#2}}
\newcommand{\orientadorR}[1]{\advisorR{#1}}
\newcommand{\orientadorInst}[1]{\advisorInst{#1}}
\newcommand{\coorientador}[1]{\coadvisor{#1}}
\newcommand{\coorientadorR}[1]{\coadvisorR{#1}}
\newcommand{\coorientadorInst}[1]{\coadvisorInst{#1}}
\newcommand{\coorientadorII}[1]{\coadvisorII{#1}}
\newcommand{\coorientadorIIR}[1]{\coadvisorIIR{#1}}
\newcommand{\coorientadorIIInst}[1]{\coadvisorIIInst{#1}}
\newcommand{\coorientadorIII}[1]{\coadvisorIII{#1}}
\newcommand{\coorientadorIIIR}[1]{\coadvisorIIIR{#1}}
\newcommand{\coorientadorIIIInst}[1]{\coadvisorIIIInst{#1}}
\newcommand{\titulo}[1]{\title{#1}}
\newcommand{\titulouk}[1]{\titleuk{#1}}
\newcommand{\subtitulo}[1]{\subtitle{#1}}
\newcommand{\dia}[1]{\day{#1}}
\newcommand{\mes}[1]{\month{#1}}
\newcommand{\ano}[1]{\year{#1}}
\newcommand{\cidade}[1]{\city{#1}}
\newcommand{\departamento}[1]{\department{#1}}
\newcommand{\programa}[1]{\program{#1}}
\newcommand{\centro}[1]{\school{#1}}
\newcommand{\universidade}[1]{\university{#1}}
%\newcommand{\uni}[1]{\uni{#1}}
%\newcommand{\CDD}[1]{\CDD{#1}}
\newcommand{\membrodabanca}[4]{\jurymember{#1}{#2}{#3}{#4}}
\newcommand{\banca}[1]{\jury{#1}}
\newcommand{\curriculo}[1]{\resume{#1}}
\newcommand{\dedicatoria}[1]{\dedication{#1}}
\newcommand{\agradecimentos}[1]{\acknowledgment{#1}}
\newcommand{\chave}[1]{\key{#1}}
\newcommand{\chaves}[1]{\keywords{#1}}
\newcommand{\chavesuk}[1]{\keywordsuk{#1}}
\newcommand{\resumo}[1]{\abstract{#1}}
\newcommand{\resumouk}[1]{\abstractuk{#1}}
\newcommand{\modotabelas}[1]{\tablesmode{#1}}
\newcommand{\modoabreviacoes}[1]{\abreviationsmode{#1}}
\newcommand{\epigrafe}[1]{\epigraph{#1}}
\newcommand{\epigrafeautor}[1]{\epigraphauthor{#1}}
\newcommand{\epigrafelivro}[1]{\epigraphbook{#1}}
\newcommand{\tituloglossario}[1]{\abreviationstitle{#1}}
%%%
%%% The title
%%%
\newcommand{\puc@thetitle}{%
\ifthenelse{\boolean{puc@localebr}}%
{\puc@title}%
{\puc@titleuk}%
}%
%%%
%%% cover
%%%
\newcommand{\puc@showcover}{%
\puc@setmargins@cover%
\thispagestyle{empty}%
\singlespacing\arial%
\begin{titlepage}%
\setcounter{page}{0}%
\renewcommand{\baselinestretch}{1.2}%
\puc@rightmargin{\LARGE \arial \textbf{\puc@author} \normalsize}%
\vspace*{\stretch{4}}%
\par%
\puc@rightmargin{\LARGE \arial \textbf{\puc@thetitle\relax} \normalsize}%
\ifthenelse{\equal{\puc@subtitle}{}}{}{%
\vspace*{\stretch{0.5}}%
\par%
\puc@rightmargin{\LARGE \arial \puc@subtitle\relax \normalsize} }%
\vspace*{\stretch{5}}%
\par%
\puc@rightmargin{\Large \arial
\textbf{\ifthenelse{\boolean{puc@phd}}%
{TESE DE DOUTORADO}%
{DISSERTAÇÃO DE MESTRADO}}}%
\vspace*{\stretch{1.5}}%
\par%
\puc@rightmargin{\textbf{DEPARTAMENTO DE \MakeUppercase{\puc@department}}}%
\vspace*{\stretch{0.5}}%
\par%
\renewcommand{\baselinestretch}{1.0}%
\puc@rightmargin{\Large \arial Programa de Pós-graduação em \puc@program}%
\vspace*{\stretch{9}}%
\par%
\puc@rightmargin{\normalsize \arial \puc@city \\ \puc@month\ de \puc@year}%
\end{titlepage}%
\setcounter{page}{1}%
}
%%%
%%% Front page
%%%
\newcommand{\puc@approvedby}{Aprovada pela Comissão Examinadora abaixo:}
\newcommand{\puc@approvedbyuk}{Approved by the Examination Committee:}
\newcommand{\puc@coverprogram}{Programa de
Pós--graduação em \puc@program, do Departamento de \puc@department{} da \puc@uni}
\newcommand{\puc@juryprogram}{Programa de
Pós--graduação em \puc@program{} da \puc@uni}
\newcommand{\puc@coverpresentedforphd}{Tese apresentada como requisito
parcial para obtenção do grau de Doutor pelo \puc@coverprogram.}
\newcommand{\puc@coverpresentedforphduk}{Thesis presented to the \puc@coverprogram{} in
partial fulfillment of the requirements for the degree of Doutor em \puc@program.}
\newcommand{\puc@coverpresentedformsc}{Dissertação apresentada como requisito
parcial para obtenção do grau de Mestre pelo \puc@coverprogram.}
\newcommand{\puc@coverpresentedformscuk}{Thesis presented to the \puc@coverprogram{} in
partial fulfillment of the requirements for the degree of Mestre em \puc@program.}
\newcommand{\puc@jurypresentedforphd}{Tese apresentada como requisito
parcial para obtenção do grau de Doutor pelo \puc@juryprogram.}
\newcommand{\puc@jurypresentedforphduk}{Thesis presented to the \puc@juryprogram{} in
partial fulfillment of the requirements for the degree of Doutor em \puc@program.}
\newcommand{\puc@jurypresentedformsc}{Dissertação apresentada como requisito
parcial para obtenção do grau de Mestre pelo \puc@juryprogram.}
\newcommand{\puc@jurypresentedformscuk}{Thesis presented to the \puc@juryprogram{} in
partial fulfillment of the requirements for the degree of Mestre em \puc@program.}
\newcommand{\puc@showfront}{%
% %\cleardoublepage%
\puc@setmargins@front%
\thispagestyle{empty}%
\ifthenelse{\boolean{puc@localebr}}%
{\pdfbookmark[0]{\puc@title}{anchor:title}}%
{\pdfbookmark[0]{\puc@titleuk}{anchor:title}}%
\singlespacing\arial%
\puc@rightmargin{\includegraphics[height=2.2cm]{puc}}%
\vspace*{\stretch{1}}%
\par%
\puc@rightmargin{\large \arial \textbf{\puc@author} \normalsize}%
\vspace*{\stretch{4}}%
\par%
\puc@rightmargin{\large \arial \textbf{\puc@thetitle\relax} \normalsize}%
\ifthenelse{\equal{\puc@subtitle}{}}{}{%
\vspace*{\stretch{0.5}}%
\par%
\puc@rightmargin{\arial \textbf{\puc@subtitle} \relax} }%
\vspace*{\stretch{5}}%
\par%
\puc@rightmargin{\arial \textbf{\ifthenelse{\boolean{puc@phd}}
{Tese de Doutorado}
{Dissertação de Mestrado}}}%
\vspace*{\stretch{1.5}}%
\par%
\puc@leftmargin{\arial%
\ifthenelse{\boolean{puc@phd}}%
{\ifthenelse{\boolean{puc@localebr}}%
{\puc@coverpresentedforphd}%
{\puc@coverpresentedforphduk}%
}%
{\ifthenelse{\boolean{puc@localebr}}%
{\puc@coverpresentedformsc}%
{\puc@coverpresentedformscuk}%
}%
}%
\vspace*{\stretch{1}}%
\par%
\puc@rightmargin{\begin{tabular}{l@{: }r@{}}%
\puc@advisorlabel\ & \puc@advisorT\ \puc@advisor%
\ifthenelse{\equal{\puc@coadvisor}{}}{}{%
\\ \puc@coadvisorlabel\ & \puc@coadvisorT\ \puc@coadvisor}%
\ifthenelse{\equal{\puc@coadvisorII}{}}{}{%
\\ \puc@coadvisorlabel\ & \puc@coadvisorIIT\ \puc@coadvisorII}%
\ifthenelse{\equal{\puc@coadvisorIII}{}}{}{%
\\ \puc@coadvisorlabel\ & \puc@coadvisorIIIT\ \puc@coadvisorIII}%
\end{tabular}}%
\vspace*{\stretch{6}}%
\par%
\puc@rightmargin{\puc@city \\
\ifthenelse{\boolean{puc@localebr}}%
{\puc@month\ de \puc@year}%
{\puc@month\ \puc@year}}%
}
%%%
%%% Jury
%%%
\newcommand{\puc@showjury}{%
\cleardoublepage%
\puc@setmargins@front%
\thispagestyle{empty}%
\singlespacing\arial%
\puc@rightmargin{\includegraphics[height=2.2cm]{puc}}%
\vspace*{\stretch{0.5}}%
\par%
\puc@rightmargin{\large \arial \textbf{\puc@author} \normalsize}%
\vspace*{\stretch{1}}%
\par%
\puc@rightmargin{\large \arial \textbf{\puc@thetitle\relax} \normalsize}%
\ifthenelse{\equal{\puc@subtitle}{}}{}{%
\vspace*{\stretch{0.1}}%
\par%
\puc@rightmargin{\arial \textbf{\puc@subtitle} \relax} }%
\vspace*{\stretch{1.5}}%
\par%
\puc@leftmargin{\arial%
\ifthenelse{\boolean{puc@phd}}%
{\ifthenelse{\boolean{puc@localebr}}%
{\puc@jurypresentedforphd ~\puc@approvedby}%
{\puc@jurypresentedforphduk ~\puc@approvedbyuk}%
}%
{\ifthenelse{\boolean{puc@localebr}}%
{\puc@jurypresentedformsc ~\puc@approvedby}%
{\puc@jurypresentedformscuk ~\puc@approvedbyuk}%
}%
}%
\vspace*{\stretch{1}}%
\renewcommand{\jurymember}[4]{\ifthenelse{\equal{##1}{}}{}{%