-
Notifications
You must be signed in to change notification settings - Fork 0
/
ncsuthesis.cls
750 lines (672 loc) · 28.3 KB
/
ncsuthesis.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
%%
%% This is file `ncsuthesis.cls',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% ncsuthesis.dtx (with options: `class')
%% --------------------------------------------------------------------
%% ncsuthesis --- A thesis class conforming to NC State ETD guidelines.
%% E-mail: [email protected]
%% Released under the LaTeX Project Public License v1.3c or later
%% See http://www.latex-project.org/lppl.txt
%% --------------------------------------------------------------------
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{ncsuthesis}[2012/01/26 v0.4 NC State ETD conformant thesis class]
%% -------------------------------------------------------------------------- %%
%% ------------------------------ Thesis type ------------------------------- %%
%% -------------------------------------------------------------------------- %%
\newcommand{\ncsu@thesistype}{phd}
\DeclareOption{phd}{\renewcommand{\ncsu@thesistype}{phd}}
\DeclareOption{ms}{\renewcommand{\ncsu@thesistype}{ms}}
%% Spacing options
\newcommand{\ncsu@defaultspacing}{\onehalfspacing}
\DeclareOption{singlespacing}{
\renewcommand{\ncsu@defaultspacing}{\singlespacing}}
\DeclareOption{onehalfspacing}{
\renewcommand{\ncsu@defaultspacing}{\onehalfspacing}}
\DeclareOption{doublespacing}{
\renewcommand{\ncsu@defaultspacing}{\doublespacing}}
\newenvironment{lscape}{\begin{lscapenum}}{\end{lscapenum}}
\DeclareOption{hardcopy}{
\renewenvironment{lscape}{\begin{lscapenotnum}}{\end{lscapenotnum}}
}
\DeclareOption{draft}{\PassOptionsToClass{\CurrentOption}{book}}
\DeclareOption{10pt}{\PassOptionsToClass{\CurrentOption}{book}}
\DeclareOption{11pt}{\PassOptionsToClass{\CurrentOption}{book}}
\DeclareOption{12pt}{\PassOptionsToClass{\CurrentOption}{book}}
\DeclareOption*{\PackageWarning{ncsuthesis}{Unknown option `\CurrentOption'. Ignoring}}
\ExecuteOptions{phd,onehalfspacing} % the default option is <phd, onehalfspacing>
\ProcessOptions
\LoadClass[openany,oneside,titlepage,letterpaper]{book}
\RequirePackage{setspace}
\RequirePackage{hyphenat}
\RequirePackage{nolbreaks}
\RequirePackage{ifthen}
\RequirePackage{sectsty}
\RequirePackage{tocloft}
\RequirePackage{graphicx}
\RequirePackage[nottoc]{tocbibind} % includes lof, lot, refs in toc
\RequirePackage{calc}
\RequirePackage{newfloat} % for Scheme
%%----------------------------------------------------------------------------%%
%%---------------------------- Formatting Options ----------------------------%%
%% -------------------------------------------------------------------------- %%
%% Capital letter height
\newlength{\ncsu@capitalheight}
\settoheight{\ncsu@capitalheight}{D}
%% Line height
\newlength{\ncsu@lineheight}
\setlength{\ncsu@lineheight}{2.0ex}
%% Leading height: The leading changes thoughout the document, so this
%% length must be updated
\newlength{\ncsu@leading}
%% We must add two double spaces plus one capital-height (for the page number)
%% to footskip. Footskip is measured from the top of the bottom margin.
%% (See geometry package documentation, note that includefoot option is used.)
\ncsu@defaultspacing
\newlength{\ncsu@footskip}
\setlength{\ncsu@footskip}{0.5\ncsu@capitalheight}
\addtolength{\ncsu@footskip}{0.5in}
%\addtolength{\ncsu@footskip}{0.5ex} % A little extra space to ensure there
% are 2 full double spaced lines
\RequirePackage[%includefoot, this line fixes the issue of the pagenumbers being too high
margin=1in, % sets all 4 margins to 1 in
lmargin=1.0in, % then sets left margin to 1.25
footskip=\ncsu@footskip]{geometry}
%% -------------------------------------------------------------------------- %%
%% Disposition format -- any titles, headings, section titles
\newcommand{\ncsu@dispositionformat}{}
\allsectionsfont{\ncsu@dispositionformat}
\providecommand{\dispositionformat}[1]{
\renewcommand{\ncsu@dispositionformat}{#1}
\allsectionsfont{\ncsu@dispositionformat}
}
%% Heading/Chapter/Section format
\newcommand{\ncsu@headingformat}{\ncsu@dispositionformat}
\providecommand{\headingformat}[1]{
\renewcommand{\ncsu@headingformat}{\ncsu@dispositionformat #1}
}
%% \chapter*-to-first line space
%% This applies to preliminary headings, and ToC, LoF, LoT
\newlength{\ncsu@afterschapsep}
\setlength{\ncsu@afterschapsep}{3\ncsu@lineheight}
%% -------------------------------------------------------------------------- %%
%% Headers/footers - page number
\pagestyle{plain}
%% -------------------------------------------------------------------------- %%
%% Vertical space around tables and figures, triple spacing
\setlength{\textfloatsep}{3\ncsu@lineheight}
\setlength{\intextsep}{3\ncsu@lineheight}
%%----------------------------------------------------------------------------%%
%%--------------------------- Content Options -------------------------------%%
%% -------------------------------------------------------------------------- %%
%% Author name
\newcommand{\ncsu@authorfirstmiddle}{First Middle}
\newcommand{\ncsu@authorlast}{Last}
%% Command to test for period after middle name
\newboolean{@ncsu@needsperiod}
\newcommand{\ncsu@testlastchar}[2]{%
\ifthenelse{\equal{#2}{\relax}}{
\ifthenelse{\equal{#1}{.}}{%
\setboolean{@ncsu@needsperiod}{false}
}{% #1 != .
\setboolean{@ncsu@needsperiod}{true}
}
\let\next=\relax
}
{% #2 != relax
\let\next=\ncsu@testlastchar
}
\next#2
}
\providecommand{\student}[2]{
\renewcommand{\ncsu@authorfirstmiddle}{#1}
\renewcommand{\ncsu@authorlast}{#2}
\ncsu@testlastchar#1\relax
\author{\ncsu@authorfirstmiddle{} \ncsu@authorlast}
}
%% Degree year - in case the degree year doesn't match the current year.
\newcommand{\ncsu@year}{\the\year}
\providecommand{\degreeyear}[1]{
\renewcommand{\ncsu@year}{#1}
}
%% -------------------------------------------------------------------------- %%
%% Thesis Title
\newcommand{\ncsu@thesistitle}{My Thesis Title}
\providecommand{\thesistitle}[1]{\renewcommand{\ncsu@thesistitle}{#1}}
%% -------------------------------------------------------------------------- %%
%% --------------------- Chapter Commands ---------------------------------- %%
%% -------------------------------------------------------------------------- %%
%% -------------------------------------------------------------------------- %%
%% Redefine the \chapter* driver \@makeschapterhead. This is used for the
%% preliminary headings.
%% The spacing between the title baseline and the top of capital letters on
%% the first line is specified by \ncsu@afterschapsep. However, this vertical
%% height built by two separate lengths:
%% 1. the space between the baseline of the title and the top of the
%% first line (including leading above the line).
%% (\ncsu@afterschapbeforeleadingsep)
%% 2. From the top of the first line leading to the top of
%% capital letters on the first line. (\ncsu@leading)
\newlength{\ncsu@afterschapbeforeleadingsep}
\AtBeginDocument{% at begin doc is necessary since fncychap
% redefines \@makeschapterhead
\renewcommand{\@makeschapterhead}[1]{%
% Measure the leading here (which depends on the current line spacing),
% and adjust the spacing accordingly between the baseline of the
% heading and the top of capital letters on the first line.
\setlength{\ncsu@leading}{\baselineskip-\ncsu@capitalheight}%
\setlength{\ncsu@afterschapbeforeleadingsep}%
{\ncsu@afterschapsep-\ncsu@leading}%
{\noindent\centering%
{\ncsu@headingformat #1}%
\par\nobreak%
\vspace{\ncsu@afterschapbeforeleadingsep}}%
}
}
%% -------------------------------------------------------------------------- %%
%% Abstract page commands
%% - hyphnat package \nohyphens prevents title from being hyphenated.
%% - \nolbreaks removes any line breaks in title (but you must use \linebreak
%% instead of \\
\newcommand{\abstractname}{\textbf{ABSTRACT}}
\newenvironment{abstract}{%
\singlespacing
\titlepage
\chapter*{\abstractname}
\MakeUppercase{\ncsu@authorlast{}, \ncsu@authorfirstmiddle{}}%
\ifthenelse{\boolean{@ncsu@needsperiod}}{\@. }{~}%
\nohyphens{\nolbreaks{\ncsu@thesistitle}.
(Under the direction of
\ifthenelse{\equal{\ncsu@chairtype}{chair}}%
{\ncsu@chair}{\ncsu@cochairI\ and \ncsu@cochairII}.)}\\
\ncsu@defaultspacing
\thispagestyle{empty}
\pagestyle{empty}
}%
{\endtitlepage \pagestyle{plain}}
%% -------------------------------------------------------------------------- %%
%% Abstract page commands
\newcommand{\makecopyrightpage}{
\begin{titlepage}
\centering
%\quad
%\vspace{0.35\textheight}
\hspace{0pt}
\vspace*{\fill}
\copyright{} Copyright \ncsu@year{} by \@author \\[1em]
All Rights Reserved
\vspace{\baselineskip}
\vspace*{\fill}
\end{titlepage}
}
%% -------------------------------------------------------------------------- %%
%% Title page commands
\newcommand{\ncsu@committeesize}{4}
\providecommand{\committeesize}[1]{\renewcommand{\ncsu@committeesize}{#1}}
%% To allow for Chair vs Co-chairs:
\newcommand{\ncsu@chairtype}{}
%% For each committee member, we have their name and title.
%% By default, their title is empty. We use an optional argument
%% to set the title of committee members or to set the chair's
%% title to something other than `Chair of Advisory Committee'.
\newcommand{\ncsu@chair}{Advisor Q. Chair}
\newcommand{\ncsu@chairtitle}{Chair of Advisory Committee}
\providecommand{\chair}[2][]{
\renewcommand{\ncsu@chair}{#2}
% Checking if optional title argument is present.
\ifthenelse{\equal{#1}{}}{}{\renewcommand{\ncsu@chairtitle}{#1}}
% Declare that we have a chair:
\renewcommand{\ncsu@chairtype}{chair}
}
\newcommand{\ncsu@cochairI}{Co-chair 1 of Committee}
\newcommand{\ncsu@cochairItitle}{Co-chair of Advisory Committee}
\providecommand{\cochairI}[2][]{
\renewcommand{\ncsu@cochairI}{#2}
\ifthenelse{\equal{#1}{}}{}{\renewcommand{\ncsu@cochairItitle}{#1}}
% Declare that we have co-chairs.
\renewcommand{\ncsu@chairtype}{cochair}
}
\newcommand{\ncsu@cochairII}{Co-chair 2 of Committee}
\newcommand{\ncsu@cochairIItitle}{Co-chair of Advisory Committee}
\providecommand{\cochairII}[2][]{
\renewcommand{\ncsu@cochairII}{#2}
\ifthenelse{\equal{#1}{}}{}{\renewcommand{\ncsu@cochairIItitle}{#1}}
\renewcommand{\ncsu@chairtype}{cochair}
}
\newcommand{\ncsu@memberI}{Member 1 of Committee}
\newcommand{\ncsu@memberItitle}{}
\providecommand{\memberI}[2][]{
\renewcommand{\ncsu@memberI}{#2}
\ifthenelse{\equal{#1}{}}{}{\renewcommand{\ncsu@memberItitle}{#1}}
}
\newcommand{\ncsu@memberII}{Member 2 of Committee}
\newcommand{\ncsu@memberIItitle}{}
\providecommand{\memberII}[2][]{
\renewcommand{\ncsu@memberII}{#2}
\ifthenelse{\equal{#1}{}}{}{\renewcommand{\ncsu@memberIItitle}{#1}}
}
\newcommand{\ncsu@memberIII}{Member 3 of Committee}
\newcommand{\ncsu@memberIIItitle}{}
\providecommand{\memberIII}[2][]{
\renewcommand{\ncsu@memberIII}{#2}
\ifthenelse{\equal{#1}{}}{}{\renewcommand{\ncsu@memberIIItitle}{#1}}
}
\newcommand{\ncsu@memberIV}{Member 4 of Committee}
\newcommand{\ncsu@memberIVtitle}{}
\providecommand{\memberIV}[2][]{
\renewcommand{\ncsu@memberIV}{#2}
\ifthenelse{\equal{#1}{}}{}{\renewcommand{\ncsu@memberIVtitle}{#1}}
}
\newcommand{\ncsu@memberV}{Member 5 of Committee}
\newcommand{\ncsu@memberVtitle}{}
\providecommand{\memberV}[2][]{
\renewcommand{\ncsu@memberV}{#2}
\ifthenelse{\equal{#1}{}}{}{\renewcommand{\ncsu@memberVtitle}{#1}}
}
\newcommand{\ncsu@memberVI}{Member 6 of Committee}
\newcommand{\ncsu@memberVItitle}{}
\providecommand{\memberVI}[2][]{
\renewcommand{\ncsu@memberV}{#2}
\ifthenelse{\equal{#1}{}}{}{\renewcommand{\ncsu@memberVItitle}{#1}}
}
\newcommand{\ncsu@titlepageparagraph}{
\ifthenelse{\equal{\ncsu@thesistype}{phd}}{
A dissertation submitted to the Graduate Faculty of\\
North Carolina State University\\
in partial fulfillment of the\\
requirements for the Degree of\\
Doctor of Philosophy
}{} % end ifthenels phd
\ifthenelse{\equal{\ncsu@thesistype}{ms}}{
A thesis submitted to the Graduate Faculty of\\
North Carolina State University\\
in partial fulfillment of the\\
requirements for the Degree of\\
Master of Science
}{} % end ifthenels phd
}
\newcommand{\ncsu@program}{Degree Program}
\providecommand{\program}[1]{\renewcommand{\ncsu@program}{#1}}
\newcommand{\ncsu@citystate}{Raleigh, North Carolina}
\newcommand{\ncsu@signatureline}[2][]{
\begin{minipage}[t]{0.4\textwidth}
\centering
\hrule
\vspace{0.5ex}
#2\\ #1
\end{minipage}
}
\newcommand{\ncsu@committeesignatures}{
\ifthenelse{\equal{\ncsu@chairtype}{chair}}{
\ifthenelse{\ncsu@committeesize=3}{
\begin{tabular}[t]{c@{\hspace{0.5in}}c}
\ncsu@signatureline[\ncsu@memberItitle]{\ncsu@memberI} &
\ncsu@signatureline[\ncsu@memberIItitle]{\ncsu@memberII} \\[6em]
\multicolumn{2}{c}{\ncsu@signatureline[\ncsu@chairtitle]{\ncsu@chair}}
\end{tabular}
}{} % end ifthenelse = 3
\ifthenelse{\ncsu@committeesize=4}{
\begin{tabular}[t]{c@{\hspace{0.5in}}c}
\ncsu@signatureline[\ncsu@memberItitle]{\ncsu@memberI} &
\ncsu@signatureline[\ncsu@memberIItitle]{\ncsu@memberII} \\[6em]
\ncsu@signatureline[\ncsu@memberIIItitle]{\ncsu@memberIII} &
\ncsu@signatureline[\ncsu@chairtitle]{\ncsu@chair} \\
\end{tabular}
}{} % end ifthenelse = 4
\ifthenelse{\ncsu@committeesize=5}{
\begin{tabular}[t]{c@{\hspace{0.5in}}c}
\ncsu@signatureline[\ncsu@memberItitle]{\ncsu@memberI} &
\ncsu@signatureline[\ncsu@memberIItitle]{\ncsu@memberII} \\[5em]
\ncsu@signatureline[\ncsu@memberIIItitle]{\ncsu@memberIII} &
\ncsu@signatureline[\ncsu@memberIVtitle]{\ncsu@memberIV} \\[5em]
\multicolumn{2}{c}{\ncsu@signatureline[\ncsu@chairtitle]{\ncsu@chair}}
\end{tabular}
}{} % end ifthenelse = 5
\ifthenelse{\ncsu@committeesize=6}{
\begin{tabular}[t]{c@{\hspace{0.5in}}c}
\ncsu@signatureline[\ncsu@memberItitle]{\ncsu@memberI} &
\ncsu@signatureline[\ncsu@memberIItitle]{\ncsu@memberII} \\[5em]
\ncsu@signatureline[\ncsu@memberIIItitle]{\ncsu@memberIII} &
\ncsu@signatureline[\ncsu@memberIVtitle]{\ncsu@memberIV} \\[5em]
\ncsu@signatureline[\ncsu@memberVtitle]{\ncsu@memberV} &
\ncsu@signatureline[\ncsu@chairtitle]{\ncsu@chair} \\
\end{tabular}
}{} % end ifthenelse = 6
}{} % end ifthenelse type = chair
\ifthenelse{\equal{\ncsu@chairtype}{cochair}}{
% co-chairs; if number is odd, put co-chairs on top line.
\ifthenelse{\ncsu@committeesize=3}{
\begin{tabular}[t]{c@{\hspace{0.5in}}c}
\ncsu@signatureline[\ncsu@cochairItitle]{\ncsu@cochairI} &
\ncsu@signatureline[\ncsu@cochairIItitle]{\ncsu@cochairII} \\[6em]
\multicolumn{2}{c}%
{\ncsu@signatureline[\ncsu@memberItitle]{\ncsu@memberI}}
\end{tabular}
}{} % end ifthenelse = 3
\ifthenelse{\ncsu@committeesize=4}{
\begin{tabular}[t]{c@{\hspace{0.5in}}c}
\ncsu@signatureline[\ncsu@memberItitle]{\ncsu@memberI} &
\ncsu@signatureline[\ncsu@memberIItitle]{\ncsu@memberII} \\[6em]
\ncsu@signatureline[\ncsu@cochairItitle]{\ncsu@cochairI} &
\ncsu@signatureline[\ncsu@cochairIItitle]{\ncsu@cochairII}
\end{tabular}
}{} % end ifthenelse = 4
\ifthenelse{\ncsu@committeesize=5}{
\begin{tabular}[t]{c@{\hspace{0.5in}}c}
\ncsu@signatureline[\ncsu@cochairItitle]{\ncsu@cochairI} &
\ncsu@signatureline[\ncsu@cochairIItitle]{\ncsu@cochairII} \\[5em]
\ncsu@signatureline[\ncsu@memberItitle]{\ncsu@memberI} &
\ncsu@signatureline[\ncsu@memberIItitle]{\ncsu@memberII} \\[5em]
\multicolumn{2}{c}%
{\ncsu@signatureline[\ncsu@memberIIItitle]{\ncsu@memberIII}}
\end{tabular}
}{} % end ifthenelse = 5
\ifthenelse{\ncsu@committeesize=6}{
\begin{tabular}[t]{c@{\hspace{0.5in}}c}
\ncsu@signatureline[\ncsu@memberItitle]{\ncsu@memberI} &
\ncsu@signatureline[\ncsu@memberIItitle]{\ncsu@memberII} \\[5em]
\ncsu@signatureline[\ncsu@memberIIItitle]{\ncsu@memberIII} &
\ncsu@signatureline[\ncsu@memberIVtitle]{\ncsu@memberIV} \\[5em]
\ncsu@signatureline[\ncsu@cochairItitle]{\ncsu@cochairI} &
\ncsu@signatureline[\ncsu@cochairIItitle]{\ncsu@cochairII} \\
\end{tabular}
}{} % end ifthenelse = 6
}{} % end ifthenelse type = cochair
}
\newcommand{\maketitlepage}{
\thispagestyle{empty}
\clearpage
\singlespacing
\begin{center}
\vfill
\ncsu@thesistitle
\vfill
by \\
\@author
\vfill
\ncsu@titlepageparagraph
\vfill
\ncsu@program
\vfill
\ncsu@citystate\\[1\ncsu@lineheight]
\ncsu@year
\vfill
APPROVED BY:
\vfill
\ncsu@committeesignatures
\end{center}
\clearpage
\ncsu@defaultspacing
}
%% -------------------------------------------------------------------------- %%
%% ------------ Dedication, biography, and acknowledgements ----------------- %%
%% -------------------------------------------------------------------------- %%
%% Template
\newcommand{\ncsu@dedbioack}[1]{%
\chapter*{#1}%
}
%% Dedication
\newcommand{\dedicationtitle}{\textbf{DEDICATION}} % apparently these now need to be all-caps and bold
\newenvironment{dedication}
{\ncsu@dedbioack{\dedicationtitle}}
{\clearpage}
%% Biography
\newcommand{\biographytitle}{\textbf{BIOGRAPHY}}
\newenvironment{biography}
{\ncsu@dedbioack{\biographytitle}}
{\clearpage}
%% Acknowledgements
\newcommand{\acknowledgementstitle}{\textbf{ACKNOWLEDGEMENTS}}
\newenvironment{acknowledgements}
{\ncsu@dedbioack{\acknowledgementstitle}}
{\clearpage}
%% -------------------------------------------------------------------------- %%
%% ------------------------- Table of Contents ----------------------------- %%
%% -------------------------------------------------------------------------- %%
\renewcommand{\contentsname}{\textbf{TABLE OF CONTENTS}}
\settowidth{\cftchapnumwidth}{\textbf{Chapter 00}}
\renewcommand{\cftchappresnum}{Chapter }
\renewcommand{\cftchapleader}{\cftdotfill{\cftsecdotsep}}
\newcommand{\thesistableofcontents}{%
\singlespacing%
\setlength{\cftbeforetoctitleskip}{-\baselineskip}
\setlength{\ncsu@leading}{\baselineskip-\ncsu@capitalheight}%
\setlength{\cftaftertoctitleskip}%
{\ncsu@afterschapsep-\cftbeforechapskip-\ncsu@leading}%
\tableofcontents%
\clearpage%
\ncsu@defaultspacing%
}
%% tocloft typesets ToC title, so we must give it our heading formats
%\renewcommand{\cfttoctitlefont}{\hfill\ncsu@headingformat}
%\renewcommand{\cftaftertoctitle}{\hfill}
\renewcommand{\cfttoctitlefont}{\hspace*{\fill}\ncsu@headingformat}
\renewcommand{\cftaftertoctitle}{\hspace*{\fill}}
\renewcommand{\listfigurename}{\textbf{LIST OF FIGURES}}
\settowidth{\cftfignumwidth}{Figure 00.000}
\renewcommand{\cftfigpresnum}{Figure }
\newcommand{\thesislistoffigures}{%
\singlespacing%
\setlength{\cftbeforeloftitleskip}{-\baselineskip}
\setlength{\ncsu@leading}{\baselineskip-\ncsu@capitalheight}%
\setlength{\cftafterloftitleskip}%
{\ncsu@afterschapsep-\cftbeforechapskip-\ncsu@leading}%
\listoffigures%
\clearpage%
\ncsu@defaultspacing%
}
\renewcommand{\cftloftitlefont}{\hfill\ncsu@headingformat}
\renewcommand{\cftafterloftitle}{\hfill}
\renewcommand{\listtablename}{\textbf{LIST OF TABLES}}
\settowidth{\cfttabnumwidth}{Table 00.000}
\renewcommand{\cfttabpresnum}{Table }
\newcommand{\thesislistoftables}{%
\singlespacing%
\setlength{\cftbeforelottitleskip}{-\baselineskip}
\setlength{\ncsu@leading}{\baselineskip-\ncsu@capitalheight}%
\setlength{\cftafterlottitleskip}%
{\ncsu@afterschapsep-\cftbeforechapskip-\ncsu@leading}%
\listoftables%
\clearpage%
\ncsu@defaultspacing%
}
\renewcommand{\cftlottitlefont}{\hfill\ncsu@headingformat}
\renewcommand{\cftafterlottitle}{\hfill}
%% try to define a new list type of 'schema' (so we dont run over the current 'scheme')
\newcommand{\listschemename}{ \textbf{LIST OF SCHEMES} }
\newlistof{scheme}{los}{\listschemename}
\DeclareFloatingEnvironment[
%fileext = los , % name of file extension
%listname = {\textbf{List of Schemes}},
%name = Scheme , % name of float type
%within = chapter ,% counter within
%placement = htbp % default placement
]{scheme}
\renewcommand{\listschemename}{ \textbf{LIST OF SCHEMES}\hfill }
%% so scheme is X and los is Z
\settowidth{\cftschemenumwidth}{Scheme 00.000}
\renewcommand{\cftschemepresnum}{Scheme }
\renewcommand{\cftafterlostitle}{\hfill}%
\newcommand{\thesislistofschemes}{%
\singlespacing%
\setlength{\cftbeforelostitleskip}{-\baselineskip}
\setlength{\ncsu@leading}{\baselineskip-\ncsu@capitalheight}%
\setlength{\cftafterlostitleskip}{\ncsu@afterschapsep-\cftbeforechapskip-\ncsu@leading}%
\addcontentsline{toc}{chapter}{\textbf{LIST OF SCHEMES}}
\listofschemes%
\clearpage%
\ncsu@defaultspacing%
}
\renewcommand{\cftlostitlefont}{\hfill\ncsu@headingformat}
\renewcommand{\cftafterlostitle}{\hfill}
%% -------------------------------------------------------------------------- %%
%% ------------------------- Landscape Pages ------------------------------- %%
%% -------------------------------------------------------------------------- %%
%% Loading pdflscape package for page rotation
\RequirePackage{pdflscape}
%% Loading fancyhdr package to change page numbering
\RequirePackage{fancyhdr}
%% Loading sideways for sideways environment
\RequirePackage{rotating}
\newlength{\portraittextheight}
\setlength{\portraittextheight}{\textheight}
\addtolength{\portraittextheight}{\footskip}
\newlength{\portraittextwidth}
\setlength{\portraittextwidth}{\textwidth}
\RequirePackage{afterpage}
\RequirePackage{changepage}
%% Rotate page and page number
\newenvironment{lscapenum}
{
%% The standard landscape environment does not rotate the margins and
%% page number. However, we want the margins (mostly) rotated as well
%% as the page number. To change the margins, we use the \changepage
%% command from the \changepage package. Since the \textheight and
%% \textwidth dimensions get switched, we need to reduce the rotated
%% \textheight by \ncsu@footskip and increase the \textwidth by the
%% same measure.
%%
%% The syntax of the \changepage command is
%% \changepage{textheight}{textwidth}{evensidemargin}{oddsidemargin}{columnsep}
%% {topmargin}{headheight}{headsep}{footskip}
\clearpage
%\changepage{\ncsu@footskip}{-\ncsu@footskip}{}{}{}{}{}{}{} %get rid of this because it fixes goes with the footskip issue
\begin{landscape}
\pagestyle{fancy}
\fancyhead{} % clear all header fields
\fancyfoot{} % clear all footer fields
\renewcommand{\headrulewidth}{0pt}
\rfoot{
%% Since the header and footer are unrotated, we must manually
%% place the page number. The picture environment is included in
%% standard LaTeX.
\setlength{\unitlength}{\portraittextheight}
\begin{picture}(0,0)
\put(0.045,0.534){\begin{sideways}\thepage\end{sideways}} % page number
\end{picture} % if your rotated pages have the page number in the wrong place, adjust the two numbers after \put in the above line
}
}
{
\end{landscape}
%% The \textheight is too large leaving landscape environment
%% since we invoked the \changepage. We manually reduce it.
\addtolength{\textheight}{-\ncsu@footskip}
%% \textheight controls 3 other variables, which must be updated.
%% See \endlandscape definition in lscape.sty
\global\@colht=\textheight
\global\vsize=\textheight
\global\@colroom=\textheight
\pagestyle{plain}
}
%% Rotate page but NOT page number
\newenvironment{lscapenotnum}
{
\begin{landscape}
}
{
\end{landscape}
}
%% -------------------------------------------------------------------------- %%
%% --------------------------- Captions ------------------------------- %%
%% -------------------------------------------------------------------------- %%
%% Adding space to start of caption
%% save
\RequirePackage{caption}
\DeclareCaptionLabelSeparator{colon}{:\hspace{0.8em}}
%% -------------------------------------------------------------------------- %%
%% ------------------------- References ------------------------------------ %%
%% -------------------------------------------------------------------------- %%
\renewcommand{\bibname}{References}
%% natbib redefines \thebibliography, so we add our own requirements
%% at \begin{document} time.
%\AtBeginDocument{
% \let\ncsu@thebibliography\thebibliography
% \let\endncsu@thebibliography\endthebibliography
% \renewenvironment{thebibliography}[1]
% {
% \singlespacing
% \begin{ncsu@thebibliography}{#1}
% }
% {
% \end{ncsu@thebibliography}
% \ncsu@defaultspacing
% }
%}
%% -------------------------------------------------------------------------- %%
%% ------------------------- The Appendices -------------------------------- %%
%% -------------------------------------------------------------------------- %%
\newlength{\appendixwidth}
\settowidth{\appendixwidth}{APPENDIX A}
\addtolength{\appendixwidth}{1em}
\providecommand{\appendixheader}[1]{
\renewcommand{\ncsu@appendixheader}{#1}
}
%% Count the total number of appendices
\RequirePackage{totcount}
\regtotcounter{chapter} % chapter counter is used for appendices
\AtBeginDocument{%
%% Since ETD requirements are different than LaTeX's normal formatting of
%% the Table of Content's Appendix listings,
%% we change the indentation of chapters, sections, and subsections in
%% the appendix part of the table of contents, but no deeper divisions,
%% so we must cap the tocdepth at 2:
\newcounter{ncsu@appendixtocdepth}
\ifthenelse{\c@tocdepth > 2}
{\setcounter{ncsu@appendixtocdepth}{2}}
{\setcounter{ncsu@appendixtocdepth}{\c@tocdepth}}
\let\ncsu@appendix\appendix
\renewcommand{\appendix}{
\ifthenelse{\isundefined{\ncsu@appendixheader}}
% Appendix title page heading not defined, define it
{
\ifthenelse{\totvalue{chapter} = 1 }%
%% number of appendices = 1
{\newcommand{\ncsu@appendixheader}{\textbf{APPENDIX}}}
%% number of appendices > 1
{\newcommand{\ncsu@appendixheader}{\textbf{APPENDICES}}}
}
% Appendix title page heading already defined, do nothing
{}
\chapter*{\ncsu@appendixheader} %% insert 'Appendix' titlepage
\addcontentsline{toc}{chapter}{\ncsu@appendixheader}
%% Adding "Appendix" before letter in TOC
%% We must change the width of the box which the appendix letter is set in
%% and add the "Appendix " before the letter. See tocloft documentation.
\addtocontents{toc}{
\protect\renewcommand{\protect\cftchappresnum}{Appendix }
\protect\renewcommand{\protect\cftchapnumwidth}{\protect\appendixwidth}
\protect\renewcommand{\protect\cftchapfont}{\protect\cftsecfont}
\protect\setlength{\protect\cftbeforechapskip}{\protect\cftbeforesecskip}
\protect\setlength{\protect\cftchapindent}{\protect\cftsecindent}
\protect\renewcommand{\protect\cftchappagefont}{\protect\cftchapfont}
\protect\setlength{\protect\cftsecindent}{\protect\cftsubsecindent}
\protect\addtolength{\protect\cftsubsecindent}{\cftsecnumwidth}
\protect\setcounter{tocdepth}{\c@ncsu@appendixtocdepth}
}
\clearpage
\ncsu@appendix %% call internal \appendix macro
} % \renewcommand{appendix}
} % \AtBeginDocument
\ncsu@defaultspacing
%%
%% Copyright (C) 2009-2012 by Josh Hykes <[email protected]> and others
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License (LPPL), either
%% version 1.3c of this license or (at your option) any later
%% version. The latest version of this license is in the file:
%%
%% http://www.latex-project.org/lppl.txt
%%
%% This work is "maintained" (as per LPPL maintenance status).
%%
%% This work consists of the file ncsuthesis.dtx
%% and the derived files ncsuthesis.ins,
%% ncsuthesis.pdf and
%% ncsuthesis.cls.
%%
%%
%% End of file `ncsuthesis.cls'.