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