-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpreamble.tex
62 lines (51 loc) · 1.93 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
%%%%% IMPORTS %%%%%
% \usepackage{fourier} % Cool font
\usepackage{graphicx} % Required for inserting images
\usepackage{hyperref} % Required for \href for hyperlinks
\usepackage{amsmath, amsthm, amsfonts} % amsthm is for theorems. amsfonts is for \mathbb (etc.)
% Define theorem and corollary environments
% Required args in {}.
% Optional arg in [] defines numbering.
\newtheorem{theorem}{Theorem}[section]
\newtheorem{corollary}{Corollary}[theorem]
\newcommand{\R}{\mathbb{R}}
% [2] means 2 arguments
% #1 means first argument and #2 means second argument
\newcommand{\cv}[2]{\begin{bmatrix}#1\\#2\end{bmatrix}}
\usepackage{listings} % For code listings
\usepackage[
backend=biber,
style=alphabetic,
sorting=ynt
]{biblatex} % Bibliography
\addbibresource{refs.bib}
%%%%%%%%%% IGNORE %%%%%%%%%%
\usepackage{xcolor}
\definecolor{codegreen}{rgb}{0,0.6,0}
\definecolor{codegray}{rgb}{0.5,0.5,0.5}
\definecolor{codepurple}{rgb}{0.58,0,0.82}
\definecolor{backcolour}{rgb}{0.95,0.95,0.92}
\lstdefinestyle{mystyle}{
backgroundcolor=\color{backcolour},
commentstyle=\color{codegreen},
keywordstyle=\color{magenta},
numberstyle=\tiny\color{codegray},
stringstyle=\color{codepurple},
basicstyle=\ttfamily\footnotesize,
breakatwhitespace=false,
breaklines=true,
captionpos=b,
keepspaces=true,
numbersep=5pt,
showspaces=false,
showstringspaces=false,
showtabs=false,
tabsize=2
}
\lstset{style=mystyle}
\usepackage{tcolorbox} % Theorem boxes
\tcbuselibrary{theorems}
\newtcbtheorem[number within=subsection]{exercise}{Exercise}{colback=magenta!5, colframe=magenta!35!black,fonttitle=\bfseries}{th}
\newtcbtheorem[number within=subsection]{solution}{Solution}{colback=green!5, colframe=green!35!black,fonttitle=\bfseries}{th}
\usepackage{commath}
%%%%%%%%%% IGNORE %%%%%%%%%%