-
Notifications
You must be signed in to change notification settings - Fork 15
/
thesis-gwu.cls
1578 lines (1387 loc) · 50.4 KB
/
thesis-gwu.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
%%
%% This is the file thesis-gwu.cls.
%% It provides a LaTeX class that is consistent with the guidelines
%% provided by the School of Engineering and Science as described at
%% <http://library.gwu.edu/node/1128>
%%
%% GWU provides a sad excuse for a LaTeX template and this is an attempt to
%% improve.
%%
%% This class is based on the LaTeX template provided at
%% <http://www-personal.umich.edu/~dalle/codes/thesis-umich/>
%%
%% The correct usage of this template is to use it as a documentclass.
%% The first line of the .tex file should be
%%
%% \documentclass{thesis-gwu}
%%
%% if this file is in the same directory as the .tex file. If the
%% two files are not in the same directory, the relative path from
%% the .tex file to this .cls file should be provided. For example,
%% if the document is called thesis-dalle.tex and this file,
%% thesis-umich.cls is in a subfolder called 'tex', the command
%% should be
%%
%% \documentclass{./tex/thesis-gwu}
%%
%% An example is distributed with this file that demonstrates all
%% of the features of the template. The example is in a file called
%% thesis-sample.tex.
%%
%% VERSIONS:
%% 1988.01.01 @Jin Ji : Initial version; reportx.sty
%% 1988.05.19 @Jin Ji : Unrecorded changes
%% 1988.12.13 @Jin Ji : Corrected table of contents to show
%% "CHAPTER" and also \@makecaption
%% 1989.01.08 @Jin Ji : Corrections for section headers
%% 1989.11.29 @? : Removed a spurious command
%% 1992.07.24 @Roque D. Oliveira : Modified \startappendices to work
%% with the New Font Selection Scheme.
%% 2008.09.01 @Jason Gilbert : Obsolete code removed for
%% compatibility with LaTeX2e; list of
%% abbreviations added, made copyright
%% page cleaner, fixed appendices,
%% bibliography, margins, title page,
%% frontispiece, bottom-center page
%% numbers, two-side printing, added
%% in-dissertation abstract and
%% abstract that prints at the end.
%% 2011.04.09 @Derek Dalle : Convert rac.sty --> thesis.umich.cls
%% 2016.09.24 @Shankar Kulumani : First attempt to modify for GWU
%% 2018.01.20 @Shankar Kulumani : Setup titlesec for modifying headings
%% 2022.07.01 @Kanishke Gamagedara : Update for 2022 GWU style guidelines
%% ---- HEADERS --------------------------------------------------------
% This prevents the compiler from running on old versions of LaTeX.
\NeedsTeXFormat{LaTeX2e}
% This command gives the name of the class.
\ProvidesClass{thesis-gwu}[2022/07/01 v1.6.2 GWU Thesis template]
%% ---- OPTIONS PROCESSING ---------------------------------------------
% Define three switches for the the thesis format types.
% The variables are \@gwu@thesis and \@gwu@report.
% The default values are false.
\newif\if@gwu@thesis
\newif\if@gwu@debug % option for debuggin
\newif\if@gwu@tableofcontents
\newif\if@gwu@listoffigures
\newif\if@gwu@listoftables
\newif\if@gwu@listofmaps
\newif\if@gwu@listofillustrations
\newif\if@gwu@listofprograms
\newif\if@gwu@listofabbrevs
\newif\if@gwu@listofsymbols
\newif\if@gwu@listofacronyms
\newif\if@gwu@listofglossariesabbrevs
\newif\if@gwu@listofglossariessymbols
\newif\if@gwu@listofglossariesacronyms
\newif\if@gwu@glossaryofterms
\newif\if@gwu@copyright
\newif\if@gwu@frontispiece
\newif\if@gwu@committeepage
\newif\if@gwu@dedication
\newif\if@gwu@acknowledgments
\newif\if@gwu@preface
\newif\if@gwu@prologue
\newif\if@gwu@foreword
\newif\if@gwu@nomenclature
\newif\if@gwu@abstract
\newif\if@gwu@msdegree
\newif\if@gwu@titlepage
% Set the default value of some of the options to true.
\@gwu@thesistrue
% \@gwu@listoffigurestrue
% \@gwu@listoftablestrue
% \@gwu@copyrighttrue
% \@gwu@committeepagefalse
\@gwu@msdegreetrue
% When there are two co-directors
\newif\if@gwu@cochair
\@gwu@cochairfalse
% This declares a variable for using an index.
% An index is not allowed in dissertations.
\newif\if@gwu@index
% This makes an option for bibliography backrefs.
\newif\if@gwu@backref
% Declare options for the overall layout.
\DeclareOption{thesis}{\@gwu@thesistrue}
% if you call debug option then use the thesis option but not report
\DeclareOption{debug}{\@gwu@debugtrue\@gwu@thesistrue}
% Declare an option for the index.
\DeclareOption{index}{\@gwu@indextrue}
% Declare an option for bibliography backrefs.
\DeclareOption{backref}{\@gwu@backreftrue}
% This passes any other options on to the 'report' class.
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{report}%
\typeout{Unknown option: passing ``\CurrentOption"
option on to the standard LaTeX report class.}}
% This command tells LaTeX to simply process the class options.
\ProcessOptions
% This control structure calls the standard LaTeX report.cls class.
% The base font size should be 10pt unless using the submit option.
\LoadClass[letterpaper,12pt,oneside]{report}
% Make sure the index is off for 'thesis'.
\if@gwu@thesis
\@gwu@indexfalse
\fi
%% ---- PACKAGE LOADING ------------------------------------------------
% This class uses the geometry.sty package to set the margins.
\if@gwu@debug
% Show margins
\RequirePackage[top=1in,bottom=1in,left=1.25in, right=1.25in,
showframe]{geometry}
\else
% Use the standard margins for the thesis version.
\RequirePackage[top=1in,bottom=1in,left=1.25in, right=1.25in]{geometry}
\fi
% Obsolete package check
\RequirePackage[l2tabu,orthodox]{nag}
% This loads the required math packages.
\RequirePackage[binary-units=true]{siunitx}
\RequirePackage{amsmath}
\RequirePackage{amsfonts}
\RequirePackage{amssymb}
\RequirePackage{mathtools}
\RequirePackage{amsthm}
% This loads the proper graphics package.
\RequirePackage{graphicx}
% Better spacing for text
\RequirePackage[utf8]{inputenc}
\RequirePackage[T1]{fontenc}
\RequirePackage{lmodern}
\RequirePackage{microtype}
\RequirePackage{bm}
\RequirePackage{mathptmx}
% Add package for managing section headings
\RequirePackage[]{titlesec}
% This is useful for complex figures.
\RequirePackage{subcaption}
% Compress multiple citations
% \RequirePackage{cite}
% This package allows the ability to create a 'code' environment.
\RequirePackage{verbatim}
% This hopefully tells verbatim to leave my damn quotes alone.
% \RequirePackage{upquote}
% This package enables the use of proper single quotes in text.
% \RequirePackage{textcomp}
% This package is used to set line spacing.
\RequirePackage{setspace}
% This package is used to make nomenclature tables that can span pages.
% \RequirePackage{longtable}
% This package allows conditional testing of varibles.
\RequirePackage{ifthen}
% This package is used for silly letter spacing
\RequirePackage{soul}
% This package is used to generate alternate environments.
\RequirePackage{float}
% This package is for the index, if it is to be used.
\if@gwu@index
\RequirePackage{makeidx}
\makeindex
\fi
% This is the package for special headers and footers.
\RequirePackage{fancyhdr}
% some extra packages to help with debugging
\if@gwu@debug
\RequirePackage[final]{showlabels} % show labels for referencing
\RequirePackage{refcheck} % check for unused references/labels
\fi
%% ---- HYPERREF ----------------------------------------------------------
% This loads a package that allows extra colors for links.
\RequirePackage[]{color}
% Custom color for references.
% \definecolor{DarkGreen}{rgb}{0,0.6,0}
% \definecolor{RoyalBlue}{rgb}{0,0.14,0.4}
% This will make labels and references hyperlinks.
\if@gwu@backref%
% Use references in the bibliography.
\RequirePackage[pagebackref=true]{hyperref}%
\else%
% Do not use back references.
\RequirePackage{hyperref}%
\fi
\hypersetup{%
unicode=false, % non-Latin characters in Acrobat’s bookmarks
pdftoolbar=true, % show Acrobat’s toolbar?
pdfmenubar=true, % show Acrobat’s menu?
pdffitwindow=false, % window fit to page when opened
pdfstartview={FitV}, % fits the width of the page to the window
pdfnewwindow=true, % links in new PDF window
colorlinks=false, % false: boxed links; true: colored links
bookmarksdepth=3,
bookmarksopen=true,
}%
% Cleveref referencing - must happen after hyperref
\AtEndOfClass{\RequirePackage[noabbrev,capitalize]{cleveref}}%
% Glossaries package - must come after hypperef
% This package is used for the list of abbreviations
\RequirePackage[printonlyused]{acronym}%
\RequirePackage[abbreviations,symbols,shortcuts=none,automake]{glossaries-extra}%
%% ---- FORMATTING -----------------------------------------------------
% Set the page style to fancy.
\pagestyle{fancy}
% This command runs at the beginning of each chapter.
% It puts the name of the chapter into the 'leftmark' parameter.
\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
% This command runs at the beginning of each section.
% It puts the number and name of the section into the 'rightmark' param.
\renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}}
% Clear the current header and footer.
\fancyhf{}
% Simply put the page number at the bottom center.
\fancyfoot[C]{\thepage}
% Get rid of the line at the top.
\renewcommand{\headrulewidth}{0pt}
% This sets the headers and footers for less-marked pages.
% Example: beginning of each chapter.
\fancypagestyle{plain}{%
% Get rid of the headers on plain pages.
\fancyhead{} %
% And also any line.
\renewcommand{\headrulewidth}{0pt}
\fancyfoot[C]{\thepage}
}
%% ---- PAGE STYLES ----------------------------------------------------
% This \ttlpg is the same as \titlepage in report.sty.
% It is used here to set the low-level style of front pages.
\newcommand*{\ttlpg}{ %
% Set one-column switch temporarily to false.
\@restonecolfalse %
% Check the number of columns.
\if@twocolumn %
\@restonecoltrue\onecolumn %
\else %
\newpage %
\fi
% No headers or footers on titlepage
\thispagestyle{empty}
% This sets the page counter.
\c@page \z@ %
}
% Same idea as \ttlpg above but with page numbers
\newcommand*{\frntpg}{ %
% Set one-column switch temporarily to false.
\@restonecolfalse %
% Check the number of columns.
\if@twocolumn %
\@restonecoltrue\onecolumn %
\else %
\newpage %
\fi
% Regular headers and footers
\thispagestyle{plain}
}
%%-------- GLOSSARIES STYLES------------------------------------
% define a new glossary style for acronymns and symbols
\renewcommand*{\glossarysection}[2][]{%
{\centering\bfseries{#2}\par}%
\phantomsection\addcontentsline{toc}{chapter}{#1}%
}%
\newglossarystyle{acronymsandsymbols}{%
\setglossarystyle{list}% % based on the list style
\renewcommand*{\glossarypreamble}{\vspace{4ex}}%
\renewcommand*{\glossaryheader}{}%
}
\newglossarystyle{glossaryofterms}{%
\setglossarystyle{list}%
\renewcommand*{\glossarypreamble}{\vspace{4ex}}%
\renewcommand*{\glossaryheader}{}%
}
%% ---- TITLE PAGE -----------------------------------------------------
% The fields to be used for the title page
\renewcommand{\@title}{Insert a Title!}
\renewcommand{\@author}{Insert an Author!}
\newcommand{\@bsdepartment}{Insert a BS department name!}
\newcommand{\@bsschool}{Insert BS school!}
\newcommand{\@bsgrad}{BS Grad date!}
\newcommand{\@msdepartment}{Insert a MS department name!}
\newcommand{\@msschool}{Insert MS school!}
\newcommand{\@msgrad}{MS Grad date!}
\newcommand{\@degree}{Doctor of Philosophy}
\newcommand{\@department}{Insert a Department Name!}
\newcommand{\@committee}{Insert a Committee!}
\newcommand{\@chair}{Insert a Chair!}
\newcommand{\@chairtitle}{Professor of INSERT Title!}
\newcommand{\@cochair}{}
\newcommand{\@cochairtitle}{}
\newcommand{\@phdgrad}{PhD Grad date!}
\newcommand{\@defensedate}{Insert defense date!}
% Commands to set the titlepage fields
\renewcommand{\title}[1]{\renewcommand{\@title}{#1}\@gwu@titlepagetrue}
\renewcommand{\author}[1]{\renewcommand{\@author}{#1}}
\newcommand{\bsdepartment}[1]{\renewcommand{\@bsdepartment}{#1}}
\newcommand{\bsschool}[1]{\renewcommand{\@bsschool}{#1}}
\newcommand{\bsgrad}[1]{\renewcommand{\@bsgrad}{#1}}
\newcommand{\showmsdegree}{\@gwu@msdegreetrue}
\newcommand{\hidemsdegree}{\@gwu@msdegreefalse}
\newcommand{\hascochair}{\@gwu@cochairtrue}
\newcommand{\msdepartment}[1]{\renewcommand{\@msdepartment}{#1}}
\newcommand{\msschool}[1]{\renewcommand{\@msschool}{#1}}
\newcommand{\msgrad}[1]{\renewcommand{\@msgrad}{#1}}
\newcommand{\degree}[1]{\renewcommand{\@degree}{#1}}
\newcommand{\department}[1]{\renewcommand{\@department}{#1}}
\newcommand{\committee}[1]{\renewcommand{\@committee}{#1}\@gwu@committeepagetrue}
\newcommand{\chair}[1]{\renewcommand{\@chair}{#1}}
\newcommand{\chairtitle}[1]{\renewcommand{\@chairtitle}{#1}}
\newcommand{\cochair}[1]{\renewcommand{\@cochair}{#1}}
\newcommand{\cochairtitle}[1]{\renewcommand{\@cochairtitle}{#1}}
\newcommand{\phdgrad}[1]{\renewcommand{\@phdgrad}{#1}}
\newcommand{\defensedate}[1]{\renewcommand{\@defensedate}{#1}}
% Commands for the user to be able to use the defined fields.
\newcommand{\inserttitle}{\@title}
\newcommand{\insertauthor}{\@author}
\newcommand{\insertbsdepartment}{\@bsdepartment}
\newcommand{\insertbsschool}{\@bsschool}
\newcommand{\insertbsgrad}{\@bsgrad}
\newcommand{\insertmsdepartment}{\@msdepartment}
\newcommand{\insertmsschool}{\@msschool}
\newcommand{\insertmsgrad}{\@msgrad}
\newcommand{\insertdegree}{\@degree}
\newcommand{\insertdepartment}{\@department}
\newcommand{\insertcommittee}{\@committee}
\newcommand{\insertchair}{\@chair}
\newcommand{\insertchairtitle}{\@chairtitle}
\newcommand{\insertcochair}{\@cochair}
\newcommand{\insertcochairtitle}{\@cochairtitle}
\newcommand{\insertyear}{\number\year}
\newcommand{\insertphdgrad}{\@phdgrad}
\newcommand{\insertdefensedate}{\@defensedate}
% This redefines the title page to automatically have all of the
% features and properties that it should according to the guidelines.
\renewcommand*{\titlepage}{
% Insert the titlepage formatting.
\ttlpg %
% Use single-spaced lines for the title page.
\begin{singlespace} %
% Title starts 2 inches from the top.
\hbox{\vspace{0.4in}} %
% Center the title page as well.
\begin{center} %
% Put the title itself in 1.5-spaced format.
\begin{singlespacing}
% Insert the title.
{\normalsize\bfseries\inserttitle} %
\end{singlespacing} \\[3\baselineskip]
% Vertical rubber space
% \vfill %
% Print the word 'by'.
by \insertauthor \\[3\baselineskip] %
% More rubber space
%\vfill %
% previous degrees
\if@gwu@msdegree
B.S. in \insertbsdepartment, \insertbsgrad, \insertbsschool \\
M.S. in \insertmsdepartment, \insertmsgrad, \insertmsschool \\[2\baselineskip]
\else
B.S. in \insertbsdepartment, \insertbsgrad, \insertbsschool \\[2\baselineskip]
\fi
% Text from guidelines
A Dissertation submitted to \\[3\baselineskip] %
The Faculty of \\
The School of Engineering and Applied Science \\
of the George Washington University \\
in partial fulfillment of the requirements \\
for the degree of \insertdegree \\[3\baselineskip]
\insertphdgrad \\[3\baselineskip]
% insert doctoral advisor
Dissertation directed by \\[1\baselineskip]
\if@gwu@cochair
\insertchair \\
\insertchairtitle \\
[1\baselineskip]
\insertcochair \\
\insertcochairtitle
\else
\insertchair \\
\insertchairtitle
\fi
\end{center} %
\end{singlespace} %
}
%% ---- FRONTISPIECE ---------------------------------------------------
% Command for the frontispiece
\newcommand{\@frontispiece}{\@empty}
% Command to set the frontispiece
\newcommand{\frontispiece}[1]{
% Turn the frontispiece on.
\@gwu@frontispiecetrue %
% Set the frontispiece.
\renewcommand{\@frontispiece}{#1}}
% Command to insert the frontispiece
\newcommand{\insertfrontispiece}{\@frontispiece}
% Command for the frontispiece page
\newcommand*{\frontispiecepage}{ %
% Insert the titlepage formatting.
\ttlpg %
% Center the page.
\begin{center} %
% Vertical rubber space
\ \vfill %
% Insert the frontispiece.
\insertfrontispiece %
% Vertical rubber space
\vfill %
\end{center} %
}
%% ---- DISSERTATION COMMITTEE PAGE ---------------------------------------
% command for the committee page
\newcommand*{\committeepage}{
% Use titlepage formatting
\frntpg
\begin{doublespace}
\noindent
The School of Engineering and Applied Science of The George Washington
University certifies that \insertauthor~has passed the Final Examination for the
degree of \insertdegree~as of \insertdefensedate. This is the
final and approved form of the dissertation.
\end{doublespace}
\begin{center}
\begin{singlespace}
{\normalsize\bfseries\inserttitle} \\[1\baselineskip]
\insertauthor \\[3\baselineskip]
\end{singlespace}
\end{center}
% Non-justified content
\begin{flushleft}
% Heading for the committee
Dissertation Research Committee: \\[2ex] %
% Horizontal spacing
\hspace{0.5in} %
% Insert the committee (in a box).
\parbox{0.85\textwidth}{\insertcommittee}
\end{flushleft} %
% flexible vertical space
\vfill
}
%% ---- COPYRIGHT PAGE -------------------------------------------------
% Command that holds the name of the copyright holder
\newcommand{\@copyright}{\@author}
% Command to change it from the default
\newcommand{\copyrightholder}[1]{\renewcommand{\@copyright}{#1}}
% Command to insert it
\newcommand{\insertcopyrightholder}{\@copyright}
% Command for copyright page
\newcommand*{\copyrightpage}{ %
% Insert the titlepage formatting.
\frntpg %
% Center the page.
\begin{center} %
% Vertical rubber space
\ \vfill %
% Insert the frontispiece.
\copyright~Copyright~\number\year~by~\insertcopyrightholder \\ %
All rights reserved
% Horizontal line
%\rule[0.5ex]{5in}{1pt} \\[1ex] %
% Vertical rubber space
\vfill %
\end{center} %
}
%% ---- STYLING FOR REMAINING FRONT PAGES ------------------------------
% Command to set the spacing for all-caps headings
\sodef\an{}{.6em}{1em plus1em}{2em plus.1em minus.1em}
% Default frontmatter style
\newcommand{\@frontpagestyle}{2}
% Command to change it
\newcommand{\frontpagestyle}[1]{\renewcommand{\@frontpagestyle}{#1}}
% Command to insert front page matter with styles
\newcommand{\insertfront}[4]{ %
% Check the value of the style.
\ifthenelse{\equal{#2}{1}}{ %
% Style 1: plain text
% Vertical rubber space
\vspace*{\stretch{1}} %
% Center on the page.
\begin{center} %
% Make a minipage.
\begin{minipage}{#4\textwidth} %
% Required to use 1.5-spacing for dissertation.
\if@gwu@thesis %
\onehalfspacing %
\fi %
% Insert the text.
\sloppy #1 %
\end{minipage} %
\end{center} %
% Vertical rubber space
\vspace*{\stretch{2}} %
}{ %
\ifthenelse{\equal{#2}{2}}{ %
% Style 2: Bold heading at top of page. Doublespacing for text
% Center on the page.
% Heading
\begin{center}\textbf{\normalsize{#3}}\end{center}
\begin{doublespace}
\par #1
\end{doublespace}
% Vertical rubber space
\vspace*{\stretch{1}} %
}{ %
\ifthenelse{\equal{#2}{3}}{ %
% Style 3: Spread caps heading
% Vertical rubber space
\vspace*{\stretch{1}} %
% Center on the page.
\begin{center} %
% Make a minipage.
\begin{minipage}{#4\textwidth} %
% Required to use 1.5-spacing for dissertation.
\if@gwu@thesis %
\onehalfspacing %
\fi %
% Heading
\begin{center} \textbf{\uppercase{\an{#3}}} \end{center} %
% Insert the text.
\sloppy #1 %
\end{minipage} %
\end{center} %
% Vertical rubber space
\vspace*{\stretch{2}} %
}{ %
\ifthenelse{\equal{#2}{4}}{ %
% Style 4: lined
% Vertical rubber space
\vspace*{\stretch{1}} %
% Center on the page.
\begin{center} %
% Make a minipage.
\begin{minipage}{#4\textwidth}
% Line above
\rule[1.4ex]{\textwidth}{1pt} %
% Required to use 1.5-spacing for dissertation.
\if@gwu@thesis %
\onehalfspacing %
\fi %
% Insert the text.
\sloppy #1 \\ %
% Line below
\rule{\textwidth}{1pt} %
\end{minipage} %
\end{center} %
% Vertical rubber space
\vspace*{\stretch{2}} %
}{ %
\ifthenelse{\equal{#2}{5}}{ %
% Style 5: bold italic heading with lines
% Vertical rubber space
\vspace*{\stretch{1}} %
% Center on the page.
\begin{center} %
% Make a minipage.
\begin{minipage}{#4\textwidth}
% Heading
\begin{center} \textbf{\textit{#3}} \end{center} %
% Move up a bit.
\ \\[-4ex] %
% Line above
\rule[1.4ex]{\textwidth}{1pt} %
% Required to use 1.5-spacing for dissertation.
\if@gwu@thesis %
\onehalfspacing %
\fi %
% Insert the text.
\sloppy #1 \\ %
% Line below
\rule{\textwidth}{1pt} %
\end{minipage} %
\end{center} %
% Vertical rubber space
\vspace*{\stretch{2}} %
}{ %
\ifthenelse{\equal{#2}{6}}{ %
% Style 6: lined with spread caps header
% Vertical rubber space
\vspace*{\stretch{1}} %
% Center on the page.
\begin{center} %
% Make a minipage.
\begin{minipage}{#4\textwidth}
% Heading
\begin{center} \textbf{\uppercase{\an{#3}}} \end{center} %
% Move up a bit.
\ \\[-4ex] %
% Line above
\rule[1.4ex]{\textwidth}{1pt} %
% Required to use 1.5-spacing for dissertation.
\if@gwu@thesis %
\onehalfspacing %
\fi %
% Insert the text.
\sloppy #1 \\ %
% Line below
\rule{\textwidth}{1pt} %
\end{minipage} %
\end{center} %
% Vertical rubber space
\vspace*{\stretch{2}} %
}{ %
% Default style: centered
% Vertical rubber space
\vspace*{\stretch{1}} %
% Center on the page.
\begin{center} %
% Make a minipage.
\begin{minipage}{0.7\textwidth} %
% Insert the text.
\begin{center} \sloppy #1 \end{center} %
\end{minipage} %
\end{center} %
% Vertical rubber space
\vspace*{\stretch{1}} %
}}}}}} %
}
%% ---- COMMANDS TO HIDE/SHOW FRONT PAGES ------------------------------
% Commands to show front pages
\newcommand{\showtitlepage}{\@gwu@titlepagetrue}
\newcommand{\showcopyright}{\@gwu@copyrighttrue}
\newcommand{\showdedication}{\@gwu@dedicationtrue}
\newcommand{\showacknowledgments}{\@gwu@acknowledgmentstrue}
\newcommand{\showpreface}{\@gwu@prefacetrue}
\newcommand{\showforeword}{\@gwu@forewordtrue}
\newcommand{\showprologue}{\@gwu@prologuetrue}
\newcommand{\shownomenclature}{\@gwu@nomenclaturetrue}
\newcommand{\showabstract}{\@gwu@abstracttrue}
\newcommand{\showcommitteepage}{\@gwu@committeepagetrue}
% Commands to hide front pages
\newcommand{\hidetitlepage}{\@gwu@titlepagefalse}
\newcommand{\hidecopyright}{\@gwu@copyrightfalse}
\newcommand{\hidededication}{\@gwu@dedicationfalse}
\newcommand{\hideacknowledgments}{\@gwu@acknowledgmentsfalse}
\newcommand{\hidepreface}{\@gwu@prefacefalse}
\newcommand{\hideforeword}{\@gwu@forewordfalse}
\newcommand{\hideprologue}{\@gwu@prologuefalse}
\newcommand{\hidenomenclature}{\@gwu@nomenclaturefalse}
\newcommand{\hideabstract}{\@gwu@abstractfalse}
\newcommand{\hidecommitteepage}{\@gwu@committeepagefalse}
%% ---- DEDICATION PAGE ------------------------------------------------
% Command that holds the value text of the dedication
\newcommand{\@dedication}{}
% Command that sets the dedication style
\newcommand{\@dedicationstyle}{\@frontpagestyle}
% Command that sets the width of the dedication text area
\newcommand{\@dedication@width}{1}
% Command to change it from the default
\newcommand{\dedication}[2][]{ %
% Show the dedication.
\showdedication %
% Set the dedication text.
\renewcommand{\@dedication}{#2} %
% Set the dedication style.
\ifthenelse{\equal{#1}{}}{}{\renewcommand{\@dedicationstyle}{#1}}}
% Command to change just the dedication style
\newcommand{\dedicationstyle}[1]{\renewcommand{\@dedicationstyle}{#1}}
% Command to adjust the dedication text area width
\newcommand{\dedicationwidth}[1]{\renewcommand{\@dedication@width}{#1}}
% Command to insert it
\newcommand{\insertdedication}{\@dedication}
% Command for page with the dedication
\newcommand*{\dedicationpage}{ %
% Set the page formatting.
\frntpg %
% Add this page to the table of contents.
\phantomsection\addcontentsline{toc}{chapter}{Dedication}
% Insert the text and formatting.
\insertfront{\@dedication %
}{\@dedicationstyle}{Dedication}{\@dedication@width}
}
%% ---- ACKNOWLEDGMENTS PAGE -------------------------------------------
% Command that holds the value text of the acknowledgments
\newcommand{\@acknowledgments}{}
% Command that sets the acknowledgments style
\newcommand{\@acknowledgmentsstyle}{\@frontpagestyle}
% Command that sets the width of the acknowledgments text area
\newcommand{\@acknowledgments@width}{1}
% Command to change it from the default
\newcommand{\acknowledgments}[2][]{ %
% Show the acknowledgments page.
\showacknowledgments %
% Set the acknowledgments text.
\renewcommand{\@acknowledgments}{#2} %
% Set the acknowledgments style.
\ifthenelse{\equal{#1}{}}{}{ %
\renewcommand{\@acknowledgmentsstyle}{#1}}}
% Command to adjust the acknowledgments text area width
\newcommand{\acknowledgmentswidth}[1]{ %
\renewcommand{\@acknowledgments@width}{#1}}
% Command to change just the dedication style
\newcommand{\acknowledgmentsstyle}[1]{ %
\renewcommand{\@acknowledgmentsstyle}{#1}}
% Command to insert it
\newcommand{\insertacknowledgments}{\@acknowledgments}
% Command for page with the acknowledgments
\newcommand*{\acknowledgmentspage}{ %
% Set the page formatting.
\frntpg %
% Add this page to the table of contents.
\phantomsection\addcontentsline{toc}{chapter}{Acknowledgments}
% Insert the text and formatting.
\insertfront{\@acknowledgments %
}{\@acknowledgmentsstyle}{Acknowledgments}{\@acknowledgments@width}
}
%% ---- PREFACE PAGE ---------------------------------------------------
% Command that holds the value text of the preface
\newcommand{\@preface}{}
% Command that sets the preface style
\newcommand{\@prefacestyle}{\@frontpagestyle}
% Command that sets the width of the preface text area
\newcommand{\@preface@width}{1}
% Command to change it from the default
\newcommand{\preface}[2][]{ %
% Show the preface.
\showpreface %
% Set the preface text.
\renewcommand{\@preface}{#2} %
% Set the preface style.
\ifthenelse{\equal{#1}{}}{}{ %
\renewcommand{\@prefacestyle}{#1}}}
% Command to adjust the preface text area width
\newcommand{\prefacewidth}[1]{ %
\renewcommand{\@preface@width}{#1}}
% Command to change just the preface style
\newcommand{\prefacestyle}[1]{ %
\renewcommand{\@prefacestyle}{#1}}
% Command to insert it
\newcommand{\insertpreface}{\@preface}
% Command for page with the preface
\newcommand*{\prefacepage}{ %
% Set the page formatting.
\frntpg %
% Add this page to the table of contents.
\phantomsection\addcontentsline{toc}{chapter}{Preface}
% Insert the text and formatting.
\insertfront{\@preface %
}{\@prefacestyle}{Preface}{\@preface@width}
}
%% ---- FOREWORD PAGE --------------------------------------------------
% Command that holds the value text of the foreword
\newcommand{\@foreword}{}
% Command that sets the foreword style
\newcommand{\@forewordstyle}{\@frontpagestyle}
% Command that sets the width of the foreword text area
\newcommand{\@foreword@width}{1}
% Command to change it from the default
\newcommand{\foreword}[2][]{ %
% Show the foreword.
\showforeword %
% Set the foreword text.
\renewcommand{\@foreword}{#2} %
% Set the foreword style.
\ifthenelse{\equal{#1}{}}{}{ %
\renewcommand{\@forewordstyle}{#1}}}
% Command to adjust the foreword text area width
\newcommand{\forewordwidth}[1]{ %
\renewcommand{\@foreword@width}{#1}}
% Command to change just the foreword style
\newcommand{\forewordstyle}[1]{ %
\renewcommand{\@forewordstyle}{#1}}
% Command to insert it
\newcommand{\insertforeword}{\@foreword}
% Command for page with the foreword
\newcommand*{\forewordpage}{ %
% Set the page formatting.
\frntpg %
% Add this page to the table of contents.
\phantomsection\addcontentsline{toc}{chapter}{Foreword}
% Insert the text and formatting.
\insertfront{\@foreword %
}{\@forewordstyle}{Foreword}{\@foreword@width}
}
%% ---- PROLOGUE PAGE --------------------------------------------------
% Command that holds the value text of the prologue
\newcommand{\@prologue}{}
% Command that sets the prologue style
\newcommand{\@prologuestyle}{\@frontpagestyle}
% Command that sets the width of the prologue text area
\newcommand{\@prologue@width}{1}
% Command to change it from the default
\newcommand{\prologue}[2][]{ %
% Show the prologue.
\showprologue %
% Set the prologue text.
\renewcommand{\@prologue}{#2} %
% Set the prologue style.
\ifthenelse{\equal{#1}{}}{}{ %
\renewcommand{\@prologuestyle}{#1}}}
% Command to adjust the prologue text area width
\newcommand{\prologuewidth}[1]{ %
\renewcommand{\@prologue@width}{#1}}
% Command to change just the prologue style
\newcommand{\prologuestyle}[1]{ %
\renewcommand{\@prologuestyle}{#1}}
% Command to insert it
\newcommand{\insertprologue}{\@prologue}
% Command for page with the prologue
\newcommand*{\prologuepage}{ %
% Set the page formatting.
\frntpg %
% Add this page to the table of contents.
\phantomsection\addcontentsline{toc}{chapter}{Prologue}
% Insert the text and formatting.
\insertfront{\@prologue %
}{\@prologuestyle}{Prologue}{\@prologue@width}
}
%% ---- COMMANDS FOR LIST OF FIGURES, ETC. -----------------------------
% Commands to show each of the lists
\newcommand{\showtableofcontents}{\@gwu@tableofcontentstrue}
\newcommand{\showlistoffigures}{\@gwu@listoffigurestrue\@gwu@tableofcontentstrue}
\newcommand{\showlistoftables}{\@gwu@listoftablestrue\@gwu@tableofcontentstrue}
\newcommand{\showlistofmaps}{\@gwu@listofmapstrue\@gwu@tableofcontentstrue}
\newcommand{\showlistofillustrations}{\@gwu@listillustrationstrue\@gwu@tableofcontentstrue}
\newcommand{\showlistofprograms}{\@gwu@listofprogramstrue\@gwu@tableofcontentstrue}
\newcommand{\showlistofabbreviations}{\@gwu@listofabbrevstrue\@gwu@tableofcontentstrue}
\newcommand{\showlistofacronyms}{\@gwu@listofacronymstrue\@gwu@listofglossariesabbrevsfalse\@gwu@tableofcontentstrue}
\newcommand{\showlistofsymbols}{\@gwu@listofsymbolstrue\@gwu@listofglossariessymbolsfalse\@gwu@tableofcontentstrue}
\newcommand{\showglossarieslistofabbreviations}{\@gwu@listofglossariesabbrevstrue\@gwu@listofacronymsfalse\@gwu@tableofcontentstrue}
\newcommand{\showglossarieslistofsymbols}{\@gwu@listofglossariessymbolstrue\@gwu@listofsymbolsfalse\@gwu@tableofcontentstrue}
\newcommand{\showglossarieslistofacronyms}{\@gwu@listofglossariesacronymstrue\@gwu@listofacronymsfalse\@gwu@tableofcontentstrue}
\newcommand{\showglossariesglossaryofterms}{\@gwu@glossaryoftermstrue\@gwu@tableofcontentstrue}
% Commands to hide each of the lists
\newcommand{\hidetableofcontents}{\@gwu@tableofcontentsfalse}
\newcommand{\hidelistoffigures}{\@gwu@listoffiguresfalse\@gwu@tableofcontentsfalse}
\newcommand{\hidelistoftables}{\@gwu@listoftablesfalse\@gwu@tableofcontentsfalse}
\newcommand{\hidelistofmaps}{\@gwu@listofmapsfalse\@gwu@tableofcontentsfalse}
\newcommand{\hidelistofillustrations}{\@gwu@listillustrationsfalse\@gwu@tableofcontentsfalse}
\newcommand{\hidelistofprograms}{\@gwu@listofprogramsfalse\@gwu@tableofcontentsfalse}
\newcommand{\hidelistofabbreviations}{\@gwu@listofabbrevsfalse\@gwu@tableofcontentsfalse}
\newcommand{\hidelistofacronyms}{\@gwu@listofacronymsfalse\@gwu@tableofcontentsfalse}
\newcommand{\hidelistofsymbols}{\@gwu@listofsymbolsfalse\@gwu@tableofcontentsfalse}
\newcommand{\hideglossarieslistofabbreviations}{\@gwu@listofglossariesabbrevsfalse\@gwu@tableofcontentsfalse}
\newcommand{\hideglossarieslistofacronyms}{\@gwu@listofglossariesacronymsfalse\@gwu@tableofcontentsfalse}
\newcommand{\hideglossarieslistofsymbols}{\@gwu@listofglossariessymbolsfalse\@gwu@tableofcontentsfalse}
\newcommand{\hideglossariesglossaryofterms}{\@gwu@glossaryoftermsfalse\@gwu@tableofcontentsfalse}
%% ---- TABLE OF CONTENTS ----------------------------------------------
% This sets the formatting for chapter entries in the table of contents.
\renewcommand*\l@chapter[2]{ %
% First add some vertical space.
\vskip 1ex plus 1pt minus 1pt
% Format the spacing and use dots between title and number.
\@dottedtocline{1}{0em}{1.2em} %
% This sets the formatting for the chapter name and page number.
{\textbf{#1}}{\textbf{#2}} %
% Add some space below, too.
\vskip 1ex}
% These lines set the spacing for other table of contents entries.
\renewcommand*{\l@section}{\@dottedtocline{2}{2.5em}{2em}}
\renewcommand*{\l@subsection}{\@dottedtocline{3}{5.0em}{2.8em}}
\renewcommand*{\l@subsubsection}{\@dottedtocline{4}{7.5em}{3.5em}}
% Number of section layers to show in table of contents
\setcounter{tocdepth}{3}
% Number of subsection layers to allow in document
\setcounter{secnumdepth}{3}