% Author: Eduardo Pignatelli
% Version: 1.0
% This template is adapted for the EEE MSc degre from following: https://www.overleaf.com/latex/templates/thesis-template-for-university-college-london/ndczhjnzxbyk
% UCL Thesis LaTeX Template
% (c) Ian Kirker, 2014
%
% This is a template/skeleton for PhD/MPhil/MRes theses.
%
% It uses a rather split-up file structure because this tends to
% work well for large, complex documents.
% We suggest using one file per chapter, but you may wish to use more
% or fewer separate files than that.
% We've also separated out various bits of configuration into their
% own files, to keep everything neat.
% Note that the \input command just streams in whatever file you give
% it, while the \include command adds a page break, and does some
% extra organisation to make compilation faster. Note that you can't
% use \include inside an \include-d file.
% We suggest using \input for settings and configuration files that
% you always want to use, and \include for each section of content.
% If you do that, it also means you can use the \includeonly statement
% to only compile up the section you're currently interested in.
% You might also want to put figures into their own files to be \input.
% For more information on \input and \include, see:
% http://tex.stackexchange.com/questions/246/when-should-i-use-input-vs-include
% Formatting rules for theses are here:
% http://www.ucl.ac.uk/current-students/research_degrees/thesis_formatting
% Binding and submitting guidelines are here:
% http://www.ucl.ac.uk/current-students/research_degrees/thesis_binding_submission
% This package goes first and foremost, because it checks all
% your syntax for mistakes and some old-fashioned LaTeX commands.
% Note that normally you should load your documentclass before
% packages, because some packages change behaviour based on
% your document settings.
% Also, for those confused by the RequirePackage here vs usepackage
% elsewhere, usepackage cannot be used before the documentclass
% command, while RequirePackage can. That's the only functional
% difference as far as I'm aware.
\RequirePackage[l2tabu, orthodox]{nag}
% ------ Main document class specification ------
% The draft option here prevents images being inserted,
% and adds chunky black bars to boxes that are exceeding
% the page width (to show that they are).
% The oneside option can optionally be replaced by twoside if
% you intend to print double-sided. Note that this is
% *specifically permitted* by the UCL thesis formatting
% guidelines.
%
% Valid options in terms of type are:
% phd
% mres
% mphil
%\documentclass[12pt,draft,a4paper,oneside]{ucl_thesis}
\documentclass[12pt,a4paper,oneside]{ucl_thesis}
% Package configuration:
% LaTeX uses "packages" to add extra commands and features.
% There are quite a few useful ones, so we've put them in a
% separate file.
% -------- Packages --------
% This package just gives you a quick way to dump in some sample text.
% You can remove it -- it's just here for the examples.
\usepackage{blindtext}
% This package means empty pages (pages with no text) won't get stuff
% like chapter names at the top of the page. It's mostly cosmetic.
\usepackage{emptypage}
% The graphicx package adds the \includegraphics command,
% which is your basic command for adding a picture.
\usepackage{graphicx}
% The float package improves LaTeX's handling of floats,
% and also adds the option to *force* LaTeX to put the float
% HERE, with the [H] option to the float environment.
\usepackage{float}
% The amsmath package enhances the various ways of including
% maths, including adding the align environment for aligned
% equations.
\usepackage{amsmath}
% Use these two packages together -- they define symbols
% for e.g. units that you can use in both text and math mode.
\usepackage{gensymb}
\usepackage{textcomp}
% You may also want the units package for making little
% fractions for unit specifications.
%\usepackage{units}
\usepackage{booktabs}
% The setspace package lets you use 1.5-sized or double line spacing.
\usepackage{setspace}
\setstretch{1.5}
\usepackage{subcaption}
% That just does body text -- if you want to expand *everything*,
% including footnotes and tables, use this instead:
%\renewcommand{\baselinestretch}{1.5}
% PGFPlots is either a really clunky or really good way to add graphs
% into your document, depending on your point of view.
% There's waaaaay too much information on using this to cover here,
% so, you might want to start here:
% http://pgfplots.sourceforge.net/
% or here:
% http://pgfplots.sourceforge.net/pgfplots.pdf
%\usepackage{pgfplots}
%\pgfplotsset{compat=1.3} % <- this fixed axis labels in the version I was using
% PGFPlotsTable can help you make tables a little more easily than
% usual in LaTeX.
% If you're going to have to paste data in a lot, I'd suggest using it.
% You might want to start with the manual, here:
% http://pgfplots.sourceforge.net/pgfplotstable.pdf
%\usepackage{pgfplotstable}
% These settings are also recommended for using with pgfplotstable.
%\pgfplotstableset{
% % these columns/<colname>/.style={<options>} things define a style
% % which applies to <colname> only.
% empty cells with={--}, % replace empty cells with '--'
% every head row/.style={before row=\toprule,after row=\midrule},
% every last row/.style={after row=\bottomrule}
%}
% The mhchem package provides chemistry formula typesetting commands
% e.g. \ce{H2O}
%\usepackage[version=3]{mhchem}
% And the chemfig package gives a weird command for adding Lewis
% diagrams, for e.g. organic molecules
%\usepackage{chemfig}
% The linenumbers command from the lineno package adds line numbers
% alongside your text that can be useful for discussing edits
% in drafts.
% Remove or comment out the command for proper versions.
%\usepackage[modulo]{lineno}
% \linenumbers
% Alternatively, you can use the ifdraft package to let you add
% commands that will only be used in draft versions
%\usepackage{ifdraft}
% For example, the following adds a watermark if the draft mode is on.
%\ifdraft{
% \usepackage{draftwatermark}
% \SetWatermarkText{\shortstack{\textsc{Draft Mode}\\ \strut \\ \strut \\ \strut}}
% \SetWatermarkScale{0.5}
% \SetWatermarkAngle{90}
%}
% The multirow package adds the option to make cells span
% rows in tables.
\usepackage{multirow}
% Subfig allows you to create figures within figures, to, for example,
% make a single figure with 4 individually labeled and referenceable
% sub-figures.
% It's quite fiddly to use, so check the documentation.
%\usepackage{subfig}
% The natbib package allows book-type citations commonly used in
% longer works, and less commonly in science articles (IME).
% e.g. (Saucer et al., 1993) rather than [1]
% More details are here: http://merkel.zoneo.net/Latex/natbib.php
%\usepackage{natbib}
% The bibentry package (along with the \nobibliography* command)
% allows putting full reference lines inline.
% See:
% http://tex.stackexchange.com/questions/2905/how-can-i-list-references-from-bibtex-file-in-line-with-commentary
\usepackage{natbib}
% modification to natbib citations
\bibliographystyle{tmlr}
\setcitestyle{authoryear,round,citesep={;},aysep={,},yysep={;}}
% The isorot package allows you to put things sideways
% (or indeed, at any angle) on a page.
% This can be useful for wide graphs or other figures.
%\usepackage{isorot}
% The caption package adds more options for caption formatting.
% This set-up makes hanging labels, makes the caption text smaller
% than the body text, and makes the label bold.
% Highly recommended.
\usepackage[format=hang,font=small,labelfont=bf]{caption}
% If you're getting into defining your own commands, you might want
% to check out the etoolbox package -- it defines a few commands
% that can make it easier to make commands robust.
\usepackage{etoolbox}
% And then some settings in separate files.
% General parameters, for ALL pages:
\renewcommand{\topfraction}{0.9} % max fraction of floats at top
\renewcommand{\bottomfraction}{0.8} % max fraction of floats at bottom
% Parameters for TEXT pages (not float pages):
\setcounter{topnumber}{2}
\setcounter{bottomnumber}{2}
\setcounter{totalnumber}{4} % 2 may work better
\setcounter{dbltopnumber}{2} % for 2-column pages
\renewcommand{\dbltopfraction}{0.9} % fit big float above 2-col. text
\renewcommand{\textfraction}{0.07} % allow minimal text w. figs
% Parameters for FLOAT pages (not text pages):
\renewcommand{\floatpagefraction}{0.7} % require fuller float pages
% N.B.: floatpagefraction MUST be less than topfraction !!
\renewcommand{\dblfloatpagefraction}{0.7} % require fuller float pages
% remember to use [htp] or [htpb] for placement,
% e.g.
% \begin{figure}[htp]
% ...
% \end{figure}
% These control how many number sections your subsections will take
% e.g. Section 2.3.1.5.6.3
% and how many of those will get put into the contents pages.
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}
\begin{document}
% \nobibliography*
% ^-- This is a dumb trick that works with the bibentry package to let
% you put bibliography entries whereever you like.
% I used this to put references to papers a chapter's work was
% published in at the end of that chapter.
% For more information, see: http://stefaanlippens.net/bibentry
% If you haven't finished making your full BibTex file yet, you
% might find this useful -- it'll just replace all your
% citations with little superscript notes.
% Uncomment to use.
%\renewcommand{\cite}[1]{\emph{\textsuperscript{[#1]}}}
% At last, content! Remember filenames are case-sensitive and
% *must not* include spaces.
\include{content/0-Preamble}
\include{content/1-Introduction}
\include{content/2-Background}
\include{content/3-Related_work}
\include{content/4-Methods}
\include{content/5-Experiments}
\include{content/6-Conclusions}
\include{Appendices}
% You could separate these out into different files if you have
% particularly large appendices.
% This line manually adds the Bibliography to the table of contents.
% The fact that \include is the last thing before this ensures that it
% is on a clear page, and adding it like this means that it doesn't
% get a chapter or appendix number.
\addcontentsline{toc}{chapter}{Bibliography}
% Actually generates your bibliography.
\bibliography{references}
% All done. \o/
\end{document}