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