%% MSc Dissertation LaTeX Template
%% School of Computing and Communications, Lancaster University,
%% Copyright 2023 Lewis Newsham
% This work consists of the files main.tex, and the other example tex files referenced within.
% This MSc dissertation template is an adapted version of the SCC PhD template created by Andrew Moore and Alaistair Baron with help from Paul Rasyon, and Edward Dearden.
% Conforms with Lancaster University MANUAL OF ACADEMIC REGULATIONS AND PROCEDURES (MARP) 2022-23 for POSTGRADUATE RESEARCH. This can be found here: https://www.lancaster.ac.uk/media/lancaster-university/content-assets/documents/student-based-services/asq/marp/PGR-Regs.pdf
% For layout information the most relevant pages of that document are pages 30-32 (Appendix 2)
\documentclass[oneside,12pt]{report}
\usepackage[paper=a4paper]{geometry}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{svg}
\usepackage{hyperref}
\hypersetup{
colorlinks=false,
breaklinks=true
}
% All sections and sub sections have to be labelled in the table of contents and thesis. This does this down to the level of subsubsection.
\setcounter{secnumdepth}{4}
\setcounter{tocdepth}{4}
%discourages hyphenated words at end of lines
\hyphenpenalty=5000
\tolerance=1000
% biblography formatting
% NOTE: At the moment both URL and DOI will be displayed, if you have a bib entry that has both URL and DOI please remove the URL so that only one link is displayed, in this case to the DOI.
\usepackage[style=authoryear,backend=biber,url=true, doi=true, sorting=nyt, natbib=true]{biblatex}
\usepackage{bibentry}
\addbibresource{ref.bib}
% Appendix formatting
\usepackage[title, titletoc]{appendix}
\renewcommand{\appendixpagename}{Appendix}
% for the title page
\usepackage{datetime}
\newdateformat{monthyeardate}{%
\monthname[\THEMONTH], \THEYEAR}
% For the declaration
% NOTE IF NOT USING OVERLEAF PLEASE REMOVE THIS AND ADD THE WORD COUNT MANUALLY. The software overleaf uses is this: https://app.uio.no/ifi/texcount/
% This has come from overleaf and has been slightly adapted. This counts everything including footnotes and captions I believe and the appendix, but not bibliography.
% https://www.overleaf.com/learn/how-to/Is_there_a_way_to_run_a_word_count_that_doesn%27t_include_LaTeX_commands%3F
\newcommand{\quickwordcount}[1]{%
\immediate\write18{texcount -0 -sum -merge #1.tex > #1-words.sum }%
\input{#1-words.sum}%
}
% TO BE FILLED IN
\newcommand\thesistitle{Title of your dissertation} % Dissertation Title
\newcommand\authorname{First (Middle) Last name} % Full Name
\newcommand\authordegrees{BSc (Hons)} % This does not have to be filled in, but it is advised you include any degrees you have.
\newcommand\supervisor{Title, Supervisor Name} % Title and Name of Supervisor
\newgeometry{left=25mm, right=25mm, top=25mm, bottom=25mm, includeheadfoot}
% This has to come before the header and footer information. Left-hand side margin has been adapted from 38mm to 25mm.
% HEADER AND FOOTER STYLE
% https://en.wikibooks.org/wiki/LaTeX/Customizing_Page_Headers_and_Footers
\usepackage{fancyhdr}
\setlength{\headheight}{15pt}
% For preamble
\fancypagestyle{preamble}{ %
\fancyhf{} % remove everything
\fancyfoot[C]{\thepage}
\renewcommand{\headrulewidth}{0pt} % remove lines as well
\renewcommand{\footrulewidth}{0pt}
}
\pagestyle{preamble}
% For the main pages
\fancypagestyle{main}{
\fancyhf{}
%\fancyhead[R]{\thepage}
\fancyfoot[C]{\thepage}
\fancyhead[L]{\textit{ \nouppercase{\leftmark}} }
\fancyhead[R]{\textit{ \nouppercase{\rightmark}} }
\renewcommand{\headrulewidth}{1pt} % remove lines as well
\renewcommand{\footrulewidth}{0pt}
}
% For title and chapter pages
\fancypagestyle{plain}{ %
\fancyhf{} % remove everything
\fancyfoot[C]{\thepage} %should keep page number
\renewcommand{\headrulewidth}{0pt} % remove lines as well
\renewcommand{\footrulewidth}{0pt}
}
\usepackage{lipsum} % just to add random text as an example
% Start of document
\begin{document}
\pagenumbering{roman}
\input{title_page}
\clearpage
\input{declaration}
\clearpage
\input{abstract}
\clearpage
\clearpage
\input{acknowledgements}
\clearpage
\tableofcontents
\clearpage
\listoffigures
\clearpage
\listoftables
\clearpage
\pagestyle{main}
\pagenumbering{arabic}
\chapter{Introduction}
\input{chapters/introduction}
\chapter{Middle chapters}
\input{chapters/middle}
\chapter{Conclusions}
\input{chapters/conclusion}
\begin{appendices}
\chapter{Introduction}
\label{appendix_introduction}
\input{appendix/introduction}
\end{appendices}
\clearpage % Required to make sure the references table of contents page number is correct.
\printbibliography[heading=bibintoc,title=References]
\end{document}