\documentclass[openright,extrafontsizes]{memoir}
\usepackage[a4paper]{geometry}
\usepackage{xcolor}
\usepackage{lipsum}
\usepackage{amsmath}
\usepackage{unicode-math}
\setmathfont[math-style=TeX,bold-style=ISO,sans-style=italic]{Cambria Math}
\setmathfont[range={\mathcal,\mathbfcal},StylisticSet=1]{Cambria Math}
\usepackage{fontspec}
\setmainfont[Mapping=tex-text]{Candara}
\setsansfont[Mapping=tex-text]{Calibri}
\setromanfont[Mapping=tex-text]{Cambria}
\setmonofont[Mapping=tex-text,Scale=0.8]{Consolas}
\defaultfontfeatures{Scale=MatchLowercase}
\usepackage[babelshorthands]{polyglossia}
\setdefaultlanguage{bulgarian}
\setotherlanguage{english}
\usepackage[square,sort&compress,numbers,elide,merge]{natbib}
\bibliographystyle{ieeetr}
\bibsep 0.0\baselineskip
\usepackage[pdfauthor=Х.\ Шамати,
            pdftitle=Справка\ на\ научните\ постижения\ на\ доцент\ дфн\ Х.\ Шамати,
            pdfsubject=Теория\ на\ кондензираната\ материя,
            pdfdisplaydoctitle=true,
	    pdfkeywords={статисческа физика, материалознание},
            bookmarks=true,
            pdfencoding=auto,
            breaklinks=true,
            colorlinks=true,
	    citecolor=blue,
	    anchorcolor=blue,
            urlcolor=blue,
	    runcolor=blue,
            linkcolor=blue,
            pdfstartview=FitH]{hyperref}
\usepackage[pageref]{backref}
\include{bluebox}
\nouppercaseheads
\makeheadrule{headings}{\textwidth}{0.65pt}
\makefootrule{headings}{\textwidth}{0.65pt}{1pt}
\makeevenhead{headings}{\thepage}{}{\itshape\leftmark}
\makeoddhead{headings}{\itshape\rightmark}{}{\thepage}
\begin{document}
\frontmatter

\begin{titlingpage}

\title{Title Book}
\author{Me \& My self}
\date{some date}

\maketitle

\end{titlingpage}


\tableofcontents
\include{preface}



\mainmatter
\include{chapter1_bg}
\include{chapter2}

\appendix

\include{appendix}

\backmatter

\include{bibliography}

\end{document}
