32728104b1b259bf848fedf42f3b811bfa6bf0eb
[msc-thesis1617.git] / thesis.pre
1 \documentclass[twoside,a4paper,titlepage]{book}
2
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
19 % Have better page numbering in chapters
20 \patchcmd{\chapter}{plain}{headings}{}{}
21
22 % Arrows for communication diagrams
23 \usetikzlibrary{arrows,shadows}
24
25 % Images directory
26 \graphicspath{{img/}}
27
28 % Fix list of listings title
29 \renewcommand{\lstlistlistingname}{List of Listings}
30
31 % Fix list of listings chapter separator
32 \makeatletter
33 \let\my@chapter\@chapter
34 \renewcommand*{\@chapter}{%
35 \addtocontents{lol}{\protect\addvspace{10pt}}%
36 \my@chapter}
37 \makeatother
38
39 % Always have url in teletype
40 \urlstyle{tt}
41
42 % Setup pdf parameters
43 \hypersetup{%
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},
50 hidelinks=true
51 }
52
53 % Fix gls in hyperlink errors
54 \pdfstringdefDisableCommands{%
55 \def\acrlong#1{}%
56 \def\acrlongpl#1{}%
57 \def\acrshort#1{}%
58 \def\acrfull#1{}%
59 \def\gls#1{}%
60 \def\glspl#1{}%
61 \def\Gls#1{}%
62 \def\Glspl#1{}%
63 }
64
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,::},
70 sensitive=true,
71 morecomment=[l]{//},
72 morecomment=[n]{/*}{*/},
73 morestring=[b]",
74 morestring=[b]',
75 emptylines=1,
76 basewidth=0.45em,
77 columns=[c]fixed,
78 texcl=true,
79 upquote=true,
80 literate=%
81 % Basic Clean constructs
82 {\\}{{$\lambda\:$}}1
83 {A.}{{$\forall\;\,$}}1
84 {E.}{{$\exists\;\,$}}1
85 {*}{{$^*$}}1
86 }
87
88 % Handy shortcut for inline Clean code
89 \newcommand{\CI}[1]{\lstinline[language=Clean,basicstyle=\ttfamily\fontseries{l}\normalsize]|#1|}
90
91 % General listings settings
92 \lstset{%
93 breakatwhitespace=false,
94 breaklines=true,
95 captionpos=b,
96 keepspaces=true,
97 basicstyle=\ttfamily\fontseries{l}\footnotesize,
98 commentstyle=\itshape\fontseries{m},
99 keywordstyle=\bfseries\fontseries{b},
100 stringstyle=\ttfamily,
101 showspaces=false,
102 showstringspaces=false,
103 showtabs=false,
104 tabsize=4,
105 frame=L,
106 language=Clean
107 }
108
109 % Increase the depth for the table of contenst
110 \setcounter{secnumdepth}{3}
111
112 % Document info
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}}}
116 \date{\today}