-
Notifications
You must be signed in to change notification settings - Fork 0
/
preamble.tex
110 lines (86 loc) · 2.27 KB
/
preamble.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
99
100
101
102
103
104
105
106
107
108
109
110
\usepackage{todonotes}
\usepackage{bold-extra}
\usepackage[nowarn]{glossaries}
\glsdisablehyper
\usepackage{indentfirst}
\usepackage{tikz}
\usepackage{lib/minted}
\usemintedstyle{bw}
\newminted{factor}{gobble=4,frame=single}
\newmint{factor}{}
%TODO figure out the "right" way to do terminology typesetting
\newcommand{\term}[1]{\emph{#1}}
\newcommand{\inputfig}[1]{
\begin{figure}
\input{fig/#1}
\label{fig:#1}
\end{figure}
}
\newcommand{\inputlst}[2][tbp]{
\begin{figure}[#1]
\input{lst/#2}
\label{lst:#2}
\end{figure}
}
\usepackage{array}
\newcolumntype{k}[1]{|>{\centering\arraybackslash\hspace{0pt}}p{#1}|}
\usepackage{varioref}
\usepackage{hyperref}
\usepackage[capitalise]{cleveref}
\def\reftextcurrent{\unskip}
\crefname{figure}{Figure}{Figures}
\crefname{subfigure}{Figure}{Figures}
\usepackage{graphicx}
\newcommand{\whenNewer}[3]{%
\ifnum\pdfstrcmp{\pdffilemoddate{#1}}%
{\pdffilemoddate{#2}}>0%
{\immediate\write18{#3}}\fi%
}
\newcommand{\includesvg}[2][]{%
\whenNewer{#2.svg}{#2.pdf}%
{inkscape -z -D --file=#2.svg --export-pdf=#2.pdf}%
\includegraphics[#1]{#2.pdf}%
}
\usepackage{amsmath,amssymb}
\allowdisplaybreaks[1]
\newcommand{\vn}[1]{\ensuremath{\langle\texttt{#1}\rangle}}
\newcommand{\vreg}[1]{\texttt{#1}}
\newcommand{\mem}[1]{\ensuremath{\textsc{reg}[\texttt{#1}]}}
\usepackage{longtable,booktabs}
\usepackage[
style=authoryear,
sortcites=true, % not that I care a whole lot
%backref=true,
abbreviate=false,
alldates=long,
dateabbrev=false,
maxbibnames=5,
url=true,
doi=false,
firstinits=true,
dashed=false,
uniquename=init
]{biblatex}
\DeclareNameAlias{sortname}{last-first}
\renewbibmacro*{date+extrayear}{%
\iffieldundef{year}
{}
{\printtext{%
\addperiod\space\printfield{labelyear}%
\printfield{extrayear}}}}
\renewcommand*{\mkbibparens}[1]{%
{\ifcitation{\bibleftbracket#1\bibrightbracket}%
{\bibleftparen#1\bibrightparen}}%
}
\renewcommand*{\bibopenparen}[1]{%
{\ifcitation{\bibleftbracket#1}{\bibleftparen#1}}%
}
\renewcommand*{\bibcloseparen}{%
{\ifcitation{\bibrightbracket}{\bibrightparen}}%
}
\renewcommand{\contentsname}{Table of Contents}
\defbibheading{bibliography}{\bibsection}
\addbibresource{thesis.bib}
\setpnumwidth{2em}
\setrmarg{3em}
%\overfullrule=1mm