Created
December 11, 2017 22:38
-
-
Save jrhawley/1d864b1271a314b1581a38ccb87eded4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%---Packages | |
\usepackage[backend=bibtex, citestyle=authoryear, bibstyle=authortitle, dashed=false, maxcitenames=1]{biblatex} | |
\usepackage[T1]{fontenc} | |
\usepackage[margin=2.5cm]{geometry} | |
\usepackage{tocloft} | |
\usepackage{setspace} | |
\usepackage{tabularx, threeparttable, etoolbox, sectsty, dsfont, subfiles} | |
\usepackage{flafter, wrapfig, subfig, float} | |
\usepackage{pdfpages} | |
\usepackage[compact,explicit]{titlesec} | |
\usepackage{enumitem} | |
\usepackage{tikz} | |
\usepackage{listings} | |
\usepackage{appendix} | |
\usepackage[hidelinks]{hyperref} | |
\usepackage[nameinlink]{cleveref} | |
%---Definitions | |
\author{Firstname Lastname} | |
\date{Month Day, Year} | |
\title{Title} | |
\newcommand{\term}{Term } | |
\newcommand{\studentnumber}{Student #} | |
\graphicspath{{./img/}} | |
\addbibresource{./files/ref.bib} | |
%Title Page { Workplace } { Location } | |
\newcommand{\dotitlepage}[3]{ | |
\pagenumbering{gobble} | |
\doublespacing | |
\makeatletter | |
\begin{titlepage} | |
\begin{center} | |
\huge \textbf{University of Waterloo}\\ | |
\normalsize Faculty of Mathematics\\ | |
\vfill | |
\huge \textbf{\@title}\\ | |
\vfill | |
\normalsize #1\\#2\\ | |
\vfill | |
\@author\\ \studentnumber\\ \term Program\\ \@date\\ | |
\end{center} | |
\end{titlepage} | |
\makeatother | |
\newpage | |
} | |
%Memorandum | |
\newenvironment{memorandum}{ | |
\begin{singlespace} | |
}{ | |
\end{singlespace} | |
\thispagestyle{empty} | |
\newpage | |
} | |
%Table of Contents and List of Figures and Tables | |
\newcommand{\dotoc}{ | |
\pagenumbering{roman} | |
\doublespacing | |
\setcounter{page}{2} | |
\phantomsection | |
\tableofcontents | |
\newpage | |
\phantomsection | |
\addcontentsline{toc}{section}{\listfigurename} | |
\listoffigures | |
\begingroup | |
\let\clearpage\relax | |
\listoftables | |
\endgroup | |
\addcontentsline{toc}{section}{\listtablename} | |
\newpage | |
} | |
%References | |
\newcommand{\doreferences}{ | |
\newpage | |
\phantomsection | |
\renewbibmacro{in:}{} | |
\printbibliography[title=References] | |
\addcontentsline{toc}{section}{References} | |
\newpage | |
} | |
% ---Formatting | |
\parindent = 0cm | |
\doublespacing | |
\addtolength{\parskip}{\baselineskip} | |
\setlength{\cftsecnumwidth}{25pt} | |
\setlength{\parskip}{1em} | |
%\hyphenchar\font=-1 | |
\hyphenpenalty=10000 | |
\renewcommand{\contentsname}{Table of Contents} | |
\renewcommand{\cftfigpresnum}{Figure } | |
\renewcommand{\cftfigaftersnum}{ --- } | |
\renewcommand{\cftfignumwidth}{65pt} | |
\renewcommand{\cfttabpresnum}{Table } | |
\renewcommand{\cfttabaftersnum}{ --- } | |
\renewcommand{\cfttabnumwidth}{65pt} | |
\newcommand{\tocsection}[1]{ | |
\section*{#1} | |
\addcontentsline{toc}{section}{#1} | |
} | |
\renewcommand{\thesection}{\arabic{section}.0} | |
\renewcommand{\thesubsection}{\arabic{section}.\arabic{subsection}} | |
\crefname{figure}{Figure}{Figures} | |
\appto\TPTnoteSettings{\footnotesize} | |
\renewcommand*{\nameyeardelim}{\addcomma\addspace} | |
\urlstyle{same} | |
\def\@xobeysp{ } | |
\widowpenalty10000 | |
\clubpenalty10000 | |
\lstloadlanguages{bash} | |
\lstset{language={bash}, | |
escapeinside={{(*@}{@*)}}, | |
gobble=0, | |
stepnumber=1,numbersep=5pt, | |
numberstyle={\footnotesize\color{gray}}, | |
breaklines=true, | |
framesep=5pt, | |
basicstyle=\small\ttfamily, | |
showstringspaces=false, | |
commentstyle=\color{black}, | |
breakatwhitespace=true, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment