%% main.tex
%% Copyright 2022 A. Grau
%
% This work may be distributed and/or modified under the conditions of the LaTeX
% Project Public License, either version 1.3 of this license or (at your option)
% any later version, with the exception that distribution of Derived Work is not
% subject to the requirements of section 6.2.
% The latest version of this license is in
%   http://www.latex-project.org/lppl.txt
% and version 1.3 or later is part of all distributions of LaTeX version
% 2005/12/01 or later.
%
% Inspired by an initial work from A. Pezzoni hosted on https://github.com/donbex/yorkthesis
%
% Current version: v1.0
% Changelog:
% 2022/07/08: Creation of this file serving as an example
%
% This work has the LPPL maintenance status `maintained`.
%
% The Current Maintainer of this work is A. Grau.
%
% This work consists of all the files listed in the README.md,
% and provides a copy of the original hosted on
% https://git.tigrau.ovh/Ambroise/LaTeX-Templates/York-Thesis.

%%% ==== Begin file
% FORMAT: Font size must be at least 11pt, 12pt is set as default
% TODO: Change `draft` to `final` for the published version.
\documentclass[draft]{yorkthesis}
% Import the personal options for the class
\usepackage{thesisoptions}

% Import the preamble with all the packages and macros
\input{mypreamble}


%%% ==== Thesis title page info
\title{Writing your maths thesis at UoY\todo{change title}}
\subtitle{A documented example on its structure and use\todo{change/remove subtitle}} % optional
\author{Ambroise Grau\todo{change author's name}}
\department{Mathematics} % FORMAT: do not include "Department of"
\qualification{PhD\todo[caption={Make it final}, color=red!60]{Change \texttt{draft} to \texttt{final} in the options passed to the class when everything will be ready}}
% \submitdate{September 2020}  % FORMAT: [month] [year].
%                              % Defaults to current month if unset.


\begin{document}
% FORMAT: All pages should be numbered continuously.

% Suppressing the numbering style and headers for the opening pages
\frontmatter* 

%% Call the title page to be made. Use this instead of \titlepage to get the yorkthesis class format 
\makethesistitle

%% Abstract of the thesis [required]
\chapter{Abstract}
% TODO: 
\todo[noline]{Write the abstract.}
% FORMAT: At most 300 words.
\vspace*{-2em}\begin{quote}
\centering \scshape \itshape The \texttt{Abstract} section is a requirement and should not be longer than 300 words.
\end{quote}\todo[caption={Shorten the abstract}, size=footnotesize]{Keep it under the limit to prevent doing the same thing I'm doing reducing fonts}
{\small
This document serves as an example of the look the \texttt{yorkthesis} class can provide while being at the same time a documentation for the code this document is built upon. 
This whole project was prompted from the fact that the template provided by the department was very old and outdated, and didn't provide a ``good enough`` look. 
For a thesis document, the usual \texttt{article} environment does not provide the chapter layout one would expect to structure such an important piece of work.
The class that is recommended is the \href{https://ctan.org/pkg/memoir}{\texttt{memoir}} class, but its documentation and setting can be a bit daunting at first glance due to its sheer volume (at the time of writing the documentation is $615$ pages long, and its implementation in \TeX consists of more than $37000$ lines of code). 

For his thesis in 2020, Alessandro Pezzoni decided to write a class on top of the \texttt{memoir} one that would contain the structure required by the university while being also easier to use (you can find his initial implementation in his github project at \url{https://github.com/donbex/yorkthesis}).
He accepted to share this for others to use it, and I am really grateful for that. 
I decided to add two elements to his class implementation (the possibility of a subtitle and an easier handling of margins), but thought that a thorough example of a good folder structure for writing a thesis would benefit people.
On top of being hosted on the maths departmental moodle page, the up to date code can be downloaded on my personal Gitea repository (at \url{https://git.tigrau.ovh/Ambroise/LaTeX-Templates/York-Thesis}), where suggestions and requests can be made, and a copy of it can also be found as an Overleaf project (at \url{https://www.overleaf.com/read/mmprbwrdbgbx}).

I hope this will be useful to many others.}\todo[color=red!60, inline, size=footnotesize,caption={Warning for old \LaTeX\ versions}]{Warning: Some features might not work as intended if the installed \LaTeX\ version and its packages are not up to date}

\hfill \AG


%%% ==== Tables of content, figures, arrays, etc. [required when existing]
\clearpage
\tableofcontents

% \clearpage
% \listoftables

% \clearpage
% \listoffigures

% FORMAT: Any material that cannot be included in the thesis and will accompany
%         it on a separate storage should be listed here.

% List all the \todo present in the document with the colour associated to them
% Delete when appropriate
\listoftodos
\todo{Remove this list of todos}

%% Acknowledgment section [optional]
\chapter{Acknowledgments}
% TODO: write if any. Otherwise remove the chapter.
\todo[noline]{Write the acknowledgements}
\begin{quote}
\centering \scshape \itshape The \texttt{Acknowledgment} section is optional and should be deleted if not used.
\end{quote}
\bigskip

This section is where you thank your funding body, the department, your supervisor, your most loved campus geese, or whoever else you think is necessary and contributed to your achievement.

\medskip
As for myself, I want to thank Alessandro for his template which makes the perfectionist inside me happy to pick up a well done job and to augment it at my wish.

%% Author's declaration section [required]
\chapter{Author's declaration}
% TODO:
\todo[noline]{Write the author's declaration}
% FORMAT: some wording needed to be included
\begin{quote}
\centering \scshape \slshape The \texttt{Author's declaration} section is a requirement and should be stated appropriately.
\end{quote}
\bigskip
This section should include a text similar to:
\begin{verbatim}
   I declare that the work presented in this thesis, except where 
   otherwise stated, is based on my own research carried out at 
   the University of York and has not been submitted previously 
   for any degree at this or any other university. Sources are 
   acknowledged by explicit references.
\end{verbatim}
If you have submitted a paper (either already published or currently under review), this should be explicitly mentioned in this section with a reference to its bibliography entry.

% WARNING: Any material included in the thesis that has been presented before
%          should be mentioned here, with full references for papers published
%          or under review.

% Set the style to the main body of the document
\mainmatter*

%%% ==== The filling of the thesis, calling the files in their order of appearance
\subfile{C-Intro/intro}
\subfile{C-Begin/beg}
\subfile{C-Middle/mid}
\subfile{C-End/end}



%%% ==== Appendix part
\appendix

\chapter{A first appendix chapter}
\Blindtext

\backmatter

% FORMAT: Glossary and/or list of abbreviations goes here.

% FORMAT: According to the guidelines, a list of _references_ includes only the
%         bibliographical entries of the items actually cited in the text,
%         while a _bibliography_ should include all the items consulted in
%         writing the thesis.
\printbibliography[heading=bibintoc, title=References]

% FORMAT: The index, if there is one, goes here.


\end{document}