4 \usepackage[utf8
]{inputenc} % Input encoding
5 \usepackage[T2A,
T1]{fontenc} % Font encoding
6 \usepackage{lmodern
} % Nicer font
7 \usepackage{microtype
} % Better kerning
8 \usepackage{tipa
} % IPA symbols
9 \usepackage{stmaryrd
} % short arrows
10 \usepackage{textcomp
} % upquote
11 \usepackage{titlecaps
} % titlecase commands
12 \usepackage{amsmath
} % extra math
13 \usepackage{amssymb
} % extra math symbols
14 \usepackage{wasysym
} % circle symbols
15 \usepackage{relsize
} % \smaller command
16 \usepackage{siunitx
} % typeset units
17 \usepackage{xcolor
} % colors
18 \usepackage{fnpct
} % footnotekerning
19 \usepackage[all
]{nowidow
} % Kill widows and orphans
20 \DeclareSIUnit\noop{\relax}
21 \DeclareSIUnit\celcius{{}^
{\circ}\kern-
\scriptspace\mathsf{C
}}
23 \DeclareMathSymbol{\shortminus}{\mathbin}{AMSa
}{"
39} %chktex 18
25 % Internationalisation
26 \usepackage[dutch,russian,british
]{babel
}
28 %\babelfont[russian]{rm}{Liberation Serif}
30 % Papersize and layout
42 \usepackage{pdflscape
}
45 \DeclareFloatingEnvironment[
47 listname=
{List of definitions
},
53 \usepackage{fancyhdr
} % Custom headers and footers
54 \usepackage[fit
]{truncate
}
59 \setlength{\unitlength}{18mm
}
60 \newcommand{\blob}{{\color{gray
}\rule[-
.2\unitlength]{2\unitlength}{.5\unitlength}}}
61 \fancyhead[RE
]{\truncate{.95\headwidth}{\rightmark}}
62 \fancyhead[LO
]{\truncate{.95\headwidth}{\leftmark}}
63 \newcommand{\frontmatterfancy}[0]{
64 \fancyhead[RO
]{\thepage}
65 \fancyhead[LE
]{\thepage}
67 \newcommand{\mainmatterfancy}[0]{
71 \put(
1,-
\value{chapter
})
{\blob}
76 \put(-
3,-
\value{chapter
})
{\blob}
81 \newcommand{\backmatterfancy}[0]{
95 \renewcommand{\chaptermark}[1]{\markboth{\chaptername\
\thechapter.\
#1}{}}
96 \renewcommand{\sectionmark}[1]{\markright{\thesection.\
#1}}
97 %\renewcommand{\chaptermark}[1]{\markboth{\MakeUppercase{\chaptername}\ \thechapter.\ #1}{}}
98 %\renewcommand{\headrulewidth}{0pt}
99 \renewcommand{\footrulewidth}{0pt
}
100 \usepackage{etoolbox
} % To patch the chapter command
101 % Have better page numbering in chapters
102 \patchcmd{\chapter}{plain
}{headings
}{}{}
103 \usepackage{epigraph
} % Epigraph
104 \renewcommand\partname{Episode
} % Rename parts to episodes (rhapsody uhu)
105 \addto\captionsbritish{\renewcommand{\partname}{Episode
}}
106 \usepackage{titlesec
}
107 \titleformat{\part}[block
]
109 {\partname~
\thepart:
}
112 % This is required to make \nameref work (https://tex.stackexchange.com/questions/211035/problems-with-nameref-not-refering-to-the-correct-label-x-titlesec)
114 \let\titlesec@part
\part%
115 \renewcommand{\part}{\@ifstar
\part@star
\part@nostar
}
116 \def\part@star
#1{\NR@gettitle
{#1}\titlesec@part*
{#1}}
117 \def\part@nostar
{\@ifnextchar
[\part@nostar@opt
\part@nostar@nopt
} % chktex 9
118 \def\part@nostar@nopt
#1{\NR@gettitle
{#1}\titlesec@part
{#1}}
119 \def\part@nostar@opt
[#1]#2{\NR@gettitle
{#1}\titlesec@part
[#1]{#2}}
123 \definecolor{lstbg
}{gray
}{.95}
124 \definecolor{shadecolor
}{named
}{lstbg
}
125 \newenvironment{chapterabstract
}{\begin{shaded
}\begin{quotation
}}{\end{quotation
}\end{shaded
}} %chktex 6
127 % Increase the depth for the table of contents
128 \setcounter{secnumdepth
}{3}
129 \renewcommand{\contentsname}{Table of Contents
} % change the name of the TOC
130 \AtBeginDocument{\addtocontents{toc
}{\protect\thispagestyle{empty
}}} % to remove page numbering from the TOC
133 \usepackage[subpreambles=true
]{standalone
} % standalone figures
134 %\usepackage{morewrites} % fix no more room for a new \write
135 \usepackage{appendix
} % subappendices, appendices per chapter
138 \usepackage[square
]{natbib
} % Cite bib entry completely
139 \setlength{\bibsep}{0.0pt
}
140 %\def\bibfont{\small}
141 %\bibliographystyle{alpha}
142 \bibliographystyle{abbrvnat
}
143 %\apptocmd{\thebibliography}{\raggedright}{}{}
144 \usepackage{bibentry
} % Cite bib entry completely
146 \newcommand{\citeentry}[1]{\begin{NoHyper
}\bibentry{#1}\end{NoHyper
}.
\citep{#1}}
147 \newcommand{\refurl}[2]{\url{#1}, accessed on:
#2}
150 \newcommand{\citepage}[1]{p.~
#1}
151 \newcommand{\citepages}[1]{pp.~
#1}
152 \newcommand{\citechapter}[1]{\cref@chapter@name~
#1}
153 \newcommand{\citechapters}[1]{\cref@chapter@name@plural~
#1}
154 \newcommand{\citesection}[1]{\cref@section@name~
#1}
155 \newcommand{\citesections}[1]{\cref@section@name@plural~
#1}
156 %\newcommand{\citesection}[1]{\S.~#1}
157 %\newcommand{\citesections}[1]{\S\S.~#1}
158 \newcommand{\citeparagraph}[1]{\P.~
#1}
159 \newcommand{\citeparagraphs}[1]{\P\P.~
#1}
160 \newcommand{\citelisting}[1]{\cref@listing@name~
#1}
164 \usepackage{booktabs
} % Nicer tables
165 \usepackage{multirow
} % Multirow cells
166 \usepackage{tabularx
} % Automatically wrapping tables
167 \usepackage{longtable
} % Tables spanning pages
168 \usepackage{threeparttable
} % Tables with footnotes
171 \usepackage[algochapter,linesnumbered,lined,boxed
]{algorithm2e
}
172 % Fix the algorithm font
173 \renewcommand\AlCapFnt{\normalfont}
176 \input{preamble/listings
}
179 \usepackage{graphicx} % Images
180 \graphicspath{{img/
},
{intro/img
},
{top/img
},
{tvt/img
}}
182 \usepackage{caption
} % subfigures/captionof
183 \usepackage{subcaption
}
184 \usepackage{rotating
}
185 \usepackage{adjustbox
} % Make table fit page
186 \newcommand{\orcid}[1]{\href{https://orcid.org/
#1}{\hspace{1mm
}\includegraphics[width=
1em
]{orcid
}\hspace{2mm
} https://orcid.org/
#1}}
190 %\usepackage{makeidx}
191 %\makeindex% Enable the index
193 % Custom enumerations
194 \usepackage[inline,shortlabels
]{enumitem
}
196 \setlist[description
]{leftmargin=
\parindent}
198 % Hyperlinks and metadata
199 \usepackage[hyphens
]{url
}
200 \usepackage[pdflang=
{en-GB
},pagebackref,breaklinks
]{hyperref
} % hyperlinks
201 \usepackage{xr
} % hyperlinks
202 \renewcommand*
{\backref}[1]{}
203 \renewcommand*
{\backrefalt}[4]{[{%
204 \ifcase #1 not cited.
\or p.~
#2.
\else pp.
#2.
\fi%chktex 1
208 pdfauthor=
{\myauthor},
209 pdfkeywords=
{task-oriented programming, functional programming, domain specific languages, internet of things
},
212 \usepackage[nodayofweek
]{datetime
} % Use a fixed document date
214 \usepackage{bookmark
}
215 \usepackage[noabbrev
]{cleveref
} % Easy references
216 \usepackage{crossreftools
} % Easy references
217 \crefname{equ
}{equation
}{equations
}
218 \crefname{part
}{episode
}{episodes
}
219 \crefname{lstlisting
}{listing
}{listings
}
220 \crefname{equ
}{definition
}{definition
}
221 \usepackage{nameref
} % to reference names of chapters
222 \newcommand{\fullref}[1]{\crtcref{#1}:
\nameref{#1}}
223 \newcommand{\Fullref}[1]{\crtCref{#1}:
\nameref{#1}}
224 \creflabelformat{equation
}{#2\textup{#1}#3}
226 % Glossaries and acronyms
227 \usepackage[nolangwarn,abbreviations,nonumberlist,prefix
]{glossaries-extra
}
228 \setabbreviationstyle{long-short
}
229 \setabbreviationstyle[noexpand
]{short-nolong
}
231 \usepackage{glossary-mcols
}
232 \pdfstringdefDisableCommands{%
234 \def\glsxtrlongpl#1{}%
235 \def\glsxtrshort#1{}%
236 \def\glsxtrshortpl#1{}%
240 \def\Glsxtrlongpl#1{}%
241 \def\Glsxtrshort#1{}%
242 \def\Glsxtrshortpl#1{}%
247 \def\glsentrytext#1{}%
250 \def\Glsentrytext#1{}%
252 \def\MakeUppercase#1{}%
255 % Initialize the glossaries
259 \usepackage{subfiles
}
261 \ifSubfilesClassLoaded{}{
263 \includexmp{CC_Attribution-NoDerivatives_4.0_International
}
267 \newcommand{\GHCmod}[1]{\texttt{#1}}
268 \newcommand{\aramsingh}{Ramsingh, A.\ (University of Glasgow)
}
269 \newcommand{\dcolon}[0]{\mathbin{::
}}
270 \newcommand{\doifmt}[1]{\href{https://doi.org/
#1}{#1}}
271 \newcommand{\etc}{{\fontfamily{cmr
}\selectfont{\itshape\/\&
\kern-
0.2em c
}}}
272 \newcommand{\jsinger}{Singer, dr.\ J.\ (University of Glasgow)
}
273 \newcommand{\mlubbers}{Lubbers, M.\ (Radboud University)
}
274 \newcommand{\pkoopman}{Koopman, dr.\ P.\ (Radboud University)
}
275 \newcommand{\ptrinder}{Trinder, prof.~dr.\ P.\ (University of Glasgow)
}
276 \newcommand{\rdmentry}[5]{#1 (
#2):
#3.
#4.\
\doifmt{#5}}
277 \newcommand{\rewriterate}[2]{\langle{}\mathit{#1},
\mathit{#2}\rangle{}}
278 \newcommand{\requiresGHCmod}[2][]{\footnote{Requires
\GHCmod{#2} to be enabled.
#1}}
279 \newcommand{\rplasmeijer}{Plasmeijer, prof.\ dr.\ ir.\ R.\ (Radboud University)
}
280 \newcommand{\erasmusplus}{ERASMUS
\raisebox{.25ex
}{+
}}
281 \newcommand{\imtask}{\gls{ITASK
}\slash\gls{MTASK
}}
282 \newcommand{\citask}{\gls{CLEAN
}\slash\gls{ITASK
}}
283 \newcommand{\Citask}{\Gls{CLEAN
}\slash\gls{ITASK
}}
284 \newcommand{\cmtask}{\gls{CLEAN
}\slash\gls{MTASK
}}
285 \newcommand{\Cmtask}{\Gls{CLEAN
}\slash\gls{MTASK
}}
286 \newcommand{\cimtask}{\gls{CLEAN
}\slash\gls{ITASK
}\slash\gls{MTASK
}}
287 \newcommand{\Cimtask}{\Gls{CLEAN
}\slash\gls{ITASK
}\slash\gls{MTASK
}}
288 \newcommand{\ccpp}{\texorpdfstring{\gls{C
}\slash\gls{CPP
}}{C
\slash{}C
\texttt{++
}}}
289 \newcommand{\Ccpp}{\texorpdfstring{\Gls{C
}\slash\gls{CPP
}}{C
\slash{}C
\texttt{++
}}}
290 \newcommand{\stacksize}[1]{\parallel#1\parallel}
293 \newenvironment{compilationscheme
}
294 {\allowdisplaybreaks\startalign}