-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathsydestyle.sty
224 lines (164 loc) · 5.63 KB
/
sydestyle.sty
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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
% This file is part of sydetex.
% sydetex is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% any later version.
% sydetex is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
% You should have received a copy of the GNU General Public License
% along with sydetex. If not, see <https://www.gnu.org/licenses/>.
\ProvidesPackage{sydestyle}[28/08/2019 v.03 uWaterloo SYDE style guide]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Style imports
\usepackage{etoolbox}
\usepackage{titlesec}
\usepackage[top=1in, bottom=1in, inner=1.5in, outer=1in]{geometry}
\usepackage{setspace}
\usepackage{url}
\usepackage{caption}
\usepackage{notoccite} % t
\usepackage{tabularx}
\usepackage{longtable}
\usepackage{amsmath, amsfonts}
\usepackage{graphicx}
\usepackage[toc]{appendix}
\usepackage[toc,acronym]{glossaries}
\usepackage{biblatex}
\usepackage{listings}
\usepackage{color}
\usepackage{verbatim}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Graphics package setup
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Bibliography and other reference sections
\DefineBibliographyStrings{english}{
bibliography = {References},
references = {References},
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Code snippet stuff
\definecolor{dkgreen}{rgb}{0,0.6,0}
\definecolor{gray}{rgb}{0.5,0.5,0.5}
\definecolor{mauve}{rgb}{0.58,0,0.82}
\definecolor{backcolour}{rgb}{0.95,0.95,0.92}
\lstset{
frame=tb,
language=Python,
aboveskip=4mm,
belowskip=4mm,
showstringspaces=false,
columns=flexible,
basicstyle={\ttfamily},
numbers=left,
backgroundcolor=\color{backcolour},
numberstyle=\small\color{gray},
keywordstyle=\color{blue},
commentstyle=\color{dkgreen},
stringstyle=\color{mauve},
breaklines=true,
breakatwhitespace=true,
tabsize=3
}
\setcounter{secnumdepth}{2}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% PAGE NUMBERING
% start roman page numbers
% \setcounter{page}{1}
\pagenumbering{roman}
% \newcommand*{\startarabicpagenumbers}{
% \setcounter{page}{1}
% \pagenumbering{arabic}
% }
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Set page size and margins
\geometry{letterpaper}
% Section heading formatting
\usepackage{titlesec}
\titleformat{\section}[display]{\LARGE\bfseries}{\thesection}{0pt}{}
\titleformat{\subsubsection}{\normalsize\bfseries}{}{0pt}{}
% The appendices need slightly different headers
\newcommand*{\startappendixtitles}{
\titleformat{\section}[display]{\Large\bfseries}{Appendix \thesection}{0pt}{}
}
\newcommand*{\finishappendixtitles}{
\titleformat{\section}[display]{\LARGE\bfseries}{\thesection}{0pt}{}
}
% Shortcut to start and stop indenting whenever
\newcommand*{\stopindent}{
\setlength{\parindent}{0pt}
}
\newcommand*{\startindent}{
\setlength{\parindent}{18pt}
}
% make our line spacing 1.5
\linespread{1.5}
% clear page after abstract
\apptocmd{\endabstract}{\newpage}{}{}
% Make sections break page when done
\newcommand{\sectionbreak}{\clearpage}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Title Page Stuff
\newcommand*{\employer}[1]{\gdef\@employer{#1}}
\newcommand*{\@employer}{\texttt{\string\employer} Employer currently not set. Please fix this.}
\newcommand*{\employeraddress}[1]{\gdef\@employeraddress{#1}}
\newcommand*{\@employeraddress}{\texttt{\string\employeraddress} Address currently not set. Please fix this.}
\newcommand*{\studentnumber}[1]{\gdef\@studentnumber{#1}}
\newcommand*{\@studentnumber}{\texttt{\string\studentnumber} Student number currently not set. Please fix this.}
\newcommand*{\lastsemester}[1]{\gdef\@lastsemester{#1 Department of Systems Design Engineering}}
\newcommand*{\@lastsemester}{\texttt{\string\lastsemester} Last semester currently not set. Please fix this.}
\newcommand*{\supervisortext}[1]{\gdef\@supervisortext{#1}}
\newcommand*{\@supervisortext}{\texttt{\string\supervisortext} Currently not set. Please fix this.}
\newcommand*{\classname}[1]{\gdef\@classname{A Report Submitted in Partial Fulfillment of the Requirements for #1}}
\newcommand*{\@classname}{\texttt{\string\classname} Currently not set. Please fix this.}
\newcommand*{\makereporttitle}{
\begin{titlepage}
\centering
{\Huge\@title\unskip\strut\par}
\vfill
{\large \@classname\par}
\vspace{2cm}
{\large\@author\unskip\strut\par}
\vspace{1cm}
{\large Faculty of Engineering\par}
{\large Department of Systems Design Engineering}
\vspace{1cm}
{\large \@date\par}
{\large\par\@supervisortext\unskip\strut\par}
\end{titlepage}
}
\newcommand*{\makewtrtitle}{
\begin{titlepage}
\centering
{\large University of Waterloo \\ Faculty of Engineering}
\vfill
{\huge\@title\unskip\strut\par}
\vfill
{\large \@employer\par}
{\large \@employeraddress\par}
\vspace {2cm}
{\large\@author\unskip\strut\par}
{\large ID \@studentnumber\par}
{\large\@lastsemester\par}
{\large \@date\par}
\end{titlepage}
}
% End Title Page Stuff
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% param: file name of .bib file
\newcommand\makesydebib[1]{
\ifx& % Check if argument #1 was not set
Please specify .bib file
\else % argument #1 was provided
\begingroup
\raggedright
\bibliographystyle{unsrt}%Used BibTeX style is unsrt
\bibliography{#1}
\endgroup
\fi
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% add a remove dot function for url links in ref
\newcommand\EatDot[1]{}
\endinput