1 \documentclass[twoside,a4paper,titlepage]{book}
3 \usepackage{geometry} % Papersize
4 \usepackage[british]{babel} % Internationalization
5 \usepackage[titletoc]{appendix} % Appendices
6 \usepackage{hyperref} % Hyperlinks
7 \usepackage{booktabs} % Better looking tables
8 \usepackage{caption} % Captions
9 \usepackage{subcaption} % Subcaptions
10 \usepackage{listings} % source code
11 \usepackage{float} % floating images
12 \usepackage{lmodern} % Better teletype fonts
13 \usepackage{textcomp} % Nice listings quotes
14 \usepackage{pgf-umlsd} % Connection diagrams
15 \usepackage{graphicx} % Graphics
16 \usepackage{epstopdf} % Eps graphics
17 \usepackage{etoolbox} % Patch chapter command
19 % Have better page numbering in chapters
20 \patchcmd{\chapter}{plain}{headings}{}{}
22 % Arrows for communication diagrams
23 \usetikzlibrary{arrows,shadows}
28 % Fix list of listings title
29 \renewcommand{\lstlistlistingname}{List of Listings}
31 % Fix list of listings chapter separator
33 \let\my@chapter\@chapter
34 \renewcommand*{\@chapter}{%
35 \addtocontents{lol}{\protect\addvspace{10pt}}%
39 % Always have url in teletype
42 % Setup pdf parameters
44 pdftitle={Task Oriented Programming and the Internet of Things},
45 pdfauthor={Mart Lubbers},
46 pdfsubject={Task Oriented Programming and the Internet of Things},
47 pdfcreator={Mart Lubbers},
48 pdfproducer={Mart Lubbers},
49 pdfkeywords={TOP,iTasks,Clean,Function Programming,IoT},
53 % Fix gls in hyperlink errors
54 \pdfstringdefDisableCommands{%
65 % Clean language spec for listings
66 \lstdefinelanguage{Clean}{%
67 alsoletter={ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_`1234567890},
68 alsoletter={~!@\#$\%^\&*-+=?<>:|\\.},
69 morekeywords={generic,implementation,definition,dynamic,module,import,from,where,in,of,case,let,infix,infixr,infixl,class,instance,with,if,derive,::},
72 morecomment=[n]{/*}{*/},
81 % Basic Clean constructs
83 {A.}{{$\forall\;\,$}}1
84 {E.}{{$\exists\;\,$}}1
88 % Handy shortcut for inline Clean code
89 \newcommand{\CI}[1]{\lstinline[language=Clean,basicstyle=\ttfamily\fontseries{l}\normalsize]|#1|}
91 % General listings settings
93 breakatwhitespace=false,
97 basicstyle=\ttfamily\fontseries{l}\footnotesize,
98 commentstyle=\itshape\fontseries{m},
99 keywordstyle=\bfseries\fontseries{b},
100 stringstyle=\ttfamily,
102 showstringspaces=false,
109 % Increase the depth for the table of contenst
110 \setcounter{secnumdepth}{3}
113 \title{Task Oriented Programming and the Internet of Things}
114 \author{Mart Lubbers BSc.\\
115 {\small\href{mailto:mart@martlubbers.net}{mart@martlubbers.net}}}