-
Notifications
You must be signed in to change notification settings - Fork 0
/
preamble.tex
282 lines (226 loc) · 7.24 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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
\usepackage{metalogo}
\usepackage[bottom=4cm]{geometry}
% \usepackage{showframe}
\usepackage{scrlayer-scrpage}
\pagestyle{scrheadings}
\addtokomafont{pageheadfoot}{\normalfont}
\clearpairofpagestyles
% \lehead[\pagemark]{\pagemark}
\lehead{\headmark}
\rohead{\headmark}
% \rohead[\pagemark]{\pagemark}
\ofoot[\pagemark]{\pagemark}
% \BeforeTOCHead[toc]{%
% \KOMAoptions{parskip=false}% no parskip in ToC
% \RedeclareSectionCommand[afterskip=1sp minus 1sp]{chapter}% no skip after ToC title
% }
\DeclareTOCStyleEntry[beforeskip=0.7em]{chapter}{chapter}
% Ensures that I am able to typeset bold font in table while still aligning the numbers
% correctly.
\usepackage{etoolbox}
\usepackage[T1]{fontenc}
\usepackage[binary-units=true]{siunitx}
\DeclareSIUnit\px{px}
\sisetup{%
detect-all = true,
detect-family = true,
detect-mode = true,
detect-shape = true,
detect-weight = true,
detect-inline-weight = math,
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Hyperlinks & bookmarks
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \definecolor{linkcolor}{rgb}{0,0.08,0.45}
\definecolor{linkcolor}{rgb}{0,0,0}
\usepackage[%
colorlinks = true,
citecolor = linkcolor,
linkcolor = linkcolor,
urlcolor = linkcolor,
unicode,
linktocpage,
]{hyperref}
\usepackage{bookmark}
\usepackage{changepage}
\usepackage{natbib}
\setcitestyle{authoryear,round,citesep={;},aysep={,},yysep={;}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Fonts
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{etex}
\makeatletter
\let\alloc@latex\alloc@
\def\alloc@#1#2#3#4{\newcount}% the current \newcount doesn't use \alloc@
\makeatother
\newcommand\hmmax{0}
\newcommand\bmmax{0}
\usepackage{times}
\usepackage[capitalise]{cleveref}
\usepackage[shortlabels]{enumitem}
\setlist{itemsep=0.1em,topsep=0.5em,parsep=0pt,partopsep=0pt}
%% FONT
% \usepackage[mtpscr,mtpfrak,subscriptcorrection,nofontinfo]{mtpro2}
\usepackage{newtxtext,newtxmath}
\setstretch{1}
\renewcommand{\th}{\textsuperscript{\textup{th}}\xspace}
\newacronym{NN}{NN}{Neural network}
\newacronym{GD}{GD}{Gradient descent}
\newacronym{SGD}{SGD}{Stochastic gradient descent}
\newacronym{BNN}{BNN}{Bayesian neural network}
\newacronym{LA}{LA}{Laplace approximation}
\newacronym{VB}{VB}{Variational Bayes}
\newacronym{MCMC}{MCMC}{Markov Chain Monte Carlo}
\newacronym{HMC}{HMC}{Hamiltonian Monte Carlo}
\newglossaryentry{LaTeX}{%
name = {\LaTeX},
description = {A document preparation system},
sort = {LaTeX},
}
\makeindex
\makeglossaries
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Maths
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newtheorem{proposition}{Proposition}[chapter]
\newtheorem{lemma}[proposition]{Lemma}
\newtheorem{theorem}[proposition]{Theorem}
\newtheorem{corollary}[proposition]{Corollary}
\theoremstyle{definition}
\newtheorem{definition}[proposition]{Definition}
\newtheorem{example}[proposition]{Example}
% \theoremstyle{remark}
\newtheorem{remark}[proposition]{Remark}
\input{math_commands}
% Make theorem titles bold
\makeatletter
\def\th@plain{%
\thm@notefont{}% same as heading font
\itshape % body font
}
\def\th@definition{%
\thm@notefont{}% same as heading font
\normalfont % body font
}
\makeatother
\makeatletter
\def\thm@space@setup{%
\thm@preskip=1em
\thm@postskip=\thm@preskip % or whatever, if you don't want them to be equal
}
\makeatother
\newcommand*{\qedex}{\null\nobreak\hfill\ensuremath{\blacksquare}}%
\usepackage{cancel}
\newcommand{\rnum}[1]{%
\textup{\uppercase\expandafter{\romannumeral#1}}%
}
% \renewcommand{\wtilde}[1]{\widetilde{#1}}
% \renewcommand{\what}[1]{\widehat{#1}}
\newcommand{\wtilde}[1]{\widetilde{#1}}
\newcommand{\what}[1]{\widehat{#1}}
\allowdisplaybreaks
\usepackage{algorithm}
\usepackage{algpseudocode}
\renewcommand{\algorithmicrequire}{\textbf{Input:}}
\renewcommand{\algorithmicensure}{\textbf{Output:}}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\usepgfplotslibrary{groupplots}
\usepgfplotslibrary{dateplot}
% Single bar legend
\pgfplotsset{compat=1.11,
/pgfplots/ybar legend/.style={
/pgfplots/legend image code/.code={%
\draw[##1,/tikz/.cd,yshift=-0.25em]
(0cm,0cm) rectangle (3pt,0.8em);},
},
}
\usepackage{tikz-cd}
\tikzcdset{
arrow style=tikz,
diagrams={>={Straight Barb}}
}
\newcommand*\circled[2]{\tikz[baseline=(char.base)]{\node[shape=circle,draw, #1] (char) {#2};}}
\usetikzlibrary{calc}
\usetikzlibrary{positioning}
\usetikzlibrary{angles,quotes}
\usetikzlibrary{backgrounds}
\usetikzlibrary{fit}
\usetikzlibrary{arrows}
\usetikzlibrary{arrows.meta}
\usetikzlibrary{shapes.symbols}
\usetikzlibrary{shadings}
\usetikzlibrary{shapes}
\usetikzlibrary{patterns}
\usetikzlibrary{fadings}
\usetikzlibrary{bayesnet}
\usetikzlibrary{matrix}
\usetikzlibrary{plotmarks}
\usetikzlibrary{intersections}
\usetikzlibrary{pgfplots.fillbetween}
\usetikzlibrary{external}
\tikzset{external/force remake=false}
\tikzset{external/mode=list and make}
\tikzexternalize[prefix=figs/external/, figure name=output-figure]
\usepackage[newfloat,kpsewhich]{minted}
\setminted[python]{
xleftmargin=12pt,
mathescape,
linenos,
numbersep=5pt,
frame=lines,
framesep=2mm,
fontsize=\scriptsize,
highlightcolor=gray!15
}
\usepackage{colortbl}
\usepackage[most]{tcolorbox}
\usepackage{tikzscale}
\colorlet{tablegray}{gray!15}
\newcommand{\libname}{\texttt{\small laplace-torch}\xspace}
\newcommand{\todo}[1]{{\color{red} [\textbf{TO-DO:} #1]}}
% PLOT COLORS
%%%%%%%
%% Color scheme
\definecolor{laplace1}{RGB}{38, 81, 206}
\definecolor{laplace2}{RGB}{232, 220, 87}
\definecolor{laplace3}{RGB}{238, 238, 238}
\definecolor{color0}{rgb}{0.00392156862745098,0.450980392156863,0.698039215686274}
\definecolor{color1}{rgb}{0.870588235294118,0.56078431372549,0.0196078431372549}
\definecolor{color2}{rgb}{0.00784313725490196,0.619607843137255,0.450980392156863}
\definecolor{color3}{rgb}{0.835294117647059,0.368627450980392,0}
\definecolor{color4}{rgb}{0.8,0.470588235294118,0.737254901960784}
\definecolor{color5}{rgb}{0.792156862745098,0.568627450980392,0.380392156862745}
\definecolor{color6}{rgb}{0.984313725490196,0.686274509803922,0.894117647058824}
\definecolor{color7}{rgb}{0.925490196078431,0.882352941176471,0.2}
\definecolor{color8}{rgb}{0.337254901960784,0.705882352941177,0.913725490196078}
%% Grayscale
\colorlet{gcolor0}{white}
\colorlet{gcolor1}{gray!15}
\colorlet{gcolor2}{gray!30}
\colorlet{gcolor3}{gray!45}
\colorlet{gcolor4}{gray!60}
\colorlet{gcolor5}{gray!75}
\colorlet{gcolor6}{gray!90}
\colorlet{gcolor7}{gray}
\colorlet{gcolor8}{black}
%% Axis colors
\definecolor{darkgray176}{RGB}{176,176,176}
\definecolor{darkslategray66}{RGB}{66,66,66}
%%%%%%%
% END PLOT COLORS
\usepackage{layouts}
\makeatletter
\newcommand\thefontsize{The current font size is: \f@size pt}
\makeatother
\usepackage[titletoc,title]{appendix}
\setcounter{tocdepth}{1}
\setcounter{secnumdepth}{3}
\AtBeginEnvironment{appendices}{\crefalias{section}{appendix}}
\usepackage{wrapfig}
\newcolumntype{H}{>{\setbox0=\hbox\bgroup}c<{\egroup}@{}}
\renewcommand{\UrlFont}{\ttfamily\small}
\usepackage[stdfont]{tuetitle}
\usepackage[all]{nowidow}
\usepackage{lipsum}