\documentclass[twoside,a4paper,titlepage]{book}
-
\usepackage{geometry} % Papersize
\usepackage[british]{babel} % Internationalization
\usepackage[titletoc]{appendix} % Appendices
\usepackage{epstopdf} % Eps graphics
\usepackage{etoolbox} % Patch chapter command
+% Have better page numbering in chapters
\patchcmd{\chapter}{plain}{headings}{}{}
+% Arrows for communication diagrams
\usetikzlibrary{arrows,shadows}
+% Images directory
\graphicspath{{img/}}
+% Fix list of listings title
+\renewcommand{\lstlistlistingname}{List of Listings}
+
+% Fix list of listings chapter separator
+\makeatletter
+\let\my@chapter\@chapter
+\renewcommand*{\@chapter}{%
+ \addtocontents{lol}{\protect\addvspace{10pt}}%
+ \my@chapter}
+\makeatother
+
+% Always have url in teletype
\urlstyle{tt}
+
+% Setup pdf parameters
\hypersetup{%
pdftitle={Task Oriented Programming and the Internet of Things},
pdfauthor={Mart Lubbers},
hidelinks=true
}
+% Fix gls in hyperlink errors
\pdfstringdefDisableCommands{%
\def\acrlong#1{}%
\def\acrlongpl#1{}%
\def\Glspl#1{}%
}
+% Clean language spec for listings
\lstdefinelanguage{Clean}{%
alsoletter={ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_`1234567890},
alsoletter={~!@\#$\%^\&*-+=?<>:|\\.},
{A.}{{$\forall\;\,$}}1
{E.}{{$\exists\;\,$}}1
{*}{{$^*$}}1
-% {>}{{$>$}}1
-% {<}{{$<$}}1
-% {<=}{{$\leq$}}1
-% {>=}{{$\geq$}}1
-% {<>}{{$\neq$}}1
-% {->}{{$\rightarrow$}}2
-% {<-}{{$\leftarrow$}}1
-% {=}{{$=$}}1
-% {~}{{$\sim$}}1
-% {\#}{{$\sharp$}}1
-% {\{|}{{$\{\!|\!$}}1
-% {|\}}{{$\!|\!\}$}}1
-% {:=}{{$:=$}}2
-% {==}{{$==$}}2
-% {++}{{$+\!\!+$}}2
-% {+++}{{$+\!\!\!\!+\!\!\!\!+$}}2
-% {:==}{{$:==$}}3
-% {\{|*|\}}{{$\{\!|\!\!\star\!\!|\!\}$}}3
- %
- % Basic iTask constructs
-% {>||>}{{$\triangleright\triangleright$}}2
-% {>>=}{{\texttt{>>=}}}3
-% {>>|}{{\texttt{>>|}}}3
-% {?>>}{{\texttt{?>>}}}3
-% {!>>}{{\texttt{!>>}}}3
-% {-||-}{{\texttt{-||-}}}4
-% {.||.}{{\texttt{.||.}}}4
-% {.&&.}{{\texttt{.\&\&.}}}4
}
+% Handy shortcut for inline Clean code
\newcommand{\CI}[1]{\lstinline[language=Clean,basicstyle=\ttfamily\fontseries{l}\normalsize]|#1|}
+% General listings settings
\lstset{%
breakatwhitespace=false,
breaklines=true,
language=Clean
}
+% Increase the depth for the table of contenst
\setcounter{secnumdepth}{3}
+% Document info
\title{Task Oriented Programming and the Internet of Things}
\author{Mart Lubbers BSc.\\
{\small\href{mailto:mart@martlubbers.net}{mart@martlubbers.net}}}
%&thesis
\usepackage[nonumberlist]{glossaries} % Glossaries and acronyms
\usepackage[algochapter]{algorithm2e} % Pseudocode
+
+% Fix the algorithm font
\renewcommand\AlCapFnt{\normalfont}
+% Initialize the glossaries
\makeglossaries%
\input{glossaries}
%Titlepage
\input{titlepage}
-\glsaddall{}
-
%Abstract
\chapter*{\centering Abstract}
\addcontentsline{toc}{chapter}{Abstract}
\input{abstract}
\end{quotation}
+%Acknowledgements
\chapter*{\centering Acknowledgements}
\addcontentsline{toc}{chapter}{Acknowledgements}
\begin{quotation}
\end{quotation}
%Table of contents
-%\begingroup
-%\let\cleardoublepage\clearpage
\tableofcontents
-%\endgroup
\mainmatter{}
+
+%Reset glossary and thus the acronyms
\glsresetall{}
+
\chapter{Introduction}\label{chp:introduction}
\input{intro}
\chapter{Discussion \& Conclusion}\label{chp:conclusion}
\input{conclusion}
-\appendix\label{chp:appendix}
+\appendix%
+\label{chp:appendix}
\chapter{Communication Protocol}\label{app:communication-protocol}
\input{appendix-protocol}
\chapter{Device Client Interface}\label{app:device-interface}
\input{appendix-device-interface}
+% Bibliography
\phantomsection{}
\addcontentsline{toc}{chapter}{Bibliography}
\bibliographystyle{ieeetr}
\bibliography{thesis}
+% Glossary
\addcontentsline{toc}{chapter}{Glossary}
\printglossaries%
+% Lists of
\cleardoublepage{}
\phantomsection{}
\addcontentsline{toc}{chapter}{Lists of \ldots}
\let\cleardoublepage\relax
\listoffigures%
\listoftables%
-\lstlistoflistings%
\listofalgorithms%
+\lstlistoflistings%
\endgroup
\end{document}