\usepackage[utf8]{inputenc} % Input encoding
-\usepackage[T2A,T1]{fontenc} % Font 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
+
+ \usepackage[dutch,russian,british]{babel}
+% \babelfont[russian]{rm}{Liberation Serif}
+\fi
% Typography, widows, orphans, fonts
\input{preamble/typography}
% Papersize and layout
\input{preamble/layout}
-% Bibliography
-\input{preamble/bibliography}
-
% Tables
\input{preamble/table}
% Crossreferences, urls and hyperlinks
\input{preamble/crossref}
-% Glossaries and acronyms
-\input{preamble/glossaries}
+% Bibliography
+\input{preamble/bibliography}
+
% Custom commands
\input{preamble/commands}
+% Glossaries and acronyms
+\input{preamble/glossaries}
+
% File structure, this must be last of the preamble
\usepackage{subfiles}