-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathunc_dissertation.cls
1198 lines (846 loc) · 38.9 KB
/
unc_dissertation.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 a class file for dissertations and theses at the University of North Carolina at Chapel Hill
%% (specifically, for the Department of Mathematics). This version is `unc_dissertation.cls', based on `jakeuncdiss.cls', based on
%% `pikeuncdiss.cls'. Previous revisions by those listed below.
%%
%% It is based on the report class, from LaTeX v2.1 (LaTeX 2e).
%%
%% Please do not change this file without renaming it first.
%%
%%
%% Last Modified November, 2013 by Jake Fowler
%% July, 2010 by Brian Pike
%% April, 2007 by Liz Bouzarth
%% April, 2007 by Liz Sell
%% March, 2006 by Emily Gamber
%% May, 2003 by Bryan Sheldon
%
%
%---------------------------------------------REVISION HISTORY----------------------------------------------
%
% 2013/11/14: *Completely rewritten from scratch. The new version is configurable by parameters, so
% there should not be so much need to edit this class file. See the readme.txt for info.
%
% 2010/07/12: *Make bibliography, list of references, etc., lowercase
%
% 2007/04/02: *Added option for a dedication page.
% *Changed list of figures.
%
% 2006/01/18: *Changed abstract format to print only Advisor and not also Reader.
% *Add page number (ii) on copyright page and single space, if it's included.
%
% 2006/03/12: *Added option for electronic submission title page, since this requires no signature lines.
% Option is "electronicsig".
%
% 2003/5/1: *Changed page margins to reflect increased pickyness in the graduate school.
% *Guaranteed 2'' top margin before all chapters including Title page, abstract, toc, etc.
% *Changed advisor/reader wording before the abstract for Masters theses.
%
% 1999/3/1: *Changed some things for List of Tables and List of Figures; in particular, the spacing was
% changed and these lists now print either the word table or figure before the reference
% number. These changes made by Robert Keller.
%
% 1998/4/14: *Added page numbers to the copyright page (this is contrary to the sample page in the
% dissertation handbook, but is required by the graduate school).
%
% 1998/4/8: *Changed font size in bibliography to same size as rest of text.
% *Fixed spacing in list of figures and list of tables.
% *Set default font size to 12pt, with warning if using 11pt. Also disallowed using 10pt -- use
% 11pt instead.
%
% 1998/4/5: *Fixed a bug introduced when fixing the amsbook bug (ugh).
%
% 1998/4/1: *Fixed a ``bug'' in the amsbook.cls (not recognizing that a new section should be started
% when starting a new chapter).
%
% 1998/3/30: *Changed default font size to 11pt.
% *Switched chapter numbers in toc back to arabic (approved by graduate school).
% *Set spacing in toc (allows for long titles).
% *Added option (datestamp) to print date at top (for drafts only).
% *Changed spacing in footnotes to single (with a little extra between entries).
% *Set default footnote symbol to arabic numbers.
% *Changed some margins (some margins are slightly larger than required by the graduate school).
%
% 1998/3/11: *Set bibliography spacing (single within entries, double between entries).
%
% 1998/3/3: *Fixed problem with page numbers on the first page of a chapter (number should't be printed).
% [set pagestyle to empty]
%
% 1998/2/5: *Fixed theorem, definition, etc. headings to print in bold face and no indentations proof
% heading prints in italics.
%
% 1997/11/16: *Trying to fix spacing in toc -- may have done it with a minimum of fuss.
% *Fixed list of figures spacing (same trick as for toc).
% *Adjusted vertical spacing for index head.
% *Added warnings for missing advisor or readers.
%
% 1997/11/15: *Completed significant changes in the way abstract and preface is handled.
% *Fixed vertical spacing at chapter heads.
%
% 1997/11/11: *Started fixing vertical spacing problem at chapter heads.
% *Added option for signature names on one line
%
% 1997/11/10: *Fixed "\DeclareOption{doctoral}{\doctrue}.
% *Fixed problem with printing appendix number in toc.
%
%------------------------------------------------DECLARATION------------------------------------------------
\NeedsTeXFormat{LaTeX2e}% LaTeX 2.09 can't be used (nor non-LaTeX)
[1994/12/01]% LaTeX date must December 1994 or later
\ProvidesClass{unc_dissertation}[2015/11/20 v1.0]
%--------------------------------------------------OPTIONS--------------------------------------------------
%This package allows us to process options of the form `key=value' (see http://ctan.math.utah.edu/ctan/tex-archive/macros/latex/contrib/oberdiek/kvoptions.pdf).
\RequirePackage{kvoptions}
%change these so that if anyone decides to change the filename in the future, they won't have to change all the variable names.
\SetupKeyvalOptions{
family=my,
prefix=my@
}
%Note: \DeclareStringOption[default]{optionname} adds a new option optionname=<whatever>. It creates a new variable \my@optionname that contains the value of the option. It defaults to the value ``default''.
% \DeclareBoolOption[default]{optionname} adds a new option optionname=true or optionname=false. It defaults to the value ``default''. It creates a new if \ifmy@optionname that may be used to check the value of the option.
%This command nullifys an option, so it doesn't get sent to the base class (report).
\newcommand{\NullOption}[1]{\DeclareVoidOption{#1}{\OptionNotUsed}}
%%% Title page options %%%
%Doctoral or masters thesis?
\DeclareBoolOption[true]{doctoral} %Defaults to doctoral.
\DeclareComplementaryOption{masters}{doctoral} %Can specify in options either `masters' or `doctoral', or `masters=true', `doctoral=false', etc.
%Do you want to include a copyright page?
\DeclareBoolOption[true]{copyright}
%%% Formatting options %%%
%Should the titles (of the thesis, as well as sections like ``List of Figures'') be in all caps?
\DeclareBoolOption[true]{allcaps}
%Do you want the left (or inside, if using twoside option) margin to be 1in (not wide) or 1.25in (wide)?
\DeclareBoolOption[false]{wideleftmargin}
%Do you want to print one-sided or two-sided? (Only really matters if you have the one wide margin.)
\DeclareBoolOption[true]{oneside} %Defaults to one-sided.
\DeclareComplementaryOption{twoside}{oneside}
%We don't actually do anything with this, but report or geometry do.
\ifmy@oneside
\PassOptionsToClass{oneside}{report}
\else
\PassOptionsToClass{twoside}{report}
\PassOptionsToPackage{twoside}{geometry}
\fi
%Do you want to the copyright notice to appear at the top of the page or the bottom?
\DeclareBoolOption[true]{cralignbottom}
\DeclareComplementaryOption{craligntop}{cralignbottom}
%%% Margin options %%%
%The default margins are configured to the requirements of the graduate school as of Nov. 2013. Since it is likely that these requirements will randomly change in the future, you can change the margins via the following options. I assume that the margins will be uniform for the entire document, except for perhaps some extra space at the top and the bottom of certain pages. The terms used are the same as those in the geometry package (see http://www.bakoma-tex.com/doc/latex/geometry/geometry.pdf for details).
%% NOTE: if you need wider margin on the left (inside), use the option wideleftmargin together with setting bindingoffset=<whatever extra space you need on the left>.
%The uniform margin (all sides) for the entire document.
\DeclareStringOption[1in]{margin}
%The left (inner), right (outer), top, and bottom margins separately.
\DeclareStringOption[\my@margin]{left}
\DeclareStringOption[\my@margin]{right}
\DeclareStringOption[\my@margin]{top}
\DeclareStringOption[\my@margin]{bottom}
%How far should the footer (the page number) be from the bottom of the body?
\DeclareStringOption[0.5in]{foot}
%If using wide left margins, how wide should the extra space be?
\DeclareStringOption[0.25in]{bindingoffset}
%%% The following options are used to configure how much ``extra space'' there should be in various spots.
%How much extra space is needed above the titles (in general)?
\DeclareStringOption[1in]{extra}
%How much extra space is needed above the main title (on the title page)?
\DeclareStringOption[\my@extra]{titleextra}
%How much extra space is needed above chapter titles (in both front and main matter)?
\DeclareStringOption[\my@extra]{chaptertitleextra}
%How much extra space is needed above chapter titles in the frontmatter (abstract, TOC, etc.)?
\DeclareStringOption[\my@chaptertitleextra]{fronttitleextra}
%How much extra space is needed above the list of figures or tables?
\DeclareStringOption[0in]{listtitleextra}
%How much extra space is needed above chapter titles in the mainmatter (i.e. the main chapters)?
\DeclareStringOption[\my@chaptertitleextra]{maintitleextra}
%How much extra space is needed above appendix titles?
\DeclareStringOption[0in]{appendixtitleextra}
%How much extra space is needed above titles in the backmatter (bibliography, index, etc.)?
\DeclareStringOption[0in]{backtitleextra}
%How much extra space is needed on the bottom (or top) of the copyright page?
\DeclareStringOption[1in]{copyrightextra}
%We want to ignore the following options, to prevent them from getting sent to the base class.
%Paper must be letterpaper:
\NullOption{a4paper}
\NullOption{a5paper}
\NullOption{b5paper}
\NullOption{letterpaper}
\NullOption{legalpaper}
\NullOption{executivepaper}
%Force portrait mode:
\NullOption{landscape}
\NullOption{portrait}
%We will provide our own titlepage.
\NullOption{notitlepage}
\NullOption{titlepage}
%You can have chapters opening on any page (not just the right). --- Never mind, I'll allow this in case you want it in a print version.
%\NullOption{openright}
%\NullOption{openany}
%One column only.
\NullOption{onecolumn}
\NullOption{twocolumn}
%Any option that is not listed above gets sent along to report. This really only leaves the font size (10pt, 11pt, 12pt), leqno, fleqn, and openbib.
\DeclareDefaultOption{\PassOptionsToClass{\CurrentOption}{report}}
%Process the options.
\ProcessKeyvalOptions{my}\relax
%Load the report class, sending any necessary options along.
\LoadClass{report}
%-------------------------------------------------MARGINS---------------------------------------------------
% The geometry package makes dealing with margins much much easier. This sets up the basic margins.
\RequirePackage[
%showframe,%for debugging
portrait,
letterpaper,
margin=\my@margin,
left=\my@left,
right=\my@right,
top=\my@top,
bottom=\my@bottom,
foot=\my@foot
%Extra wide margin on the left, if requested.
\ifmy@wideleftmargin
,bindingoffset=\my@bindingoffset
\fi
]{geometry}
%Here we configure some utility functions to provide the extra spaces. (This is necessary to ensure that it works correctly when the extra space is 0pt. It also helps clean up some of the conditionals elsewhere).
%If it's 0pt, we don't want to have a vspace command at all. The * is necessary since it could appear at the top of a page. NOTE: The \hbox{}\kern-\topskip part should make it start at the actual top of the page (without inserting additional space). (See also http://tex.stackexchange.com/questions/7676/why-does-vspace0pt-add-vertical-space).
\newcommand{\my@titlepageextra}{%
\hbox{}\kern-\topskip
\ifx\my@titleextra{0pt}%
\else%
\vspace*{\my@titleextra}%
\fi%
}
\newcommand{\my@frontextra}{%
\hbox{}\kern-2\topskip %I don't know why I need to double it here and in the rest, but it works.
\ifx\my@fronttitleextra{0pt}%
\else%
\vspace*{\my@fronttitleextra}%
\fi%
}
\newcommand{\my@listextra}{%
\hbox{}\kern-2\topskip
\ifx\my@listtitleextra{0pt}%
\else%
\vspace*{\my@listtitleextra}%
\fi%
}
\newcommand{\my@mainextra}{%
\hbox{}\kern-2\topskip
\ifx\my@maintitleextra{0pt}%
\else%
\vspace*{\my@maintitleextra}%
\fi%
}
\newcommand{\my@appendixextra}{%
\hbox{}\kern-2\topskip
\ifx\my@appendixtitleextra{0pt}%
\else%
\vspace*{\my@appendixtitleextra}%
\fi%
}
\newcommand{\my@backextra}{%
\hbox{}\kern-2\topskip
\ifx\my@backtitleextra{0pt}%
\else%
\vspace*{\my@backtitleextra}%
\fi%
}
%For the copyright page, also consider whether its align top or bottom
\newcommand{\my@crtopextra}{%
\ifmy@cralignbottom%
%fill in all the vertical space at the top so that what follows goes as far to the bottom as possible.
\vspace*{\fill}%
\else%
%provide the extra space
\hbox{}\kern-2\topskip
\vspace*{\my@copyrightextra}%
\fi%
}
\newcommand{\my@crbottomextra}{%
\ifmy@cralignbottom%
%provide the extra space
\hbox{}\kern-2\topskip
\vspace*{\my@copyrightextra}%
\fi%
}
%---------------------------------------------OTHER PACKAGES------------------------------------------------
% This package allows double spacing
\RequirePackage{setspace}
\doublespacing
% The varwidth environment is like a minipage, but has the smallest possible width.
\RequirePackage{varwidth}
% This package makes the text prettier.
\RequirePackage[protrusion,expansion,tracking,kerning,letterspace=25]{microtype}
% This package allows for glossaries
\RequirePackage[acronym]{glossaries}
%---------------------------------------------COMMANDS PROVIDED---------------------------------------------
%% This defines commands:
%% \DeclareAuthorVariable*{var} % for a mandatory variable
%% \DeclareAuthorVariable{var} % for an optional variable
%% Which are essentially equivalent to doing:
%% \newcommand{\my@var}
%% \newcommand{\var}[1]{\renewcommand{\my@var}{#1}}
%% This code was (mostly) copied from:
%% http://tex.stackexchange.com/questions/93908/macro-for-declaring-variables-in-class-files
% Do the branching between * and normal version
\newcommand{\DeclareAuthorVariable}{%
\@ifstar{\my@DeclareAuthorVariable{\my@mandatory@var}}
{\my@DeclareAuthorVariable{\my@optional@var}}%
}
% The main command; the internal version of \foo is \my@foo
% The macro \ting@foo is initialized to give an error or an info
% message when used, so if the user doesn't provide a value for a
% mandatory variable, we'll catch the issue. (Modified to branch
% according to a variable having been given a value or not.)
\newcommand{\my@DeclareAuthorVariable}[2]{%
\long\@namedef{my@#2}{#1{#2}}%
\long\@namedef{#2}##1{\long\@namedef{my@#2}{##1}\long\@namedef{my@#2@defined}{}}%
}
% The error and info messages
\newcommand{\my@mandatory@var}[1]{%
\ClassError{unc_dissertation}
{Missing value for mandatory variable
\expandafter\string\csname#1\endcsname}
{You have to provide a value with
\expandafter\string\csname#1\endcsname{...}}%
}
\newcommand{\my@optional@var}[1]{%
\ClassInfo{unc_dissertation}
{Missing value for optional variable
\expandafter\string\csname#1\endcsname}%
}
% To allow for branching based on a variable having a value or not.
\newcommand{\@ifauthorvariable}[3]{\@ifundefined{my@#1@defined}{#3}{#2}}
% Examples:
% \DeclareAuthorVariable*{var}
% \DeclareAuthorVariable{optvar}
% To check if a variable is defined:
% \@ifauthorvariable{optvar}
% {The optional value is \my@optvar.}
% {The optional value is missing!}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%% THE FOLLOWING VARIABLES MAY BE (RE)DEFINED BY THE USER %%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% These variables are used to produce the title page. %%%
%Info for title page (optional, defaualt values are provided, depending on whether doctoral or masters).
%Type of paper (dissertation, thesis, project, etc.).
\DeclareAuthorVariable*{disstype}
%Full name of degree (Doctor of Philosophy, Masters of Science, etc.).
\DeclareAuthorVariable*{dissdegree}
%Full name of department and/or school (Department of Mathematics, Department of Physics, etc.).
\DeclareAuthorVariable*{dissdept}
\ifmy@doctoral
\disstype{dissertation}
\dissdegree{Doctor of Philosophy}
\else
\disstype{thesis}
\dissdegree{Master of Science}
\fi
\dissdept{Department of Mathematics in the College of Arts and Sciences}
%The blurb on the title page will be automatically constructed from the above information. If you need to change it, you can redefine this variable.
\DeclareAuthorVariable*{dissblurb}
\dissblurb{A \my@disstype{} submitted to the faculty at the University of North Carolina at Chapel Hill in partial fulfillment of the requirements for the degree of \my@dissdegree{} in the \my@dissdept.}
%The location. You shouldn't ever have to change this, unless UNC teleports to some other city or something.
\DeclareAuthorVariable*{dissloc}
\dissloc{Chapel Hill}
%The year the thesis is submitted (defaults to the current year).
\DeclareAuthorVariable*{dissyear}
\dissyear{\the\year}
%Heading above the names of the committee members---hopefully this should never have to be changed.
\DeclareAuthorVariable*{approvedby}
\approvedby{Approved by:}
%Name of advisor.
\DeclareAuthorVariable*{advisor}
%Names of committee members (a.k.a. ``readers'') These are set as optional in case you have special circumstances in which you do not have 4 readers.
\DeclareAuthorVariable{readerA}
\DeclareAuthorVariable{readerB}
\DeclareAuthorVariable{readerC}
\DeclareAuthorVariable{readerD}
%A shortcut command to quickly set the names of the advisor and the 4 comittee members, in order.
\newcommand{\committee}[5]{%
\advisor{#1}%
\readerA{#2}%
\readerB{#3}%
\readerC{#4}%
\readerD{#5}%
}
%%% These variables are used to make the copyright page (you shouldn't have to change these). %%%
%The copyright year (defaults to submission year).
\DeclareAuthorVariable*{cryear}
\cryear{\my@dissyear}
%The name to appear on the copyright page (defaults to the author).
\DeclareAuthorVariable*{crauthor}
\crauthor{\@author}
%The copyright blurb (defaults to ALL RIGHTS RESERVED).
\DeclareAuthorVariable*{crblurb}
\crblurb{\textls*[25]{ALL RIGHTS RESERVED}}
%%% This is used to make the abstract page. The command \abstract (like \title and \author) MUST be called by the user before calling \maketitle. %%%
%The abstract text (mandatory).
\DeclareAuthorVariable*{abstract}
%The abstract blurb (appears after the title of the abstract page, you shouldn't have to change this).
\DeclareAuthorVariable*{abstractblurb}
\abstractblurb{\@author: \@title\par (Under the direction of \my@advisor)}
% For those of us with two advisors (i.e., Rich and Roberto), comment above and uncomment below.
% Need the { } to force a space between the first advisor's last name and the word "and."
%\abstractblurb{\@author: \@title\par (Under the direction of \my@advisor{ }and \my@readerA)}
%Width of the abstract blurb, specified as a percentage of the width of the body (i.e. the text area, not including margins). At 1.0 the blurb tends to look weird if you have a really long title, so defaults to .75.
\DeclareAuthorVariable*{abstractblurbwidth}
\abstractblurbwidth{.75}
%%% This is used to make the dedication page. %%%
%The dedication text (optional).
\DeclareAuthorVariable{dedication}
%Width of the dedication, as a percentage. (Behaves the same as \abstractblurbwidth.)
\DeclareAuthorVariable*{dedicationwidth}
\dedicationwidth{.75}
%%% The titles of various automatically constructed pages. %%%
\DeclareAuthorVariable*{absname}
\absname{Abstract}
\DeclareAuthorVariable*{tocname}
\tocname{Table of Contents}
\DeclareAuthorVariable*{lofname}
\lofname{LIST OF FIGURES}
\DeclareAuthorVariable*{lotname}
\lotname{LIST OF TABLES}
\DeclareAuthorVariable*{loaname}
\loaname{LIST OF ABBREVIATIONS}
\DeclareAuthorVariable*{bblname}
\bblname{REFERENCES}
%-----------------------------------------------FRONT MATTER------------------------------------------------
%%% This is the section where all of the front matter pages get formatted and created. If you need to change how these pages are formatted, and you cant do it with the settings, this is where you edit this file. %%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% IMPORTANT NOTE: THIS IS THE SECTION YOU EDIT IF YOU NEED TO CHANGE THE FORMATTING OF THE TITLE PAGE, ETC.%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Redefine what \maketitle does (changed from report). Now it makes a title page in accordance with the UNC thesis dissertation guide. It additionally creates the copyright page, the dedication page (optional), and the abstract page.
\renewcommand\maketitle{%
\my@maketitlepage%
\ifmy@copyright%
\my@makecopyrightpage%
\fi%
\my@makeabstractpage%
\@ifauthorvariable{dedication}{\my@makededicationpage}{}%
\global\let\thanks\relax%
\global\let\maketitle\relax%
\global\let\@thanks\@empty%
\global\let\@author\@empty%
\global\let\@date\@empty%
\global\let\@title\@empty%
\global\let\title\relax%
\global\let\author\relax%
\global\let\date\relax%
\global\let\and\relax%
}
%This function actually makes the title page.
\newcommand{\my@maketitlepage}{%
%Be careful about extra returns (put % signs at the end of lines). They can throw off the spacing.
\thispagestyle{empty}%
%Single space it here.
\singlespacing%
\begin{center}%
%Add the extra space at the top.
\my@titlepageextra%
%actually display the title
\my@displaymaintitle \par%
\vspace{1in}
%display the author
\@author \par
\vspace{1in}%
%The blurb
\my@dissblurb \par
\vspace{1in}%
%location and year
\my@dissloc \par
\my@dissyear \par
\vspace{1in}%
\end{center}
%back to double spacing
\doublespacing
%List the advisor, followed by the committee members.
%This varwidth box is as wide as the longest name inside it. The names align left inside the box, but the box itself goes as far right as it can because of the \hfill above.
\hspace{4.666in}
\begin{varwidth}{\textwidth}
\my@approvedby \par
\my@advisor \par
\my@readerA \par
\my@readerB \par
\my@readerC \par
\my@readerD
\end{varwidth}
\clearpage
}
%This function makes the copyright page.
\newcommand{\my@makecopyrightpage}{
\begin{center}
%single spacing again
\singlespacing
%provide the top extra space
\my@crtopextra
%copyright year
\copyright{} \my@cryear \par
%copyright name
\my@crauthor \par
%copyright blurb
\my@crblurb \par
%provide the bottom extra space
\my@crbottomextra
\end{center}
\clearpage
}
%This function makes the abstract page.
\newcommand{\my@makeabstractpage}{
\begin{center}
%add extra space at top.
\my@frontextra
%display the title
\my@displaytitle{\my@absname}
%put the blurb in a box because it looks weird when the title is really long. Note that the apparent stupidity of the two nested center environments is due to the fact the box also needs to be centered, not just its contents within the box. The width of the box is controlled by setting \abstractblurbwidth.
\begin{minipage}{\my@abstractblurbwidth\textwidth}
\begin{center}
%single spacing for the blurb
\singlespacing
\my@abstractblurb
\end{center}
\end{minipage}
\end{center}
%double spacing for the text of the abstract
\doublespacing
%skip a line
\vspace{\baselineskip}
%display the abstract
\my@abstract
\clearpage
}
%This function makes the dedication page.
\newcommand{\my@makededicationpage}{
\begin{center}
%add extra space at top.
\my@frontextra
%put it in a box
\begin{minipage}{\my@dedicationwidth\textwidth}
\begin{center}
%single spacing
\singlespacing
%display the dedication
\my@dedication
\end{center}
\end{minipage}
\end{center}
\clearpage
}
%%% Functions for controlling the display format (not positioning) of the main title or chapter title. %%%
% Displays the main title, either in allcaps, large and bold, or in Large font, depending on the allcaps option. The \textls adds letterspacing to the allcaps titles, so they look better.
\newcommand{\my@displaymaintitle}{%
\ifmy@allcaps%
{\large \textls*[25]{\textbf{\MakeUppercase{\@title}}}}%
\else%
{ \textbf{\@title}}%
\fi%
}
% Displays the title of a \chapter*, either in allcaps and bold, or in Large font, depending on the allcaps option. The \textls adds letterspacing to the allcaps titles, so they look better.
\newcommand{\my@displaytitle}[1]{%
\ifmy@allcaps%
\textls*[25]{\textbf{\MakeUppercase{#1}}}%
\else%
{\Large #1}%
\fi%
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%% END FRONT MATTER FORMATTING AREA %%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%------------------------------------------DOCUMENT ORGANIZATION--------------------------------------------
%%% In order for the document to be formatted correctly, we set up commands that are used to organize the document into 4 sections. %%%
%Set up flags to indicate when we've reached the frontmatter, mainmatter, appendices, or backmatter. To get your formatting right, you MUST use \frontmatter, \mainmatter, \appendix (if you have them), and \backmatter (for bibliography).
\newif\ifmy@frontmatter
\my@frontmatterfalse
\newif\ifmy@mainmatter
\my@mainmatterfalse
\newif\ifmy@appendix
\my@appendixfalse
\newif\ifmy@backmatter
\my@backmatterfalse
%Define the commands \frontmatter, etc. (overriding \appendix).
\newcommand\frontmatter{%
\my@frontmattertrue%
\my@mainmatterfalse%
\my@appendixfalse%
\my@backmatterfalse%
\cleardoublepage\pagenumbering{roman}}
\newcommand\mainmatter{%
\my@frontmatterfalse%
\my@mainmattertrue%
\my@appendixfalse%
\my@backmatterfalse%
\cleardoublepage\pagenumbering{arabic}}
\renewcommand\appendix{%
\my@frontmatterfalse%
\my@mainmatterfalse%
\my@appendixtrue%
\my@backmatterfalse%
\par
\setcounter{chapter}{0}%
\setcounter{section}{0}%
\gdef\@chapapp{\appendixname}%
\gdef\thechapter{\@Alph\c@chapter}}
\newcommand\backmatter{%
\my@frontmatterfalse%
\my@mainmatterfalse%
\my@appendixfalse%
\my@backmattertrue%
\if@openright\cleardoublepage\else\clearpage\fi
\let\chaptername\relax}
%Except, list of tables and list of figures have their own rules. So add a flag for that.
\newif\ifmy@isalist
\my@isalistfalse
%And set the flag when you call \listoffigures, \listoftables or \listofabbreviations
\renewcommand\listoffigures{%
\if@twocolumn
\@restonecoltrue\onecolumn
\else
\@restonecolfalse
\fi
\my@isalisttrue
\chapter*{\listfigurename}%
\@mkboth{\MakeUppercase\listfigurename}%
{\MakeUppercase\listfigurename}%
\@starttoc{lof}%
\if@restonecol\twocolumn\fi
\my@isalistfalse
}
\renewcommand\listoftables{%
\if@twocolumn
\@restonecoltrue\onecolumn
\else
\@restonecolfalse
\fi
\my@isalisttrue
\chapter*{\listtablename}%
\@mkboth{%
\MakeUppercase\listtablename}%
{\MakeUppercase\listtablename}%
\@starttoc{lot}%
\if@restonecol\twocolumn\fi
\my@isalistfalse
}
\providecommand\listofabbreviations{%
\if@twocolumn
\@restonecoltrue\onecolumn
\else
\@restonecolfalse
\fi
\my@isalisttrue
\printglossary[type=\acronymtype,title=\listabbreviationname]
\if@restonecol\twocolumn\fi
\my@isalistfalse
}
\newcommand\my@addappropriatespace{%
\ifmy@isalist%
\my@listextra%
\else%
\ifmy@frontmatter\my@frontextra\fi%
\ifmy@mainmatter\my@mainextra\fi%
\ifmy@appendix\my@appendixextra\fi%
\ifmy@backmatter\my@backextra\fi%
\fi%
}
%--------------------------------------------CHAPTER FORMATTING---------------------------------------------
%%% The following commands override those from report to change the display of chapter headers, so that they start 2 inches below the top of the page, and are otherwise formatted appropriately. Hopefully the settings I've provided will allow for a sufficient amount of customization to satisfy the graduate school. If you, you're going to have to wade in to some pretty deep LaTeX stuff here. Additionally we add nonnumbered chapters to the table of contents. %%%
%Now we modify the display of the chapter headings to do the right things.
\def\@makechapterhead#1{%this is for \chapter
\begin{center}%
%Add the appropriate extra space at the beginning.
\my@addappropriatespace%
%Display ``CHAPTER n'' at the top of the page. (Also letterspace it since it is all caps.)
\textls*[25]{{\MakeUppercase{\@chapapp}\enspace\thechapter}}
%thought we might need to skip a line, but I like the way it looks better without doing so.
%\vspace{\baselineskip}
%Display the actual name of the title in Large font
{\large\bfseries #1}
\par
\end{center}
%\vspace*{\baselineskip}
}
\def\@makeschapterhead#1{%this is for \chapter*
\begin{center}
%Add the appropriate extra space at the beginning.
\my@addappropriatespace%
%Display the title, capitalizing if allcaps is specified.
\my@displaytitle{#1}
\par
\end{center}
%\vspace*{\baselineskip}
}
%--------------------------------------------SECTION FORMATTING---------------------------------------------
% The default section and subsection headings from report are too big. So we fix them. (See http://infohost.nmt.edu/tcc/help/pubs/nmtthesis/old/annotated/at.startsection.html).
\renewcommand\section{\@startsection {section}{1}{\z@}%
{-3.5ex \@plus -1ex \@minus -.2ex}%
{2.3ex \@plus.2ex}%
{\normalfont\large\bfseries\singlespacing}}
\renewcommand\subsection{\@startsection{subsection}{2}{\z@}%
{-3.25ex\@plus -1ex \@minus -.2ex}%
{1.5ex \@plus .2ex}%
{\normalfont\normalsize\bfseries\singlespacing}}
%Since the subsubsections are now the same size as the subsections, we make them run-in headings.
\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%
{-3.25ex\@plus -1ex \@minus -.2ex}%
{-1em}%
{\normalfont\normalsize\bfseries}}
%Of course, now subsubsections are formatted the same as paragraphs. But oh well.
%--------------------------------------------TABLE OF CONTENTS----------------------------------------------
%%% OK, so here we're going to try to get the table of contents (and the lists of tables and figures) to display the way we like. %%%
%Set the titles of the various lists to the correct values.
\renewcommand{\contentsname}{\my@tocname}
\renewcommand{\listfigurename}{\my@lofname}
\renewcommand{\listtablename}{\my@lotname}
\providecommand{\listabbreviationname}{\my@loaname}
% Anything that comes before the table of contents should not have an entry in the toc. To implement this requirement, I define a flag \my@isthereatoc, defaulting to false.
%This flag indicates whether we've reached the table of contents or not
\newif\ifmy@isthereatoc
\my@isthereatocfalse
%I override the \tableofcontents command to set the flag to true when the command \tableofcontents is called.
\renewcommand\tableofcontents{%
\if@twocolumn
\@restonecoltrue\onecolumn
\else
\@restonecolfalse
\fi
\chapter*{\contentsname
\@mkboth{%
\MakeUppercase\contentsname}{\MakeUppercase\contentsname}}%
\@starttoc{toc}%
\if@restonecol\twocolumn\fi%
\my@isthereatoctrue%
}