% based on Harish Bhanderi's PhD/MPhil template, then Uni Cambridge
% http://www-h.eng.cam.ac.uk/help/tpl/textprocessing/ThesisStyle/
% corrected and extended in 2007 by Jakob Suckale, then MPI-CBG PhD programme
% and made available through OpenWetWare.org - the free biology wiki
% modified for SU by Andreas Solders in 2011

%: Style file for Latex
% In this template package, it can be found in ./Latex/Classes/

\documentclass[twoside,11pt]{Latex/Classes/PhDthesisSU} %Default style using S5 paper
%\documentclass[twoside,11pt]{Latex/Classes/PhDthesisSU_A4} %Use this instead if you need A4 paper.
\usepackage{xcolor}
\usepackage[utf8]{inputenc}
\usepackage[official]{eurosym}
\usepackage{amsmath}
\usepackage[linesnumbered,ruled]{algorithm2e}
%\usepackage{hyperref}
\usepackage{multirow}
\usepackage[shortlabels]{enumitem}
\usepackage{multicol}% http://ctan.org/pkg/multicols
\usepackage{pdfpages}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{hyphenat}
\usepackage[printonlyused,withpage]{acronym}

\usepackage{booktabs}
\usepackage{newtxtext,newtxmath}  % Better hyphenation and appearance
\usepackage{caption}
\usepackage{arydshln}
\usepackage{epsfig}
\usepackage[linesnumbered,ruled]{algorithm2e}

\usepackage{lineno}
\usepackage{ifoddpage}
\modulolinenumbers[5]
\newcommand{\vect}[1]{\boldsymbol{#1}}
\newcommand{\secref}[1]{\S\ref{#1}}

% Custom commands:
\newcommand{\red}[1]{\textcolor{red}{#1}}

%: Macro file for Latex
% Macros help you summarize frequently repeated Latex commands.
% Here, they are placed in an external file /Latex/Macros/MacroFile1.tex
% An macro that you may use frequently is the figuremacro
\include{Latex/Macros/MacroFile1}


\setcitestyle{square,numbers} % change how references are included (see the natbib package).

%: -------------------------------------------------------------
%:                  TITLE PAGE
% --------------------------------------------------------------

%% To Do: change title and author information
\title{Your \\Thesis \\Title}%Title of the thesis
\subtitle{}% Subtitle of the thesis
\author{\href{mailto:your.email@hh.se}{Your Name}}
%\supervisor{Supervisor: Slawomir Nowazyk}

%If you want pdf meta-data
\pdfinfo{
   /Author (Author Name)
   /Title  (Creating a PDF document using PDFLaTeX)
   /CreationDate (MONTH YEAR)
   /Subject (PDFLaTeX)
   /Keywords (PDF;LaTeX)
}

% ---------------------------------------------------------------
       
% turn of those nasty overfull and underfull hboxes
\hbadness=10000
\hfuzz=50pt

% ---------------------------------------------------------------
%:                  FRONT MATTER: dedications, abstract,..
% ---------------------------------------------------------------
\usepackage{blindtext}
\usepackage{tcolorbox}
\usepackage{emptypage}

%\includeonly{X/filename} % Uncomment to only compile the specified files.

\usepackage[english]{babel}
\begin{document}
\pagenumbering{arabic}
\frontmatterSU


%: ----------------------- Generate cover page ------------------------

\maketitle  % command to print the title page with above variables


%: ----------------------- Cover page back side ------------------------

\newpage
\thispagestyle{empty}
%include again
\includepdf[pages=-,pagecommand={},width=1.3\textwidth]{0_frontmatter/Spikning Template.pdf}
\thispagestyle{empty}
\newpage
\phantom{.}
\thispagestyle{empty}

\vspace{\stretch{1}}

{\fontfamily{verdana}\selectfont
{\scriptsize
\noindent

 %% To Do: insert your thesis title, your name. Fill in the ISBN as well as the dissertation number
\vspace{5mm}
\noindent
Your Thesis title \\
\copyright  Your Name \\
Halmstad University Dissertation No. XX \\
ISBN XXX-XX-XXXXX-XX-X (printed) \\
ISBN XXX-XX-XXXXX-XX-X (pdf) \\
Publisher: Halmstad University Press, YEAR | www.hh.se/hup \\
Printer: Media-Tryck, Lund

\vspace{5mm}
\noindent

}
}
%\cleardoublepage
%\setcounter{page}{1}
%\input{0_frontmatter/abstract}
%\include{0_frontmatter/abbreviations}
%\include{0_frontmatter/acknowledgement}
%\include{0_frontmatter/listofpapers}

\cleardoublepage
\setcounter{page}{1}
% Dedication (file already exists in 0_frontmatter/)
\include{0_frontmatter/dedication}
% Acknowledgements
\include{0_frontmatter/acknowledgement}
% Abstract
\input{0_frontmatter/abstract}
% Other front matter
\include{0_frontmatter/abbreviations}
\include{0_frontmatter/listofpapers}


%: ----------------------- Table of contents ------------------------

\setcounter{secnumdepth}{2} % organisational level that receives a numbers
\setcounter{tocdepth}{2}    % print table of contents for level 2

\renewcommand{\contentsname}{Table of Contents}
\tableofcontents            % print the table of contents
% levels are: 0 - chapter, 1 - section, 2 - subsection, 3 - subsubsection


%: ----------------------- Abbreviations ------------------------

% Tie in external source file for definitions: /0_frontmatter/abbreviations.tex
% Abbreviation entries can also be defined in the main text. See abbreviations.tex
% To create the glossary run "makeindex thesis.nlo  -s nomencl.ist -o thesis.nls"

\renewcommand{\nomname}{Abbreviations} % Change title of page from Nomenclature to Abbreviations

\begin{footnotesize} % scriptsize(7) < footnotesize(8) < small (9) < normal (10)

\printnomenclature[2 cm] % [] = distance between entry and description
\label{nom} % target name for links to glossary

\end{footnotesize}

%\end{multicols}

%: ----------------------- list of figures/tables ------------------------

\listoffigures	% print list of figures

\listoftables  % print list of tables


%: --------------------------------------------------------------
%:                  MAIN DOCUMENT SECTION
% --------------------------------------------------------------

% the main text starts here with the introduction, 1st chapter,...

\mainmatterSU

\setcounter{page}{1}
%: ----------------------- subdocuments ------------------------

% To Do: Parts of the thesis are included below. Rename the files as required.
% But take care that the paths match. You can also change the order of appearance by moving the include commands. Feel free to add more chapters as well. 

\include{1_Introduction/Introduction}
\include{2_Background/Background.tex}
\include{3_PapersSummary/PapersSummary}
\include{4_Conclusions/Conclusions}	
%\include{5_SummaryOfPapers/SummaryOfPapers}
%\include{6_Conclusions/Conclusions}

% Include as many chapters as you need
% --------------------------------------------------------------
%:                  BACK MATTER: appendices, refs,..
% --------------------------------------------------------------

\backmatterSU
\pagestyle{plain} 

%\include{Appendix/append1}	

% the back matter: summary and references close the thesis

%: ----------------------- bibliography ------------------------

% The section below defines how references are listed and formatted.

%\begin{multicols}{2} % \begin{multicols}{ # columns}[ header text][ space] %uncomment to have 2 columns
\begin{scriptsize} % tiny(5) < scriptsize(7) < footnotesize(8) < small (9)

\bibliographystyle{Latex/Classes/PhDbiblio-url2} %Default style file. Change according to you preferences.
\renewcommand{\bibname}{References} % changes the header from Bibliography to References
\bibliography{9_backmatter/references} % adjust this to fit your BibTex file

\end{scriptsize}
\include{9_backmatter/included_papers}
\end{document}
