15 \usepackage{pdflscape
}
17 \usepackage{fancyhdr
} % Custom headers and footers
18 \usepackage[fit
]{truncate
}
22 \setlength{\unitlength}{18mm
}
23 \newcommand{\blob}{{\color{gray
}\rule[-
.2\unitlength]{2\unitlength}{.5\unitlength}}}
24 \fancyhead[RE
]{\truncate{.95\headwidth}{\rightmark}}
25 \fancyhead[LO
]{\truncate{.95\headwidth}{\leftmark}}
26 \newcommand{\frontmatterfancy}[0]{
27 \fancyhead[RO
]{\thepage}
28 \fancyhead[LE
]{\thepage}
30 \newcommand{\mainmatterfancy}[0]{
34 \put(
1,-
\value{chapter
})
{\blob}
39 \put(-
3,-
\value{chapter
})
{\blob}
44 \newcommand{\backmatterfancy}[0]{
58 \renewcommand{\chaptermark}[1]{\markboth{\chaptername\
\thechapter.\
#1}{}}
59 \renewcommand{\sectionmark}[1]{\markright{\thesection.\
#1}}
60 %\renewcommand{\chaptermark}[1]{\markboth{\MakeUppercase{\chaptername}\ \thechapter.\ #1}{}}
61 %\renewcommand{\headrulewidth}{0pt}
62 \renewcommand{\footrulewidth}{0pt
}
63 \usepackage{etoolbox
} % To patch the chapter command
64 % Have better page numbering in chapters
65 \patchcmd{\chapter}{plain
}{headings
}{}{}
66 \usepackage{epigraph
} % Epigraph
67 \renewcommand\partname{Episode
} % Rename parts to episodes (rhapsody uhu)
68 \addto\captionsbritish{\renewcommand{\partname}{Episode
}}
70 \titleformat{\part}[block
]
76 % This is required to make \nameref work (https://tex.stackexchange.com/questions/211035/problems-with-nameref-not-refering-to-the-correct-label-x-titlesec)
78 \let\titlesec@part
\part%
79 \renewcommand{\part}{\@ifstar
\part@star
\part@nostar
}
80 \def\part@star
#1{\NR@gettitle
{#1}\titlesec@part*
{#1}}
81 \def\part@nostar
{\@ifnextchar
[\part@nostar@opt
\part@nostar@nopt
}
82 \def\part@nostar@nopt
#1{\NR@gettitle
{#1}\titlesec@part
{#1}}
83 \def\part@nostar@opt
[#1]#2{\NR@gettitle
{#1}\titlesec@part
[#1]{#2}}
88 \definecolor{lstbg
}{gray
}{.95}
89 \definecolor{shadecolor
}{named
}{lstbg
}
90 \newenvironment{chapterabstract
}{\begin{shaded
}\begin{quotation
}}{\end{quotation
}\end{shaded
}} %chktex 6
92 % Increase the depth for the table of contents
93 \setcounter{secnumdepth
}{3}
94 \renewcommand{\contentsname}{Table of Contents
} % change the name of the TOC
95 \AtBeginDocument{\addtocontents{toc
}{\protect\thispagestyle{empty
}}} % to remove page numbering from the TOC
98 \usepackage[inline,shortlabels
]{enumitem
}
100 \setlist[description
]{leftmargin=
\parindent}
104 \usepackage{newfloat
}
105 \DeclareFloatingEnvironment[
107 listname=
{List of definitions
},
115 \usepackage{appendix
}