%=====================================================================
% University of Ottawa (easily modified) Thesis Template for LaTeX
% Last Updated January 2024
% by Nicholas Sorensen (nsorense@uottawa.ca)
% Made without feedback or support from the University of Ottawa.
% DISCLAIMER
% This template has not been authorized by the University of Ottawa,
% but is an adaptation of my own MSc. thesis. To the best of my
% knowledge, this template satisfies the uOttawa thesis requirements.
% However, it is your responsibility to assure that you have met all
% requirements of the University and your particular department.
% The uOttawa logo was taken from the University's branding page. For
% updated logos and/or colors, see https://www.uottawa.ca/about-us/administration-services/brand
% This was written largely based on the thesis template provided
% by the University of Waterloo (https://www.overleaf.com/latex/templates/university-of-waterloo-thesis-template-updated-august-2023/qxqqzmbrcmpp).
% Also note that there are explanatory comments and tips throughout this template.
%======================================================================
% Some important notes on using this template and making it your own...
% This thesis template is geared towards generating a PDF version optimized for viewing on an electronic display, including hyperlinks within the PDF.
%=====================================================================
% DON'T FORGET TO ADD YOUR OWN NAME AND TITLE in the "hyperref" package configuration below.
% Search for: PDFTITLE, PDFAUTHOR, PDFSUBJECT, and PDFKEYWORDS.
% THIS INFORMATION GETS EMBEDDED IN THE FINAL PDF DOCUMENT.
% This LaTeX document is based on the standard "book" document class which provides all necessary sectioning structures and allows multi-part theses.
% For people who prefer to install their own LaTeX distributions on their own computers, and process the source files manually, the following notes provide the sequence of tasks:
% E.g. to process a thesis called "mythesis.tex" based on this template, run:
% pdflatex mythesis -- first pass of the pdflatex processor
% bibtex mythesis -- generates bibliography from .bib data file(s)
% makeindex -- should be run only if an index is used
% pdflatex mythesis -- fixes numbering in cross-references, bibliographic references, glossaries, index, etc.
% pdflatex mythesis -- it takes a couple of passes to completely process all cross-references
% If you use the recommended LaTeX editor, Texmaker, you would open the mythesis.tex file, then click the PDFLaTeX button. Then run BibTeX (under the Tools menu).
% Then click the PDFLaTeX button two more times.
% If you have an index as well,you'll need to run MakeIndex from the Tools menu as well, before running pdflatex
% the last two times.
% To create a PDF output that is optimized for double-sided printing:
% 1) comment-out the \documentclass statement in the preamble below, and un-comment the second \documentclass line.
% 2) change the value assigned below to the boolean variable "PrintVersion" from " false" to "true".
%======================================================================
% D O C U M E N T P R E A M B L E
% Specify the document class, default style attributes, and page dimensions, etc.
% For hyperlinked PDF, suitable for viewing on a computer, use this:
\documentclass[letterpaper,12pt,titlepage,oneside,final]{book}
% For PDF, suitable for double-sided printing, change the PrintVersion variable below to "true" and use this \documentclass line instead of the one above:
%\documentclass[letterpaper,12pt,titlepage,openright,twoside,final]{book}
% Some LaTeX commands I define for my own nomenclature.
% If you have to, it's easier to make changes to nomenclature once here than in a million places throughout your thesis!
\newcommand{\package}[1]{\textbf{#1}} % package names in bold text
\newcommand{\cmmd}[1]{\textbackslash\texttt{#1}} % command name in tt font
\newcommand{\href}[1]{#1} % does nothing, but defines the command so the print-optimized version will ignore \href tags (redefined by hyperref pkg).
%\newcommand{\texorpdfstring}[2]{#1} % does nothing, but defines the command
% Anything defined here may be redefined by packages added below...
\newcommand{\titleformatted}[1]{\vspace{3.0 cm}\hspace*{0pt}
\begin{flushright}
\textsc{\huge#1}
\end{flushright}
\vspace{1.0 cm}}
\newcommand{\centertitleformatted}[1]{\vspace{3.0 cm}\hspace*{0pt}
\begin{center}
\textsc{\huge#1}
\end{center}
\vspace{0.5 cm}} %
% document parameters
\def\doctitle{Thesis title}
\def\authorname{John Doe}
\def\supervisorname{Jane Doe}
\def\departmentname{Department of Physics}
\def\facultyname{Faculty of Science}
\def\degreename{Master of Science, Physics}
\def\location{Ottawa, Canada}
\def\yearname{2023}
\def\universityname{University of Ottawa}
% This package allows if-then-else control structures.
\usepackage{ifthen}
\newboolean{PrintVersion}
\setboolean{PrintVersion}{false}
% CHANGE THIS VALUE TO "true" as necessary, to improve printed results for hard copies by overriding some options of the hyperref package, called below.
%\usepackage{nomencl} % For a nomenclature (optional; available from ctan.org)
\usepackage{amsmath,amssymb,amstext,amsfonts} % Lots of math symbols and environments
\usepackage[pdftex]{graphicx} % For including graphics N.B. pdftex graphics driver
% The following packages are useful. See their respective documentation for more information.
\usepackage{breqn,enumitem,fancyhdr,setspace,caption,subcaption,ulem,tocloft,titlesec,lipsum,dirtytalk,mathtools,gensymb,lscape,float}
%Used for template generic text.
\usepackage{lipsum}
\usepackage[
backend=bibtex,
style=nature,
url = false,
]{biblatex}
\addbibresource{template}
\usepackage[includehead]{geometry}
% This changes the format of the table of contents as well as the list of figures and the list of tables
\renewcommand{\cfttoctitlefont}{\null\hfill\Huge\scshape}
\renewcommand{\cftloftitlefont}{\null\hfill\Huge\scshape}
\renewcommand{\cftlottitlefont}{\null\hfill\Huge\scshape}
% This changes the format of the chapter, part, and section fonts.
\renewcommand{\cftchapfont}{\scshape}
\renewcommand{\cftpartfont}{\bfseries\scshape}
\renewcommand*{\subsubsection}[1]{\vspace{10pt}{\large \scshape #1}\vspace{10pt}\newline}
\renewcommand{\chaptermark}[1]{%
\markboth{#1}{}%
}
\DeclareCaptionFormat{custom}
{%
\mdseries{#1#2}{\small #3}
}
\captionsetup{format=custom}
\titleformat{\chapter}[display]{\filleft\Huge\scshape}{\filleft\fontsize{80}{130}\selectfont\thechapter}{0pt}{}[]
\titleformat{\part}[display]{\filleft\Huge\scshape}{\fontsize{80}{130}\selectfont Part \thepart}{0pt}{}[]
% bizzarely, an extra page will be added betweeen the part and the following chapter unless there is text immediately following the chapter title. This is fine, so far.
\titleformat{\section}[hang]{\mdseries\Large}{\thesection}{20pt}{\scshape}
\titleformat{\subsection}[hang]{\mdseries\large}{\thesubsection}{20pt}{\scshape}
\titlespacing*{\chapter}{0pt}{10pt}{30pt}% NEW
% These packages add typefaces to the document.
% \usepackage[cmintegrals,cmbraces]{newtxmath}
% uncommend the following lines to make the fonttype garamond
% \usepackage{ebgaramond}
% \usepackage{ebgaramond-maths}
% % Some characters are not defined in garamond
% \DeclareSymbolFont{cmmathletters}{OML}{cmm}{m}{it}
% \DeclareMathSymbol{\newepsilon}{\mathord}{cmmathletters}{"0F}
% \DeclareMathSymbol{\newmu}{\mathord}{cmmathletters}{"16}
% \DeclareMathSymbol{\newpartial}{\mathord}{cmmathletters}{"40}
% \renewcommand{\mu}{\newmu}
% \renewcommand{\epsilon}{\newepsilon}
% \renewcommand{\partial}{\newpartial}
% Hyperlinks make it very easy to navigate an electronic document.
% In addition, this is where you should specify the thesis title and author as they appear in the properties of the PDF document.
% Use the "hyperref" package
% N.B. HYPERREF MUST BE THE LAST PACKAGE LOADED; ADD ADDITIONAL PKGS ABOVE
\usepackage[pdftex,pagebackref=false]{hyperref} % with basic options
%\usepackage[pdftex,pagebackref=true]{hyperref}
% N.B. pagebackref=true provides links back from the References to the body text. This can cause trouble for printing.
\hypersetup{
plainpages=false, % needed if Roman numbers in frontpages
unicode=false, % non-Latin characters in Acrobat’s bookmarks
pdftoolbar=true, % show Acrobat’s toolbar?
pdfmenubar=true, % show Acrobat’s menu?
pdffitwindow=false, % window fit to page when opened
pdfstartview={FitH}, % fits the width of the page to the window
pdftitle=\doctitle, % title!
pdfauthor=\authorname,
pdfsubject={TeX templates},
% pdfkeywords={keyword1} {key2} {key3}, % list of keywords, and uncomment this line if desired
pdfnewwindow=true, % links in new window
colorlinks=true, % false: boxed links; true: colored links
linkcolor=black, % color of internal links
citecolor=black, % color of links to bibliography
filecolor=black, % color of file links
urlcolor=black % color of external links
}
\ifthenelse{\boolean{PrintVersion}}{ % for improved print quality, change some hyperref options
\hypersetup{ % override some previously defined hyperref options
% colorlinks,%
citecolor=black,%
filecolor=black,%
linkcolor=black,%
urlcolor=black}
}{} % end of ifthenelse (no else)
\usepackage[automake,abbreviations]{glossaries-extra} % Exception to the rule of hyperref being the last add-on package
\usepackage{siunitx} % not sure why by it breaks if I put this above
\usepackage[nameinlink]{cleveref}
% Setting up the page margins...
% Set margins to minimum permitted by uOttawa thesis regulations:
\setlength{\marginparwidth}{0pt} % width of margin notes
% N.B. If margin notes are used, you must adjust \textwidth, \marginparwidth
% and \marginparsep so that the space left between the margin notes and page
% edge is less than 15 mm (0.6 in.)
\setlength{\marginparsep}{0pt} % width of space between body text and margin notes
\setlength{\evensidemargin}{0.125in} % Adds 1/8 in. to binding side of all
% even-numbered pages when the "twoside" printing option is selected
\setlength{\oddsidemargin}{0.125in} % Adds 1/8 in. to the left of all pages when "oneside" printing is selected, and to the left of all odd-numbered pages when "twoside" printing is selected
\setlength{\textwidth}{6.375in} % assuming US letter paper (8.5 in. x 11 in.) and side margins as above
\raggedbottom
% The following statement specifies the amount of space between paragraphs. Other reasonable specifications are \bigskipamount and \smallskipamount.
\setlength{\parskip}{\medskipamount}
% The following statement controls the line spacing.
% The default spacing corresponds to good typographic conventions and only slight changes (e.g., perhaps "1.2"), if any, should be made.
\renewcommand{\baselinestretch}{1} % this is the default line space setting
% By default, each chapter will start on a recto (right-hand side) page.
% We also force each section of the front pages to start on a recto page by inserting \cleardoublepage commands.
% In many cases, this will require that the verso (left-hand) page be blank, and while it should be counted, a page number should not be printed.
% The following statements ensure a page number is not printed on an otherwise blank verso page.
\let\origdoublepage\cleardoublepage
\newcommand{\clearemptydoublepage}{%
\clearpage{\pagestyle{empty}\origdoublepage}}
\let\cleardoublepage\clearemptydoublepage
% Define Glossary terms (This is properly done here, in the preamble and could also be \input{} from a separate file...)
\input{glossaries}
\makeglossaries
%======================================================================
% L O G I C A L D O C U M E N T
% The logical document contains the main content of your thesis.
% Being a large document, it is a good idea to divide your thesis into several files, each one containing one chapter or other significant chunk of content, so you can easily shuffle things around later if desired.
%======================================================================
\begin{document}
%----------------------------------------------------------------------
% FRONT MATERIAL
% title page, examining committee membership (for PhD Thesis only), declaration, borrowers' page, abstract, acknowledgements,
% dedication, table of contents, list of tables, list of figures, nomenclature, etc.
%----------------------------------------------------------------------
\input{uo-ethesis-frontpgs}
%----------------------------------------------------------------------
% MAIN BODY
% This thesis uses different files for different chapters.
% Each chapter file is started with the \chapter command.
% Only use \documentclass or \begin{document} and \end{document} commands in this master document.
% Tip: Putting each sentence on a new line is a way to simplify later editing.
%----------------------------------------------------------------------
% set spacing after front matter
\doublespacing
% set the header to read the chapter, left justified
\pagestyle{fancy}
\rhead{}
\setlength{\headheight}{30pt}
\input{chapters/chapter-introduction}
\part{Tips and tricks}
\label{part:tipsAndTricks}
\input{chapters/chapter-template}
%----------------------------------------------------------------------
% END MATERIAL
% Bibliography, Appendices, Index, etc.
%----------------------------------------------------------------------
% Appendices
% The \appendix statement indicates the beginning of the appendices.
\appendix
% Add an un-numbered title page before the appendices and a line in the Table of Contents
\chapter*{APPENDICES}
\addcontentsline{toc}{chapter}{APPENDICES}
% Appendices are just more chapters, with different labeling (letters instead of numbers).
% \doublespacing
\input{appendices/appendix-template}
%----------------------------------------------------------------------
% Bibliography
% The following statement selects the style to use for references.
% It controls the sort order of the entries in the bibliography and also the formatting for the in-text labels.
% \bibliographystyle{ieeetr}
% This specifies the location of the file containing the bibliographic information.
% It assumes you're using BibTeX to manage your references (if not, why not?).
\cleardoublepage % This is needed if the "book" document class is used, to place the anchor in the correct page, because the bibliography will start on its own page.
% Use \clearpage instead if the document class uses the "oneside" argument
\phantomsection % With hyperref package, enables hyperlinking from the table of contents to bibliography
% The following statement causes the title "References" to be used for the bibliography section:
\renewcommand*{\bibname}{References}
\renewcommand*{\bibfont}{\footnotesize}
% Add the References to the Table of Contents
\addcontentsline{toc}{chapter}{References}
\singlespace
\printbibliography
\cleardoublepage
\phantomsection % allows hyperref to link to the correct page
%----------------------------------------------------------------------
% GLOSSARIES (Lists of definitions, abbreviations, symbols, etc. provided by the glossaries-extra package)
% -----------------------------
% \glsaddall
% \printglossary[type = constant, style=twocolumnstyle]
\cleardoublepage
\phantomsection % allows hyperref to link to the correct page
\end{document} % end of logical document