This repository has been archived on 2025-03-06. You can view files and clone it, but cannot push or open issues or pull requests.
dekker-phd-thesis/assets/packages.tex

94 lines
2.3 KiB
TeX

\hfuzz=1.5pt
\usepackage{csquotes}
\usepackage[australian]{babel}
\usepackage{hyperref}
% Fonts
\usepackage{fontspec}
%% Main font
\setmainfont{ArchivoNarrow}[
Path=assets/fonts/ArchivoNarrow/,
Extension=.ttf,
UprightFont=*-Regular,
BoldFont=*-Bold,
ItalicFont=*-Italic,
BoldItalicFont=*-BoldItalic,
]
%% Title font
\newfontfamily{\norwester}{Norwester}[
Path=assets/fonts/Norwester/,
Extension=.otf,
]
\newfontfamily{\kollektif}{Kollektif}[
Path=assets/fonts/Kollektif/,
Extension=.ttf,
BoldFont=*-Bold,
ItalicFont=*-Italic,
BoldItalicFont=*-BoldItalic,
]
%% Monospace font
\setmonofont{VictorMono}[
Path=assets/fonts/VictorMono/,
Extension=.otf,
UprightFont=*-Regular,
BoldFont=*-Bold,
ItalicFont=*-Italic,
BoldItalicFont=*-BoldItalic,
]
%% Mathmatical font
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{unicode-math}
\setmathfont{GFSNeohellenicMath.otf}
% References
\usepackage[
style=apa,
]{biblatex}
\usepackage{cleveref}
% Glossary / Acronyms
\usepackage[acronym,toc]{glossaries}
\usepackage{titlecaps}
\glsdisablehyper{}
\defglsentryfmt[main]{\ifglsused{\glslabel}{\glsgenentryfmt}{\textit{\glsgenentryfmt}}}
\makeglossaries{}
% Graphics
\usepackage{graphicx}
\usepackage{subcaption}
% Example environment
\newcounter{example}[chapter]
\newenvironment{example}[1][]{\refstepcounter{example}\par\medskip \noindent
\textbf{Example~\theexample. #1} \rmfamily}{\hfill \ensuremath{\square}}
% Code formatting
\usepackage{fancyvrb}
\usepackage{color}
\input{assets/pygments_header.tex}
\newcommand{\highlightfile}[1]{{\scriptsize\input{#1tex}}}
\DeclareNewTOC[
type=listing,
float,
name=Listing,
counterwithin=chapter,
listname={List of Source Listings},
]{listing}
\crefname{listing}{listing}{listings}
\newcommand{\Vlabel}[1]{\label[line]{#1}\hypertarget{#1}{}}
\newcommand{\lref}[1]{\hyperlink{#1}{\FancyVerbLineautorefname~\ref*{#1}}}
\newcommand{\lrefrange}[2]{\FancyVerbLineautorefname{}s~\hyperlink{#1}{\ref*{#1}}--\hyperlink{#2}{\ref*{#2}}}
\newcommand{\Lrefrange}[2]{Lines~\hyperlink{#1}{\ref*{#1}}--\hyperlink{#2}{\ref*{#2}}}
% TODO: What am I doing with this?
\newcommand*\justify{%
\fontdimen2\font=0.4em% interword space
\fontdimen3\font=0.2em% interword stretch
\fontdimen4\font=0.1em% interword shrink
\fontdimen7\font=0.1em% extra space
\hyphenchar\font=`\-% allowing hyphenation
}
\newcommand{\mzninline}[1]{\texttt{\small\justify\detokenize{#1}}}