\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

	\usepackage[dutch,russian,british]{babel}
%	\babelfont[russian]{rm}{Liberation Serif}
\fi

% Typography, widows, orphans, fonts
\input{preamble/typography}

% Internationalisation
\input{preamble/internationalisation}

% Papersize and layout
\input{preamble/layout}

% Tables
\input{preamble/table}

% Listings
\input{preamble/listings}

% Graphics
\input{preamble/graphics}

% Crossreferences, urls and hyperlinks
\input{preamble/crossref}

% 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}

% Metadata (only works in main document) and should go after subfiles
\input{preamble/metadata}
