generated from cmustatistics/proposal-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ubcstatproposal.cls
167 lines (130 loc) · 3.65 KB
/
ubcstatproposal.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
% UBC Statistics proposal template
% Daniel J. McDonald 2024
% building on
% CMU Statistics & Data Science proposal and ADA report template
% Alex Reinhart, 2022
% article
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesClass{ubcstatproposal}[2024/03/23 ubcstatproposal]
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
\ProcessOptions
\LoadClass[12pt,letterpaper,twoside]{article}
% Math packages
\RequirePackage{amsmath}
\RequirePackage{amsthm}
\RequirePackage{amssymb}
\RequirePackage{lipsum}
% Fonts
\RequirePackage[T1]{fontenc}
\RequirePackage{lmodern} % default to Latin Modern for better character support
% Typesetting options
\RequirePackage{microtype}
\RequirePackage[hyphens,obeyspaces]{url}
\RequirePackage{booktabs}
% Headers and footers
\RequirePackage{fancyhdr}
% Figure caption styles: sans-serif, with label "Figure N" italicized
% \RequirePackage[font=sf,labelfont=it]{caption}
% Provide a shorttitle command for page headings, in case their title is too
% long
\newcommand{\shorttitle}[1]{\def\@shorttitle{#1}}
\DeclareRobustCommand{\BibTeX}{%
{\normalfont B\kern-.05em{\scshape i\kern-.025em b}\kern-.08em \TeX}%
}
% Note: Change to \RequirePackage[hidelinks,final]{hyperref} for printing in
% B&W, to avoid unsightly boxes
\RequirePackage[final]{hyperref}
\hypersetup{%
bookmarksnumbered=true,
pdftitle={\@title},
pdfauthor={\@author},
pdfsubject={Department of Statistics, The University of British Columbia},
pdfpagelayout=SinglePage,
bookmarksopen=False,
colorlinks=true,
linkcolor=Blue,
urlcolor=Blue,
citecolor=Cerulean
}
\RequirePackage[capitalize,sort,compress]{cleveref}
% Make some colours available
\RequirePackage[usenames,dvipsnames]{xcolor}
\RequirePackage[final]{graphicx}
\graphicspath{ {figures/} } % specify the path where figures are located
% Bibliography
\RequirePackage{natbib}
\RequirePackage[margin=2.5cm]{geometry} % pass tells it not to mess with the layout
\setlength{\headheight}{15pt}
% PDF metadata
\AtBeginDocument{%
% Page headers
\pagestyle{fancy}
\fancyhead{}
\fancyhead[CE]{\textit{\@author}}
\ifdefined\@shorttitle
\fancyhead[CO]{\textit{\@shorttitle}}
\else
\fancyhead[CO]{\textit{\@title}}
\fi
\fancyhead[RE,RO]{\thepage}
\renewcommand{\headrulewidth}{0pt}
\ifdraft{
\newcommand{\draftmark}{{\sffamily Draft as of \today}}
\fancyfoot[CE,CO]{\draftmark}
}{
\fancyfoot{}
}
\thispagestyle{empty}
}
% Fancypants logic
\RequirePackage{pgffor}
\RequirePackage{ifdraft}
\def\theadvisors{}
\newcommand{\advisor}[1]{%
\g@addto@macro\theadvisors{{#1},}
}
\def\thecommittee{}
\newcommand{\committee}[1]{%
\g@addto@macro\thecommittee{{#1},}
}
\newcommand{\documenttype}[1]{\def\thedocumenttype{#1}}
\renewcommand{\maketitle}{%
{
\raggedright
\begin{center}
\vspace*{2.5cm}
\includegraphics[width=3.5in]{ubc-logo-2018-wordmark-blue282-pms.pdf} \\
{\Large Department of Statistics}\\[4ex]
{\Large \thedocumenttype}\\[4ex]
\ifdraft{\draftmark\\}{}
\vspace{1cm}
{\large \@title}\\[4ex]
{\large \@author}\\[4ex]
\@date\\[8ex]
\end{center}
\vspace{1cm}
\textbf{Committee:}\\
% Advisor(s) first
\foreach \advisor in \theadvisors {
\ifx\advisor\empty
\else
\advisor, Advisor\\
\fi
}
% Committee members
\foreach \member in \thecommittee {
\ifx\member\empty
\else
\member\\
\fi
}
\clearpage
}
}
% Support large landscape tables
\RequirePackage{pdflscape}
\newenvironment{landscapepage}[1][1in]{%
\newgeometry{margin=#1}%
\begin{landscape}}{%
\end{landscape}%
\restoregeometry}