Add first version of a thesis template
This commit is contained in:
27
.gitignore
vendored
Normal file
27
.gitignore
vendored
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
### macOS ###
|
||||||
|
# General
|
||||||
|
.DS_Store
|
||||||
|
.AppleDouble
|
||||||
|
.LSOverride
|
||||||
|
|
||||||
|
# Thumbnails
|
||||||
|
._*
|
||||||
|
|
||||||
|
# Files that might appear in the root of a volume
|
||||||
|
.DocumentRevisions-V100
|
||||||
|
.fseventsd
|
||||||
|
.Spotlight-V100
|
||||||
|
.TemporaryItems
|
||||||
|
.Trashes
|
||||||
|
.VolumeIcon.icns
|
||||||
|
.com.apple.timemachine.donotpresent
|
||||||
|
|
||||||
|
### Tex compiled files
|
||||||
|
*.aux
|
||||||
|
*.bcf
|
||||||
|
*.toc
|
||||||
|
*.synctex.gz
|
||||||
|
*.out
|
||||||
|
*.log
|
||||||
|
*.run.xml
|
||||||
|
*.tdo
|
||||||
6
York-Thesis/Bibfiles/firstbib.bib
Normal file
6
York-Thesis/Bibfiles/firstbib.bib
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
@book{texbook,
|
||||||
|
author = {Donald E. Knuth},
|
||||||
|
year = {1986},
|
||||||
|
title = {The {\TeX} Book},
|
||||||
|
publisher = {Addison-Wesley Professional}
|
||||||
|
}
|
||||||
BIN
York-Thesis/C-Begin/beg.pdf
Normal file
BIN
York-Thesis/C-Begin/beg.pdf
Normal file
Binary file not shown.
36
York-Thesis/C-Begin/beg.tex
Normal file
36
York-Thesis/C-Begin/beg.tex
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
%% beg.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 and documentation
|
||||||
|
%
|
||||||
|
% 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.
|
||||||
|
\documentclass[../main]{subfiles}
|
||||||
|
|
||||||
|
%\myexternaldocument{main} % for overleaf to get the cross references
|
||||||
|
|
||||||
|
\begin{document}
|
||||||
|
\chapter{Begin}\label{sec:Beg}
|
||||||
|
This is the beginning of your work where you will refer to equation \eqref{eq:thull}.
|
||||||
|
|
||||||
|
\blindmathpaper
|
||||||
|
|
||||||
|
\end{document}
|
||||||
33
York-Thesis/C-End/end.tex
Normal file
33
York-Thesis/C-End/end.tex
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
%% end.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 and documentation
|
||||||
|
%
|
||||||
|
% 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.
|
||||||
|
\documentclass[../main]{subfiles}
|
||||||
|
|
||||||
|
\begin{document}
|
||||||
|
\chapter{End}
|
||||||
|
|
||||||
|
Last section to say that I'm bored of creating this template, but I've used it as a procrastinating tool from actually writing my thesis. \AG
|
||||||
|
|
||||||
|
\end{document}
|
||||||
BIN
York-Thesis/C-Intro/intro.pdf
Normal file
BIN
York-Thesis/C-Intro/intro.pdf
Normal file
Binary file not shown.
248
York-Thesis/C-Intro/intro.tex
Normal file
248
York-Thesis/C-Intro/intro.tex
Normal file
@@ -0,0 +1,248 @@
|
|||||||
|
%% intro.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 and documentation
|
||||||
|
%
|
||||||
|
% 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.
|
||||||
|
|
||||||
|
\documentclass[../main]{subfiles}
|
||||||
|
|
||||||
|
%% TOOL: The following command can be used anywhere in the
|
||||||
|
%% file. However, it's use in the preamble is fairly useless
|
||||||
|
%% since the `else` part will never be run as preambles of
|
||||||
|
%% subfiles are ignored since the inclusion in the main gets
|
||||||
|
%% rid of all elements that are outside of the body enclosed
|
||||||
|
%% in the `\begin{document} ... \end{document}`.
|
||||||
|
%% This is only here as an example.
|
||||||
|
\ifSubfilesClassLoaded{ % only do these next lines if compiling this file alone
|
||||||
|
}{ % else condition, i.e. if we are compiling the main file
|
||||||
|
}
|
||||||
|
|
||||||
|
% change title and author when compiling this document on its own
|
||||||
|
\title{Folder structure of the project} \author{}
|
||||||
|
%\myexternaldocument{main} % for overleaf to get the cross references
|
||||||
|
|
||||||
|
\begin{document}
|
||||||
|
\ifSubfilesClassLoaded{ \maketitle \tableofcontents \listoftodos }{} % make title and todolist only if compiling by itself
|
||||||
|
\chapter{Introduction and documentation}
|
||||||
|
This serves as an introduction and a documentation to the file structure of this project and to the interaction between the different files present.
|
||||||
|
This file hierarchy tree is as follows (only source files are shown, compiled files are hidden):
|
||||||
|
\begin{verbatim}
|
||||||
|
[folders are denoted by a *]
|
||||||
|
* Project
|
||||||
|
|-- main.tex <- thesis tex file
|
||||||
|
|-- yorkthesis.cls <- the premade class
|
||||||
|
|-- thesisoptions.sty <- package holding the settings for the class
|
||||||
|
|-- mypreamble.tex <- packages and precious macros
|
||||||
|
|--* C-Intro
|
||||||
|
| !-- beg.tex <- introductory chapter in its folder
|
||||||
|
|--* C-Beg
|
||||||
|
| !-- beg.tex <- another chapter
|
||||||
|
|--* C-Middle
|
||||||
|
| !-- mid.tex <- another chapter
|
||||||
|
|--* C-End
|
||||||
|
| !-- end.tex <- last chapter
|
||||||
|
!--* Bibfiles
|
||||||
|
|-- firstbib.bib <- some bib file
|
||||||
|
!-- secondbib.bib <- another bib file
|
||||||
|
\end{verbatim}
|
||||||
|
\todo{add bib files/graphics to examples}
|
||||||
|
|
||||||
|
As can be seen on the diagram, the principal file of the thesis is \texttt{main.tex} which lies at the root of the \texttt{Project} folder, together with the class used for the thesis' layout and some helper files (an additional file not listed in the tree for overleaf is described in section \ref{sec:overleaf}).
|
||||||
|
The actual content of the the thesis is split in subfiles lying in multiple sub-folders.
|
||||||
|
The next section will describe the role of each file and how they should be used, while section \ref{sec:subfiles} describes the relation to each other and the code they need to work together.
|
||||||
|
|
||||||
|
\section{Roles and use of the files}
|
||||||
|
\subsection{The thesis: \texttt{main.tex}}
|
||||||
|
Even though the content of this file appears to be very small, this is the file that has to be compiled in order to obtain the full thesis. The motto of the \texttt{main} is ``Divide and conquer'', by means of delegating big tasks to other files and elements and bringing them all together in one place.
|
||||||
|
This file calls the \texttt{yorkthesis} class to create the document with only basic options, and then delegates the handling of its options to \texttt{thesisoptions.sty}, with the exception of the title page values which are to be filled in the main document.
|
||||||
|
|
||||||
|
The overall structure of the thesis is described in the \verb|\begin{document} ... \end{document}| by first creating the first pages of the thesis corresponding to the title page, abstract, table of contents (and other list of elements), acknowledgment and author's declaration, before calling onto subfiles to fill in the body of the document (selecting the order in which to include the work), and finishing by including the appendices and the bibliography.
|
||||||
|
|
||||||
|
\begin{rem}
|
||||||
|
The subfiles are called in the example by relative path, but there is a possibility to ignore that and simply use file names by uncommenting a section in the preamble. See the details in section \ref{sec:preamble-file}.
|
||||||
|
\end{rem}
|
||||||
|
|
||||||
|
\subsection{The class elements: \texttt{yorkthesis.cls} and \texttt{thesisoptions.tex}}
|
||||||
|
The \texttt{yorkthesis} class is built upon the \texttt{memoir} class and apart from forcing some options by default (such as setting A4), a title page layout is defined to follow the university regulations, giving access to the appropriate commands to do so.
|
||||||
|
Additionally, it creates a header for all pages, and gives access to new commands to set the page layout.
|
||||||
|
In order to use it, you need to call \verb|\documentclass[<options>]{yorkthesis}|, where \texttt{<options>} is a list of options compatible with the \texttt{memoir} class that will be passed to it.
|
||||||
|
Currently the only option passed is the \texttt{draft} option, which has multiple implications (details in section \ref{sec:draft-option}).
|
||||||
|
In order to create the title page the following must be called in the \texttt{main.tex}:
|
||||||
|
\begin{itemize}
|
||||||
|
\item \verb|\title{..}|: [required] title of the thesis;
|
||||||
|
\item \verb|\subtitle{..}|: [optional] subtitle (if appropriate);
|
||||||
|
\item \verb|\author{..}|: [required] your name;
|
||||||
|
\item \verb|\department{..}|: [required] department name, according to the list in the ``depositing your thesis'' section of the \href{https://www.york.ac.uk/research/graduate-school/progression/thesis/submit/}{GRS website};
|
||||||
|
\item \verb|\qualification{..}|: [required] name of the qualification for which this work is submitted (PhD, MSc,...);
|
||||||
|
\item \verb|\submitdate{..}|: [optional] the month and year of the first submission (if not included, will default to the month and year at compilation).
|
||||||
|
\end{itemize}
|
||||||
|
The other options for the class are set in the file \verb|thesisoptions.tex| and concern the following elements: fonts, margins, chapter style, sections style, list spacing and draft version options.
|
||||||
|
|
||||||
|
\subsubsection{Margins}
|
||||||
|
It is strongly recommended to use the commands provided to set the margins of the document instead of trying to deal with it by calling the \verb|geometry| package (even though it should work too, I cannot insure that the class will react well to that).
|
||||||
|
Margins are set by pair of opposite edges, so that the spine and foredge margins will be set in one command, and the upper and lower margins by a second one.
|
||||||
|
The sides of reference when setting the margins are the spine (for the binding) and the upper one.
|
||||||
|
|
||||||
|
The horizontal margins can be set either by giving one length, two lengths or a length and a ratio as follows:
|
||||||
|
\begin{itemize}
|
||||||
|
\item \verb|\horizontalmarginsvalue{x}|: [\verb|x| is a length with its unit] sets the spine and foredge margins to the value of \verb|x|;
|
||||||
|
\item \verb|\horizontalmarginsvalue[y]{x}|: [\verb|x| and \verb|y| are lengths with their unit] sets the spine margin to the value of \verb|x| and the foredge margin to the value of \verb|y|;
|
||||||
|
\item \verb|\horizontalmarginsratio[r]{x}|: [\verb|x| is a length with its unit, \verb|r| is a ratio] sets spine margin to the value of \verb|x| and the foredge margin to the value of $\verb|x|*\verb|r|$;
|
||||||
|
\item (\verb|\horizontalmarginsratio{x}| is equivalent to \verb|\horizontalmarginsratio[1]{x}| and \verb|\horizontalmarginsvalue{x}|).
|
||||||
|
\end{itemize}
|
||||||
|
The corresponding commands \verb|\verticalmarginsvalue| and \verb|\verticalmarginsratio| are used to set the upper and lower margins.
|
||||||
|
|
||||||
|
\begin{rem}
|
||||||
|
If no command is called for either the horizontal or the vertical margins, the default value for these will be used, which is set to \verb|3cm| for the spine and foredge margins, and to \verb|4cm| for the upper and lower margins, giving the inside frame for the content a similar ratio width/height to the original A4 page.
|
||||||
|
\end{rem}
|
||||||
|
|
||||||
|
\begin{rem}
|
||||||
|
Only one of the horizontal commands and one of the vertical ones should be called to insure an appropriate behaviour. If both \verb|\horizontalmarginsvalue| and \verb|\horizontalmarginsratio| are called, the spine value will be set to the last of the two commands called, whereas the foredge value will be set from the resulting operation of \verb|\horizontalmarginsvalue{x}| (I just didn't want to make another nested condition, so this is what happens when things go wrong).
|
||||||
|
\end{rem}
|
||||||
|
|
||||||
|
\subsubsection{Chapter and sections style}
|
||||||
|
The general layout of the sections is set by using the \verb|\headstyles{..}| command, which gives a special format to the headers of each of the \emph{Chapter, Section, Subsection, Subsubsection, Paragraph} and \emph{Subparagraph} subdivisions.
|
||||||
|
Examples can be found in the \verb|memoir| documentation in section 6.9.
|
||||||
|
It is possible to override such definitions by calling the \verb|\setSheadstyle{..}| command (where \verb|S| is one of the subdivision shortnames), as can be seen in the \verb|thesisoptions.tex| example file.
|
||||||
|
Additionally, more examples of chapter header exists (see appendix B of the \verb|memoir| documentation), and they can be called upon by using the \verb|\chapterstyle{..}| command.
|
||||||
|
Since this only define the style for a chapter, it is necessary to call it after the \verb|\headstyle{..}| command if you do not want this setting to be overridden.
|
||||||
|
You can also take the general structure of a chapter style and only redefine the style of the text for the chapter title and number as is done with the \verb|\renewcommand*{\chaptitlefont}{..}| in the option file for this example.
|
||||||
|
|
||||||
|
\subsubsection{The \texttt{draft} option}\label{sec:draft-option}
|
||||||
|
As mentioned earlier, this \texttt{draft} option is given when calling the class in the \texttt{main.tex} document, but is used to determine the behaviour of some other packages.
|
||||||
|
This option also allows to take actions conditionally on if it is present or not.
|
||||||
|
This is what the conditional operations located at the end of the \texttt{thesisoptions.tex} file are about:
|
||||||
|
\begin{verbatim}
|
||||||
|
\ifdraftdoc
|
||||||
|
%% Some actions occurring when `draft` is set
|
||||||
|
\else
|
||||||
|
%% Other actions if `draft` is not set
|
||||||
|
\fi
|
||||||
|
\end{verbatim}
|
||||||
|
which is currently used to make a watermark on the front page in draft mode, and call the \texttt{microtype} package otherwise.
|
||||||
|
|
||||||
|
Additionally, this example calls the \texttt{hyperref} package with the \texttt{final} option to override the fact that hyperlinks are not created in draft mode; whilst the \texttt{todonotes} package is called with the \texttt{obeyDraft} option which means that the todo notes on the side will only appear if the \texttt{draft} option is set for the class, and they will be disabled otherwise.
|
||||||
|
|
||||||
|
\subsection{The personal stuff: \texttt{mypreamble.tex}}\label{sec:preamble-file}
|
||||||
|
Apart from the important bit at the top of this file, its content is globally up to you. You should put in there all the packages and macros you will want or need to use.
|
||||||
|
|
||||||
|
Since I have decided to use the subfile package to simplify my life (more on that in section \ref{sec:subfiles}), the first thing to do is to include the packages needed to work with that.
|
||||||
|
We first need to add the \texttt{xr-hyper} package which will take care of cross references and their correct behaviour with the \texttt{hyperref} package, and then add the \texttt{subfiles} package.
|
||||||
|
In order to use the references between different files we need an additional command that will make them available to the subfiles (the main file will have them anyway).
|
||||||
|
After these few inclusions there are two sets of commands that are commented out and serve different purposes.
|
||||||
|
|
||||||
|
The first one is as follows:
|
||||||
|
\begin{verbatim}
|
||||||
|
\makeatletter
|
||||||
|
\ def\input@path{ {dir1/}{dir2/} }
|
||||||
|
\makeatother
|
||||||
|
\end{verbatim}
|
||||||
|
which allows to use file names in inclusion, instead of relative paths as long as all the folders of the project are added to this list by respecting the syntax. It is currently commented out since this slows down the compilation time a lot and provide only small benefit. But if you are lazy, then this can be helpful.
|
||||||
|
The second part concerns the use of \emph{Overleaf}, as additional commands are needed for cross-referencing purposes (see section \ref{sec:overleaf} for the details). Only uncomment these lines if you are using that website to write your thesis.
|
||||||
|
|
||||||
|
On top of the usual packages that relates to maths, some additional ones are listed in the example such as the \texttt{hyperref} package which creates hyperlinks into the outputed pdf in order to jump between sections, and the \texttt{todonotes} which allows you to create sticker notes in the margins about what needs to be done as well as giving you a list of these after the table of content by calling \verb|\listoftodos| (check \href{http://mirrors.ctan.org/macros/latex/contrib/todonotes/todonotes.pdf}{its documentation} for more info).
|
||||||
|
Your bibilography needs to be setup somewhere, so if you are using \texttt{.bib} files, this is the right place to include the package with all the options you would like, and then to add the files needed as a ressource, so that referencing a book like Knuth's TeXbook \cite{texbook} becomes very easy.
|
||||||
|
Notice the invocation with the \verb|\subfix{..}| command (or the relative path in the Overleaf project as the subfix didn't seem to work there unfortunately...).
|
||||||
|
|
||||||
|
The \texttt{mypreamble} file is also the place to create the styling of your theorems, definitions, remarks and other scholia.
|
||||||
|
|
||||||
|
Lastly, all your macros for new commands should go there, so that they are all in one place and available to use everywhere.
|
||||||
|
|
||||||
|
\begin{rem}[Technical implementation]
|
||||||
|
The choice has been made to make to have this document as a plain \texttt{.tex} file instead of making it a package file (as \texttt{.sty}). This is a personal choice to avoid any interpretation of the commands listed there and to make the packages placed there too.
|
||||||
|
\end{rem}
|
||||||
|
|
||||||
|
\subsection{The other files}
|
||||||
|
All the other files of the structure correspond to the actual content of the thesis separated between chapters.
|
||||||
|
These are pretty standalone files that one would write in a classical \texttt{article} class style, with only a few elements that will be covered in the following section.
|
||||||
|
|
||||||
|
\section{Using subfiles}\label{sec:subfiles}
|
||||||
|
The reason why I chose to use the \texttt{subfiles} package is that it allows you to include files into the main document, while keeping the possibility to compile them separately.
|
||||||
|
That way you don't have to move back to the main file every time you want to compile something, you can compile only the desired section instead of the whole document, and you don't need to delete all the stuff outside of the \verb|\begin{document}..\end{document}| in the file storing your chapter content in order to make it compile from the main document.
|
||||||
|
|
||||||
|
How to do it is pretty straightforward and can be found on p.2--3 of the \href{https://mirror.ox.ac.uk/sites/ctan.org/macros/latex/contrib/subfiles/subfiles.pdf}{package documentation}.
|
||||||
|
In short, the subfiles, are using a special document class with the path to the main file by calling upon \verb| \documentclass[../main]{subfiles}|.
|
||||||
|
This does most of the job, since this will allow the file to compile by using all the preamble of the main file. In turn, when in \texttt{main.tex} the command \verb|\subfile{..}| is invoked, it will only pick the content located between the \verb|\begin{document}| and \verb|\end{document}| commands.
|
||||||
|
If you want to run some actions depending on if the file is included or if it is compiled by itself there is a command for it that you can include in the body of the document:
|
||||||
|
\begin{verbatim}
|
||||||
|
\ifSubfilesClassLoaded{
|
||||||
|
% actions to do if compiling this file alone
|
||||||
|
}{
|
||||||
|
% else condition, i.e. if we are compiling the main file
|
||||||
|
}
|
||||||
|
\end{verbatim}
|
||||||
|
which can be used to only create a local titlepage, toc or bibliography which should not appear when compiling the main file (you can check the difference between the result of the compilation of the \texttt{intro.tex} file on its own compared to when it is integrated into the main).
|
||||||
|
|
||||||
|
\subsection{Including graphics}
|
||||||
|
In order to make sure that the path will not get broken when compiling the main file, you might need to use the \verb|\subfix{..}| command around the filename so that the \texttt{subfiles} class can deal with that problem for us by doing the following: \verb|\includegraphics[<options>]{\subfix{image}}|.
|
||||||
|
|
||||||
|
\subsection{Cross-referencing}
|
||||||
|
Most of the job of cross referencing is done by the \texttt{xr-hyper} package, but we need to help it a bit. This is the reason of the presence of \verb|\externaldocument{\subfix{main}}| in the preamble.
|
||||||
|
After that, when you compile one of the subfile, it will always read the auxiliary file generated by the \texttt{main} document to find the references and to include the appropriate number in the right places.
|
||||||
|
For example, if we create an equation here that we will reference in Chapter \ref{sec:Beg}:
|
||||||
|
\begin{equation}\label{eq:thull}
|
||||||
|
\Omega(I) = \{ (\lambda, \rho)\in \Lambda(I)\times P(I) \mid s(\lambda t) = (s\rho) t \quad \forall s,t\in S\},
|
||||||
|
\end{equation}
|
||||||
|
(which denotes the translational hull of a subsemigroup $I\subseteq S$), we already have the labels appropriately introduced.
|
||||||
|
|
||||||
|
\subsubsection{Using the auxiliary file in a \LaTeX\ editor}
|
||||||
|
In order for the cross referencing to work in subfiles, you first need to compile the \texttt{main.tex} file.
|
||||||
|
This will create the \texttt{main.aux} file which stores all the labels and associated values.
|
||||||
|
Then compiling any subfile will use that auxiliary file and should give you access to all these references as expected.
|
||||||
|
|
||||||
|
\subsubsection{Using cross-ref in overleaf}\label{sec:overleaf}
|
||||||
|
|
||||||
|
If you intend to use Overleaf, some additional steps can be needed as described in the \href{https://www.overleaf.com/learn/how-to/Cross_referencing_with_the_xr_package_in_Overleaf}{documentation on the overleaf website}.
|
||||||
|
This is due to the fact that we cannot directly access the \texttt{.aux} files which contains the references we need as they are only stored in the cache and not in the file system. In order to do that, there are three necessary steps to accomplish this (see ):
|
||||||
|
\begin{enumerate}
|
||||||
|
\item in the file \texttt{mypreamble.tex} you need to uncomment the line that relates to the overleaf cross-referencing at the top of the file;
|
||||||
|
\item a new file named \texttt{latexmkrc} needs to be created containing the following code:
|
||||||
|
\begin{verbatim}
|
||||||
|
add_cus_dep( 'tex', 'aux', 0, 'makeexternaldocument' );
|
||||||
|
sub makeexternaldocument {
|
||||||
|
if (!($root_filename eq $_[0]))
|
||||||
|
{
|
||||||
|
system( "latexmk -cd -pdf \"$_[0]\"" );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
\end{verbatim}
|
||||||
|
which will force the creation of the auxiliary file of a dependency file called upon;
|
||||||
|
\item add the command \verb|\myexternaldocument{main}| to the preamble of each subfile, which will force the availability of \texttt{main.aux}.
|
||||||
|
\end{enumerate}
|
||||||
|
|
||||||
|
This process will allow the cross-referencing to happen, but will make the compilation time much slower, because it will require the compilation of the \texttt{main} file every time, which in turns ask all the subfiles to be compiled. If this is ok for you, then you can leave the settings as such and never touch this again.
|
||||||
|
|
||||||
|
However, there are ways to speed up the compilation process by using the fact that Overleaf keep the compiled files available in the cache.
|
||||||
|
To do this, simply unset all of the elements listed above (so keeping the lines commented out, and not creating the \texttt{latexmkrc} file). Then, compile the \texttt{main.tex} once, which will set the \texttt{.aux} file in the cache, and compile the subfile as usual.
|
||||||
|
You should be able to keep this cache set for a while, but remember that your browser might clean it at any point without you knowing it, so you would need to recompile the main for it to be working again.
|
||||||
|
It might also happen that the first compilations of the subfile produce errors but it should resolves itself fairly quickly.
|
||||||
|
|
||||||
|
\begin{rem}
|
||||||
|
In the log you will notice that Overleaf warns you about labels being defined multiple times. This is normal because it is reading the labels set both in the \texttt{main.aux} file as well as those in the auxiliary file of the current file you are compiling.
|
||||||
|
For this reason, you need to be extra careful not to use the same name for labels.
|
||||||
|
A way to check is to use the autofill of Overleaf to try a \verb|\ref{..}| with the label you are going to set, and if it is not suggested, then you should be fine to set it with \verb|\label{..}|.
|
||||||
|
\end{rem}
|
||||||
|
|
||||||
|
\section{Accessibility}
|
||||||
|
\todo[caption={Create the accessibility section}, inline]{Find the tools necessary to allow graphics and tables to be accessible.}
|
||||||
|
\end{document}
|
||||||
36
York-Thesis/C-Middle/mid.tex
Normal file
36
York-Thesis/C-Middle/mid.tex
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
%% mid.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 and documentation
|
||||||
|
%
|
||||||
|
% 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.
|
||||||
|
\documentclass[../main]{subfiles}
|
||||||
|
|
||||||
|
|
||||||
|
\begin{document}
|
||||||
|
\section{Middle part}
|
||||||
|
This will now have a chunk of automated part.
|
||||||
|
Note that this section is still part of the second chapter, even though it is written in another file than the rest of that chapter.
|
||||||
|
|
||||||
|
\blinddocument
|
||||||
|
|
||||||
|
\end{document}
|
||||||
BIN
York-Thesis/main.pdf
Normal file
BIN
York-Thesis/main.pdf
Normal file
Binary file not shown.
166
York-Thesis/main.tex
Normal file
166
York-Thesis/main.tex
Normal file
@@ -0,0 +1,166 @@
|
|||||||
|
%% 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}
|
||||||
129
York-Thesis/mypreamble.tex
Normal file
129
York-Thesis/mypreamble.tex
Normal file
@@ -0,0 +1,129 @@
|
|||||||
|
%% mypreamble.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.
|
||||||
|
%
|
||||||
|
% Current version: v1.0
|
||||||
|
% Changelog:
|
||||||
|
% 2022/07/08: Creation of preamble template
|
||||||
|
%
|
||||||
|
% 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.
|
||||||
|
|
||||||
|
|
||||||
|
%%% ===== Folder structure
|
||||||
|
% Important packages to use in order to work with the subfiles
|
||||||
|
\usepackage{xr-hyper} % cross-referencing with use of hyperref
|
||||||
|
\usepackage{subfiles} % use file structure in subfolders
|
||||||
|
\externaldocument{\subfix{main}} % all refs available in subfiles by \ref{labelname} as usual
|
||||||
|
|
||||||
|
%% NOTE: The following code make an additional paths search
|
||||||
|
%% search to simplify the calls to \subfile if you don't want
|
||||||
|
%% to bother with relative paths. If you uncomment it, add
|
||||||
|
%% the folders' name appropriately to the list with the {dir/}
|
||||||
|
%% syntax (brackets and trailing slash).
|
||||||
|
%% WARNING: This slows down compilation time A LOT!!!
|
||||||
|
\makeatletter
|
||||||
|
\def\input@path{ %
|
||||||
|
{../Bibfiles/}{C-Begin/}{C-Middle/}{C-End/} % list of folders
|
||||||
|
}
|
||||||
|
\makeatother
|
||||||
|
|
||||||
|
|
||||||
|
%%% ===== BEGIN OVERLEAF_EXTERNAL_DOC
|
||||||
|
%% For Overleaf only, in order to allow cross referencing to work in subfiles
|
||||||
|
%\makeatletter
|
||||||
|
%\newcommand*{\addFileDependency}[1]{% argument=file name and extension
|
||||||
|
% \typeout{(#1)}
|
||||||
|
% \@addtofilelist{#1}
|
||||||
|
% \IfFileExists{#1}{}{\typeout{No file #1.}}
|
||||||
|
%}
|
||||||
|
%\makeatother
|
||||||
|
|
||||||
|
%\newcommand*{\myexternaldocument}[1]{%
|
||||||
|
% \externaldocument{\subfix{#1}}%
|
||||||
|
% \addFileDependency{\subfix{#1.tex}} % in general this can be left out to speed up compilation time
|
||||||
|
% \addFileDependency{\subfix{.aux}}%
|
||||||
|
%}
|
||||||
|
%%% ====== END OVERLEAF_EXTERNAL_DOC
|
||||||
|
|
||||||
|
|
||||||
|
%%% ===== Packages used for the purpose of this example
|
||||||
|
\usepackage{verbatim} % to make the code-like elements
|
||||||
|
\usepackage[math]{blindtext} % to make the auto-generated lipsum parts
|
||||||
|
|
||||||
|
|
||||||
|
%%% ===== List of recommended packages you need to include
|
||||||
|
\usepackage{amsmath, amsthm}
|
||||||
|
\usepackage{amssymb, amsfonts}
|
||||||
|
\usepackage[final]{hyperref} % links with final option to force them to appear even in draft mode
|
||||||
|
\usepackage{xspace} % for automatic spaces after text commands
|
||||||
|
\usepackage{xcolor} % to use colours in different parts
|
||||||
|
% NOTE: Package for the todo notes. Notice that it uses multiple packages such as
|
||||||
|
% ifthen, xkeyval, xcolor, tikz (w/ graphicx) and calc, and thus they need
|
||||||
|
% to be called before todonotes if specific options are wanted
|
||||||
|
\usepackage[obeyDraft, textsize=small, colorinlistoftodos]{todonotes}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
%%% ===== List the packages you want to use
|
||||||
|
%% NOTE: you might need to take care of the order in which some are included,
|
||||||
|
%% such as ticz/graphicx that need to go above todonotes
|
||||||
|
\usepackage{mathrsfs} %for stylistic PA
|
||||||
|
\usepackage{bbm} %for map identity with 1
|
||||||
|
\usepackage{url}
|
||||||
|
|
||||||
|
|
||||||
|
%%% ===== Bibliography setup
|
||||||
|
\usepackage[eprint, % Include information for pre-prints.
|
||||||
|
doi=false,
|
||||||
|
url=false,
|
||||||
|
maxnames=10, % Truncate lists of more than 10 authors.
|
||||||
|
giveninits=true, % Only output the initials of an author's given
|
||||||
|
% names.
|
||||||
|
safeinputenc % Fix for biber not playing nice with breve accents
|
||||||
|
% (i.e. \u{}), see
|
||||||
|
% https://tex.stackexchange.com/a/170586/27664.
|
||||||
|
]{biblatex}
|
||||||
|
\addbibresource{\subfix{firstbib.bib}}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
%%% ===== Styling for my theorems
|
||||||
|
\theoremstyle{plain} % the style for theorem, propositions and lemmas
|
||||||
|
% Counter used to make it continuous numbering with subsubsection value appended
|
||||||
|
\newtheorem{thm}[subsubsection]{Theorem} % name shortcut for Theorem & counter check
|
||||||
|
\newtheorem{prop}[subsubsection]{Proposition} % idem for rest...
|
||||||
|
\newtheorem{lem}[subsubsection]{Lemma}
|
||||||
|
\newtheorem{cor}[subsubsection]{Corollary}
|
||||||
|
\newtheorem{conj}[subsubsection]{Conjecture}
|
||||||
|
\newtheorem{claim}{Claim}
|
||||||
|
\newcounter{scount}[subsection] % counter to only go down to subsection but make it different
|
||||||
|
\renewcommand{\thescount}{\arabic{subsection}.\arabic{scount}}
|
||||||
|
\newtheorem{scholie}[scount]{Scholie}
|
||||||
|
\theoremstyle{definition} % the style for definitions
|
||||||
|
\newtheorem{defn}{Definition} % shortname
|
||||||
|
\newtheorem*{defns}{Definitions} % plural shortname
|
||||||
|
\theoremstyle{remark} % the style for remarks and examples
|
||||||
|
\newtheorem{rem}{Remark} % shortname
|
||||||
|
\newtheorem*{rem*}{Remark} % starred version
|
||||||
|
\newtheorem{note}{Note}
|
||||||
|
\newtheorem*{rems}{Remarks} % plural
|
||||||
|
\newtheorem{ex}{Example}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
%%% ===== List of your own macros here
|
||||||
|
\newcommand{\AG}{\ensuremath{\mathscr{A\hspace*{-3pt}{G}}}\xspace}
|
||||||
120
York-Thesis/thesisoptions.sty
Normal file
120
York-Thesis/thesisoptions.sty
Normal file
@@ -0,0 +1,120 @@
|
|||||||
|
%% thesisoptions.sty
|
||||||
|
%% 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.
|
||||||
|
%
|
||||||
|
% Current version: v1.0
|
||||||
|
% Changelog:
|
||||||
|
% 2022/07/08: Creation of this helper package for the yorkthesis.cls class
|
||||||
|
%
|
||||||
|
% 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.
|
||||||
|
|
||||||
|
\ProvidesPackage{thesisoptions}[2022/07/08 v1.0 Options for the York Thesis class]
|
||||||
|
|
||||||
|
%%% ==== Fonts
|
||||||
|
\usepackage[utf8]{inputenx} % Allow unicode input
|
||||||
|
\usepackage[T1]{fontenc}
|
||||||
|
\usepackage{lmodern} % A nice scalable font based on Computer Modern.
|
||||||
|
% For more options, see e.g.
|
||||||
|
% https://tex.stackexchange.com/a/59706/27664
|
||||||
|
|
||||||
|
|
||||||
|
%%% ==== Margins
|
||||||
|
% Margins of the document can be set using some helper macros defined in the class file.
|
||||||
|
% The block size of the document will adjust relatively to the values of the margin defined.
|
||||||
|
% Horizontal margins are set relatively to the spine edge of the page, while vertical ones
|
||||||
|
% are relatively to the upper edge.
|
||||||
|
% Defaults: The defaults margins are 3cm on spine and foredge and 4cm on upper and lower edges.
|
||||||
|
% Commands: The available commands are the following:
|
||||||
|
% \horizontalmarginsvalue, \horizontalmarginsratio, \verticalmarginsvalue and
|
||||||
|
% \verticalmarginsratio which all takes one required parameter and one optional. It
|
||||||
|
% is expected that at most one of the horizontal commands and at most one of the
|
||||||
|
% vertical commands is called (see limitations below).
|
||||||
|
% Arguments: For the \horizontal* commands the required one is the spine margin with its unit,
|
||||||
|
% and the upper edge margin with its unit for the \vertical* commands.
|
||||||
|
% For the \*marginsvalue commands the optional argument is the opposite edge margin
|
||||||
|
% value with its unit (with default the same value as the required argument), and for
|
||||||
|
% the \*marginsratio it corresponds to a ratio between the margin set for the reference
|
||||||
|
% and the margin obtained for the opposite side (with default value 1, meaning that
|
||||||
|
% margin values will be the same), under the rule: oppside = ratio * refside.
|
||||||
|
% Limitations: Since the horizontal ratio cannot be set if the margins on both the spine and the
|
||||||
|
% foredge sides are set, this ratio is discarded. This means that calling both the
|
||||||
|
% \horizontalmarginsvalue and \horizontalmarginsratio commands will set the spine margin
|
||||||
|
% to the value set by the last of the two commands called, and the foredge margin will
|
||||||
|
% set by the value found in \horizontalmarginsvalue (with spine value if not explicitely
|
||||||
|
% given). Similarly for vertical ratio.
|
||||||
|
% Hack it: Check the cls for the definitions of these macros and use the memoir accordingly.
|
||||||
|
% Examples:
|
||||||
|
% \horizontalmarginsvalue{3cm} -> sets both spine and foredge margin to 3cm (current default)
|
||||||
|
% \horizontalmarginsvalue[2cm]{3cm} -> sets spine to 3cm and foredge to 2cm
|
||||||
|
% \horizontalmarginsratio[0.8]{40mm} -> sets spine to 4cm and foredge to 3.2cm (4*0.8)
|
||||||
|
\horizontalmarginsvalue{3cm}
|
||||||
|
\verticalmarginsvalue{4cm}
|
||||||
|
|
||||||
|
%%% ==== Styling chapters/sections
|
||||||
|
% See the manual of the `memoir` class for more predefined styles:
|
||||||
|
% - Appendix B for chapter styles (or for more examples consult
|
||||||
|
% https://ctan.uib.no/info/latex-samples/MemoirChapStyles/MemoirChapStyles.pdf);
|
||||||
|
% - Section 6.9 for lower level heading styles.
|
||||||
|
% To learn how to define your own, see Chapter 6.
|
||||||
|
% The order of call between \headstyles and \chapterstyle is important since
|
||||||
|
% the chapter header is defined in both of these, but the former defines
|
||||||
|
% the other sections style headers, so calling \headstyle second would
|
||||||
|
% override the parameters of \chapterstyle.
|
||||||
|
|
||||||
|
% As a baseline choice, I use dowding for the [sub]sections headers (defined
|
||||||
|
% in memoir.dtx in `\makeheadstyles{dowding}`) and then I set the chapter style to
|
||||||
|
% dash (defined in `\makechapterstyle{dash}`)
|
||||||
|
\headstyles{dowding}
|
||||||
|
\chapterstyle{dash}
|
||||||
|
|
||||||
|
% Personal styling choice, modifying the look and placement of section headers
|
||||||
|
% (using the definitions in file for the base code but suppressing \centering
|
||||||
|
% to manually set the indentation)
|
||||||
|
\setsecheadstyle{\normalfont\large\MakeTextUppercase} % large CAPS
|
||||||
|
\setsubsecheadstyle{\normalfont\scshape} % small caps
|
||||||
|
\setsubsecindent{1em}
|
||||||
|
\setsubsubsecheadstyle{\normalfont\normalsize\itshape} % italicised for subsubsection
|
||||||
|
\setsubsubsecindent{2em}
|
||||||
|
\setparaheadstyle{\normalfont\normalsize\slshape} % slanted for paragraphs
|
||||||
|
% Making the title and number of the chapter bigger and bold
|
||||||
|
\renewcommand*{\chapnumfont}{\normalfont\LARGE\bfseries}
|
||||||
|
\renewcommand*{\chaptitlefont}{\normalfont\LARGE\bfseries}
|
||||||
|
|
||||||
|
%%% ==== Styling lists
|
||||||
|
% Uncomment one of the options below to reduce the spacing between list items.
|
||||||
|
% See Section 8.6 of the manual of the `memoir` class.
|
||||||
|
\firmlists % Slightly less space than the default
|
||||||
|
% \tightlists % No extra space
|
||||||
|
|
||||||
|
%%% ==== Differences between draft and final version
|
||||||
|
\ifdraftdoc
|
||||||
|
%% Extra options for draft versions only
|
||||||
|
% NOTE: `draftwatermark` needs a scalable font.
|
||||||
|
\usepackage[firstpageonly]{draftwatermark} % Watermark on the front page
|
||||||
|
\else
|
||||||
|
%% Extra options for final versions only
|
||||||
|
\usepackage{microtype} % Enable microtypographical adjustments
|
||||||
|
\fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
%%%% ==== DEBUG
|
||||||
|
% If you want the version of the packages you use appear when they load in the log file, uncomment the following line:
|
||||||
|
\listfiles
|
||||||
162
York-Thesis/yorkthesis.cls
Normal file
162
York-Thesis/yorkthesis.cls
Normal file
@@ -0,0 +1,162 @@
|
|||||||
|
%% yorkthesis.cls
|
||||||
|
%% Copyright 2020 A. Pezzoni
|
||||||
|
%% 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.
|
||||||
|
%
|
||||||
|
% Current version: v1.0
|
||||||
|
% Changelog:
|
||||||
|
% 2020/09/29: Upload of the initial version by A. Pezzoni on
|
||||||
|
% https://github.com/donbex/yorkthesis
|
||||||
|
% 2022/07/07: Recuperation by A. Grau for distribution to the York maths dpt
|
||||||
|
% 2022/07/08: Add possibility of subtitle, and create helper commands to set margins
|
||||||
|
%
|
||||||
|
% 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.
|
||||||
|
|
||||||
|
|
||||||
|
% Comments starting with FORMAT highlight requirements from the UoY thesis
|
||||||
|
% regulations, as of July 2022.
|
||||||
|
% See https://www.york.ac.uk/research/graduate-school/academic/thesis/format/#tab-2
|
||||||
|
|
||||||
|
\NeedsTeXFormat{LaTeX2e}
|
||||||
|
\ProvidesClass{yorkthesis}[2022/07/08 v1.0 UoY Maths Thesis]
|
||||||
|
|
||||||
|
|
||||||
|
%%% Set class options
|
||||||
|
|
||||||
|
\DeclareOption*{%
|
||||||
|
\PassOptionsToClass{\CurrentOption}{memoir}
|
||||||
|
}
|
||||||
|
|
||||||
|
\PassOptionsToClass{twoside}{memoir}
|
||||||
|
|
||||||
|
% FORMAT: Avoid blank pages.
|
||||||
|
\PassOptionsToClass{openany}{memoir}
|
||||||
|
|
||||||
|
% FORMAT: Font size must be at least 11pt.
|
||||||
|
% The document must be on A4 paper.
|
||||||
|
\PassOptionsToClass{12pt,a4paper}{memoir}
|
||||||
|
|
||||||
|
\ProcessOptions
|
||||||
|
\LoadClass{memoir}
|
||||||
|
|
||||||
|
|
||||||
|
%%% Formatting options
|
||||||
|
|
||||||
|
% FORMAT: Use 1.5 line spacing.
|
||||||
|
\OnehalfSpacing
|
||||||
|
|
||||||
|
% FORMAT: GRS states as a recommendation that:
|
||||||
|
% spine margin should be at least 40mm,
|
||||||
|
% other margins should be at least 15mm.
|
||||||
|
% In effect, their view is the following:
|
||||||
|
% "We would recommend that they stick with the guidance re. margin on binding edge merely because we still get examiners who prefer to make themselves a physical copy to mark up, rather than using the digital annotation."
|
||||||
|
% I have taken the stand to set the default value to 3cm on both sizes horizontally,
|
||||||
|
% while putting 4cm vertically. The implementation below prevents the use of setting
|
||||||
|
% the blocksize and then letting the margins be defined by a value relatively to that
|
||||||
|
% blocksize. If you want to use these instead, you need to delete the macros below.
|
||||||
|
% DOC: Check memoir package sec2.4.2 p.17-21
|
||||||
|
\newcommand{\horizontalmarginsvalue}[2][*]{\def\margin@spine{#2} \def\margin@foredge{#1}}
|
||||||
|
\newcommand{\horizontalmarginsratio}[2][*]{\def\margin@spine{#2} \def\margin@hratio{#1}}
|
||||||
|
\newcommand{\verticalmarginsvalue}[2][*]{\def\margin@up{#2} \def\margin@low{#1}}
|
||||||
|
\newcommand{\verticalmarginsratio}[2][*]{\def\margin@up{#2} \def\margin@vratio{#1}}
|
||||||
|
|
||||||
|
\@ifundefined{margin@spine}{ % none of the horizontal commands have been called
|
||||||
|
\setlrmarginsandblock{3cm}{*}{1} % default with 3cm each side
|
||||||
|
}{ % if margin@spine is defined, so is one of margin@foredge or margin@hratio
|
||||||
|
\@ifundefined{margin@foredge}{ % at least ratio value is defined
|
||||||
|
\setlrmarginsandblock{\margin@spine}{*}{\margin@hratio}
|
||||||
|
}{ % at least foredge value is defined; hratio value is discarded if defined
|
||||||
|
\setlrmarginsandblock{\margin@spine}{\margin@foredge}{*}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
\@ifundefined{margin@up}{ % none of the vertical commands have been called
|
||||||
|
\setulmarginsandblock{4cm}{*}{1} % default with 3cm each side
|
||||||
|
}{ % if margin@up is defined, so is one of margin@low or margin@vratio
|
||||||
|
\@ifundefined{margin@low}{ % at least ratio value is defined
|
||||||
|
\setulmarginsandblock{\margin@up}{*}{\margin@vratio}
|
||||||
|
}{ % at least low value is defined; vratio value is discarded if defined
|
||||||
|
\setulmarginsandblock{\margin@up}{\margin@low}{*}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
% Call the layout to respect the values set
|
||||||
|
\checkandfixthelayout
|
||||||
|
|
||||||
|
% FORMAT: Table of contents must include all document subdivisions.
|
||||||
|
% Do not go below subsubsections.
|
||||||
|
\settocdepth{subsubsection}
|
||||||
|
\setsecnumdepth{subsubsection}
|
||||||
|
|
||||||
|
% FORMAT: The font size of the headings should be smaller than the font size of
|
||||||
|
% the main text.
|
||||||
|
% NOTE: Hyperref messes up the capitalisation of headings containing a reference
|
||||||
|
% label, so we use small-caps headings as a workaround.
|
||||||
|
% See https://tex.stackexchange.com/q/562773/27664
|
||||||
|
\nouppercaseheads
|
||||||
|
\pagestyle{headings}
|
||||||
|
\makeevenhead{headings}{\thepage}{}{\small\slshape\scshape\leftmark}
|
||||||
|
\makeoddhead{headings}{\small\slshape\scshape\rightmark}{}{\thepage}
|
||||||
|
|
||||||
|
% FORMAT: A bibliography should contain every item consulted in writing the
|
||||||
|
% thesis, while a list of references only contains the items explicitly
|
||||||
|
% mentioned in the document.
|
||||||
|
\renewcommand{\bibname}{References}
|
||||||
|
|
||||||
|
|
||||||
|
%%% Title page
|
||||||
|
|
||||||
|
\newcommand{\department}[1]{\def\@department{#1}}
|
||||||
|
\newcommand{\qualification}[1]{\def\@qualification{#1}}
|
||||||
|
\newcommand{\submitdate}[1]{\def\@submitdate{#1}}
|
||||||
|
\newcommand{\subtitle}[1]{\gdef\cfg@subtitle{#1}}
|
||||||
|
|
||||||
|
% Empty submitdate defaults to the current month and year.
|
||||||
|
% Taken from the yorkThesis class by J H Pickering:
|
||||||
|
% https://www.york.ac.uk/language/current/resources/software-resources/latex/
|
||||||
|
\def\@submitdate{%
|
||||||
|
\ifcase\the\month\or
|
||||||
|
January\or February\or March\or April\or May\or June\or
|
||||||
|
July\or August\or September\or October\or November\or December\fi
|
||||||
|
\space \number\the\year}
|
||||||
|
|
||||||
|
\newlength{\droplen}
|
||||||
|
\newcommand*{\makethesistitle}{\begingroup%
|
||||||
|
% FORMAT: The title page should have number 1 (not visible),
|
||||||
|
% hence the starred version of `titlingpage`.
|
||||||
|
\begin{titlingpage*}
|
||||||
|
% Centre the title with respect to the physical page, not the typeblock
|
||||||
|
\calccentering{\unitlength}
|
||||||
|
\begin{adjustwidth*}{\unitlength}{-\unitlength}
|
||||||
|
\droplen=0.1\textheight
|
||||||
|
\vspace*{\droplen}
|
||||||
|
\centering
|
||||||
|
{\Huge \@title}
|
||||||
|
\@ifundefined{cfg@subtitle}{}{\\[\baselineskip]{\large\scshape\cfg@subtitle}} \\[2\baselineskip]
|
||||||
|
{\Large \itshape \@author}\par
|
||||||
|
\begin{vplace}[2] % Split surrounding vertical space with a 2:1 ratio
|
||||||
|
{\large \scshape \@qualification}\\[2\baselineskip]
|
||||||
|
{\LARGE \scshape University of York}\\[.5\baselineskip]
|
||||||
|
{\LARGE \scshape \@department}
|
||||||
|
\end{vplace}
|
||||||
|
{\large \@submitdate}\par
|
||||||
|
\vspace*{\droplen}
|
||||||
|
\end{adjustwidth*}
|
||||||
|
% FORMAT: The abstract should be on page 2, so we prevent clearing to
|
||||||
|
% the next recto page.
|
||||||
|
\titlingpageend{\clearforchapter}{\clearforchapter}
|
||||||
|
\end{titlingpage*}
|
||||||
|
\endgroup}
|
||||||
Reference in New Issue
Block a user