[dd6877]: / docs / project_writeup / byumsphd.cls

Download this file

989 lines (982 with data), 33.0 kB

  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
% BYU MS/PhD LaTeX Class File
%
% Copyright (c) 2006 Christopher K. Monson
% The latest version of this file may be obtained from
% http://latex-byu-thesis.googlecode.com/
%
% Bug reports are also welcome at that address, and will be addressed as
% quickly as possible; I know that this is your baby and that everyone is on a
% tight schedule. I was there once.
%
% License: LaTeX Project Public License (www.latex-project.org/lppl.txt)
% Executive summary:
% This software is copyright but you are granted a license which gives
% you, the "user" of the software, legal permission to copy, distribute,
% and/or modify the software. However, if you modify the software and
% then distribute it (even just locally) you must change the name of the
% software to avoid confusion.
%
% OR (dual-licensed)
%
% License: GNU Lesser General Public License (www.gnu.org/licenses/lgpl.html)
%
% Author Information:
% Christopher K. Monson
% Brigham Young University
% monpublic@gmail.com
%
% Please contact the author for change requests. If you have patches, please
% send those to the author as well so that this class has a single point of
% distribution and all may benefit.
%
% NOTE TO USERS WHO DON'T USE NATBIB:
%
% Your references section may or may not be included properly in the table of
% contents or in the pdf bookmarks. If it isn't, do the following in the
% preamble of your document and it should show up there.:
%
% \let\old@openbib@code\@openbib@code
% \renewcommand{\@openbib@code}{\addcontentsline{toc}{chapter}{\bibname}\old@openbib@code}
%
% Version: 1.4
%
% Changelog:
% Chris Tensmeyer (2019-04-01):
% * Fix Vertical Spacing on first page to match template
% Daron Barnes (2017-07-12):
% * Removed Month-Year of graduation from title page.
% Andrew McNabb (2013-06-05):
% * Bump version to 1.5
% * Change monthgraduated to monthapproved (issue 48)
% * Make the electronic option set openany (issue 48)
% Andrew McNabb (2012-03-02):
% * Bumped version to 1.4
% * Change to 11 pt and single spacing in the byuprop class.
% Andrew McNabb (2012-03-02):
% * Bumped version to 1.3
% * Make abstracts in the byuprop class match the byumsphd class.
% Andrew McNabb (2012-03-02):
% * Bumped version to 1.2.2
% * Ensure the Table of Contents name in the PDF bookmarks matches.
% * Work around a fatal error occuring with some versions of natbib.
% Chris Monson (2011-04-18):
% * Bumped version to 1.2.1
% * More clarity on shifting requirements for abstracts (issue 38).
% * Made electronic option the default in the example file, clarified
% use of geometry package.
% Chris Monson (2011-03-11):
% * Bumped version to 1.2.0
% * New university requirements, per issue 37 (no sig page, no margin
% shifting on electronic copies)
% * Backed out addition of driverfallback option in example - it is not
% available on all systems.
% Chris Monson (2011-03-03):
% * Bumped version to 1.1.9
% * Subtitle now works properly
% * Thanks to Oliver Kopp for microtype patch to the example file.
% Chris Monson (2010-10-08):
% * Bumped version to 1.1.8
% * issue 31: example needs plainpages=false in hyperref settings
% Chris Monson (2010-03-10):
% * Bumped version to 1.1.7
% * issue 27: Added bib.bib to the distribution tarball
% Chris Monson (2010-03-10):
% * Bumped version to 1.1.6
% * issue 29: Removed deprecated commands from example file
% Chris Monson (2010-01-06):
% * Bumped version to 1.1.5
% * Removed tocloft documentation until it can be better supported
% * Added twosidetoc option to the class
% Chris Monson (2009-12-17):
% * Bumped version to 1.1.4
% * Added documentation about how to add dot leaders to the TOC, fixed
% some spacing.
% Chris Monson (2009-11-24):
% * Bumped version to 1.1.3
% * Fixed hardcopy option to work properly
% Chris Monson (2009-11-23):
% * Bumped version to 1.1.2
% * issue 21: Make compliant headings the default
% * issue 22: Add convenience options for electronic/hardcopy
% Chris Monson (2009-11-20):
% * Bumped version to 1.1.1
% * issue 19: ms setting gives "no line here to end" errors
% * issue 18: change monthsubmitted to monthgraduated
% * issue 20: page numbering wrong for chapter 1 in some cases
% * issue 17: bookmarks need to be numbered - see example file
% Chris Monson (2009-11-14):
% * Bumped version to 1.1.0
% * Change Graduate Coordinator default to Kent E. Seamons
% * Addressed issue 16: template is out of sync with new university
% requirements
% * Changed the canonical location in the comments (googlecode)
% * Added options for more margin fiddling
% Chris Monson (2009-10-27):
% * Bumped version to 1.0.13
% * Addressed issue 12: chapter heading styles have changed
% * Addressed issue 13: lol, lot, and lof not linking properly
% * Made bibsection hack part of standard behavior
% Chris Monson (2009-09-25):
% * Bumped version to 1.0.12
% Lloyd Brown (Contrib) (2009-09-25):
% * Added options to enable "list of listings", named "lol".
% Chris Monson (2009-09-16):
% * Bumped version to 1.0.11
% * Updated example file to be more informative.
% Chris Monson (Anonymous Contrib) (2009-03-06):
% * Bumped version to 1.0.10
% * Added \copyrighttext settable option (replacing All Rights
% Reserved)
% Chris Monson (2008-05-21):
% * Bumped version to 1.0.9
% Lloyd Brown (Contrib) (2008-05-15):
% * Added option for setting "Department" as in "Accepted for the
% Department" to something else
% * Added option for setting "Graduate Coordinator" title to something
% else
% * This closes issue 8 in the tracker
% Chris Monson (2007-07-06):
% * Bumped version to 1.0.8
% * Fixed signature page to be compliant with new rules
% * Added duplexprinter convenience option
% * Added tocbibind to the example file to show people how to get their
% bibliography referenced in the TOC
% * This closes issues 4 and 6 in the tracker
% Chris Monson (2007-03-10):
% * Bumped version to 1.0.5
% * Addressed issue (2) on code.google.com/p/latex-byu-thesis as follows
% * Created a fake pdfbookmark command that switches on with hyperref
% * Inserted pdfbookmark commands per Dan Delorey (new requirements)
% * Later bumped version to 1.0.6
% * Added an option to put an entry for References into the TOC
% * Later bumped version to 1.0.7
% * Reverted the addition of refintoc. There is an easier way in the
% document itself, and it is too dependent on the particular
% bibliography environment used.
% Chris Monson (2007-03-09):
% * Bumped version to 1.0.4
% * Added the LGPL as an alternate license
% Chris Monson (2007-02-01):
% * Created a version number and bumped it to 1.0.3
% * Added option for setting "Department of" string to something else
% Chris Monson (2006-03-13):
% * Removed some cruft
% * Established some suitable defaults
% Chris Monson (2006-03-10):
% * First reasonable release
%
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesClass{byumsphd}[2007/03/10 BYU LaTeX MS/PhD Class]
%
% Boolean option creation
\newif\if@hardcopyoption % tells us that the hardcopy option was set
\newif\if@electronicoption % tells us that the electronic option was set
\newif\if@twosidetoc % Two-sided printing starts at TOC (earlier than body)
\newif\if@simplechapterheading % "1 Title" instead of "Chapter 1<nl>Title"
\newif\if@thesis % generates \if@thesis, \@thesistrue, and \@thesisfalse
\newif\if@chapternum % for putting page numbers on part and chapter pages
\newif\if@centerchapter % for centered chapter headings vs. left-justified
\newif\if@vcenterpart % for vertical centering of parts vs. top
\newif\if@compliantsizes % for headings no larger than 12 pt (ugly)
\newif\if@lof % Show list of figures?
\newif\if@lot % Show list of tables?
\newif\if@lol % Show list of listings?
\newif\if@needdrawing % Need the eso-pic environment? Drawing something?
\newif\if@needlistings % Need the listings package? Using List of Listings?
\newif\if@layout % This will draw lines showing all the margins
\newif\if@equalmargins % Make all margins equal
\newif\if@grid % Show a grid
\newif\if@separator % Show a separator page between the single-sided and double-sided parts of the document
\newif\if@committeemembera
\newif\if@committeememberb
\newif\if@committeememberc
\newif\if@committeememberd
\newif\if@duplexprinter % Ensure that there are an even number of pages in the front matter
% committee members are not assumed to exist
\@committeememberafalse
\@committeememberbfalse
\@committeemembercfalse
\@committeememberdfalse
\newcommand{\@@sideval}{twoside}
\newcommand{\@@openval}{openright}
\newcommand{\@@ptsize}{12pt}
% This is an empty no-op command in case pdfbookmark is not defined (hyperref
% not included)
\newcommand{\@@pdfbookmark}[3][1]{%
\ifx\pdfbookmark\undefined
\relax
\else
\pdfbookmark[#1]{#2}{#3}%
\fi
}%
%
% This document can serve as either a PhD dissertation or a Master's thesis
\DeclareOption{hardcopy}{\@hardcopyoptiontrue}
\DeclareOption{electronic}{\@electronicoptiontrue}
\DeclareOption{simplechapterheading}{\@simplechapterheadingtrue}
\DeclareOption{compliantheadings}{\@compliantsizestrue}
\DeclareOption{prettyheadings}{\@compliantsizesfalse}
\DeclareOption{chaptercenter}{\@centerchaptertrue}
\DeclareOption{chapterleft}{\@centerchapterfalse}
\DeclareOption{partmiddle}{\@vcenterparttrue}
\DeclareOption{parttop}{\@vcenterpartfalse}
\DeclareOption{ms}{\@thesistrue}
\DeclareOption{phd}{\@thesisfalse}
\DeclareOption{chapternum}{\@chapternumtrue}
\DeclareOption{nochapternum}{\@chapternumfalse}
\DeclareOption{lof}{\@loftrue}
\DeclareOption{lot}{\@lottrue}
\DeclareOption{lol}{\@needlistingstrue \@loltrue}
\DeclareOption{layout}{\@needdrawingtrue \@layouttrue}
\DeclareOption{grid}{\@needdrawingtrue \@gridtrue}
\DeclareOption{separator}{\@separatortrue}
\DeclareOption{duplexprinter}{\@duplexprintertrue}
\DeclareOption{twoside}{\renewcommand{\@@sideval}{twoside}}%
\DeclareOption{oneside}{\renewcommand{\@@sideval}{oneside}}%
\DeclareOption{equalmargins}{\@equalmarginstrue}%
\DeclareOption{openright}{\renewcommand{\@@openval}{openright}}%
\DeclareOption{openany}{\renewcommand{\@@openval}{openany}}%
\DeclareOption{twosidetoc}{\@twosidetoctrue}%
\DeclareOption{10pt}{\renewcommand{\@@ptsize}{10pt}}%
\DeclareOption{11pt}{\renewcommand{\@@ptsize}{11pt}}%
\DeclareOption{12pt}{\renewcommand{\@@ptsize}{12pt}}%
% Ignore the letterpaper option, but allow it to be passed.
\DeclareOption{letterpaper}{\typeout{Ignoring option ``letterpaper''}}%
\setlength{\unitlength}{1in}
%
% Default to compliant heading sizes
\@compliantsizestrue
% Default to not using the convenience settings for hardcopy or ETD
\@hardcopyoptionfalse
\@electronicoptionfalse
% Default to two-sided printing starting at the body (not TOC)
\@twosidetocfalse
% Default to equal margins
\@equalmarginstrue
% Default to NOT indenting first paragraph, using normal chapter headings
\@simplechapterheadingfalse
% Default to NOT showing lists of figures and tables
\@loffalse
\@lotfalse
\@lolfalse
% Default to PhD
\@thesisfalse
% Default to one-sided printing
\@duplexprinterfalse
% Don't show the layout, usually
\@needdrawingfalse
\@layoutfalse
\@gridfalse
\ExecuteOptions{%
chapternum,
chapterleft,
partmiddle,
equalmargins,
oneside,
}%
\ProcessOptions
%
% Handle convenience settings
\if@hardcopyoption
\if@electronicoption
\ClassError{byumsphd}{%
Invalid inclusion of both ``electronic'' and ``hardcopy''
in class options.}%
\fi
\@equalmarginsfalse
\renewcommand{\@@sideval}{twoside}
\fi
\if@electronicoption
\@equalmarginstrue
\fi
%
% We base our work on the report class
%
% You would think that we could just use a DeclareOption* and pass the options
% on to this class, but that doesn't work very well. If you want to do that,
% you can't use ExecuteOptions to set defaults because then the overriding
% options never get passed. It's nuts. So, this is how we do it, with
% appropriate default specifications.
\LoadClass[\@@ptsize,letterpaper,\@@sideval,\@@openval]{report}
%
% Rather than fiddle with spacing, we set it up using the setspace package
% Note that even though most of the document is double spaced, we start with
% single spacing because of the following reasons:
% * setspace likes to *enlarge* the spacing, not shrink it
% * the minimum style requirements dictate vertical spacing as a number of
% ``blank lines'', and the size of those lines is single-spaced.
\RequirePackage[singlespacing]{setspace}
%
% The geometry package is great and we use it rather than fiddling with the
% margins directly. We do have to employ some margin-fiddling trickery after
% the preamble, however, because the geometry package does not provide a way to
% set the margins in the middle of a document.
\RequirePackage{geometry}
%
% If we are showing a list of listings, then we need to include the listings package
\if@needlistings
\RequirePackage{listings}%
\fi
%
% If we are showing layout grids, then we include the appropriate package and
% draw stuff on every page.
\if@needdrawing
\RequirePackage[grid=false]{eso-pic}%
\newcommand{\@vertline}{\line(0,1){11}}
\newcommand{\@horzline}{\line(1,0){8.5}}
\newcommand{\@maingrid}{%
\multiput(1,0)(1,0){8}{\thicklines\@vertline}%
\multiput(0,1)(0,1){10}{\thicklines\@horzline}%
}%
\newcommand{\@smallgrid}{%
\multiput(0.5,0)(1,0){8}{\thinlines\@vertline}%
\multiput(0,0.5)(0,1){11}{\thinlines\@horzline}%
}%
\newcommand{\@layoutpreamble}{\setlength{\unitlength}{1in}}
\newcommand{\@rightsidebox}{
\put (1.5,1){\dashbox{0.03125}(6,9)}%
}%
\newcommand{\@leftsidebox}{
\put (1,1){\dashbox{0.03125}(6,9)}%
}%
\newcommand{\@prefaceinnerbox}{
\put (1.5,1){\dashbox{0.03125}(6,8)}%
}%
\AddToShipoutPicture{%
\@layoutpreamble
\if@layout
\@rightsidebox
\@leftsidebox
\@prefaceinnerbox
\fi
\if@grid
\@smallgrid
\@maingrid
\fi
}%
\fi
% Name of the degree
\newcommand*{\@degreename}{%
\if@thesis%
Master of Science%
\else%
Doctor of Philosophy%
\fi%
}%
%
% Name of document
\newcommand*{\@documenttype}{%
\if@thesis%
project%
\else%
dissertation%
\fi%
}%
%
% Page style for initial chapter and part pages
\newcommand*{\@chapterpagestyle}{%
\if@chapternum%
\thispagestyle{plain}%
\else%
\thispagestyle{empty}%
\fi%
}%
%
% Tells the chapter headings how to justify themselves (center or left)
\newenvironment{@headjustify}{%
\begingroup
\if@centerchapter
\centering
\fi
}{%
\endgroup
}%
%
% Sets the top spacing for a Part
\newcommand{\@parttopspace}{%
\if@vcenterpart
\vspace*{\fill}\par
\else
\begin{singlespace}%
\vspace*{\@prefacemargingapsingle}\par
\end{singlespace}%
\fi
}%
%
% Sets the bottom spacing for a Part
\newcommand{\@partbottomspace}{%
\if@vcenterpart
\vspace*{\fill}\par
\else
\begin{singlespace}%
\vspace*{3\@blankline}\par
\end{singlespace}%
\fi
}%
%
% Use this instead of \Large in case compliant sizes are needed
\newcommand{\@sizeLarge}{%
\if@compliantsizes
\normalsize
\else
\Large
\fi
}%
%
% Use this instead of \large in case compliant sizes are needed
\newcommand{\@sizelarge}{%
\if@compliantsizes
\normalsize
\else
\large
\fi
}%
%
% Use this instead of \Huge in case compliant sizes are needed
\newcommand{\@sizeHuge}{%
\if@compliantsizes
\normalsize
\else
\Huge
\fi
}%
%
% Use this instead of \huge in case compliant sizes are needed
\newcommand{\@sizehuge}{%
\if@compliantsizes
\normalsize
\else
\huge
\fi
}%
%
\newcommand{\@clearemptydoublepage}{%
\clearpage
{\pagestyle{empty}\cleardoublepage}%
}%
%
\newcommand{\clearpage@forchapter}{%
\if@openright
\cleardoublepage
\else
\clearpage
\fi
}%
%
% These are internal variables used throughout the class. They represent
% default values for their corresponding @-less versions.
\newcommand{\@university}{Brigham Young University}
\newcommand{\@universityabbrev}{BYU}
\newcommand{\@department}{Computer Science}
\newcommand{\@departmentprefix}{Department of}
\newcommand{\@departmentprefixshort}{Department}
\newcommand{\@graduatecoordinator}{Kent~E.~Seamons}
\newcommand{\@graduatecoordinatortitle}{Graduate~Coordinator}
\newcommand{\@college}{College of Physical and Mathematical Sciences}
\newcommand{\@collegedean}{Thomas~W.~Sederberg}
\newcommand{\@collegedeantitle}{Associate Dean}
\newcommand{\@committeechair}{}
\newcommand{\@committeemembera}{}
\newcommand{\@committeememberb}{}
\newcommand{\@committeememberc}{}
\newcommand{\@committeememberd}{}
\newcommand{\@monthgraduated}{}
\newcommand{\@yeargraduated}{}
\newcommand{\@yearcopyrighted}{\@yeargraduated}
\newcommand{\@copyrighttext}{All Rights Reserved}
%
\newcommand{\@documentabstract}{}
\newcommand{\@documentkeywords}{}
\newcommand{\@acknowledgments}{}
\newcommand{\@bindingoffset}{0.5in}
%
% This tells us whether to generate document keywords
\newif\if@hasdocumentkeywords
\@hasdocumentkeywordsfalse
%
% This tells us whether to generate the acknowledgments
\newif\if@hasacknowledgments
\@hasacknowledgmentsfalse
%
% Set up default geometry specifications
\geometry{top=1.0in,
bottom=1.0in,
textwidth=6.5in,
hcentering}
\if@equalmargins
\geometry{bindingoffset=0in}
\else
\geometry{bindingoffset=\@bindingoffset}
\fi
%
% Here are some things that can be set from inside the document. Most of them
% have suitable defaults.
\newcommand{\university}[1]{\renewcommand{\@university}{#1}}
\newcommand{\universityabbrev}[1]{\renewcommand{\@universityabbrev}{#1}}
\newcommand{\department}[1]{\renewcommand{\@department}{#1}}
\newcommand{\departmentprefix}[1]{\renewcommand{\@departmentprefix}{#1}}
\newcommand{\departmentprefixshort}[1]{\renewcommand{\@departmentprefixshort}{#1}}
\newcommand{\graduatecoordinator}[1]{\renewcommand{\@graduatecoordinator}{#1}}
\newcommand{\graduatecoordinatortitle}[1]{\renewcommand{\@graduatecoordinatortitle}{#1}}
\newcommand{\college}[1]{\renewcommand{\@college}{#1}}
\newcommand{\collegedean}[1]{\renewcommand{\@collegedean}{#1}}
\newcommand{\collegedeantitle}[1]{\renewcommand{\@collegedeantitle}{#1}}
\newcommand{\committeechair}[1]{\renewcommand{\@committeechair}{#1}}
\newcommand{\committeemembera}[1]{\@committeememberatrue\renewcommand{\@committeemembera}{#1}}
\newcommand{\committeememberb}[1]{\@committeememberbtrue\renewcommand{\@committeememberb}{#1}}
\newcommand{\committeememberc}[1]{\@committeememberctrue\renewcommand{\@committeememberc}{#1}}
\newcommand{\committeememberd}[1]{\@committeememberdtrue\renewcommand{\@committeememberd}{#1}}
\newcommand{\monthsubmitted}[1]{\ClassWarning{byumsphd}{monthsubmitted is deprecated - use monthgraduated instead}\monthgraduated{#1}}% TODO: delete this
\newcommand{\yearsubmitted}[1]{\ClassWarning{byumsphd}{yearsubmitted is deprecated - use yeargraduated instead}\yeargraduated{#1}}% TODO: delete this
\newcommand{\monthgraduated}[1]{\renewcommand{\@monthgraduated}{#1}}
\newcommand{\yeargraduated}[1]{\renewcommand{\@yeargraduated}{#1}}
\newcommand{\yearcopyrighted}[1]{\renewcommand{\@yearcopyrighted}{#1}}
\newcommand{\copyrighttext}[1]{\renewcommand{\@copyrighttext}{#1}}
%
\newcommand{\documentabstract}[1]{\renewcommand{\@documentabstract}{#1}}
\newcommand{\documentkeywords}[1]{%
\@hasdocumentkeywordstrue
\renewcommand{\@documentkeywords}{#1}%
}
\newcommand{\acknowledgments}[1]{%
\@hasacknowledgmentstrue
\renewcommand{\@acknowledgments}{#1}%
}
\newcommand{\setbindingoffset}[1]{%
\renewcommand{\@bindingoffset}{#1}%
\if@equalmargins\else
\geometry{bindingoffset=#1}%
\fi
}
\newcommand{\settextwidth}[1]{\geometry{textwidth=#1}}
%
% Internal lengths with no external settings
\newlength{\@assumedcharwidth}
\newlength{\@defaultindent}
\newlength{\@blankline}
\newlength{\@prefacemargingapsingle}
\newlength{\@prefacemargingapdouble}
\setlength{\@assumedcharwidth}{6pt}
\setlength{\@defaultindent}{6\@assumedcharwidth}
\setlength{\@blankline}{\baselineskip}
%
% This is the margin gap between the top of the paper and single-spaced text. It defines a margin that is a total of 2 inches from the top
\setlength{\@prefacemargingapsingle}{1in}
\setlength{\@prefacemargingapdouble}{\@prefacemargingapsingle}
\addtolength{\@prefacemargingapdouble}{-\baselineskip}
%
% This is defined for a gap that goes from the top of the page down to text
% that is double-spaced. Because double-spacing text moves the text down
% within a double-space height box, it makes the margins look wrong (even
% though they are technically right). Subtracting a single-space height fixes
% the problem in these cases.
%\end{doublespace}
%
% Title page
\renewcommand{\titlepage}{%
\clearpage
\@@pdfbookmark[1]{Title Page}{title}%
{\parindent 0pt%
{\centering
\parbox[t]{5in}{\centering
\begin{doublespace}%
\@title
\end{doublespace}%
\par}%
\vfill
\@author
\vfill
A {\@documenttype} submitted to the faculty of\\%
\@university\\%
in partial fulfillment of the requirements for the degree of\\%
\begin{doublespace}
\@degreename
\end{doublespace}
\vfill
\@committeechair, Chair\\%
\if@committeemembera
\@committeemembera\\%
\fi
\if@committeememberb
\@committeememberb\\%
\fi
\if@committeememberc
\@committeememberc\\%
\fi
\if@committeememberd
\@committeememberd\\%
\fi
\vfill
%\vfill
\begin{doublespace}%
{\@departmentprefix} {\@department} \\%
\@university\\%
\end{doublespace}%
\vspace*{\fill}%
\begin{doublespace}
Copyright {\copyright} {\@yearcopyrighted} {\@author}\\%
{\@copyrighttext}%
\end{doublespace}
%\vspace*{\fill}%
\par}% end centering
}% end parindent
\newpage
}%
%
\newcommand{\abstractpage}{%
\clearpage
\@@pdfbookmark[1]{Abstract}{abstract}%
{\centering
\parindent 0pt%
ABSTRACT%
\vspace{1.2\@blankline}\par
\parbox[t]{5in}{\centering
\@title
\par}% end parbox
\vspace{1.2\@blankline}\par
{\@author}\\%
{\@departmentprefix} {\@department}, {\@universityabbrev}\\%
\@degreename
\par}% end centering
{\setlength{\parskip}{\@blankline}\par
% parskip is applied at the beginning of paragraphs, so we add a bit of
% length here to make it the same as above.
\vspace{0.2\@blankline}\par
\@documentabstract
\par}
\if@hasdocumentkeywords
\vfill\par\noindent
Keywords: \@documentkeywords
\par
\par
\else
\ClassError{byumsphd}{%
Specification of document keywords is required.
}%
\fi
\newpage
}%
%
% Create a counter for the listings that need to be referenced from the table
% of contents. This is needed to get hyperref to link to unnumbered sections
% properly (like listoftables, etc.) without using an existing counter and
% messing up the numbering of other kinds of sections.
\newcounter{toclistings}
%
\newcommand{\acknowledgmentspage}{%
\clearpage
\begin{doublespace}%
{\centering
\parindent 0pt%
ACKNOWLEDGMENTS%
\vspace{2\@blankline}\par
\par}% end centering
\@acknowledgments
\end{doublespace}%
\newpage
}%
%
\renewcommand{\tableofcontents}{%
\if@twosidetoc
\clearpage@forchapter
\else
\clearpage
\fi
\@@pdfbookmark[1]{\contentsname}{toc}%
\@tocheader{\contentsname}%
\thispagestyle{plain}%
\@starttoc{toc}%
\newpage
}%
%
\renewcommand{\listoffigures}{%
\if@twosidetoc
\clearpage@forchapter
\else
\clearpage
\fi
\refstepcounter{toclistings}
\addcontentsline{toc}{chapter}{\listfigurename}
\@tocheader{\listfigurename}%
\@starttoc{lof}%
\newpage
}%
%
\renewcommand{\listoftables}{%
\if@twosidetoc
\clearpage@forchapter
\else
\clearpage
\fi
\refstepcounter{toclistings}
\addcontentsline{toc}{chapter}{\listtablename}
\@tocheader{\listtablename}%
\@starttoc{lot}%
\newpage
}%
%
\if@lol
\renewcommand{\lstlistlistingname}{List of Listings}
\renewcommand{\lstlistoflistings}{%
\if@twosidetoc
\clearpage@forchapter
\else
\clearpage
\fi
\refstepcounter{toclistings}
\addcontentsline{toc}{chapter}{\lstlistlistingname}
\@tocheader{\lstlistlistingname}%
\@starttoc{lol}%
\newpage
}%
\fi
%
\newcommand{\@separatorpage}{%
\if@twoside
\if@separator
\clearpage
\thispagestyle{empty}%
\addtocounter{page}{-1}% Don't count this page
{\centering
\vspace*{\fill}
DISCARD THIS PAGE --- IT IS ONLY A MARKER\\
\vspace{3\@blankline}%
All preceding pages must be single-sided.\\
All subsequent pages must be double-sided.
\vspace*{\fill}
\par}% end centering
\newpage
\fi
\fi
}%
%
% Lifted from report.cls and edited to be smaller
% NOTE that the minimum standards document indicates that ALL fonts should be
% 10, 11, or 12 point *including titles and headings*. This requirement is
% incredibly ugly, but if you want to comply with it, change everything to
% normalsize in this document.
\renewcommand{\section}{\@startsection {section}{1}{\z@}%
{-3.5ex \@plus -1ex \@minus -.2ex}%
{2.3ex \@plus.2ex}%
{\normalfont\@sizelarge\bfseries}}%
\renewcommand\subsection{\@startsection{subsection}{2}{\z@}%
{-3.25ex\@plus -1ex \@minus -.2ex}%
{1.5ex \@plus .2ex}%
{\normalfont\normalsize\bfseries}}%
\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%
{-3.25ex\@plus -1ex \@minus -.2ex}%
{1.5ex \@plus .2ex}%
{\normalfont\normalsize\bfseries}}%
%
\renewcommand{\chapter}{%
\clearpage@forchapter
\thispagestyle{plain}%
\@afterindenttrue
\global\@topnum\z@
\secdef\@chapter\@schapter
}%
%
\newcommand{\@tocheader}[1]{%
\begin{@headjustify}%
\@chapterpagestyle
\parindent 0pt%
\begin{singlespace}%
\vspace*{\@prefacemargingapdouble}%
\ifnum \c@secnumdepth > \m@ne
\@sizeLarge \bf {#1}%
\par
\vspace{\@blankline}%
\fi
\vspace{\@blankline}%
\end{singlespace}%
\nobreak
\end{@headjustify}%
}%
%
%
\renewcommand{\@makechapterhead}[1]{%
\begin{@headjustify}%
\@chapterpagestyle
\parindent 0pt%
\begin{singlespace}%
\vspace*{\@prefacemargingapdouble}%
\ifnum \c@secnumdepth > \m@ne
\@sizeLarge \bf
\if@simplechapterheading
\expandafter{%
\thechapter
\hspace{0.25in}%
\MakeUppercase{#1}%
}%
\else
\expandafter{\@chapapp{} \thechapter}%
\fi
\par
\vspace{\@blankline}%
\fi
\end{singlespace}%
\if@simplechapterheading\else
\@sizelarge \bf {#1} \par
\fi
\begin{singlespace}%
\vspace{\@blankline}%
\end{singlespace}%
\nobreak
\end{@headjustify}%
}%
%
\renewcommand{\@makeschapterhead}[1]{%
\begin{@headjustify}
\@chapterpagestyle
\parindent 0pt%
\begin{singlespace}%
\vspace*{\@prefacemargingapdouble}%
\@sizelarge \bf {#1} \par
\vspace{\@blankline}%
\end{singlespace}%
\nobreak
\end{@headjustify}%
}%
%
\renewcommand{\part}{%
\clearpage@forchapter
\@chapterpagestyle
\@parttopspace
\secdef\@part\@spart
}%
%
\def\@part[#1]#2{%
\ifnum \c@secnumdepth >-2\relax
\refstepcounter{part}%
\addcontentsline{toc}{part}{\thepart\hspace{1em}#1}%
\else
\addcontentsline{toc}{part}{#1}%
\fi
\markboth{}{}% empty headings
{\centering
\interlinepenalty \@M
\normalfont
\ifnum \c@secnumdepth >-2\relax
\@sizehuge\bfseries \partname\nobreakspace\thepart
\par
\vskip 20\p@
\fi
\@sizeHuge \bfseries #2%
\par}% end centering
\@partbottomspace
}%
%
\def\@spart#1{%
\addcontentsline{toc}{part}{#1}%
\@chapterpagestyle
{\centering
\interlinepenalty \@M
\normalfont
\@sizeHuge \bfseries #1%
\par}% end centering
\@partbottomspace
}%
%
\let\old@bibliography\bibliography
\renewcommand{\bibliography}[1]{%
\onehalfspace\par
\old@bibliography{#1}%
}%
%
\renewcommand{\maketitle}{%
\begin{singlespace}%
\pagenumbering{roman}%
{%
\pagestyle{empty}%
% The front matter is one-sided, so the margins don't alternate
\if@equalmargins\else
\addtolength{\evensidemargin}{\@bindingoffset}%
\fi
\titlepage
\abstractpage
\if@hasacknowledgments
\acknowledgmentspage
\fi
}%
{%
\if@twosidetoc
% If we are beginning two-sided at the TOC, then the separator page
% belongs here (if anywhere).
\@separatorpage
\else
% Otherwise, we need to make our margins one-sided again in this
% block.
\if@equalmargins\else
\addtolength{\evensidemargin}{\@bindingoffset}%
\fi
\fi
\pagestyle{plain}%
\begin{doublespace}%
\tableofcontents
\if@lof
\listoffigures
\fi
\if@lot
\listoftables
\fi
\if@lol
\lstlistoflistings
\fi
\if@twosidetoc\else
% If we start two-sided printing after the various tables (body
% only), then we print the separator here.
\@separatorpage
\fi
\end{doublespace}%
}%
\end{singlespace}%
\if@duplexprinter
\@clearemptydoublepage
\fi
% Body starts here
\clearpage@forchapter
\pagenumbering{arabic}%
}%
%
% Different font in captions
\newcommand{\captionfonts}{\small}
%
% Fix the abstract environment for individual chapters
\renewenvironment{abstract}%
{%
\begin{singlespace}%
{\vspace*{\fill}\centering\bf\@sizelarge Abstract\bigskip\par}%
\end{singlespace}%
\begingroup\noindent
}%
{%
\endgroup\vspace*{\fill}%
}%
%
%
% Set up default document settings
\AtBeginDocument{%
\pagestyle{plain}%
\pagenumbering{arabic}%
\parindent \@defaultindent
% Fix the bibliography stuff (if using natbib).
\@ifpackageloaded{natbib}{% natbib loaded
\renewcommand{\bibname}{\refname}
\let\oldbibsection\bibsection
\renewcommand{\bibsection}{%
\oldbibsection
\refstepcounter{toclistings}%
\addcontentsline{toc}{chapter}{\refname}
}%
}{% natbib not loaded
\ClassWarning{byumsphd}{Not using natbib - TOC might not show references. Search class file comments for "NATBIB" for how to resolve this by hand (or just use natbib - it's an excellent package)}
\renewcommand{\bibname}{References}
}%
% Set up double spacing---this is safe because the overall document is
% single-spaced and we'll set up single spacing as the default in maketitle
% where spacing matters.
\doublespace
}%
%
\newcommand{\@subtitle}{}
% vim: ft=tex sw=4 sts=4