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
16 \newcommand{\dcolon}[0]{\mathbin{::
}}
18 % Internationalisation
19 \usepackage[dutch,russian,british
]{babel
}
21 %\babelfont[russian]{rm}{Liberation Serif}
23 % Papersize and layout
36 \usepackage{fancyhdr
} % Custom headers and footers
41 \setlength{\unitlength}{18mm
}
42 \newcommand{\blob}{\rule[-
.2\unitlength]{2\unitlength}{.5\unitlength}}
43 \fancyhead[RE
]{\rightmark}
44 \fancyhead[LO
]{\leftmark}
45 \newcommand{\frontmatterfancy}[0]{
46 \fancyhead[RO
]{\thepage}
47 \fancyhead[LE
]{\thepage}
49 \newcommand{\mainmatterfancy}[0]{
53 \put(
1,-
\value{chapter
})
{\blob}
58 \put(-
3,-
\value{chapter
})
{\blob}
63 \newcommand{\backmatterfancy}[0]{
77 \renewcommand{\chaptermark}[1]{\markboth{\chaptername\
\thechapter.\
#1}{}}
78 \renewcommand{\sectionmark}[1]{\markright{\thesection.\
#1}}
79 %\renewcommand{\chaptermark}[1]{\markboth{\MakeUppercase{\chaptername}\ \thechapter.\ #1}{}}
80 %\renewcommand{\headrulewidth}{0pt}
81 \renewcommand{\footrulewidth}{0pt
}
82 \usepackage{etoolbox
} % To patch the chapter command
83 % Have better page numbering in chapters
84 \patchcmd{\chapter}{plain
}{headings
}{}{}
85 \usepackage{epigraph
} % Epigraph
86 \renewcommand\partname{Movement
} % Rename parts to movements (rhapsody uhu)
87 \addto\captionsbritish{\renewcommand{\partname}{Movement
}}
90 \titleformat{\part}[block
]
96 \newenvironment{chapterabstract
}
100 % Increase the depth for the table of contents
101 \setcounter{secnumdepth
}{3}
102 \renewcommand{\contentsname}{Table of Contents
} % change the name of the TOC
103 \AtBeginDocument{\addtocontents{toc
}{\protect\thispagestyle{empty
}}} % to remove page numbering from the TOC
106 \usepackage[subpreambles=true
]{standalone
} % standalone figures
107 \usepackage{morewrites
} % fix no more room for a new \write
108 \usepackage{appendix
} % subappendices, appendices per chapter
111 \usepackage{bibentry
} % Cite bib entry completely
113 \bibliographystyle{alpha
}
116 \usepackage{graphicx} % Images
117 \graphicspath{{img/
},
{introduction/img
}}
118 \usepackage{caption
} % subfigures
119 \usepackage{subcaption
}
120 \newcommand{\orcid}[1]{\href{https://orcid.org/
#1}{\hspace{1mm
}\includegraphics[width=
1em
]{orcid
}\hspace{2mm
} https://orcid.org/
#1}}
123 \usepackage{booktabs
} % Nicer tables
124 \usepackage{multirow
} % Multirow cells
125 \usepackage{tabularx
} % Automatically wrapping tables
126 \usepackage{longtable
} % Tables spanning pages
130 \usepackage[algochapter
]{algorithm2e
}
131 % Fix the algorithm font
132 \renewcommand\AlCapFnt{\normalfont}
133 \usepackage{listings
}
134 % General listings settings
138 breakatwhitespace=false,
143 escapeinside=
{[+
}{+
]},
% chktex 9
147 postbreak=
\mbox{\textcolor{gray
}{$
\hookrightarrow$
}\space},
149 showstringspaces=false,
155 \usepackage{lstlangclean
}
156 \usepackage{lstlanghaskell
}
157 \usepackage{lstlanghaskelllhstex
}
158 \usepackage{lstlangarduino
}
159 \newcommand{\cinline}[1]{\lstinline[language=c,postbreak=
]|
#1|
}
160 \newcommand{\arduinoinline}[1]{\lstinline[language=
{[Arduino
]C++
},postbreak=
]|
#1|
}
161 \newcommand{\cleaninline}[1]{\lstinline[language=Clean,postbreak=
]|
#1|
}
162 \newcommand{\haskellinline}[1]{\lstinline[language=Haskell,style=haskell,postbreak=
]|
#1|
}
163 \newcommand{\haskelllhstexinline}[1]{\lstinline[language=Haskell,style=haskelllhstex,postbreak=
]|
#1|
}
164 %For storing listings in footnotes
166 % Fix list of listings title
167 \renewcommand{\lstlistlistingname}{List of Listings
}
168 % Fix list of listings chapter separator
170 \let\my@chapter\@chapter
%
171 \renewcommand*
{\@chapter
}{%
172 \addtocontents{lol
}{\protect\addvspace{10pt
}}%
176 \lstnewenvironment{lstClean
}[1][]
178 \lstset{language=Clean,
#1}
179 \renewcommand*
{\lstlistingname}{Listing (
\gls{CLEAN
})
}
182 \lstnewenvironment{lstArduino
}[1][]
184 \lstset{language=
{[Arduino
]C++
},
#1}
185 \renewcommand*
{\lstlistingname}{Listing (
\gls{ARDUINO
})
}
188 \lstnewenvironment{lstHaskell
}[1][]
190 \lstset{language=Haskell,style=haskell,
#1}%
191 \renewcommand*
{\lstlistingname}{Listing (
\gls{HASKELL
})
}
194 \lstnewenvironment{lstHaskellLhstex
}[1][]
196 \lstset{language=Haskell,style=haskelllhstex,
#1}%
197 \renewcommand*
{\lstlistingname}{Listing (
\gls{HASKELL
})
}
201 % Hyperlinks and metadata
202 \usepackage[pagebackref
]{hyperref
} % hyperlinks
203 \renewcommand*
{\backref}[1]{}
204 \renewcommand*
{\backrefalt}[4]{[{%
205 \ifcase #1 not cited.
\or p.~
#2.
\else pp.
#2.
\fi%chktex 1
209 pdfauthor=
{\myauthor},
210 pdfkeywords=
{task-oriented programming, functional programming, domain specific languages, internet of things
},
213 \usepackage[nodayofweek
]{datetime
} % Use a fixed document date
215 \usepackage{bookmark
}
216 \usepackage{cleveref
} % Easy references
217 \crefname{part
}{movement
}{movements
}
218 \crefname{lstlisting
}{listing
}{listing
}
220 % Glossaries and acronyms
221 \usepackage[acronym,nonumberlist
]{glossaries
}
223 % Titlecase glossary commands
224 \newcommand{\glst}[1]{\titlecap{\glsentrylong{#1}}}
225 \newcommand{\Glst}[1]{\glst{#1}}
226 % Fix gls in hyperlink errors
227 \pdfstringdefDisableCommands{%
242 \def\glsentrytext#1{}%
245 \def\Glsentrytext#1{}%
250 %\usepackage{makeidx}
251 %\makeindex% Enable the index
253 % Custom enumerations
254 \usepackage[inline,shortlabels
]{enumitem
}
256 \setlist[description
]{leftmargin=
\parindent}
258 % Initialize the glossaries
262 \usepackage{subfiles
}
264 \ifSubfilesClassLoaded{}{
266 \includexmp{CC_Attribution-NoDerivatives_4.0_International
}
270 \newcommand{\GHCmod}[1]{\texttt{#1}}
271 \newcommand{\requiresGHCmod}[1]{\footnote{Requires
\GHCmod{#1} to be enabled.
}}
272 \newcommand{\etc}{{\fontfamily{cmr
}\selectfont{\itshape\/\&c
}}}
273 \newcommand{\rdmentry}[6]{#1:
#2 (
#3):
#4.
#5.\
\href{https://doi.org/
#6}{#6}}
274 \newcommand{\mlubbers}{Lubbers, M.\ (Radboud University)
}
275 \newcommand{\pkoopman}{Koopman, dr.\ P.\ (Radboud University)
}
276 \newcommand{\rplasmeijer}{Plasmeijer, prof.\ dr.\ ir.\ R.\ (Radboud University)
}
278 \newcommand{\mychapter}[2]{
282 \newcommand{\myappendix}[2]{
286 \newcommand{\mybackmatter}[2]{
290 \newcommand{\mypart}[3]{\part[#2:
#3]{#2\\
[2ex
]\smaller{}#3}\label{#1}}