 
\documentclass[11pt, a4paper, twoside, titlepage]{book}
\usepackage[latin1]{inputenc}
\usepackage{amsmath,amsfonts,amssymb,amsthm,mathtools} % Most people will need these for mathematics

%Figures
\usepackage{graphicx}	%Graphics package
\usepackage[center]{caption}
\usepackage{subcaption}
\usepackage{wrapfig}  % Wrap text around figures	
\usepackage{float} % To place figures correctly

\usepackage{makeidx} % Probably important.
\usepackage{listings} % To include code-snippets
\usepackage{color}
\usepackage{hyperref} % Clickable links to urls, internal and external references etc.


\lstset{
    basicstyle=\footnotesize\ttfamily,
  identifierstyle=\bfseries\color{green!40!black},
  commentstyle=\itshape\color{purple!40!black},
  keywordstyle=\color{blue},
  stringstyle=\color{orange},
}


\usepackage{pdfpages}	% Packages to handle certain issues with the pdf conversion and landscape figures/tables
\usepackage{lscape} 

\usepackage[authoryear,square]{natbib} % References/bibliography package
\usepackage{footnote}
\usepackage[titletoc]{appendix} % Appendix + add to table of contents
\usepackage{sidecap}

% Table packages
\usepackage{tabularx}
\makesavenoteenv{tabular}
\makesavenoteenv{table}
\usepackage{array}
\usepackage{booktabs}
\newcommand*\rot{\rotatebox{90}}

\usepackage{changepage}
\usepackage{verbatim}
\usepackage{cprotect}
\usepackage{cancel}


%Special in-document vector graphics:
\usepackage{tikz}
\usetikzlibrary{shapes.geometric,calc,positioning,3d,intersections,arrows}
\usetikzlibrary{decorations.markings}
\usepackage{pgfplots}


% Custom characters
\newcommand{\slfrac}[2]{\left.#1\middle/#2\right.} % Long on-line fraction-slash: \slfrac
\newcommand{\degree}{\ensuremath{^\circ}} % The 'degree' character : \degree
\DeclareRobustCommand{\orderof}{\ensuremath{\mathcal{O}}} % The 'Order of' character: \orderof




%Epigraph / quote
\usepackage{epigraph}
\setlength\epigraphwidth{.8\textwidth}
\setlength\epigraphrule{0pt}



\title{Typesetting your Master's Thesis with \LaTeX -- A pragmatic approach.}
		
\author{%
	\large
	\textsc{Tarjei Antonsen}\\[2mm]
	\normalsize	University of Troms{\o} \\
	\normalsize	\href{mailto:tarjei.antonsen@uit.no}{tarjei.antonsen@uit.no}
	\vspace{-5mm}
	}
\date{October 2014}


% START OF MAIN DOCUMENT
\begin{document}

\maketitle
\frontmatter


%ABSTRACT
\chapter*{\centering \begin{normalsize}Abstract\end{normalsize}}
\addcontentsline{toc}{chapter}{Abstract} 
You are currently reading the abstract which is the summary of the following work. Often the reader will benefit from a short introduction to the subject of which the thesis concerns itself and where the current work contributes to this. The methods used should be introduced, with emphasis on the improving aspects of your method. Important or never before used parameter values can be mentioned -- such as $\rho_s=3000$ kgm$^{-3}$. The most important results and discussions should also be mentioned accordingly to the conclusions. If you have concluded with something which renders the findings of e.g. \citet{tomsic1,havnes07} redundant, you may also mention this as an additional selling point.
\clearpage



%ACKNOWLEDGEMENTS
\chapter{Acknowledgments}
Above all, I wish to express my sincerest gratitude to my supervisor Prof. Bob Saget.\\ 
\\
I also love my girlfriend. LOL, JK, don't have one. I am sad.
\\
\\
\qquad \emph{Barack Obama},\\
\qquad \emph{October 2014}

\newpage

\thispagestyle{empty}
\vspace*{\fill}
\epigraph{\itshape Begin at the beginning, the King said gravely, ``I like big butts and I cannot lie''}{---Lewis Carroll, \textit{Sir Mix-A-Lot in Wonderland}}


% ADD TABLE OF CONTENTS
\tableofcontents


\mainmatter

% FIRST CHAPTER
\chapter{Introduction}
\TeX\  and \LaTeX\ are a typesetting system and document preparation language, respectively, which have become the \emph{de facto} standard in academia.


\section{The main TeX-document}

There isn't really much too you main document. It is just a plain text file in the .tex-format, and if you really wanted to, you could write your entire thesis in any notepad. The biggest advantage with using \LaTeX\ editors and specialized software, is that the code is color coded and usually well-presented. Apart from that, with the ''few'' commands you need when writing a thesis, I always prefer using the most basic programs without 'too many options' (e.g. TeXShop). If you are bombarded with opportunities, the probability of using some unnecessary option will be significant. Many users, however, may save some time by using the built-in macros and shortcuts which many distributions have, and this is of course recommended.

\subsection{Sectional hierarchy of the 'book' format}
A thesis is normally structured into chapters which contain sections and subsections. The primary commands to make a new object of one of these classes are:

\begin{verbatim}
\chapter{...}
\section{...}
\subsection{...}
\subsubsection{...}
\end{verbatim}


% Commands to include a figure:
%\begin{figure}
%\includegraphics[width=\textwidth]{your-figure's-file-name}
%\caption{\label{fig:your-figure}Caption goes here.}
%\end{figure}



%APPENDICES
\begin{appendices}
\noappendicestocpagenum
\addappheadtotoc

\chapter{How to pronounce \LaTeX}\label{pron}
Who the balls cares? \citet{havnes96}

\end{appendices}

\bibliographystyle{Bibliography/Template_LastNameFirst_Alphabetical}
\bibliography{Bibliography/database_template}
\end{document}

