-\usepackage{geometry}
-\geometry{
- inner=25mm,
- outer=20mm,
- marginparsep=3mm,
- marginparwidth=13mm,
- top=25mm,
- bottom=20mm,
- paperwidth=17cm,
- paperheight=24cm,
-}
-\usepackage{pdflscape}
-\usepackage{float}
-\usepackage{newfloat}
-\DeclareFloatingEnvironment[
- fileext=loq,
- listname={List of definitions},
- name=Definition,
- placement=tbp,
- within=chapter,
- chapterlistsgaps=on,
- ]{equ}
-\usepackage{fancyhdr} % Custom headers and footers
-\usepackage[fit]{truncate}
-%\pagestyle{headings}
-\pagestyle{fancy}
-\fancyhead{}
-\fancyfoot{}
-\setlength{\unitlength}{18mm}
-\newcommand{\blob}{{\color{gray}\rule[-.2\unitlength]{2\unitlength}{.5\unitlength}}}
-\fancyhead[RE]{\truncate{.95\headwidth}{\rightmark}}
-\fancyhead[LO]{\truncate{.95\headwidth}{\leftmark}}
-\newcommand{\frontmatterfancy}[0]{
- \fancyhead[RO]{\thepage}
- \fancyhead[LE]{\thepage}
-}
-\newcommand{\mainmatterfancy}[0]{
- \fancyhead[RO]{
- \thepage%
- \begin{picture}(0,0)
- \put(1,-\value{chapter}){\blob}
- \end{picture}
- }
- \fancyhead[LE]{
- \begin{picture}(0,0)
- \put(-3,-\value{chapter}){\blob}
- \end{picture}%
- \thepage%
- }
-}
-\newcommand{\backmatterfancy}[0]{
- \fancyhead[RO]{
- \thepage%
- \begin{picture}(0,0)
- \put(1,-1){\blob}
- \end{picture}
- }
- \fancyhead[LE]{
- \begin{picture}(0,0)
- \put(-3,-1){\blob}
- \end{picture}%
- \thepage%
- }
-}
-\renewcommand{\chaptermark}[1]{\markboth{\chaptername\ \thechapter.\ #1}{}}
-\renewcommand{\sectionmark}[1]{\markright{\thesection.\ #1}}
-%\renewcommand{\chaptermark}[1]{\markboth{\MakeUppercase{\chaptername}\ \thechapter.\ #1}{}}
-%\renewcommand{\headrulewidth}{0pt}
-\renewcommand{\footrulewidth}{0pt}
-\usepackage{etoolbox} % To patch the chapter command
-% Have better page numbering in chapters
-\patchcmd{\chapter}{plain}{headings}{}{}
-\usepackage{epigraph} % Epigraph
-\renewcommand\partname{Episode} % Rename parts to episodes (rhapsody uhu)
-\addto\captionsbritish{\renewcommand{\partname}{Episode}}
-\usepackage{titlesec}
-\titleformat{\part}[block]
- {\Huge}
- {\partname~\thepart:}
- {20pt}
- {}
-% This is required to make \nameref work (https://tex.stackexchange.com/questions/211035/problems-with-nameref-not-refering-to-the-correct-label-x-titlesec)
-\makeatletter
-\let\titlesec@part\part%
-\renewcommand{\part}{\@ifstar\part@star\part@nostar}
-\def\part@star#1{\NR@gettitle{#1}\titlesec@part*{#1}}
-\def\part@nostar{\@ifnextchar[\part@nostar@opt\part@nostar@nopt} % chktex 9
-\def\part@nostar@nopt#1{\NR@gettitle{#1}\titlesec@part{#1}}
-\def\part@nostar@opt[#1]#2{\NR@gettitle{#1}\titlesec@part[#1]{#2}}
-\makeatother
-
-\usepackage{framed}
-%\newenvironment{chapterabstract}{\begin{quotation}\em\noindent}{\end{quotation}} %chktex 6
-\definecolor{lstbg}{gray}{.95}
-\definecolor{shadecolor}{named}{lstbg}
-\newenvironment{chapterabstract}{\begin{shaded}\em}{\end{shaded}} %chktex 6
-
-% Increase the depth for the table of contents
-\setcounter{secnumdepth}{3}
-\renewcommand{\contentsname}{Table of Contents} % change the name of the TOC
-\AtBeginDocument{\addtocontents{toc}{\protect\thispagestyle{empty}}} % to remove page numbering from the TOC
-
-% (file) structure
-\usepackage[subpreambles=true]{standalone} % standalone figures
-%\usepackage{morewrites} % fix no more room for a new \write
-\usepackage{appendix} % subappendices, appendices per chapter
-
-% Bibliography
-\usepackage{natbib} % Cite bib entry completely
-\setlength{\bibsep}{0.0pt}
-\def\bibfont{\small}
-%\bibliographystyle{alpha}
-\bibliographystyle{abbrvnat}
-\apptocmd{\thebibliography}{\raggedright}{}{}
-\usepackage{bibentry} % Cite bib entry completely
-\nobibliography*
-\newcommand{\citeentry}[1]{\begin{NoHyper}\bibentry{#1}\end{NoHyper}. \citep{#1}}
-
-\makeatletter
-\newcommand{\citepage}[1]{p.~#1}
-\newcommand{\citepages}[1]{pp.~#1}
-\newcommand{\citechapter}[1]{\cref@chapter@name~#1}
-\newcommand{\citechapters}[1]{\cref@chapter@name@plural~#1}
-\newcommand{\citesection}[1]{\cref@section@name~#1}
-\newcommand{\citesections}[1]{\cref@section@name@plural~#1}
-%\newcommand{\citesection}[1]{\S.~#1}
-%\newcommand{\citesections}[1]{\S\S.~#1}
-\newcommand{\citeparagraph}[1]{\P.~#1}
-\newcommand{\citeparagraphs}[1]{\P\P.~#1}
-\newcommand{\citelisting}[1]{\cref@listing@name~#1}
-\makeatother