%%% Кодировки и шрифты %%%
\ifxetexorluatex
\setmainlanguage[babelshorthands=true]{russian} % Язык по-умолчанию русский с поддержкой приятных команд пакета babel
\setotherlanguage{english} % Дополнительный язык = английский (в американской вариации по-умолчанию)
\ifwindows
\setmonofont{cour}[ % Courier New
Script = Latin,
Path = c:/windows/fonts/,
Extension = .ttf,
UprightFont = *,
BoldFont = *bd,
ItalicFont = *i,
BoldItalicFont = *bi]
\newfontfamily\cyrillicfonttt{cour}[ % Courier New
Script = Cyrillic,
Path = c:/windows/fonts/,
Extension = .ttf,
UprightFont = *,
BoldFont = *bd,
ItalicFont = *i,
BoldItalicFont = *bi]
\else
\setmonofont{Courier New}
\newfontfamily\cyrillicfonttt{Courier New}[Script = Cyrillic]
\fi
\ifXeTeX
\defaultfontfeatures{Ligatures=TeX,Mapping=tex-text}
\else
\defaultfontfeatures{Ligatures=TeX}
\fi
\ifwindows
\setmainfont{times}[ % Times New Roman
Script = Latin,
Path = c:/windows/fonts/,
Extension = .ttf,
UprightFont = *,
BoldFont = *bd,
ItalicFont = *i,
BoldItalicFont = *bi]
\newfontfamily\cyrillicfont{times}[ % Times New Roman
Script = Cyrillic,
Path = c:/windows/fonts/,
Extension = .ttf,
UprightFont = *,
BoldFont = *bd,
ItalicFont = *i,
BoldItalicFont = *bi]
\setsansfont{arial}[ % Arial
Script = Latin,
Path = c:/windows/fonts/,
Extension = .ttf,
UprightFont = *,
BoldFont = *bd,
ItalicFont = *i,
BoldItalicFont = *bi]
\newfontfamily\cyrillicfontsf{arial}[ % Arial
Script = Cyrillic,
Path = c:/windows/fonts/,
Extension = .ttf,
UprightFont = *,
BoldFont = *bd,
ItalicFont = *i,
BoldItalicFont = *bi]
\else
\setmainfont{Times New Roman}
\newfontfamily\cyrillicfont{Times New Roman}[Script = Cyrillic]
\setsansfont{Arial}
\newfontfamily\cyrillicfontsf{Arial}[Script = Cyrillic]
\fi
\fi