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]{\rightmark}
-\fancyhead[LO]{\leftmark}
+\fancyhead[RE]{\truncate{.95\headwidth}{\rightmark}}
+\fancyhead[LO]{\truncate{.95\headwidth}{\leftmark}}
\newcommand{\frontmatterfancy}[0]{
\fancyhead[RO]{\thepage}
\fancyhead[LE]{\thepage}
%\newenvironment{chapterabstract}{\begin{quotation}\em\noindent}{\end{quotation}} %chktex 6
\definecolor{lstbg}{gray}{.95}
\definecolor{shadecolor}{named}{lstbg}
-\newenvironment{chapterabstract}{\begin{shaded}\em\noindent}{\end{shaded}} %chktex 6
+\newenvironment{chapterabstract}{\begin{shaded}\em}{\end{shaded}} %chktex 6
% Increase the depth for the table of contents
\setcounter{secnumdepth}{3}
%\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
-% Graphics
-\usepackage{graphicx} % Images
-\graphicspath{{img/},{intro/img},{top/img},{tvt/img}}
-\usepackage{caption} % subfigures/captionof
-\usepackage{subcaption}
-\usepackage{rotating}
-\newcommand{\orcid}[1]{\href{https://orcid.org/#1}{\hspace{1mm}\includegraphics[width=1em]{orcid}\hspace{2mm} https://orcid.org/#1}}
-\usepackage{tikz}
-
% Tables
\usepackage{booktabs} % Nicer tables
\usepackage{multirow} % Multirow cells
% Fix the algorithm font
\renewcommand\AlCapFnt{\normalfont}
\usepackage{listings}
+\newcounter{tmp}
% https://tex.stackexchange.com/questions/149056/how-can-i-define-additional-literate-replacements-without-deleting-existing-ones
\makeatletter
\def\addToLiterate#1{\edef\lst@literate{\unexpanded\expandafter{\lst@literate}\unexpanded{#1}}}
}
{}
+% Graphics
+\usepackage{graphicx} % Images
+\graphicspath{{img/},{intro/img},{top/img},{tvt/img}}
+\usepackage{caption} % subfigures/captionof
+\usepackage{subcaption}
+\usepackage{rotating}
+\newcommand{\orcid}[1]{\href{https://orcid.org/#1}{\hspace{1mm}\includegraphics[width=1em]{orcid}\hspace{2mm} https://orcid.org/#1}}
+\usepackage{tikz}
+
+
% Hyperlinks and metadata
- \usepackage[hyphens]{url}
+\usepackage[hyphens]{url}
\usepackage[pdflang={en-GB},pagebackref,breaklinks]{hyperref} % hyperlinks
\usepackage{xr} % hyperlinks
\renewcommand*{\backref}[1]{}