%
% <%= projectName %>
% Written by <%= authorName %>, <%= authorSurName %>
% <%= projectUrl %>
% Licensed under <%= license %> License
%

% Page creation engine
\documentclass[11pt,a4paper]{<%= docClass %>}
\usepackage[utf8]{inputenc}
\usepackage[<%= language %>]{babel}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage[cmintegrals,cmbraces]{newtxmath}
\usepackage{ebgaramond-maths}
\usepackage{ebgaramond}
\usepackage[T1]{fontenc}
\usepackage{eso-pic}
\usepackage{blindtext}
\usepackage{background}
\usepackage[printwatermark]{xwatermark}
\usepackage{fancyhdr}
\usepackage[colorinlistoftodos]{todonotes}
% Main modules
\usepackage{url}      % URL
\usepackage{hyperref} % Links
\usepackage{graphicx} % Pictures
\usepackage{wrapfig}  % In-line Pictures
\usepackage{verbatim} % Code
\usepackage{moreverb} % Encoding
\usepackage{listings} % Code
\usepackage{color}    % Highlight
\usepackage[grey,ebgaramond]{quotchap}



\definecolor{numbercolor}{RGB}{205,85,85}
\definecolor{textcolor}{RGB}{153,153,153}

\colorlet{chaptergrey}{numbercolor}
\renewcommand*\sectfont{\color{textcolor}}
\backgroundsetup{
contents={\includegraphics{./img/logo_big.png}},
angle=0,
scale=.5,
color=grey,
position={-1.4,-37},
opacity=.5
}
\newwatermark*[pages=1-\lastdocpage,color=red!1,angle=0,scale=1,xpos=0,ypos=0]{\includegraphics[scale=0.5]{./img/logomarg_op.png}}

\setlength{\headheight}{15pt}
\fancyhf{} % clear the header and footers
\pagestyle{fancy}
\renewcommand{\chaptermark}[1]{\markboth{\thechapter. #1}{\thechapter. #1}}
\renewcommand{\sectionmark}[1]{\markright{\thesection. #1}} 
\renewcommand{\headrulewidth}{0pt}
\fancyhead[LO]{\emph{\leftmark}} 
\fancyhead[RE]{\emph{\rightmark}} 
\fancyhead[RO,LE]{\emph{\doctitle\ \thepage}}

\fancypagestyle{plain}{\fancyhf{}\fancyfoot[C]{\emph{\thepage}}}
<% if (copyrights) { %>
\fancyfoot[R]{\emph{\copyright\the\year\ \docauthname, \docauthsurname\ Tout droits réservés}}
<% } %>
% JEM fix header on cleared pages for openright
\def\cleardoublepage{\clearpage\if@twoside \if, odd\c@page\else
   \hbox{}
   \fancyhead[RE,LO]{}
   \newpage
   \if@twocolumn\hbox{}\newpage
   \fi
   \fancyhead[LO]{\emph{\leftmark}} 
   \fancyhead[RE]{\emph{\rightmark}} 
   \fi\fi}



% Config
\newcommand{\docauthname}{<%= authorName %>}
\newcommand{\docauthsurname}{<%= authorSurName %>}
\newcommand{\docprofname}{<%= ProfName %>}
\newcommand{\docprofsurname}{<%= ProfSurName %>}
\newcommand{\doctitle}{<%= projectName %>}




<% if (glossary) { %>
% Glossary
\usepackage[nomain,acronym,xindy,toc]{glossaries}
\loadglsentries{./src/glossary}
\makeglossaries
\usepackage{makeidx}
\makeindex
<% } %>
% Document
\begin{document}

\input{title}
\tableofcontents


% Chapter files listing
% End of chapter files listing

<% if (bib) { %>
% Bibliography
\bibliographystyle{unsrt}
\bibliography{../src/references}
<% } %><% if (glossary) { %>
\printindex
% Glossary
\setglossarystyle{altlist}
\printglossaries
<% } %>

\end{document}
