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
21 \DeclareFontShape{OT1}{lmr}{bx}{sc} { <-> ssub * lmr/bx/n }{}
23 % Have better page numbering in chapters
24 \patchcmd{\chapter}{plain}{headings}{}{}
26 % Arrows for communication diagrams
27 \usetikzlibrary{arrows,shadows}
32 % Fix list of listings title
33 \renewcommand{\lstlistlistingname}{List of Listings}
35 % Fix list of listings chapter separator
37 \let\my@chapter\@chapter
38 \renewcommand*{\@chapter}{%
39 \addtocontents{lol}{\protect\addvspace{10pt}}%
43 % Always have url in teletype
46 % Setup pdf parameters
48 pdftitle={Task Oriented Programming and the Internet of Things},
49 pdfauthor={Mart Lubbers},
50 pdfsubject={Task Oriented Programming and the Internet of Things},
51 pdfcreator={Mart Lubbers},
52 pdfproducer={Mart Lubbers},
53 pdfkeywords={TOP,iTasks,Clean,Function Programming,IoT},
57 % Fix gls in hyperlink errors
58 \pdfstringdefDisableCommands{%
69 % Clean language spec for listings
70 \lstdefinelanguage{Clean}{%
71 alsoletter={ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_`1234567890},
72 alsoletter={~!@\#$\%^\&*-+=?<>:|\\.},
73 morekeywords={generic,implementation,definition,dynamic,module,import,from,where,in,of,case,let,infix,infixr,infixl,class,instance,with,if,derive,::},
76 morecomment=[n]{/*}{*/},
85 % Basic Clean constructs
87 {A.}{{$\forall\;\,$}}1
88 {E.}{{$\exists\;\,$}}1
92 % Handy shortcut for inline Clean code
93 \newcommand{\CI}[1]{\lstinline[language=Clean,basicstyle=\ttfamily\fontseries{l}\normalsize]|#1|}
95 % General listings settings
97 breakatwhitespace=false,
101 basicstyle=\ttfamily\fontseries{l}\footnotesize,
102 commentstyle=\slshape\fontseries{m},
103 keywordstyle=\bfseries\fontseries{b},
104 stringstyle=\ttfamily,
106 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}}}