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
18 \usepackage[nodayofweek]{datetime} % Use a fixed document date
22 \DeclareFontShape{OT1}{lmr}{bx}{sc} { <-> ssub * lmr/bx/n }{}
24 % Have better page numbering in chapters
25 \patchcmd{\chapter}{plain}{headings}{}{}
27 % Arrows for communication diagrams
28 \usetikzlibrary{arrows,shadows}
33 % Fix list of listings title
34 \renewcommand{\lstlistlistingname}{List of Listings}
36 % Fix list of listings chapter separator
38 \let\my@chapter\@chapter
39 \renewcommand*{\@chapter}{%
40 \addtocontents{lol}{\protect\addvspace{10pt}}%
44 % Always have url in teletype
47 % Setup pdf parameters
49 pdftitle={Task Oriented Programming and the Internet of Things},
50 pdfauthor={Mart Lubbers},
51 pdfsubject={Task Oriented Programming and the Internet of Things},
52 pdfcreator={Mart Lubbers},
53 pdfproducer={Mart Lubbers},
54 pdfkeywords={TOP,iTasks,Clean,Function Programming,IoT},
58 % Fix gls in hyperlink errors
59 \pdfstringdefDisableCommands{%
70 % Clean language spec for listings
71 \lstdefinelanguage{Clean}{%
72 alsoletter={ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_`1234567890},
73 alsoletter={~!@\#$\%^\&*-+=?<>:|\\.},
74 morekeywords={generic,implementation,definition,dynamic,module,import,from,where,in,of,case,let,infix,infixr,infixl,class,instance,with,if,derive,::},
77 morecomment=[n]{/*}{*/},
86 % Basic Clean constructs
88 {A.}{{$\forall\;\,$}}1
89 {E.}{{$\exists\;\,$}}1
93 % Handy shortcut for inline Clean code
94 \newcommand{\CI}[1]{\lstinline[language=Clean,basicstyle=\ttfamily\fontseries{l}\normalsize]|#1|}
96 % General listings settings
98 breakatwhitespace=false,
102 basicstyle=\ttfamily\fontseries{l}\footnotesize,
103 commentstyle=\slshape\fontseries{m},
104 keywordstyle=\bfseries\fontseries{b},
105 stringstyle=\ttfamily,
107 showstringspaces=false,
113 % Increase the depth for the table of contenst
114 \setcounter{secnumdepth}{3}
117 \title{Task Oriented Programming and the Internet of Things}
118 \author{Mart Lubbers BSc.\\
119 {\small\href{mailto:mart@martlubbers.net}{mart@martlubbers.net}}}
120 \date{\formatdate{10}{7}{2017}}