-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpreamble.tex
More file actions
66 lines (53 loc) · 1.57 KB
/
Copy pathpreamble.tex
File metadata and controls
66 lines (53 loc) · 1.57 KB
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
% Shared preamble — included by all course main.tex files
% --- Layout ---
\usepackage[margin=1in]{geometry}
% --- Math ---
\usepackage{amsmath, amssymb, amsthm}
% --- Graphs ---
\usepackage{pgfplots}
\usepackage{tikz}
\usepackage{tikz-3dplot}
\pgfplotsset{compat=1.18}
\usetikzlibrary{calc}
% --- Boxes ---
\usepackage{tcolorbox}
\tcbuselibrary{theorems, breakable}
% --- Misc ---
\usepackage{enumitem}
\usepackage{hyperref}
\usepackage{pifont}
% --- Theorem-like environments ---
% Definition — green box, own counter
\newtcbtheorem[number within=section]{definition}{Definition}{%
colback=red!3, colframe=red!40,
fonttitle=\bfseries, breakable
}{def}
% --- Example box ---
\NewTColorBox{example}{ o }{%
colback=gray!5,
colframe=gray!60,
fonttitle=\bfseries,
title={Example\IfValueTF{#1}{: #1}{}},
breakable
}
% Theorem — blue box, uses shared counter
\newtcbtheorem[number within=section]{theorem}{Theorem}{%
colback=blue!3, colframe=blue!40,
fonttitle=\bfseries, breakable
}{thm}
\theoremstyle{plain}
\theoremstyle{remark}
\newtheorem*{remark}{Remark}
\newtheorem*{note}{Note}
% --- Common shortcuts ---
\newcommand{\R}{\mathbb{R}}
\newcommand{\N}{\mathbb{N}}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\C}{\mathbb{C}}
\newcommand{\ve}[1]{\langle #1 \rangle} % vector brackets
\newcommand{\norm}[1]{\left\lVert #1 \right\rVert}
\newcommand{\abs}[1]{\left\lvert #1 \right\rvert}
\newcommand{\dd}[1]{\,\mathrm{d}#1} % differential
\newcommand{\pd}[2]{\frac{\partial #1}{\partial #2}} % partial derivative
\newcommand{\xmark}{\ding{55}}