\documentclass{article}
\title{TITLE: Template - Long Documents in Latex}
\author{AUTHORS: XY, ZA, BC}
\date{DATE}
\usepackage[toc,page]{appendix}
\usepackage[toc,acronym]{glossaries}
% Enable dummy text
\usepackage{lipsum}
% Enable line numbers
\usepackage[switch]{lineno}
% Enable inclusion of sub files
\usepackage{subfiles}
% Package to draw watermark - useful for sending drafts
\usepackage{draftwatermark}
\SetWatermarkText{DRAFT}
\SetWatermarkScale{1.8}
\SetWatermarkColor[rgb]{1,0.8,0.79}
% Generate the glossary
\makeglossaries
% Custom command for notes - usage: \note{Your note's text}
\newcommand{\note}[1]{{\bf (Note: \color{blue} #1})}
% Increase line number size
\def\linenumberfont{\normalfont\small\sffamily}
% Acronyms
\newacronym{ml}{ML}{Machine Learning}
\newacronym{ai}{AI}{Artificial Intelligence}
\newacronym{ann}{ANN}{Artificial Neural Networks}
\newacronym{gps}{GPS}{Global Positioning System}
\newacronym{html}{HTML}{Hyper Text Markup Language}
\newglossaryentry{semantic_segmentation}
{
name=Semantic Segmentation,
description={Describes the process of associating each pixel of an image with a class label, (such as flower, person, road, sky, ocean, or car) \cite{noauthor_semantic_nodate}.}
}
\linenumbers
\begin{document}
\maketitle
\note{This is a template for how to manage long documents in Latex and it combines goodies from few different libraries to support writing long documents. It was developed for the purposes of writing a thesis. It includes example glossary, watermark, line numbers, appendices, references with bibtex, custom command and example sections. In this template every chapter/section has its own file (e.g. 0-abstract.tex, 1-introduction.tex, etc...) and is referenced from the main file (main.tex) which should be compiled to get the final document. This structure is useful for writing separate chapters without the need to compile the rest of the document and in the same time preserving the possibility to do so from the main file. Example reference to the glossary, e.g.: \gls{semantic_segmentation}; and to the acronym e.g.: \acrfull{gps} (see the source code)}
\subfile{0-abstract}
\newpage
\subfile{0-acknowledgements}
\newpage
\tableofcontents
\listoffigures
\listoftables
\newpage
% Print the glossary
\glsaddall
\printglossaries
\newpage
\subfile{1-introduction}
\subfile{2-extended_background}
\subfile{3-research_method}
\subfile{4-results}
\subfile{5-discussion}
\subfile{6-appendix}
% Path to a .bib file.
\bibliographystyle{abbrv}
\bibliography{7-references.bib}
\end{document}