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{relsize
} % \smaller command
15 \usepackage{siunitx
} % typeset units
16 \usepackage{xcolor
} % colors
17 \DeclareSIUnit\noop{\relax}
18 \DeclareSIUnit\celcius{{}^
{\circ}\kern-
\scriptspace\mathsf{C
}}
19 %\usepackage{atveryend} % \smaller command
21 \DeclareMathSymbol{\shortminus}{\mathbin}{AMSa
}{"
39} %chktex 18
22 \newcommand{\dcolon}[0]{\mathbin{::
}}
24 % Internationalisation
25 \usepackage[dutch,russian,british
]{babel
}
27 %\babelfont[russian]{rm}{Liberation Serif}
29 % Papersize and layout
41 \usepackage{pdflscape
}
43 \usepackage{fancyhdr
} % Custom headers and footers
48 \setlength{\unitlength}{18mm
}
49 \newcommand{\blob}{\rule[-
.2\unitlength]{2\unitlength}{.5\unitlength}}
50 \fancyhead[RE
]{\rightmark}
51 \fancyhead[LO
]{\leftmark}
52 \newcommand{\frontmatterfancy}[0]{
53 \fancyhead[RO
]{\thepage}
54 \fancyhead[LE
]{\thepage}
56 \newcommand{\mainmatterfancy}[0]{
60 \put(
1,-
\value{chapter
})
{\blob}
65 \put(-
3,-
\value{chapter
})
{\blob}
70 \newcommand{\backmatterfancy}[0]{
84 \renewcommand{\chaptermark}[1]{\markboth{\chaptername\
\thechapter.\
#1}{}}
85 \renewcommand{\sectionmark}[1]{\markright{\thesection.\
#1}}
86 %\renewcommand{\chaptermark}[1]{\markboth{\MakeUppercase{\chaptername}\ \thechapter.\ #1}{}}
87 %\renewcommand{\headrulewidth}{0pt}
88 \renewcommand{\footrulewidth}{0pt
}
89 \usepackage{etoolbox
} % To patch the chapter command
90 % Have better page numbering in chapters
91 \patchcmd{\chapter}{plain
}{headings
}{}{}
92 \usepackage{epigraph
} % Epigraph
93 \renewcommand\partname{Movement
} % Rename parts to movements (rhapsody uhu)
94 \addto\captionsbritish{\renewcommand{\partname}{Movement
}}
96 \titleformat{\part}[block
]
101 % This is required to make \nameref work (https://tex.stackexchange.com/questions/211035/problems-with-nameref-not-refering-to-the-correct-label-x-titlesec)
103 \let\titlesec@part
\part%
104 \renewcommand{\part}{\@ifstar
\part@star
\part@nostar
}
105 \def\part@star
#1{\NR@gettitle
{#1}\titlesec@part*
{#1}}
106 \def\part@nostar
{\@ifnextchar
[\part@nostar@opt
\part@nostar@nopt
} % chktex 9
107 \def\part@nostar@nopt
#1{\NR@gettitle
{#1}\titlesec@part
{#1}}
108 \def\part@nostar@opt
[#1]#2{\NR@gettitle
{#1}\titlesec@part
[#1]{#2}}
110 \newenvironment{chapterabstract
}{\begin{quotation
}}{\end{quotation
}}
112 % Increase the depth for the table of contents
113 \setcounter{secnumdepth
}{3}
114 \renewcommand{\contentsname}{Table of Contents
} % change the name of the TOC
115 \AtBeginDocument{\addtocontents{toc
}{\protect\thispagestyle{empty
}}} % to remove page numbering from the TOC
118 \usepackage[subpreambles=true
]{standalone
} % standalone figures
119 %\usepackage{morewrites} % fix no more room for a new \write
120 \usepackage{appendix
} % subappendices, appendices per chapter
123 \usepackage{bibentry
} % Cite bib entry completely
125 \usepackage{natbib
} % Cite bib entry completely
126 \setlength{\bibsep}{0.0pt
}
128 %\bibliographystyle{alpha}
129 \bibliographystyle{abbrvnat
}
130 \apptocmd{\thebibliography}{\raggedright}{}{}
133 \usepackage{graphicx} % Images
134 \graphicspath{{img/
},
{intro/img
},
{top/img
},
{tvt/img
}}
135 \usepackage{caption
} % subfigures
136 \usepackage{subcaption
}
137 \usepackage{rotating
}
138 \newcommand{\orcid}[1]{\href{https://orcid.org/
#1}{\hspace{1mm
}\includegraphics[width=
1em
]{orcid
}\hspace{2mm
} https://orcid.org/
#1}}
142 \usepackage{booktabs
} % Nicer tables
143 \usepackage{multirow
} % Multirow cells
144 \usepackage{tabularx
} % Automatically wrapping tables
145 \usepackage{longtable
} % Tables spanning pages
149 \usepackage[algochapter
]{algorithm2e
}
150 % Fix the algorithm font
151 \renewcommand\AlCapFnt{\normalfont}
152 \usepackage{listings
}
153 % https://tex.stackexchange.com/questions/149056/how-can-i-define-additional-literate-replacements-without-deleting-existing-ones
155 \def\addToLiterate#1{\edef\lst@literate
{\unexpanded\expandafter{\lst@literate
}\unexpanded{#1}}}
156 \lst@Key
{moreliterate
}{}{\addToLiterate{#1}}
158 % General listings settings
161 basicstyle=
\tt\small,
162 breakatwhitespace=false,
167 escapeinside=
{[+
}{+
]},
% chktex 9
171 postbreak=
\mbox{\textcolor{gray
}{$
\hookrightarrow$
}\space},
173 showstringspaces=false,
180 \usepackage{lstlangclean
}
181 \usepackage{lstlanghaskell
}
182 \usepackage{lstlangarduino
}
190 \newcommand{\cinline}[1]{\lstinline[language=c,basicstyle=
\tt,postbreak=
]|
#1|
}
191 \newcommand{\arduinoinline}[1]{\lstinline[language=
{[Arduino
]C++
},basicstyle=
\tt,postbreak=
]|
#1|
}
192 \newcommand{\pythoninline}[1]{\lstinline[language=Python,basicstyle=
\tt,postbreak=
]|
#1|
}
193 \newcommand{\cleaninline}[1]{\lstinline[language=Clean,basicstyle=
\tt,postbreak=
]|
#1|
}
194 \newcommand{\haskellinline}[1]{\lstinline[language=
{[Regular
]Haskell
},basicstyle=
\tt,postbreak=
]|
#1|
}
195 \newcommand{\haskelllhstexinline}[1]{\lstinline[language=
{[Lhs2Tex
]Haskell
},basicstyle=
\tt,postbreak=
]|
#1|
}
196 %For storing listings in footnotes
198 % Fix list of listings title
199 \renewcommand{\lstlistlistingname}{List of Listings
}
200 % Fix list of listings chapter separator
202 \let\my@chapter\@chapter
%
203 \renewcommand*
{\@chapter
}{%
204 \addtocontents{lol
}{\protect\addvspace{10pt
}}%
208 \lstnewenvironment{lstPython
}[1][]
210 \lstset{language=Python,
#1}
211 \renewcommand*
{\lstlistingname}{Listing (
\gls{PYTHON
})
}
214 \lstnewenvironment{lstClean
}[1][]
216 \lstset{language=Clean,
#1}
217 \renewcommand*
{\lstlistingname}{Listing (
\gls{CLEAN
})
}
220 \lstnewenvironment{lstArduino
}[1][]
222 \lstset{language=
{[Arduino
]C++
},
#1}
223 \renewcommand*
{\lstlistingname}{Listing (
\gls{ARDUINO
})
}
226 \lstnewenvironment{lstHaskell
}[1][]
228 \lstset{language=
{[Regular
]Haskell
},
#1}%
229 \renewcommand*
{\lstlistingname}{Listing (
\gls{HASKELL
})
}
232 \lstnewenvironment{lstHaskellLhstex
}[1][]
234 \lstset{language=
{[Lhs2Tex
]Haskell
},
#1}%
235 \renewcommand*
{\lstlistingname}{Listing (
\gls{HASKELL
})
}
239 % Hyperlinks and metadata
240 \usepackage[pagebackref
]{hyperref
} % hyperlinks
241 \renewcommand*
{\backref}[1]{}
242 \renewcommand*
{\backrefalt}[4]{[{%
243 \ifcase #1 not cited.
\or p.~
#2.
\else pp.
#2.
\fi%chktex 1
247 pdfauthor=
{\myauthor},
248 pdfkeywords=
{task-oriented programming, functional programming, domain specific languages, internet of things
},
251 \usepackage[nodayofweek
]{datetime
} % Use a fixed document date
253 \usepackage{bookmark
}
254 \usepackage[noabbrev
]{cleveref
} % Easy references
255 \crefname{part
}{movement
}{movements
}
256 \crefname{lstlisting
}{listing
}{listings
}
257 \usepackage{nameref
} % to reference names of chapters
258 \newcommand{\fullref}[1]{\Cref{#1}:
\nameref{#1}}
260 % Glossaries and acronyms
261 \usepackage[nolangwarn,acronym,nonumberlist
]{glossaries
}
263 % Titlecase glossary commands
264 \newcommand{\glst}[1]{\titlecap{\glsentrylong{#1}}}
265 \newcommand{\Glst}[1]{\glst{#1}}
266 % Fix gls in hyperlink errors
267 \pdfstringdefDisableCommands{%
282 \def\glsentrytext#1{}%
285 \def\Glsentrytext#1{}%
288 \usepackage{glossary-mcols
}
291 %\usepackage{makeidx}
292 %\makeindex% Enable the index
294 % Custom enumerations
295 \usepackage[inline,shortlabels
]{enumitem
}
297 \setlist[description
]{leftmargin=
\parindent}
299 % Initialize the glossaries
303 \usepackage{subfiles
}
305 \ifSubfilesClassLoaded{}{
307 \includexmp{CC_Attribution-NoDerivatives_4.0_International
}
311 \newcommand{\GHCmod}[1]{\texttt{#1}}
312 \newcommand{\requiresGHCmod}[2][]{\footnote{Requires
\GHCmod{#1} to be enabled.
#2}}
313 \newcommand{\etc}{{\fontfamily{cmr
}\selectfont{\itshape\/\&c
}}}
314 \newcommand{\rdmentry}[6]{#1:
#2 (
#3):
#4.
#5.\
\href{https://doi.org/
#6}{#6}}
315 \newcommand{\mlubbers}{Lubbers, M.\ (Radboud University)
}
316 \newcommand{\pkoopman}{Koopman, dr.\ P.\ (Radboud University)
}
317 \newcommand{\rplasmeijer}{Plasmeijer, prof.\ dr.\ ir.\ R.\ (Radboud University)
}
319 \newcommand{\mypart}[3]{
320 \part[#2:
#3]{#2\\
[2ex
]\smaller{}#3}%