forked from GarenSidonius/ASU-Dissertation-Template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dissertation_template_latex.tex
executable file
·1105 lines (998 loc) · 52.5 KB
/
dissertation_template_latex.tex
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
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% ASU Dissertation Template
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Copyright 2015 Robert W. Kutter (robert@kutterconsulting.com)
%
% See also: http://kutterconsulting.com
%
% For guidance on using this file, see the README.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Preamble
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand*{\pointsize}{12pt} %<Set the font size; make sure the size is correct
% for the font you will use
\documentclass[letterpaper, % Use US letter-size paper
oneside, % No verso and recto differences
\pointsize] % Uses the font size defined above
{memoir}
\renewcommand{\cleardoublepage}% % \cleardoublepage will create entirely blank
{\clearpage}% % pages depending on settings (e.g., usually
% before start of \mainmatter); redefine it here
% so that no entirely blank pages are created
% automatically
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% (Some) Packages
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{graphicx} % For importing image files
\usepackage{etoolbox} % For advanced commands throughout preamble
\usepackage{microtype} %~Improves kerning and protrusion (optional);
% See here for an introduction:
% http://www.khirevich.com/latex/microtype/
\providetoggle{usemicrotype} % TRUE = microtype is being used
\makeatletter % (Used to turn of microtype protrusion in the
\@ifpackageloaded{microtype}% % table of contents.)
{\settoggle{usemicrotype}{true}}%
{\settoggle{usemicrotype}{false}}
\makeatother
\usepackage{changepage} % For changing page layout (e.g., margins) in the
% middle of the document
\usepackage{calc} % Calculate text widths; used in page layout
% changes
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Title page, input
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\listadd{\titlelines}%
{First Line of the Title} %<Enter the title of the dissertation
\listadd{\titlelines}%
{Second Line of the Title} % If you want to
% split the title across lines,
% use another \listadd command for the
% second line
\newcommand*\Author{Your Name} %<Enter your name; must match official transcript
\newcommand*{\documentname}%
{Dissertation} %<Enter the type of document (capitalized)
\newcommand*{\degreename}
{Doctor of Philosophy} %<Enter the type of degree (capitalized)
\newcommand*\defdate{Month Year} %<Give month (written out fully) and year of
% the oral defense
\listadd{\committeechair}{Chair Name} %<Enter committee chair name; use \listadd for
%\listadd{\committeechair}{Another name}% for additional names
\newcommand*{\chairlabel}{Chair} %<If you have co-chairs, replace this text with
% 'Co-Chair'
\listadd{\committeemember}{Member Name} %<Enter committee member names; use \listadd for
\listadd{\committeemember}{Member Name} % additional names
\newcommand*{\gradmonth}{Month} %<Enter the graduation date; month can only be:
% May, August, or December
\newcommand*{\gradyear}{Year} %<Enter the graduation year, e.g. 2014
\listadd{\keywords}{keyword 1} %<Enter keywords; use \listadd for
\listadd{\keywords}{keyword 2} % additional names (up to 6)
\newcommand*{\graddate}{\gradmonth% % Compose full graduation date
\space\gradyear}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Page layout
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\settrimmedsize{\stockheight}% % Specifies \paperheight and \paperwidth
{\stockwidth}{*}
\settrims{0pt}{0pt} % Set location of page in relation to the stock.
% Paper and stock size are equivalent,
% so both \trimtop and \trimedge are set to 0pt
\newlength{\forfootskip}
\setlength{\forfootskip}%
{3\baselineskip}
\newlength{\textblockheight} % Calculate height of text block to leave room
\setlength{\textblockheight}{9.0in} % for footers, keeping page numbers outside
\addtolength{\textblockheight}% % the 1in vertical margins
{-\forfootskip}
\settypeblocksize{\textblockheight}% % Calculated by 1.0in vertical margins and
{*}{*} % letting margins set the width of the typeblock
\setulmargins{1.0in}{*}{*} % Set upper margin (\uppermargin, not \topmargin);
% calculate the bottom margin
\setlrmarginsandblock{1.25in}{1.25in}{*}%~Set margins and calculate width of typeblock
\setheaderspaces{*}{0.5\baselineskip}{*}% Arguments: '\headdrop', '\headsep', and/or ratio
% Note: This is only used in the list of
% contents sections
\setheadfoot{\baselineskip}% % Set '\headheight' and '\footskip'
{\forfootskip}
\checkandfixthelayout % Required by memoir package after setting layout
\settypeoutlayoutunit{in} % Write layout dimensions to log file in inches
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Fonts
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage[T1]{fontenc} % Standard option to handle, e.g., accented
% characters like 'ö' better
\usepackage{amssymb,mathtools} % For AMS-LaTeX, see here for more:
% http://www.ams.org/publications/authors/tex/amslatex
% ('mathtools' loads and extends 'amsmath')
\usepackage{ifxetex,ifluatex} % Can check if XeTeX or LuaTeX was used to typeset
\usepackage{fixltx2e} % Provides \textsubscript
\IfFileExists{upquote.sty}% % Use upquote if available, for
{\usepackage{upquote}}{} % straight quotes in verbatim environments
% Load fonts depending on the
% typesetting engine
\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % If pdftex
\usepackage[utf8]{inputenc} % 'utf8' should match the encoding of this file
%
%~Set up your font in pdftex here
%
\else % If xetex or luatex
\ifxetex % If xetex
\usepackage{mathspec} % Matches non-math open-type font to math
% open-type font (use 'mathspec' if you want to
% write math in unicode)
\usepackage{xunicode} % Convert LaTeX character macros to unicode
\else % If luatex\usepackage{fontspec}
\usepackage{fontspec} % Use fontspec for (open type) font selection
\fi
\defaultfontfeatures{Mapping=tex-text,% Font spec setting
Scale=MatchLowercase}
\newcommand*{\euro}{€}
\setmainfont{Garamond} %<Set the main font; make sure the font is correct
% for the font size (See ASU Style Guide)
% \setmathfont(Digits,Latin,Greek)% %~Uncomment two lines to set a font for math%
% {MATHFONT}
\fi
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Line spacing
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\DoubleSpacing % True double spacing
\BeforeBeginEnvironment{quote} % Memoir leaves most special material
{\SingleSpacing} % single spaced, but makes block quotes
\AfterEndEnvironment{quote}% % double-spaced; fix to follow ASU style guide
{\vspace{-\baselineskip} %
\DoubleSpacing}
\BeforeBeginEnvironment{quotation}%
{\SingleSpacing}
\AfterEndEnvironment{quotation}%
{\vspace{-\baselineskip} %
\DoubleSpacing}
\setlength{\footnotesep}{\baselineskip}% Double space *between* footnotes
\renewcommand*{\footnoterule}{% % Redefine footnoterule so that initial footnote
\kern-3pt% % still appears right under the rule (changing
\hrule width 0.4\columnwidth % \footnotesep also changes the space between the
\kern 2.6pt % rule and the first footnote
\vspace{-0.5\baselineskip} % (Here is the vertical space adjustment)
}
\usepackage{enumitem} % Control spacing in enumerate environment
\setlist{noitemsep} % Remove extra vertical spacing between items in lists
% \setlist{nosep} to leave no space around whole list
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Page numbering
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\makepagestyle{ASU}
\makeevenfoot{ASU}{}{\thepage}{}
\makeoddfoot{ASU}{}{\thepage}{}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Title page, formatting
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newlength{\savedfootskip}
\setlength{\savedfootskip}{\footskip}
\newcommand{\titlepagesetup}{% % Page layout for title page
\changepage% % Adjustment to page dimensions:
{\savedfootskip}% % text height
{}% % text width
{}% % even-side margin
{}% % odd-side margin
{}% % column sep.
{}% % topmargin
{}% % headheight
{}% % headsep
{-\savedfootskip}% % footskip
}
\newcommand{\closetitlepagesetup}{% % Undo set up for title page
\changepage{-\savedfootskip}{}{}{}{}%
{}{}{}{\savedfootskip}%
}
\makeatletter % Do not modify this section; Enter info above
\newcommand*{\titlepageASU}{
\titlepagesetup
\clearpage
\begin{center}
\SingleSpacing
\thispagestyle{empty}
\renewcommand*{\do}[1]{##1 \\[\baselineskip]}
\dolistloop{\titlelines}
by \\[\baselineskip]
\Author \\[4\baselineskip]
A \documentname~Presented in Partial Fulfillment \\
of the Requirements for the Degree \\
\degreename \\
\vfill % Vertically center the portion below
Approved \defdate~by the \\
Graduate Supervisory Committee: \\[\baselineskip]
\renewcommand*{\do}[1]{##1, \chairlabel \\}
\dolistloop{\committeechair}
\renewcommand*{\do}[1]{##1 \\}
\dolistloop{\committeemember}
\vfill % Vertically center the portion above
ARIZONA STATE UNIVERSITY \\[\baselineskip]
\graddate
\end{center}
\clearpage
\closetitlepagesetup
}
\makeatother
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Heading styles
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Note: memoir also has \book and \part commands; do not use these
\makechapterstyle{ASU}{% % Define chapter heading style
\renewcommand*{\chapterheadstart}{} % Chapter title flush with top margin
\renewcommand*{\chapnamefont}% % Set font for 'Chapter' or 'Appendix'
{\normalfont}
\renewcommand*{\chapnumfont}% % Set font for number in chapter headings
{\normalfont}
\renewcommand*{\afterchapternum}% % Insert a double line break after
{\\[\baselineskip]} % chapter number
\renewcommand*{\chaptitlefont}% % Set font for chapter title name
{\normalfont}
\setlength{\afterchapskip}{0pt} % Set vertical space between chapter title and
% first paragraph; equivalent to one line break
% (vertical space = \afterchapskip + \baselineskip)
% Note: This \afterchapskip value is only used in
% front matter
\renewcommand*{\printchapternum}{% % Center justify chapter number
\centering \chapnumfont %
\thechapter}
\renewcommand*{\printchaptertitle}[1]%% Center justify
{\expandafter\centering % % \MakeUppercase has issues; see here for some
\expandafter\chaptitlefont % % details: https://tex.stackexchange.com/questions/35680/uppercase-in-newcommand
\expandafter\MakeUppercase % % Accented characters and some fonts may not
\expandafter{##1}} % uppercase correctly; if that happens, just
% type the chapter title in uppercase
}
\setsecnumdepth{all} %~Enter the levels that you want to have numbered
% (Default is to number all [5 levels deep].)
\newcommand{\divisionbeforeskip}% % Create default formatting for headings
{\baselineskip}
\newcommand{\divisionindent}%
{0.5em}
\newcommand{\divisionfont}{\normalfont} % Font must be \normalfont
\newcommand{\divisionafterskip}%
{\baselineskip}
\setbeforesecskip{\divisionbeforeskip} % Apply default formatting to all heading levels
\setsecindent{\divisionindent} % Note: If you change \setsecnumdepth above, you
\setsecheadstyle{\divisionfont} % will need to set the indent for all lower
\setaftersecskip{\divisionafterskip} % levels to '0pt'; otherwise, they will be
% preceded by unnecessary space
\setbeforesubsecskip{\divisionbeforeskip}
\setsubsecindent{\divisionindent}
\setsubsecheadstyle{\divisionfont}
\setaftersubsecskip{\divisionafterskip}
\setbeforesubsubsecskip{\divisionbeforeskip}
\setsubsubsecindent{\divisionindent}
\setsubsubsecheadstyle{\divisionfont}
\setaftersubsubsecskip{\divisionafterskip}
\setbeforeparaskip{\divisionbeforeskip}
\setparaindent{\divisionindent}
\setparaheadstyle{\divisionfont}
\setafterparaskip{\divisionafterskip}
\setbeforesubparaskip{\divisionbeforeskip}
\setsubparaindent{\divisionindent}
\setsubparaheadstyle{\divisionfont}
\setaftersubparaskip{\divisionafterskip}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Paragraph formatting
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\sloppybottom % Reduce the chances of widows
\raggedbottom % Loosens vertical spacing requirements, so
% \sloppybottom doesn't make pages look bad;
% it also prevents large gaps in the middle of
% pages and pushes them to the bottom of pages
\indentafterchapter % Overrides the default which is not to indent
% the first paragraph in a chapter, but it
% looks odd in some places to not indent
% paragraphs
%%% List Titles %%%
\renewcommand{\contentsname}% % Set heading for each list
{Table of Contents}% % Formatted as chapter headings by default, so
\renewcommand{\listtablename}% % no additional heading formatting is needed
{List of Tables}
\renewcommand{\listfigurename}%
{List of Figures}
%%% Depth %%%
\settocdepth{subparagraph} % Include 5 levels deep (all levels) in TOC
%%% Fonts %%%
\makeatletter%
\patchcmd{\l@part}% % Patch the command that writes part-level entries
{\cftpartfont {#1}}% % to the table of contents, so they are in
{\normalfont \texorpdfstring{% % 'normalfont' and uppercase
\uppercase{#1}}{{#1}} }%
{\typeout{Success: Patch %
'l@part' to uppercase %
part-level headings in the %
table of contents.}}%
{\typeout{Fail: Patch %
'l@part' to uppercase %
part-level headings in the %
table of contents.}}%
\makeatother%
\makeatletter%
\patchcmd{\l@chapapp}% % Patch the command that writes chapter-level
{\cftchapterfont {#1}}% % entries to the table of contents, so they are
{\normalfont \texorpdfstring{% % in 'normalfont' and uppercase
\uppercase{#1}}{{#1}} }%
{\typeout{Success: Patch %
'l@chapapp' to uppercase %
part-level headings in the %
table of contents.}}%
{\typeout{Fail: Patch %
'l@chapapp' to uppercase %
part-level headings in the %
table of contents.}}%
\makeatother%
% If not using 'hyperref', use the following commands to adjust 'part' and 'chapter'
% level headings in the TOC
%\renewcommand*{\cftpartfont}% % Uppercase 'part' and 'chapter' headings
% {\normalfont\MakeTextUppercase} % Note: Sending \MakeTextUppercase to the TOC
%\renewcommand*{\cftchapterfont}% % conflicts with hyperref and breaks it!
% {\normalfont\MakeTextUppercase}%
\usepackage{titlecaps} % Set up headline style for captions in the
% lists of tables and figures
% Note: ASU style guide does not provide
% comprehensive guidelines for headlines, so
% Chicago style for headline style is used
% Note: Last word in title is not explicitly
% capitalized; in general, these settings are
% broadly correct, but captions should be
% reviewed to ensure they are being capitalized
% properly
\Resetlcwords
\Addlcwords{a an the} % Leave articles lowercase
\Addlcwords{and but for or nor} % Leave conjunctions lowercase
\Addlcwords{aboard about above across % % Leave all prepositions lowercase
after against along amid among anti % % (This is a [non-exhaustive] list of common
around as at before behind below % % one-word prepositions)
beneath beside besides between %
beyond but by concerning considering %
despite down during except excepting %
excluding following for from in %
inside into like minus near of off %
on onto opposite outside over past %
per plus regarding round save since %
than through to toward towards under %
underneath unlike until up upon %
versus vs via with within without}
\Addlcwords{ according\space{to} % % Leave two-word conjunctions lowercase
ahead\space{of} apart\space{from} % % (This is a [non-exhaustive] list of common
as\space{for} as\space{of} % % two-word prepositions.)
as\space{per} as\space{regards} %
aside\space{from} astern\space{of} %
back\space{to} because\space{of} %
close\space{to} due\space{to} %
except\space{for} far\space{from} %
in\space{to} inside\space{of} %
instead\space{of} left\space{of} %
near\space{to} next\space{to} %
on\space{to} opposite\space{of} %
opposite\space{to} out\space{from} %
out\space{of} outside\space{of} %
owing\space{to} prior\space{to} %
pursuant\space{to} rather\space{than} %
regardless\space{of} right\space{of} %
subsequent\space{to} such\space{as} %
thanks\space{to} that\space{of} %
up\space{to}}
\renewcommand{\cfttableaftersnumb}% % Put table captions in List of Tables in title
{\titlecap}% % case
\renewcommand{\cftfigureaftersnumb}% % Put table captions in List of Figures in title
{\titlecap}% % case
\newcommand{\macrocapwrap}[1]{% % Use this macro to place other macros inside
{\bgroup\bgroup{{#1}}\egroup\egroup}% % captions, e.g., '\macrocapwrap{\ref{figure1}}'
}% % Note: Necessary due to the 'titlecaps' package
% which modifies contents of captions
\renewcommand*{\cftpartpagefont}% % Use normal font for all page numbers
{\normalfont}
\renewcommand*{\cftchapterpagefont}%
{\normalfont}
\renewcommand*{\cftsectionpagefont}%
{\normalfont}
\renewcommand*{\cftsubsectionpagefont}%
{\normalfont}
\renewcommand*{\cftsubsubsectionpagefont}%
{\normalfont}
\renewcommand*{\cftsubsubsectionpagefont}%
{\normalfont}
\renewcommand*{\cftparagraphpagefont}%
{\normalfont}
\renewcommand*{\cftsubparagraphpagefont}%
{\normalfont}
\renewcommand*{\cftfigurepagefont}%
{\normalfont}
\renewcommand*{\cfttablepagefont}%
{\normalfont}
\cftpagenumbersoff{part} % Turn off page numbers for 'part's, which are
% actually serving as headings within the TOC
%%% Vertical Space %%%
\setlength{\cftbeforepartskip}{0pt} % Remove all additional vertical spacing so TOC
\setlength{\cftbeforechapterskip}{0pt} % is double spaced uniformly
\setlength{\cftbeforesectionskip}{0pt}
\setlength{\cftbeforesubsectionskip}{0pt}
\setlength{\cftbeforesubsubsectionskip}{0pt}
\setlength{\cftbeforeparagraphskip}{0pt}
\setlength{\cftbeforesubparagraphskip}{0pt}
\setlength{\cftbeforefigureskip}{0pt}
\setlength{\cftbeforetableskip}{0pt}
\renewcommand{\insertchapterspace}{% % By default, extra vertical space (10pt) is
\addtocontents{lof}% % inserted between tables and figures from
{\protect\addvspace{0pt}}% % different chapters; remove this extra space.
\addtocontents{lot}%
{\protect\addvspace{0pt}}%
}
%%% Horizontal Space %%%
\newlength{\levelindentincrement} % Set indent to increase by the same amount for
\setlength{\levelindentincrement}{2em} % each level in the TOC; don't adjust figure
\newlength{\levelindent} % or table indents
\setlength{\levelindent}%
{\levelindentincrement}
\setlength{\cftchapterindent}%
{\levelindent}
\addtolength{\levelindent}%
{\levelindentincrement}
\setlength{\cftsectionindent}%
{\levelindent}
\addtolength{\levelindent}%
{\levelindentincrement}
\setlength{\cftsubsectionindent}%
{\levelindent}
\addtolength{\levelindent}%
{\levelindentincrement}
\setlength{\cftsubsubsectionindent}%
{\levelindent}
\addtolength{\levelindent}%
{\levelindentincrement}
\setlength{\cftparagraphindent}%
{\levelindent}
\addtolength{\levelindent}%
{\levelindentincrement}
\setlength{\cftsubparagraphindent}%
{\levelindent}
\addtolength{\levelindent}%
{\levelindentincrement}
\setlength{\cftchapternumwidth}% % Decrease space between number and heading for
{0.85\cftchapternumwidth} % all heading levels
\setlength{\cftsectionnumwidth}%
{0.85\cftsectionnumwidth}
\setlength{\cftsubsectionnumwidth}%
{0.85\cftsubsectionnumwidth}
\setlength{\cftsubsubsectionnumwidth}%
{0.85\cftsubsubsectionnumwidth}
\setlength{\cftparagraphnumwidth}%
{0.85\cftparagraphnumwidth}
\setlength{\cftsubparagraphnumwidth}%
{0.85\cftsubparagraphnumwidth}
\setlength{\cftfigurenumwidth}% % Figure has the same 'level' as 'chapter' in the
{\cftchapternumwidth} % figure list, so make the number spacing the
% same as for chapters
\setlength{\cfttablenumwidth}% % Table has the same 'level' as 'chapter' in the
{\cftchapternumwidth} % table list, so make the number spacing the
% same as for chapters
%%% Leaders/dots %%%
\renewcommand*{\cftdotsep}{1.7} % Set distance between dots for all heading levels
\renewcommand*{\cftchapterleader}% % Turn on dots for 'chapter' level
{\normalfont\cftdotfill{\cftdotsep}}
\makeatletter % Bring leader dots over to page number (no gap)
\renewcommand{\@pnumwidth}{1.55em} %~Manually adjust
\renewcommand{\@tocrmarg}{2.55em}
\makeatother
%%% Printing List Titles and Headers in Content Lists
% Table of Contents (TOC)
\copypagestyle{ASUtoc}{ASU}% % Page style for regular page in TOC
\makeevenhead{ASUtoc}%
{\leftmark}{}{Page}
\makeoddhead{ASUtoc}%
{\leftmark}{}{Page}
\copypagestyle{ASUtocFirst}{ASU}% % Custom page headers for first page of TOC
\makeevenhead{ASUtocFirst}% % (print out the title)
{}%
{\printchaptertitle{\contentsname}}%
{}
\makeoddhead{ASUtocFirst}%
{}%
{\printchaptertitle{\contentsname}}%
{}
\renewcommand{\tocheadstart}{}% % Usually content list titles are printed like
% chapter headings; empty that formatting
\renewcommand{\printtoctitle}[1]{}% % Don't print TOC title using default method;
% it will be output in the header
\renewcommand{\aftertoctitle}{% % On the first page of the TOC, print out the
\thispagestyle{ASUtocFirst}% % TOC title using a custom page style and print
\hfill Page\par% % the heading for the page below in the regular
}% % textbox
% Note: Need '\par' before lists; see here: https://tex.stackexchange.com/questions/49882/yet-another-perhaps-a-missing-item-error
% List of Tables (LOT)
\copypagestyle{ASUlot}{ASU}% % Page style for regular page in list of tables
\makeevenhead{ASUlot}{Table}{}{Page}
\makeoddhead{ASUlot}{Table}{}{Page}
\copypagestyle{ASUlotFirst}{ASU}% % Custom page headers for first page of list of
\makeevenhead{ASUlotFirst}% % tables (print out the title)
{}%
{\printchaptertitle{\listtablename}}%
{}
\makeoddhead{ASUlotFirst}%
{}%
{\printchaptertitle{\listtablename}}%
{}
\renewcommand{\lotheadstart}{}% % Usually content list titles are printed like
% chapter headings; empty that formatting;
\renewcommand{\printlottitle}[1]{}% % Don't print LOT title using default method;
% it will be output in the header
\renewcommand{\afterlottitle}{% % On the first page of the list of tables, print
\thispagestyle{ASUlotFirst}% % out the title using a custom page style and
Table\hfill Page\par}% % print heading below in regular textbox
% List of Figures (LOF)
\copypagestyle{ASUlof}{ASU}
\makeevenhead{ASUlof}{Figure}{}{Page}
\makeoddhead{ASUlof}{Figure}{}{Page}
\copypagestyle{ASUlofFirst}{ASU}% % Custom page headers for first page of list of
\makeevenhead{ASUlofFirst}% % figures (print out the title)
{}%
{\printchaptertitle{\listfigurename}}%
{}
\makeoddhead{ASUlofFirst}%
{}%
{\printchaptertitle{\listfigurename}}%
{}
\renewcommand{\lofheadstart}{}% % Usually content list titles are printed like
% chapter headings; empty that formatting
\renewcommand{\printloftitle}[1]{}% % Don't print LOF title using default method;
% it will be output in the header
\renewcommand{\afterloftitle}{% % On the first page of the list of figures, print
\thispagestyle{ASUlofFirst}% % out the title using a custom page style and
Figure\hfill Page\par} % print heading below in regular textbox
%%% Page layout (dimensions) for Contents Lists
\newlength{\verticalpush} % Set up to change page dimensions for the table
% of contents
% Push everything down so all the content is still
% 1in from the top of the page, including the
% header, so the header is available for titles
% on the first page of contents lists and then
% the headings on subsequent pages
\setlength{\verticalpush}% % Calculate difference between \headdrop and the
{1.0in - \headdrop} % total upper margin (1in), so you can push
% the top of the header down into the textbox
\newcommand{\contentslistsetup}{% % Set up for contents lists
\changepage% % Adjustment to page dimensions:
{-\baselineskip}% % text height
{}% % text width
{}% % even-side margin
{}% % odd-side margin
{}% % column sep.
{\verticalpush}% % topmargin
{}% % headheight
{}% % headsep
{-\verticalpush+\baselineskip}% % footskip
}
\newcommand{\closecontentslistsetup}{% % Undo set up for contents lists
\changepage{\baselineskip}{}{}{}{}%
{-\verticalpush}{}{}{\verticalpush-\baselineskip}%
}
% Content lists can also be output directly. If the following command were used, all the
% headings would have to be output manually (i.e., can't rely on any memoir macros for
% formatting or setting in contents lists headings and lists). It would be best to
% create a custom macro, such as '\customtoc', to output headings and content lists
% following the style guide.
%
% \makeatletter
% \@starttoc{toc}
% \makeatother
% These pages partly explain why it's difficult to use 'afterpage' to change page layout
% settings (essentially, it's because everything inside \afterpage has a local scope).
% If it were possible to use 'afterpage' in that way, the content lists would be
% easier to format. A new page layout could be called after the first page of each
% content list. Instead, use page marks to get the layout required by the style guide.
% https://tex.stackexchange.com/questions/97126/attempts-to-manually-change-linewidth-ignored-by-latex
% https://tex.stackexchange.com/questions/85729/page-styles-only-work-for-thispagestyle-under-afterpage
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Footnotes and Endnotes
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{chngcntr} % Modify counters (e.g., for figures, footnotes)
\counterwithout*{footnote}{chapter} % Make footnote numbering continuous throughout
\providetoggle{useendnotes}
\settoggle{useendnotes}{true} %<Set to 'true' if you want to use endnotes
\iftoggle{useendnotes}{% % Use the command \pagenote to create endnotes
% in the running text. They will be collected
% and printed in a 'Notes' section at the end
% of the document
\makepagenote % Required in preamble if using endnotes
\continuousnotenums % Numbering does *not* reset after each chapter
\renewcommand*{\pagenotesubhead}[3]{} % No subheads inside note list (default is to
% divide them by chapter)
\renewcommand*{\notenuminnotes}[1]% % Remove extra space between note number and note
{\normalfont #1.} % text
\renewcommand{\postnoteinnotes}% % Double space *between* notes
{\par\vspace{\baselineskip}}
}{} % Do nothing here if not using endnotes
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Bibliography
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\bibfilename}{sample_library}%<Enter the name of the *.bib file containing the
% reference information for sources cited in
% the text. God help you if you're doing
% citations manually.
\newcommand{\bibheading}{References} %<Enter the heading for the references section:
% 'References', 'Works Cited', or 'Bibliography'
\providetoggle{usebiblatex} % True = a biblatex package is being used;
% False = 'natbib' is being used
\settoggle{usebiblatex}{true} %~Set to 'false' to use 'natbib' intead of
% biblatex; I strongly recommend using biblatex
% because natbib is rather old and will break
% for innocuous things like underscores in URLs
\iftoggle{usebiblatex}{% % Settings for citation package
% % Settings for 'biblatex' or a version of
% % 'biblatex'
\usepackage[authordate,%
backend=biber,% % Recommend to use 'biber' instead of 'bibtex'
doi=only,% % Avoid printing URLs
isbn=false]% % Don't print ISBN numbers
{biblatex-chicago} %~Other possibilities include: 'biblatex',
% 'biblatex-apa', and 'biblatex-mla'
\bibliography{\bibfilename}
\setlength{\bibitemsep}% % Set vertical distance between
{0.5\baselineskip}% % bibliography entries
\setcounter{biburlnumpenalty}{9000} % Break URLs in bibliography across lines
\setcounter{biburlucpenalty}{9000}
\setcounter{biburllcpenalty}{9000}
\usepackage[style=american,% % Settings for quotation marks; load after
english=american]{csquotes}% % 'inputenc'; only use with biblatex; throws
\MakeOuterQuote{"}% % error when used with natbib
}{% % Settings for 'natbib'
\usepackage{natbib}%
\newcommand{\natbibstyle}{asudis}% %~Enter the name of the *.bst file to use to
% format citations with natbib. Default is
% 'asudis'. I do not know where 'asudis' came
% from, but apparently it formats citations
% correctly because it was included with the
% previous LaTeX template.
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Tables and figures
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\captiondelim{. } %~Use period (.) after caption number instead of
% colon (:). Change according to style guide.
\captionstyle[\raggedright]% % Set justifcation for [one line captions]
{\raggedright} % and {multiple line captions}
\setlength{\belowcaptionskip}{0pt} % Bring caption down closer to figure/table
\makeatletter % Consecutive numbering throughout
\counterwithout{figure}{chapter} % (including back matter)
\counterwithout{table}{chapter}
\renewcommand\@memfront@floats{}
\renewcommand\@memmain@floats{}
\renewcommand\@memback@floats{}
\makeatletter
%%% Tables %%%
%
% Note: 'memoir' natively supports commands from the following table-related packages:
% tabularx, ccaption, booktabs.
% Everyone has particular ideas about how tables should look, so you may need to
% load additional packages and modify the code below to get tables (and figures) to
% look the way you want them to.
\setfloatadjustment{table}{\raggedright}% Left justify material inside table floats
\usepackage{tabu} % 'tabu' is an excellent table package; it can
% automatically size column widths and has a
% lot of customizations that other packages do
% not. It also has a 'longtabu' environment that
% emulates 'longtable' with additional features
% from the 'tabu' package. If you don't want
% to use it, you can comment this line out.
\BeforeBeginEnvironment{table}% % Single space inside table environment
{\SingleSpacing}
\AfterEndEnvironment{table}
{\DoubleSpacing}
%%% Figures %%%
\setfloatadjustment{figure}% % Left justify material inside figure floats
{\raggedright}
\BeforeBeginEnvironment{figure}% % Single space inside figure environment
{\SingleSpacing}
\AfterEndEnvironment{figure}
{\DoubleSpacing}
\makeatletter % Define custom macro called '\maxwidth{}' that
\def\maxwidth#1{% % allows you to specify the maximum width of an
\ifdim% % imported image. See below for an example.
\Gin@nat@width>#1 #1% %
\else% % Source: http://tex.stackexchange.com/questions/86350/includegraphics-maximum-width
\Gin@nat@width%
\fi}
\makeatother
%
% Example \maxwidth:
%
% \includegraphics[width=\maxwidth]{\textwidth}]{image.pdf}
%
% Note: This will keep an image inside the horizontal margins assuming the image starts
% on the right margin (i.e., no horizontal space before the image).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Hyperref settings
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% URL Settings %%%
\PassOptionsToPackage{hyphens}{url}
\usepackage[breaklinks=true]{hyperref} % 'hyperref' should be loaded at the end of the
% preamble; Note: the uppercasing commands used
% throughout the preamble can conflict with it,
% especially when non-standard fonts or
% different file encodings are used
\urlstyle{same} % Set URLs in the same font as regular text
\tolerance 1414 % Help URLs from entering margins
\hbadness 1414 % Source: https://tex.stackexchange.com/questions/3033/forcing-linebreaks-in-url
\emergencystretch 1.5em
\hfuzz 0.3pt
\widowpenalty=10000
\vfuzz \hfuzz
%%% Create metadata strings
\usepackage{hyperxmp} % For metadata
\renewcommand*{\do}[1]{#1\ }% % Build title string to output to pdf document
\newcommand*{\onelinetitle}{%
\dolistloop{\titlelines}%
}
\edef\theonelinetitle%
{\onelinetitle}
\renewcommand*{\do}[1]{{#1}\ }% % Build keyword string to output to pdf document
\newcommand*{\pdfkeywordsstring}{%
\dolistloop{\keywords}%
}
\edef\thepdfkeywordsstring%
{\pdfkeywordsstring}
\newcommand*{\pdfcopyrightstring}% % Build copyright message string
{Copyright \copyright\space\gradyear\ by \Author.%
{\space}All rights reserved.}
\ifpdf % Build pdf creator string (for pdfTeX)
\makeatletter
\def\extractpdftexversion#1-#2-#3 #4%
\@nil{#3}
\edef\pdfcreator{pdfTeX \expandafter%
\extractpdftexversion\pdftexbanner\@nil}
\makeatother
\fi
\ifxetex % Build pdf creator string (for XeTeX)
\edef\pdfcreator{XeTeX %
\the\XeTeXversion\XeTeXrevision}
\fi
\edef\pdfsummary{% % Build pdf summary
A \documentname Presented in\space
Partial Fulfillment of the\space
Requirements for a \degreename\space
from Arizona State University}
%%% Enter metadata and other settings
\hypersetup{ % Set pdf metadata
pdftitle={\theonelinetitle}, % Title
pdfauthor={\Author}, % Author
pdfcreator={\pdfcreator}, % Enter the TeX writer for good documentation
%pdfproducer={}, % Let 'pdfproducer' be filled automatically
pdfsubject={\pdfsummary}, % Subject of the document
pdfkeywords=\thepdfkeywordsstring, % List of keywords
hidelinks={true}, % Links look like regular text (no colors, boxes)
breaklinks={true}, % Allow links to break across lines
}
\ifxetex % If processing with XeTeX
\hypersetup{unicode=true} % Must use 'true' in XeTeX
\else
\hypersetup{unicode=true} % Default is to use 'true' otherwise, as well
\fi
\ifpdf % Copyright message; probably only works in pdfTeX
\hypersetup{
pdfcopyright={\pdfcopyrightstring},
pdfinfo={%
Copyright=\pdfcopyrightstring%
}%
}
\fi
\usepackage%
[numbered,% % Include numbers of sections in bookmarks
open% % Bookmark tree already expanded when PDF opened
]%
{bookmark}
\bookmark[page=1,rellevel=0,% % Create bookmark of title page at root level
keeplevel=true]{Title Page}
\preto{\tableofcontents}{% % Create bookmark for TOC
\hypertarget{tocpage}{}%
\bookmark[dest=tocpage,rellevel=0,%
keeplevel=true]{\contentsname}%
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Copyright page
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\copyrightpageASU}{% % Create copyright page
\thispagestyle{empty}
\titlepagesetup
~\\ \vfill
\begin{center}
\copyright\gradyear\space%
\Author\\%
All Rights Reserved%
\end{center}%
\clearpage%
\closetitlepagesetup
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Sample settings
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\providetoggle{sample} % True = demonstration of template
\settoggle{sample}{false}
\iftoggle{sample}{%
\newcounter{tablecounter}
\setcounter{tablecounter}{1}
\newcounter{figurecounter}
\setcounter{figurecounter}{1}
}{%
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Debugging Help
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{lipsum} % Outputs dummy text
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Document
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Title page
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\titlepageASU
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Copyright page
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\copyrightpageASU %~If you don't want to have a copyright page,
% comment out this line
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Front matter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\chapterstyle{ASU}
\pagestyle{ASU}
\frontmatter
\chapter*{Abstract} % Abstract is required
\input{sample_abstract} %<Enter the name of the .tex file containing your
% your abstract or omit this line and type in
% your abstract here.
\chapter*{Dedication} %~Dedication is optional
%\clearpage %~If you don't wish to display the heading
% 'Dedication', comment out the previous line
% and use this one instead.
\input{sample_dedication} %<Enter the name of the .tex file containing your
% your dedication or omit this line and type in
% your dedication here.
\chapter*{Acknowledgments} %~Acknowledgments are optional
\input{sample_acknowledgments} %<Enter the name of the .tex file containing your
% acknowledgments or omit this line and type in
% your acknowledgments here.
\iftoggle{usemicrotype} % If 'microtype' is in use, turn off protrusion
{\microtypesetup{protrusion=false}}% % for TOC
{}
\clearpage % Output table of contents on a new page
\contentslistsetup % Change page layout for contents lists
\pagestyle{ASUtoc}
\tableofcontents* % Starred version leaves TOC heading out of TOC
\addtocontents{toc}% % List of ... needs to be on left margin, but
{\setlength{\cftchapterindent}% % they inherit 'chapter' formatting, so override
{0em}%
}
\clearpage
\pagestyle{ASUlot}
\listoftables % List of Tables should appear in TOC, so use
% unstarred version of \listoftables
\clearpage
\pagestyle{ASUlof}
\listoffigures % List of Figures should appear in TOC, so use
% unstarred version of \listoffigures
\phantomsection % \phantomsection is needed before using
% \addtocontents when it contains certain macros
% when also using 'hyperref' package
\addtocontents{toc}% % Undo manual override above for chapter indent,
{\setlength{\cftchapterindent}% % so actual chapters in the TOC are indented
{\levelindentincrement}% % correctly
}
\setlength{\afterchapskip}% % Set vertical space between chapter title and
{\baselineskip} % first paragraph; equivalent to two line breaks
\phantomsection
\addcontentsline{toc}{part}{Chapter} % Add "Chapter" to TOC here at 'part' level
\phantomsection
\addtocontents{toc}% % Add this 'mark' to TOC so subsequent pages use
{\protect\markboth{CHAPTER}{Page}} % the "CHAPTER" heading
\iftoggle{usemicrotype} % If 'microtype' is in use, turn protrusion back
{\microtypesetup{protrusion=true}}% % on
{}
\clearpage % Note: All these changes have to be above a
% a '\clearpage' before '\mainmatter'
\pagestyle{ASU} % Switch back to regular page style for remainder
% of the document
\closecontentslistsetup % Undo page layout for contents lists
%\chapter{Definitions} %~OTHER LISTS (optional)
%\input{definitions} %<Enter the name of the .tex file or omit this
% line and type in here.
%\chapter{Preface} %~PREFACE (optional, less than 10 pages)
%\input{preface} %<Enter the name of the .tex file or omit this
% line and type in here.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%