-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshortcuts.sty
76 lines (59 loc) · 1.91 KB
/
shortcuts.sty
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
\ProvidesPackage{shortcuts}
% ? Various shortcuts
% ! real/imaginary
\newcommand{\re}[1]{\text{Re}\left(#1\right)}
% \newcommand{\im}[1]{\text{Im}\left(#1\right)}
% ! such that
\newcommand{\st}{\text{ s.t. }}
% ! better spacing forall
\let\oldforall\forall
\renewcommand{\forall}{\,\oldforall \, }
% ! never use epsilon
\let\oldepsilon\epsilon
\renewcommand{\epsilon}{\varepsilon}
% ! powerset
\newcommand{\pset}[1]{\mathcal{P}(#1)}
% ! limit points
\newcommand{\fl}{\mathscr{L}}
% ! limsup/liminf pretty
\DeclareMathOperator*\limsupbar{\overline{\lim}_{n\to\infty}}
\DeclareMathOperator*\liminfbar{\underline{\lim}_{n\to\infty}}
% ! overline/underline
\newcommand{\obar}[1]{\overline{#1}}
\newcommand{\ubar}[1]{\underline{#1}}
% ! algebra is a nightmare
\newcommand{\zmod}[1]{\mathbb{Z}/#1\mathbb{Z}}
% ! absolute value
\renewcommand{\abs}[1]{\left|#1\right|}
\renewcommand{\norm}[1]{||#1||}
% linear algebra
\newcommand{\field}{\mathbb{F}}
\newcommand{\defvectorspace}[1][]{Let $V$ be a #1vector space over a field $\field$ }
\DeclareMathOperator*\interior{Int}
\DeclareMathOperator*\Span{Span}
\DeclareMathOperator*\St{St}
\DeclareMathOperator*\im{Im}
\let\ker\relax
\DeclareMathOperator*\ker{Ker}
%\DeclareMathOperator*\rank{rank}
\DeclareMathOperator*\crank{c-rank}
\DeclareMathOperator*\rrank{r-rank}
\DeclareMathOperator*\nullity{nullity}
\DeclareMathOperator*\Hom{Hom}
\DeclareMathOperator*\Id{Id}
\DeclareMathOperator*\diam{diam}
% Goofy
\renewcommand{\leq}{\leqslant}
\renewcommand{\geq}{\geqslant}
\newcommand{\floor}[1]{\lfloor #1 \rfloor}
\DeclareMathOperator*\GL{GL}
\DeclareMathOperator*\SO{SO}
\newcommand{\R}{\mathbb{R}}
\newcommand{\C}{\mathbb{C}}
\newcommand{\N}{\mathbb{N}}
\newcommand{\card}{\text{card}}
\newcommand\encircle[2][gray]{%
\tikz[baseline=(X.base)]
\node (X) [draw, shape=circle, inner sep=-4, #1, thick] {\strut {\small #2}};}
\newcommand{\eig}{\text{Eig}}
\newcommand{\iprod}[1]{\langle #1 \rangle}