% ------------------------------------------------------------------
% This template is created based on the official Word template.    |
% Some instructions given in this template may be only valid for   |
% the Word template. However all of the included sections are      |
% useful for presenting basic LaTeX commands.                      |
%                                                                  |
% Happy thesis writing!                                            |
% Best regards,                                                    |
% Template author                                                  |
% ------------------------------------------------------------------
% Import document properties file that defines formatting
% of the document.
\input{Document_properties}
% Begin main contents.
\begin{document}
	% Setup roman page numbering for the first pages.
	\pagenumbering{roman}
	\thispagestyle{empty}
    % THIS CHAPTER SHOULD BE REMOVED.
    % --------------------------------------------------------------
    % Input Introduction page.                                     |
    \input{Chapters/Introductions_for_using_the_thesis_template} % |
    % Reset page numbering.                                        |
    \pagebreak %                                                   |
    \setcounter{page}{1} %                                         |
    % --------------------------------------------------------------
	% Input title page
	\input{Chapters/Title}
	% Hide page number on the first page.
	\thispagestyle{empty}
	% Begin tighter line spacing used in the abstract.
	\singlespacing
	
	% Input English abstract.
	\input{Chapters/Abstract}
	
	% Input Finnish abstract.
	\input{Chapters/Tiivistelma}
	
	% Begin standard line spacing used in the rest of the document.
	\onehalfspacing
	
	% Input acknowledgements chapter.
	\input{Chapters/Acknowledgments}
	
	% Input list of abbreviations.
	\input{Chapters/Symbols_and_abbreviations}
	
	% Setup normal arabic page numbering.
	% Forced page break is needed here, because acknowledgements
	% must be ended before beginning the arabic page numbering.
	\pagebreak
	\pagenumbering{arabic}
	
	% Input table of contents.
	\input{Chapters/Table_of_contents}
	
	% Input introduction.
	\input{Chapters/Introduction}
	
	% Input second chapter.
	\input{Chapters/Second_chapter}
	
	% Input third chapter.
	\input{Chapters/Third_chapter}
	
	% Input conclusions.
	\input{Chapters/Conclusions}
	
	% Insert bibliography.
	\renewcommand{\bibname}{REFERENCES}
	\printbibliography[heading=bibintoc]
	
	% THIS SECTION SHOULD BE REMOVED.
    % -------------------------------------------------------------------------------------
    \vspace{2em} %                                                                        |
    Note: More information on referencing is available in \autoref{appendix:references} % |
    % -------------------------------------------------------------------------------------
	
	% Begin automatic counting of the appendices.
	\ResumeSuspendedCounters{appendixchapters}
	
	% Begin appendices chapter.
	\noappendicestocpagenum
	\begin{appendices}
		% Disable appendix page number from toc entries.
		\addtocontents{toc}{\cftpagenumbersoff{chapter}}
		\addtocontents{toc}{\cftpagenumbersoff{section}}
		\addtocontents{toc}{\cftpagenumbersoff{subsection}}
		
		% Disable figure and table page numbers from appendices.
		\addtocontents{lof}{\cftpagenumbersoff{figure}}
		\addtocontents{lot}{\cftpagenumbersoff{table}}
		
		% Reset page counter at the beginning of each appendix.
		% Remove page numbering altogether, if there is only one appendix.
		
	    % Input appendix 1.
	    \setcounter{page}{1}
		\input{Appendices/Text_processing_and_layout_in_a_thesis}
		\pagebreak
		
		% Input appendix 2.
	    \setcounter{page}{1}
		\input{Appendices/References}
		\pagebreak
		
		% Input appendix 3.
	    \setcounter{page}{1}
		\input{Appendices/Tables_figures_equations_numbers_symbols_and_abbreviations}
		\pagebreak
		
		% Input appendix 4.
	    \setcounter{page}{1}
		\input{Appendices/Appendices_to_the_thesis}
		\thispagestyle{empty}
		\pagebreak
		
		% Input appendix 5.
	    \setcounter{page}{1}
		\input{Appendices/Publishing_the_thesis}
		\thispagestyle{empty}
		\pagebreak
		
		% Input appendix 6.
		\setcounter{page}{1}
		\input{Appendices/Latex_tricks}
	\end{appendices}
\end{document}
% End of the document.