-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.tex
98 lines (90 loc) · 2.51 KB
/
setup.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
% This file contains global setup commands so that we can write in our main document without cluttering up the workspace. This file is the first thing included in the main paper after the \documentclass command, and all settings are immediately available.
\usepackage{graphicx}
\usepackage{xcolor}
\usepackage{parskip}
\usepackage{wrapfig}
\usepackage{amsmath}
% Font settings
\usepackage{fontspec}
\usepackage{titlesec}
\usepackage{titling}
\setmainfont{Open Sans}
\newfontfamily \headingfont[]{Open Sans Light}
\newfontfamily \codefont[NFSSFamily=JetBrainsMono]{JetBrains Mono}
\definecolor{accent}{rgb}{0.8, 0.0, 0.0}
\titleformat{\section}
{\Huge\headingfont}{\thesection}{1em}{}[{\color{accent}\titlerule[4pt]}]
\titleformat{\subsection}
{\Large\headingfont}{\thesection}{1em}{}[{\color{accent}\titlerule[2pt]}]
\titleformat{\subsubsection}
{\large\headingfont}{\thesection}{1em}{}[{\color{accent}\titlerule[1pt]}]
\setmonofont{JetBrains Mono}
% Set to clear page before each section.
\newcommand{\sectionbreak}{\clearpage}
% Link settings
\usepackage{hyperref}
\definecolor{linkcolour}{rgb}{0.7, 0.133, 0.133}
\hypersetup{
colorlinks,
breaklinks,
urlcolor=linkcolour,
linkcolor=linkcolour,
citecolor=linkcolour
}
% Code settings
\usepackage{minted}
\usepackage[htt]{hyphenat}
% Note: For some reason, this patch is needed to allow minted to work with python3, since it just looks for "python" by default.
\usepackage{xpatch}
\makeatletter
\xpatchcmd\minted@pygmentize
{python -c}
{python3 -c}
{}{\fail}
\xpatchcmd\minted@autogobble
{python -c}
{python3 -c}
{}{\fail}
\makeatother
\usemintedstyle{default}
\definecolor{codebg}{rgb}{0.973, 0.973, 0.973}
\definecolor{codehighlight}{rgb}{0.360, 0.215, 0.309}
\setminted{
autogobble=true,
encoding=utf-8,
numbers=left,
bgcolor=codebg,
highlightcolor=codehighlight,
fontfamily=JetBrainsMono,
fontsize=\scriptsize,
breaklines,
tabsize=2
}
\renewcommand{\theFancyVerbLine}{\sffamily{\scriptsize\oldstylenums{\arabic{FancyVerbLine}}}}
% Header/Footer settings
\usepackage{fancyhdr}
\usepackage{lastpage}
\usepackage[left=3cm, right=3cm, top=2cm, bottom=4cm]{geometry}
\pagestyle{fancy}
\fancyhead[L,C,R]{}
\renewcommand{\headrulewidth}{0pt}
% Footer definition
\fancyfoot[L]{
\includegraphics[width=2cm]{img/rug_icon.jpg}
}
\fancyfoot[C]{}
\fancyfoot[R]{
\headingfont
\large
Page \thepage\ of \pageref*{LastPage}
\normalfont
\normalsize
}
% Bibiliography settings
\usepackage[
backend=bibtex,
style=numeric,
natbib=true,
autocite=superscript
]{biblatex}
\addbibresource{sources.bib}