-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDissertate.cls
executable file
·258 lines (232 loc) · 7.5 KB
/
Dissertate.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
% -------------------------------------------------------------------
% @LaTeX-class-file{
% filename = "Dissertate.cls",
% version = "2.0",
% date = "25 March 2014",
% codetable = "ISO/ASCII",
% keywords = "LaTeX, Dissertate",
% supported = "Send email to [email protected].",
% docstring = "Class for a dissertation."
% --------------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{Dissertate}[2014/03/25 v2.0 Dissertate Class]
\LoadClass[12pt, oneside, letterpaper]{book}
% Text layout.
\RequirePackage[width=5.75in, letterpaper]{geometry}
\usepackage{ragged2e}
\RaggedRight
\RequirePackage{graphicx}
\usepackage{fixltx2e}
% Support for text/math-mode symbols not supported by this class by default
\usepackage{gensymb}
\usepackage{textcomp}
\parindent 12pt
\RequirePackage{lettrine}
\RequirePackage{setspace}
\RequirePackage{verbatim}
% Fonts.
\RequirePackage{color}
\RequirePackage{xcolor}
\usepackage{hyperref}
\RequirePackage{url}
\RequirePackage{amssymb}
\RequirePackage{mathspec}
\setmathsfont(Digits,Latin,Greek)[Numbers={Proportional}]{EB Garamond}
\setmathrm{EB Garamond}
\AtBeginEnvironment{tabular}{\addfontfeature{RawFeature=+tnum}}
\widowpenalty=300
\clubpenalty=300
\setromanfont[Numbers=OldStyle, Ligatures={Common, TeX}, Scale=1.0]{EB Garamond}
\newfontfamily{\smallcaps}[RawFeature={+c2sc,+scmp}]{EB Garamond}
\setsansfont[Scale=MatchLowercase, BoldFont={Lato Bold}]{Lato Regular}
\setmonofont[Scale=MatchLowercase]{Source Code Pro}
\RequirePackage[labelfont={bf,sf,footnotesize,singlespacing},
textfont={sf,footnotesize,singlespacing},
justification={justified,RaggedRight},
singlelinecheck=false,
margin=0pt,
figurewithin=chapter,
tablewithin=chapter]{caption}
\renewcommand{\thefootnote}{\fnsymbol{footnote}}
% Headings and headers.
\RequirePackage{fancyhdr}
\RequirePackage[tiny, md, sc]{titlesec}
\setlength{\headheight}{15pt}
\pagestyle{plain}
\RequirePackage{titling}
% Front matter.
\setcounter{tocdepth}{1}
\usepackage[titles]{tocloft}
\usepackage[titletoc]{appendix}
\renewcommand{\cftsecleader}{\cftdotfill{\cftdotsep}}
\renewcommand{\cftchapfont}{\normalsize \scshape}
\renewcommand\listfigurename{Listing of figures}
\renewcommand\listtablename{Listing of tables}
% References.
\renewcommand\bibname{References}
\RequirePackage[super,comma,numbers]{natbib}
\renewcommand{\bibnumfmt}[1]{[#1]}
\RequirePackage[palatino]{quotchap}
\renewcommand*{\chapterheadstartvskip}{\vspace*{-0.5\baselineskip}}
\renewcommand*{\chapterheadendvskip}{\vspace{1.3\baselineskip}}
% An environment for paragraph-style section.
\providecommand\newthought[1]{%
\addvspace{1.0\baselineskip plus 0.5ex minus 0.2ex}%
\noindent\textsc{#1}%
}
% Align reference numbers so that they do not cause an indent.
\newlength\mybibindent
\setlength\mybibindent{0pt}
\renewenvironment{thebibliography}[1]
{\chapter*{\bibname}%
\@mkboth{\MakeUppercase\bibname}{\MakeUppercase\bibname}%
\list{\@biblabel{\@arabic\c@enumiv}}
{\settowidth\labelwidth{\@biblabel{999}}
\leftmargin\labelwidth
\advance\leftmargin\dimexpr\labelsep+\mybibindent\relax\itemindent-\mybibindent
\@openbib@code
\usecounter{enumiv}
\let\p@enumiv\@empty
\renewcommand\theenumiv{\@arabic\c@enumiv}}
\sloppy
\clubpenalty4000
\@clubpenalty \clubpenalty
\widowpenalty4000%
\sfcode`\.\@m}
{\def\@noitemerr
{\@latex@warning{Empty `thebibliography' environment}}
\endlist}
% Some definitions.
\def\advisor#1{\gdef\@advisor{#1}}
\def\coadvisorOne#1{\gdef\@coadvisorOne{#1}}
\def\coadvisorTwo#1{\gdef\@coadvisorTwo{#1}}
\def\committeeInternal#1{\gdef\@committeeInternal{#1}}
\def\committeeInternalOne#1{\gdef\@committeeInternalOne{#1}}
\def\committeeInternalTwo#1{\gdef\@committeeInternalTwo{#1}}
\def\committeeExternal#1{\gdef\@committeeExternal{#1}}
\def\degreetypeyear#1{\gdef\@degreetypeyear{#1}}
\def\degreetypemonth#1{\gdef\@degreetypemonth{#1}}
\def\degreetypeterm#1{\gdef\@degreetypeterm{#1}}
\def\degreetype#1{\gdef\@degreetype{#1}}
\def\department#1{\gdef\@department{#1}}
\def\field#1{\gdef\@field{#1}}
\def\university#1{\gdef\@university{#1}}
\def\universitycity#1{\gdef\@universitycity{#1}}
\def\universitystate#1{\gdef\@universitystate{#1}}
\def\programname#1{\gdef\@programname{#1}}
\def\pdOneName#1{\gdef\@pdOneName{#1}}
\def\pdOneSchool#1{\gdef\@pdOneSchool{#1}}
\def\pdOneYear#1{\gdef\@pdOneYear{#1}}
\def\pdTwoName#1{\gdef\@pdTwoName{#1}}
\def\pdTwoSchool#1{\gdef\@pdTwoSchool{#1}}
\def\pdTwoYear#1{\gdef\@pdTwoYear{#1}}
% School name and location
\university{Northeastern University}
\universitycity{Boston}
\universitystate{Massachusetts}
% School color found from university's graphic identity site:
% http://www.nyu.edu/employees/resources-and-services/media-and-communications/styleguide.html
\definecolor{SchoolColor}{rgb}{0.3412, 0.0235, 0.5490} % purple
\definecolor{chaptergrey}{rgb}{0.2600, 0.0200, 0.4600} % dialed back a little
\definecolor{midgrey}{rgb}{0.4, 0.4, 0.4}
\hypersetup{
colorlinks,
citecolor=SchoolColor,
filecolor=black,
linkcolor=black,
urlcolor=SchoolColor,
}
% Formatting guidelines found in:
% http://gsas.nyu.edu/docs/IO/4474/formattingguide.pdf
\renewcommand{\frontmatter}{
\pagenumbering{roman}
\input{frontmatter/personalize}
\maketitle
\copyrightpage
\frontispiece
\acknowledgments
\abstractpage
\tableofcontents
% figure listing - required if you have any figures
\listoffigures
\phantomsection
\addcontentsline{toc}{chapter}{List of figures}
% table listing - required if you have any tables
\listoftables
\phantomsection
\addcontentsline{toc}{chapter}{List of tables}
% appendix listing - required only if you have two or more appendices
% \newpage
% \thispagestyle{empty}
% \phantomsection
% \addcontentsline{toc}{chapter}{List of appendices}
% \chapter*{List of appendices}
% \contentsline {chapter}{Appendix A}{\pageref{AppendixA}}{}
\newpage
\setcounter{page}{1}
\pagenumbering{arabic}
}
\renewcommand{\maketitle}{
\thispagestyle{empty}
\vspace*{\fill}
\vspace{100pt}
\begin{center}
\Huge \textcolor{midgrey}{\thetitle} \normalsize \\
\vspace{25pt}
by \\
\vspace{15pt}
\theauthor\\
\vspace{135pt}
\textsc{a dissertation submitted in partial fulfillment\\
of the requirements for the degreetype of \\
\vspace{8pt}
\@degreetype \\
\@department \\
\@university \\
\vspace{10pt}
\@degreetypemonth, \@degreetypeyear}
\end{center}
\vspace*{\fill}
}
\newcommand{\copyrightpage}{
\newpage
\thispagestyle{empty}
\vspace*{25pt}
\begin{center}
\scshape \noindent \small \copyright \ \small \theauthor \\
all rights reserved, \@degreetypeyear
\end{center}
\newpage
\rm
}
\newcommand{\frontispiece}{
\newpage
\thispagestyle{empty}
\vspace*{\fill}
\begin{center}
\includegraphics[width=45pt]{figures/nu_logo.png}
\end{center}
\vspace*{\fill}
}
\newcommand{\acknowledgments}{
\phantomsection
\addcontentsline{toc}{chapter}{Acknowledgments}
\chapter*{Acknowledgments}
\noindent
\input{frontmatter/thanks}
\vspace*{\fill} \newpage
}
\newcommand{\abstractpage}{
\phantomsection
\addcontentsline{toc}{chapter}{Abstract}
\chapter*{Abstract}
\input{frontmatter/abstract}
}
\renewcommand{\backmatter}{
\input{endmatter/personalize}
\clearpage
\bibliography{references}
\addcontentsline{toc}{chapter}{References}
\bibliographystyle{apalike2}
\include{endmatter/colophon}
}