-
Notifications
You must be signed in to change notification settings - Fork 1
/
cmustatproposal.cls
154 lines (123 loc) · 3.56 KB
/
cmustatproposal.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
% CMU Statistics & Data Science proposal and ADA report template, building on
% article
% Alex Reinhart, 2022
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesClass{cmustatthesis}[2022/09/03 cmustatproposal]
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
\ProcessOptions
\LoadClass[11pt,letterpaper,twoside]{article}
% Math packages
\RequirePackage{amsmath}
\RequirePackage{amsthm}
\RequirePackage{amssymb}
% define theorem, corollary, lemma, and definition environments
\theoremstyle{plain}
\newtheorem*{theorem*}{Theorem}
\newtheorem{theorem}{Theorem}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{definition}[theorem]{Definition}
% 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}}
% Note: Change to \RequirePackage[hidelinks,final]{hyperref} for printing in
% B&W, to avoid unsightly boxes
\RequirePackage[final]{hyperref}
\RequirePackage[final]{graphicx}
\graphicspath{ {figures/} } % specify the path where figures are located
% Bibliography
\RequirePackage{natbib}
\bibliographystyle{apalike} % bibliography style - recommend using apalike-doi
% as it hyperlinks DOIs
% PDF metadata
\AtBeginDocument{%
\hypersetup{%
bookmarksnumbered=true,
pdftitle={\@title},
pdfauthor={\@author},
pdfsubject={Department of Statistics and Data Science, Carnegie Mellon University},
pdfpagelayout=SinglePage,
bookmarksopen=False
}
% Page headers
\pagestyle{fancy}
\fancyhead{}
\ifdefined\@shorttitle
\fancyhead[CO]{\textit{\@shorttitle}}
\else
\fancyhead[CO]{\textit{\@title}}
\fi
\fancyhead[CE]{\textit{\@author}}
\fancyhead[LE,RO]{\thepage}
\renewcommand{\headrulewidth}{0pt}
\ifdraft{
\newcommand{\draftmark}{{\sffamily Draft as of \today}}
\fancyfoot[CE,CO]{\draftmark}
}{
\fancyfoot{}
}
\thispagestyle{plain}
}
% 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}
\includegraphics[width=3.5in]{cmu-wordmark-horizontal-r.pdf} \\
{\Large Department of Statistics \& Data Science}\\[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[pass]{geometry} % pass tells it not to mess with the layout
\RequirePackage{pdflscape}
\newenvironment{landscapepage}[1][1in]{%
\newgeometry{margin=#1}%
\begin{landscape}}{%
\end{landscape}%
\restoregeometry}