#include "documentclass"
\usepackage{fourier-orns}
\usepackage{fontspec}
\defaultfontfeatures{Ligatures=TeX, Scale=MatchLowercase}
\newfontfamily\cyrillicfont{PT Serif}[Script=Cyrillic]
\setmainfont{PT Serif}
\usepackage{polyglossia}
\setdefaultlanguage{russian}

\usepackage[russian]{hyperref}
\usepackage{graphicx}

\usepackage{indentfirst}

\usepackage{color}
\usepackage[nopagecolor=white]{pagecolor}
\pagecolor{yellow!10}

#include "geometry"

\usepackage{gamebook}
\renewcommand{\gbturntext}{\hfill перейдите на }
\renewcommand{\gbitem}[2]{\item #1 \gbturn{\directlua{
  tex.print(#2)
}}.}

\renewcommand{\gbheadtext}{%(title)s}
\title{\gbheadtext}
\author{%(author)s}
\date{\vfill \hfill \textit{\today}}

\usepackage{fancyhdr}
\setlength{\parskip}{1.3ex plus 0.2ex minus 0.2ex}

\pagestyle{fancy}

\renewcommand{\chaptermark}[1]{\markboth{\sffamily\normalsize\bfseries\chaptername\ \thechapter.\ #1}{}}
\renewcommand{\sectionmark}[1]{\markright{\sffamily\normalsize\thesection\hspace{5pt}#1}{}}

\fancyhf{}
\fancyhead[LE,RO]{\sffamily\normalsize\thepage}
\fancyhead[LO]{\decothreeright}
\fancyhead[RE]{\decothreeleft}
\fancyfoot[C]{\thepage}

\renewcommand{\headrulewidth}{0.5pt}

\fancypagestyle{plain}{\fancyhead{}\renewcommand{\headrulewidth}{0pt}}

\renewcommand{\thesection}{\arabic{section}}

\makeatletter
  \providecommand*\setfloatlocations[2]{\@namedef{fps@#1}{#2}}
\makeatother
\setfloatlocations{table}{ht}

\usepackage{titling}
\pretitle{
  \par\begin{center}
	\rule{\textwidth}{1.6pt}
  \Large \par
}

\posttitle{
  \end{center}
  \vspace*{-0.5\baselineskip}
	\rule{\textwidth}{1.6pt}
}

\usepackage[draft,nomargin,footnote,noindex]{fixme}

\begin{document}

#include "titlepage"
