-\usepackage[
- inner=25mm,
- outer=20mm,
- marginparsep=3mm,
- marginparwidth=13mm,
- top=25mm,
- bottom=20mm,
- paperwidth=17cm,
- paperheight=24cm]{geometry} % Papersize
-\usepackage[british]{babel} % Internationalization
-\usepackage[titletoc]{appendix} % Appendices
-\usepackage[pagebackref,hidelinks]{hyperref} % Hyperlinks
-\usepackage{graphicx} % Graphics
-\usepackage{booktabs} % Better looking tables
-\usepackage{etoolbox} % Patch chapter command
-\usepackage[nodayofweek]{datetime} % Use a fixed document date
-\usepackage{listings} % Code
-\usepackage[acronym,nonumberlist]{glossaries} % Glossaries and acronyms
-\usepackage[algochapter]{algorithm2e} % Pseudocode
-\usepackage{makeidx} % Index
-\usepackage[inline,shortlabels]{enumitem}
-\setlist{noitemsep}
-\setlist[description]{leftmargin=\parindent}
+\usepackage[utf8]{inputenc} % Input encoding
+\usepackage[X2,T1]{fontenc} % Font encoding
+\usepackage{ifxetex}
+\ifxetex%
+ \usepackage{amsmath} % extra math
+ \usepackage{fontspec}
+ \usepackage{polyglossia}
+ \setmainlanguage[variant=british]{english}
+ \setotherlanguage{dutch}
+ \setotherlanguage{russian}
+ \newfontfamily{\cyrillicfont}{Liberation Serif}
+\else
+ \usepackage{lmodern} % Nicer font
+ \usepackage{microtype} % Better kerning
+ \usepackage{amsmath} % extra math
+ \usepackage{amssymb} % extra math symbols