This repository has been archived by the owner on Aug 22, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dissertate.cls
169 lines (151 loc) · 4.96 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
% -------------------------------------------------------------------
% @LaTeX-class-file{
% filename = "Dissertate.cls",
% version = "1.0",
% date = "24 January 2014",
% codetable = "ISO/ASCII",
% keywords = "LaTeX, Dissertate",
% supported = "send email to [email protected]",
% docstring = "Class for a dissertation."
% --------------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{Dissertate}[2014/01/24 v1.0 Dissertate Class]
\LoadClass[12pt, twoside, openright, letterpaper]{book}
\def\@endpart{\vfil\newpage
\if@twoside
\vspace*{\fill}
\hfill
\begin{center}
This page intentionally left blank.
\end{center}
\vspace{\fill}
\thispagestyle{fancy}
\newpage
\fi
\if@tempswa
\twocolumn
\fi
}
% some definitions
\def\degreeyear#1{\gdef\@degreeyear{#1}}
\def\degreemonth#1{\gdef\@degreemonth{#1}}
\def\degree#1{\gdef\@degree{#1}}
\def\advisor#1{\gdef\@advisor{#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}}
\RequirePackage{xcolor}
\usepackage{hyperref}
\RequirePackage[small, md, sc, compact]{titlesec}
\setlength{\headheight}{15pt}
\pagestyle{plain}
\RequirePackage{titling}
\RequirePackage[palatino]{quotchap}
\RequirePackage{kvoptions}
\DeclareStringOption{School}[]
\ProcessKeyvalOptions*
\RequirePackage{packages/\Dissertate@School/style}
\RequirePackage{graphicx}
\RequirePackage{amssymb}
\RequirePackage{lettrine}
\RequirePackage[super,comma,numbers]{natbib}
\renewcommand{\bibnumfmt}[1]{[#1]}
\RequirePackage[width=5.75in, letterpaper]{geometry}
\RequirePackage{fancyhdr}
\usepackage[titletoc]{appendix}
\renewcommand{\setthesection}{\arabic{chapter}.A\arabic{section}}
\RequirePackage{setspace}
\RequirePackage{booktabs}
\RequirePackage[tight,nice]{units}
\RequirePackage{verbatim}
\setcounter{tocdepth}{2}
\RequirePackage{url}
\usepackage[titles]{tocloft}
\renewcommand{\cftsecleader}{\cftdotfill{\cftdotsep}}
\renewcommand{\cftchapfont}{\normalsize \scshape}
\usepackage{fixltx2e}
%\usepackage{ragged2e}
\renewcommand\bibname{References}
\renewcommand\listfigurename{Listing of figures}
%\RaggedRight
\parindent 12pt
\RequirePackage{mathspec}
%\setmathsfont(Digits,Latin,Greek)[Numbers={Proportional}]{EB Garamond}
\setmathsfont(Digits,Latin,Greek)[Numbers={Lining}]{EB Garamond}
\setmathrm{EB Garamond}
\widowpenalty=300
\clubpenalty=300
\usepackage{fontspec}
\defaultfontfeatures{Mapping=tex-text}
\setmainfont[
Ligatures=TeX,
Extension=.otf,
BoldFont=EBGaramond12-Regular,
BoldFeatures={FakeBold=3},
ItalicFont=EBGaramond12-Italic,
BoldItalicFont=EBGaramond12-Italic,
BoldItalicFeatures={FakeBold=3},
Numbers={Lining},
]{EBGaramond12-Regular}
\newfontfamily{\smallcaps}[RawFeature={+c2sc,+scmp}]{EB Garamond}
%\setromanfont[Numbers=OldStyle, Ligatures={Common}]{EB Garamond}
%\setsansfont[Scale=MatchLowercase, BoldFont={Lato Bold}]{Lato Regular}
\setmonofont[
%BoldFeatures={FakeBold=3},
%BoldFont=Inconsolata,
%BoldItalicFeatures={FakeBold=3},
%BoldItalicFont=Inconsolata,
%ItalicFont=Inconsolata,
Scale=MatchLowercase
]{Inconsolata}
\RequirePackage[
labelfont={bf,sf,footnotesize,singlespacing},
textfont={sf,footnotesize,singlespacing},
%justification={justified,RaggedRight},
justification=justified,
singlelinecheck=false,
margin=0pt,
figurewithin=chapter,
tablewithin=chapter
]{caption}
%\renewcommand{\thefootnote}{\fnsymbol{footnote}}
%\onehalfspacing
%\doublespacing
% 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}
\makeatletter
\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}
\makeatother