2 \usepackage[utf8
]{inputenc} % Input encoding
3 \usepackage[T1]{fontenc} % Font encoding
4 \usepackage{lmodern
} % Nicer font
5 \usepackage{microtype
} % Better kerning
6 \usepackage{tipa
} % IPA symbols
7 \usepackage{stmaryrd
} % short arrows
8 \usepackage{textcomp
} % upquote
9 \usepackage{titlecaps
} % titlecase commands
10 \usepackage{amsmath
} % extra math
11 \usepackage{amssymb
} % extra math symbols
12 \usepackage{relsize
} % \smaller command
13 \usepackage{atveryend
} % \smaller command
15 \DeclareMathSymbol{\shortminus}{\mathbin}{AMSa
}{"
39} %chktex 18
17 % Internationalisation
18 \usepackage[dutch,russian,british
]{babel
}
20 %\babelfont[russian]{rm}{Liberation Serif}
22 % Papersize and layout
35 \usepackage{fancyhdr
} % Custom headers and footers
40 \setlength{\unitlength}{18mm
}
41 \newcommand{\blob}{\rule[-
.2\unitlength]{2\unitlength}{.5\unitlength}}
42 \fancyhead[RE
]{\rightmark}
43 \fancyhead[LO
]{\leftmark}
44 \newcommand{\frontmatterfancy}[0]{
45 \fancyhead[RO
]{\thepage}
46 \fancyhead[LE
]{\thepage}
48 \newcommand{\mainmatterfancy}[0]{
52 \put(
1,-
\value{chapter
})
{\blob}
57 \put(-
3,-
\value{chapter
})
{\blob}
62 \newcommand{\backmatterfancy}[0]{
76 \renewcommand{\chaptermark}[1]{\markboth{\chaptername\
\thechapter.\
#1}{}}
77 \renewcommand{\sectionmark}[1]{\markright{\thesection.\
#1}}
78 %\renewcommand{\chaptermark}[1]{\markboth{\MakeUppercase{\chaptername}\ \thechapter.\ #1}{}}
79 %\renewcommand{\headrulewidth}{0pt}
80 \renewcommand{\footrulewidth}{0pt
}
81 \usepackage{etoolbox
} % To patch the chapter command
82 % Have better page numbering in chapters
83 \patchcmd{\chapter}{plain
}{headings
}{}{}
84 \usepackage{epigraph
} % Epigraph
85 \renewcommand\partname{Movement
} % Rename parts to movements (rhapsody uhu)
86 \addto\captionsbritish{\renewcommand{\partname}{Movement
}}
89 \titleformat{\part}[block
]
95 \newenvironment{chapterabstract
}
99 % Increase the depth for the table of contents
100 \setcounter{secnumdepth
}{3}
101 \renewcommand{\contentsname}{Table of Contents
} % change the name of the TOC
102 \AtBeginDocument{\addtocontents{toc
}{\protect\thispagestyle{empty
}}} % to remove page numbering from the TOC
105 \usepackage[subpreambles=true
]{standalone
} % standalone figures
106 \usepackage{morewrites
} % fix no more room for a new \write
107 \usepackage{appendix
} % subappendices, appendices per chapter
110 \usepackage{bibentry
} % Cite bib entry completely
112 \bibliographystyle{alpha
}
114 % Hyperlinks and metadata
115 \usepackage[pagebackref
]{hyperref
} % hyperlinks
116 \renewcommand*
{\backref}[1]{}
117 \renewcommand*
{\backrefalt}[4]{[{%
118 \ifcase #1 not cited.
\or p.~
#2.
\else pp.
#2.
\fi%chktex 1
122 pdfauthor=
{\myauthor},
123 pdfkeywords=
{task-oriented programming, functional programming, domain specific languages, internet of things
},
126 \usepackage[nodayofweek
]{datetime
} % Use a fixed document date
128 \usepackage{bookmark
}
129 \usepackage{cleveref
} % Easy references
130 \crefname{part
}{movement
}{movements
}
131 \crefname{lstlisting
}{listing
}{listing
}
134 \usepackage{graphicx} % Images
135 \graphicspath{{img/
},
{introduction/img
}}
136 \usepackage{caption
} % subfigures
137 \usepackage{subcaption
}
138 \newcommand{\orcid}[1]{\href{https://orcid.org/
#1}{\hspace{1mm
}\includegraphics[width=
1em
]{orcid
}\hspace{2mm
} https://orcid.org/
#1}}
141 \usepackage{booktabs
} % Nicer tables
142 \usepackage{multirow
} % Multirow cells
143 \usepackage{tabularx
} % Automatically wrapping tables
144 \usepackage{longtable
} % Tables spanning pages
148 \usepackage[algochapter
]{algorithm2e
}
149 % Fix the algorithm font
150 \renewcommand\AlCapFnt{\normalfont}
151 \usepackage{listings
}
152 % General listings settings
155 basicstyle=
\tt\small,
156 breakatwhitespace=false,
161 % escapeinside={(+}{+)}, % chktex 9
165 postbreak=
\mbox{\textcolor{gray
}{$
\hookrightarrow$
}\space},
167 showstringspaces=false,
173 \usepackage{lstlangclean
}
174 \usepackage{lstlanghaskell
}
175 \usepackage{lstlanghaskelllhstex
}
176 \usepackage{lstlangarduino
}
177 \newcommand{\cinline}[1]{\lstinline[language=c,postbreak=
]|
#1|
}
178 \newcommand{\arduinoinline}[1]{\lstinline[language=
{[Arduino
]C++
},postbreak=
]|
#1|
}
179 \newcommand{\cleaninline}[1]{\lstinline[language=Clean,postbreak=
]|
#1|
}
180 \newcommand{\haskellinline}[1]{\lstinline[language=Haskell,style=haskell,postbreak=
]|
#1|
}
181 \newcommand{\haskelllhstexinline}[1]{\lstinline[language=Haskell,style=haskelllhstex,postbreak=
]|
#1|
}
182 % Fix list of listings title
183 \renewcommand{\lstlistlistingname}{List of Listings
}
184 % Fix list of listings chapter separator
186 \let\my@chapter\@chapter
%
187 \renewcommand*
{\@chapter
}{%
188 \addtocontents{lol
}{\protect\addvspace{10pt
}}%
192 \lstnewenvironment{lstClean
}[1][]
194 \lstset{language=Clean,
#1}
195 \renewcommand*
{\lstlistingname}{Listing (
\gls{CLEAN
})
}
198 \lstnewenvironment{lstArduino
}[1][]
200 \lstset{language=
{[Arduino
]C++
},
#1}
201 \renewcommand*
{\lstlistingname}{Listing (
\gls{ARDUINO
})
}
204 \lstnewenvironment{lstHaskell
}[1][]
206 \lstset{language=Haskell,style=haskell,
#1}%
207 \renewcommand*
{\lstlistingname}{Listing (
\gls{HASKELL
})
}
210 \lstnewenvironment{lstHaskellLhstex
}[1][]
212 \lstset{language=Haskell,style=haskelllhstex,
#1}%
213 \renewcommand*
{\lstlistingname}{Listing (
\gls{HASKELL
})
}
217 % Glossaries and acronyms
218 \usepackage[acronym,nonumberlist
]{glossaries
}
220 % Titlecase glossary commands
221 \newcommand{\glst}[1]{\titlecap{\glsentrylong{#1}}}
222 \newcommand{\Glst}[1]{\glst{#1}}
223 % Fix gls in hyperlink errors
224 \pdfstringdefDisableCommands{%
239 \def\glsentrytext#1{}%
242 \def\Glsentrytext#1{}%
247 %\usepackage{makeidx}
248 %\makeindex% Enable the index
250 % Custom enumerations
251 \usepackage[inline,shortlabels
]{enumitem
}
253 \setlist[description
]{leftmargin=
\parindent}
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{\requiresGHCmod}[1]{\footnote{Requires
\GHCmod{#1} to be enabled.
}}
269 \newcommand{\etc}{{\fontfamily{cmr
}\selectfont{\itshape\/\&c
}}}
270 \newcommand{\rdmentry}[6]{#1:
#2 (
#3):
#4.
#5.\
\href{https://doi.org/
#6}{#6}}
271 \newcommand{\mlubbers}{Lubbers, M.\ (Radboud University)
}
272 \newcommand{\pkoopman}{Koopman, dr.\ P.\ (Radboud University)
}
273 \newcommand{\rplasmeijer}{Plasmeijer, prof.\ dr.\ ir.\ R.\ (Radboud University)
}
275 \newcommand{\mychapter}[2]{
279 \newcommand{\myappendix}[2]{
283 \newcommand{\mybackmatter}[2]{
287 \newcommand{\mypart}[3]{\part[#2:
#3]{#2\\
[2ex
]\smaller{}#3}\label{#1}}