-
Notifications
You must be signed in to change notification settings - Fork 0
/
thesis.cls
100 lines (90 loc) · 2.8 KB
/
thesis.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
\ProvidesClass{thesis}
%% For normal draft builds
\LoadClass[nobind,draft,rmtitles,oneside]{hepthesis}
%\LoadClass[hyperpdf,nobind,draft,twoside]{hepthesis}
%% For short draft builds (breaks citations by necessity)
%\LoadClass[hyperpdf,nobind,draft,hidefrontback]{hepthesis}
%% For Cambridge soft-bound version
%\LoadClass[hyperpdf,bindnopdf]{hepthesis}
%% For Cambridge hard-bound version (must be one-sided)
%\LoadClass[hyperpdf,oneside]{hepthesis}
%% -------------------------------------
%% Standard packages
%% -------------------------------------
%\RequirePackage{cite}
%\RequirePackage{morefloats}
\RequirePackage{mathrsfs} % script font
\RequirePackage{afterpage}
%\RequirePackage{gillius}
%% Using Babel allows other languages to be used and mixed-in easily
\RequirePackage[english]{babel}
\selectlanguage{english}
%% Quotes in different languages are different.
%% Using \enquote{bla} automatically uses the correct quotes
%% according to the Babel language that is set
\RequirePackage[autostyle,babel]{csquotes}
%% Subfigures - note subfig is incompatible with ccaption
\RequirePackage{subfig}
%% TikZ is a marvellous drawing package
\RequirePackage{tikz}
%% BEK: Switch off problematic full-stops after sections, figure, and table
%% numbers when using an appendix
\KOMAoptions{numbers=noenddot}
%% BEK: Remove extra vspace inserted when a table float is created
%% Table environment
\renewenvironment{table}[1][tbp]{%
\@oldtable[#1]%
\begin{center}%
}{%
\end{center}%
\@oldendtable%
\ignorespacesafterend%
}
%% Makes a thesis title page
\DeclareRobustCommand{\titlepage}[2][]{%
%\@oldtitlepage%
\thispagestyle{empty}%
\begingroup%
\ifx\@sftitles\@empty\else\sf\fi%
\begin{center}%
\vspace*{\frontmattertitleskip}%
\begin{doublespace}%
{\Huge\textbf{\thetitle}}\\%
\end{doublespace}%
\vspace*{1cm}%
{\Large{{\theauthor} \\ {#1}}}\\%
{#2}%
\end{center}%
\endgroup%
%\@oldendtitlepage%
%\cleardoublepage%
}
%% An environment for the rubbish at the front of a typical thesis
\specialcomment{frontmatter}{%
\setcounter{tocdepth}{2}% show down to subsections in contents
\setcounter{secnumdepth}{2}% number down to subsections
\newcounter{iterlist}%
\@oldfrontmatter%
\pagenumbering{arabic}%
\adjustwidth{\@frontmatterextramargin}{\@frontmatterextramargin}%
\begin{\@frontmatterspacing}%
}{%
\end{\@frontmatterspacing}%
\endadjustwidth%
\ignorespacesafterend%
%\newcounter{grabPageNumber}%
%%\setcounter{\value{page}}%
}
\specialcomment{mainmatter}{%
%\@oldmainmatter%
\@mainmattertrue%
%\pagenumbering{arabic}%
%\setcounter{page}{\value{grabPageNumber}}%
%\pagenumbering{arabic}%
\adjustwidth{\@mainmatterextramargin}{\@mainmatterextramargin}%
\begin{\@mainmatterspacing}%
}{%
\end{\@mainmatterspacing}%
\endadjustwidth%
\ignorespacesafterend%
}