For formatting instructions and requirements see the Formatting section of the School of Graduate Studies website. The thesis style template for LaTeX (ut-thesis) implements these requirements. You are not required to use the template, but using it will make most of the formatting requirements easier to meet.
►►Thesis template for LaTeX.
Below are some general formatting tips for drafting your thesis in LaTeX. In addition, there are other supports available:
Many common problems have been solved on the TeX - LaTeX Stack Exchange Q & A Forum
To use the LaTeX and ut-thesis, you need two things: a LaTeX distribution (compiles your code), and an editor (where you write your code). Two main approaches are:
Occasionally, the version of ut-thesis on GitHub may be more up-to-date than the popular distributions (especially yearly TeX Live), including small bug fixes. To use the GitHub version, you can download the file ut-thesis.cls (and maybe the documentation ut-thesis.pdf) and place it in your working directory. This will take priority over any other versions of ut-thesis on your system while in this directory.
Here are a few tips & tricks for formatting your thesis in LateX.
Using the ut-thesis document class, a minimal example thesis might look like:
\documentclass{ut-thesis}
\author{Your Name}
\title{Thesis Title}
\degree{Doctor of Philosophy}
\department{LaTeX}
\gradyear{2020}
\begin{document}
\frontmatter
\maketitle
\begin{abstract}
% abstract goes here
\end{abstract}
\tableofcontents
\mainmatter
% main chapters go here
% references go here
\appendix
% appendices go here
\end{document}
►► A larger example is available on GitHub here.
You may want to consider splitting your code into multiple files. The contents of each file can then be added using \input{filename}.
The usual commands for document hierarchy are available like \chapter, \section, \subsection, \subsubsection, and \paragraph. To control which appear in the \tableofcontents, you can use \setcounter{tocdepth}{i}, where i = 2 includes up to \subsection, etc. For unnumbered sections, use \section*, etc. No component should be empty, such as \section{...} immediately followed by \subsection{...}.
Note: In the examples below, we denote the preamble vs body like:
preamble code
---
body code
In LaTeX, tables and figures are environments called “floats”, and they usually don’t appear exactly where you have them in the code. This is to avoid awkward whitespace. Float environments are used like \begin{env} ... \end{env}, where the entire content ... will move with the float. If you really need a float to appear exactly “here”, you can use:
\usepackage{float}
---
\begin{figure}[H]
...
\end{figure}
Most other environments (like equation) do not float.
A LaTeX table as a numbered float is distinct from tabular data. So, a typical table might look like:
\usepackage{booktabs}
---
\begin{table}
\centering
\caption{The table caption}
\begin{tabular}{crll}
i & Name & A & B \\
1 & First & 1 & 2 \\
2 & Second & 3 & 5 \\
3 & Third & 8 & 13
\end{tabular}
\end{table}
The & separates cells and \\ makes a new row. The {crll} specifies four columns: 1 centred, 1 right-aligned, and 2 left-aligned.
Some helpful packages for creating more advanced tabular data:
A LaTeX figure is similarly distinct from graphical content. To include graphics, it’s best to use the command \includegraphics from the graphicx package. Then, a typical figure might look like:
\usepackage{graphicx}
---
\begin{figure}
\centering
\includegraphics[width=.6\textwidth]{figurename}
\end{figure}
Here we use .6\textwidth to make the graphic 60% the width of the main text.
By default, graphicx will look for figurename in the same folder as main.tex; if you need to add other folders, you can use \graphicspath{{folder1/}{folder2/}...}.
The preferred package for subfigures is subcaption; you can use it like:
\usepackage{subcaption}
---
\begin{figure} % or table, then subtable below
\begin{subfigure}{0.5\textwidth}
\includegraphics[width=\textwidth]{figureA}
\caption{First subcaption}
\end{subfigure}
\begin{subfigure}{0.5\textwidth}
\includegraphics[width=\textwidth]{figureB}
\caption{Second subcaption}
\end{subfigure}
\caption{Overall figure caption}
\end{figure}
This makes two subfigures each 50% of the text width, with respective subcaptions, plus an overall figure caption.
Math can be added inline with body text like $E = m c^2$, or as a standalone equation like:
\begin{equation}
E = m c^2
\end{equation}
A complete guide to math is beyond our scope here; again, Overleaf provides a great set of resources to get started.
We recommend using the hyperref package to make clickable links within your thesis, such as the table of contents, and references to equations, tables, figures, and other sections.
A cross-reference label can be added to a section or float environment using \label{key}, and referenced elsewhere using \ref{key}. The key will not appear in the final document (unless there is an error), so we recommend a naming convention like fig:diagram, tab:summary, or intro:back for \section{Background} within \chapter{Intro}, for example. We also recommend using a non-breaking space ~ like Figure~\ref{fig:diagram}, so that a linebreak will not separate “Figure” and the number.
You may need to compile multiple times to resolve cross-references (and citations). However, this occurs by default as needed in most editors.
The LaTeX package tikz provides excellent tools for drawing diagrams and even plotting basic math functions. Here is one small example:
\usepackage{tikz}
---
\begin{tikzpicture}
\node[red,circle] (a) at (0,0) {A};
\node[blue,square] (b) at (1,0) {B};
\draw[dotted,->] (a) -- node[above]{$\alpha$} (b);
\end{tikzpicture}
Don’t forget semicolons after every command, or else you will get stuck while compiling.
There are several options for managing references in LaTeX. We recommend the most modern package: biblatex, with the biber backend. A helpful overview is given here.
Assuming you have a file called references.bib that looks like:
@article{Lastname2020,
title = {The article title},
author = {Lastname, First and Last2, First2 and Last3 and First3},
journal = {Journal Name},
year = {2020},
vol = {99},
no = {1}
}
...
then you can cite the reference Lastname2020 using biblatex like:
\usepackage[backend=biber]{biblatex}
\addbibresource{references.bib}
---
\cite{Lastname2020}
...
\printbibliography
Depending on what editor you’re using to compile, this may work straight away. If not, you may need to update your compiling command to:
pdflatex main && biber main && pdflatex main && pdflatex main
Assuming your document is called main.tex. This is because biber is a separate tool from pdflatex. So in the command above, we first identify the cited sources using pdflatex, then collect the reference information using biber, then finish compiling the document using pdflatex, and then we compile once more in case anything got missed.
There are many options when loading biblatex to configure the reference formatting; it’s best to search the CTAN documentation for what you want to do.
Windows users may find that biber.exe or bibtex.exe get silently blocked by some antivirus software. Usually, an exception can be added within the antivirus software to allow these programs to run.
University of Toronto Libraries
130 St. George St.,Toronto, ON, M5S 1A5
libraryhelp@utoronto.ca
416-978-8450
Map
About web accessibility. Tell us about a web accessibility problem.
About online privacy and data collection.
© University of Toronto. All rights reserved. Terms and conditions.