-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDissertate.cls
151 lines (128 loc) · 4.74 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
% -------------------------------------------------------------------
% @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, oneside, letterpaper]{book}
\usepackage{mathtools}
% \DeclarePairedDelimiter{\norm}{\lVert}{\rVert}
\usepackage{amsmath}
% \usepackage{mathspec}
\usepackage{algpseudocode}
\RequirePackage{fix-cm}
% some definitions
\def\degreeyear#1{\gdef\@degreeyear{#1}}
\def\degreemonth#1{\gdef\@degreemonth{#1}}
\def\degrees#1{\gdef\@degrees{#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{color}
\usepackage{hyperref}
\RequirePackage[tiny, md, sc]{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}
\RequirePackage{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} %command out for using siunitx
\RequirePackage{verbatim}
\setcounter{tocdepth}{1}
\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},SizeFeatures={{Size=-8, OpticalSize=8},{Size= 8-, OpticalSize=12}},]{EB Garamond}
\setmathrm{EB Garamond}
\widowpenalty=300
\clubpenalty=300
\defaultfontfeatures{Mapping=tex-text}
\newfontfamily{\smallcaps}[RawFeature={+c2sc,+scmp}]{EB Garamond}
\setromanfont[Numbers=Proportional, Ligatures={Common, TeX}, Scale=1.0]{EB Garamond}
\setsansfont[Scale=MatchLowercase, BoldFont={Lato Bold}]{Lato Regular}
\setmonofont[Scale=MatchLowercase]{Noto Mono} % Font substitution for 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}
\RequirePackage[labelfont={bf,sf,footnotesize,singlespacing},
textfont={sf,footnotesize,singlespacing},
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