forked from YangLaTeX/thubeamer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmacros.tex
138 lines (128 loc) · 7.5 KB
/
macros.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
% About: Macros for Vector, Matrix, Tensor, Math Operator and Misc
% Author: Jingxuan Yang
% vectors
\newcommand{\va}{\bm{a}} \newcommand{\vah}{\hat{\bm{a}}} \newcommand{\ah}{\hat{a}} \newcommand{\vat}{\tilde{\bm{a}}} \newcommand{\at}{\tilde{a}}
\newcommand{\vb}{\bm{b}} \newcommand{\vbh}{\hat{\bm{b}}} \newcommand{\bh}{\hat{b}} \newcommand{\vbt}{\tilde{\bm{b}}} \newcommand{\bt}{\tilde{b}}
\newcommand{\vc}{\bm{c}} \newcommand{\vch}{\hat{\bm{c}}} \newcommand{\ch}{\hat{c}} \newcommand{\vct}{\tilde{\bm{c}}} \newcommand{\ct}{\tilde{c}}
\newcommand{\vd}{\bm{d}} \newcommand{\vdh}{\hat{\bm{d}}} \newcommand{\dhat}{\hat{d}} \newcommand{\vdt}{\tilde{\bm{d}}} \newcommand{\dt}{\tilde{d}}
\newcommand{\ve}{\bm{e}} \newcommand{\veh}{\hat{\bm{e}}} \newcommand{\eh}{\hat{e}} \newcommand{\vet}{\tilde{\bm{e}}} \newcommand{\et}{\tilde{e}}
\newcommand{\vf}{\bm{f}} \newcommand{\vfh}{\hat{\bm{f}}} \newcommand{\fh}{\hat{f}} \newcommand{\vft}{\tilde{\bm{f}}} \newcommand{\ft}{\tilde{f}}
\newcommand{\vg}{\bm{g}} \newcommand{\vgh}{\hat{\bm{g}}} \newcommand{\gh}{\hat{g}} \newcommand{\vgt}{\tilde{\bm{g}}} \newcommand{\gt}{\tilde{g}}
\newcommand{\vh}{\bm{h}} \newcommand{\vhh}{\hat{\bm{h}}} \newcommand{\hh}{\hat{h}} \newcommand{\vht}{\tilde{\bm{h}}} \newcommand{\htild}{\tilde{h}}
\newcommand{\vi}{\bm{i}} \newcommand{\vih}{\hat{\bm{i}}} \newcommand{\ih}{\hat{i}} \newcommand{\vit}{\tilde{\bm{i}}} \newcommand{\itild}{\tilde{i}}
\newcommand{\vj}{\bm{j}} \newcommand{\vjh}{\hat{\bm{j}}} \newcommand{\jh}{\hat{j}} \newcommand{\vjt}{\tilde{\bm{j}}} \newcommand{\jt}{\tilde{j}}
\newcommand{\vk}{\bm{k}} \newcommand{\vkh}{\hat{\bm{k}}} \newcommand{\kh}{\hat{k}} \newcommand{\vkt}{\tilde{\bm{k}}} \newcommand{\kt}{\tilde{k}}
\newcommand{\vl}{\bm{l}} \newcommand{\vlh}{\hat{\bm{l}}} \newcommand{\lh}{\hat{l}} \newcommand{\vlt}{\tilde{\bm{l}}} \newcommand{\lt}{\tilde{l}}
\newcommand{\vm}{\bm{m}} \newcommand{\vmh}{\hat{\bm{m}}} \newcommand{\mh}{\hat{m}} \newcommand{\vmt}{\tilde{\bm{m}}} \newcommand{\mt}{\tilde{m}}
\newcommand{\vn}{\bm{n}} \newcommand{\vnh}{\hat{\bm{n}}} \newcommand{\nh}{\hat{n}} \newcommand{\vnt}{\tilde{\bm{n}}} \newcommand{\nt}{\tilde{n}}
\newcommand{\vo}{\bm{o}} \newcommand{\voh}{\hat{\bm{o}}} \newcommand{\oh}{\hat{o}} \newcommand{\vot}{\tilde{\bm{o}}} \newcommand{\ot}{\tilde{o}}
\newcommand{\vp}{\bm{p}} \newcommand{\vph}{\hat{\bm{p}}} \newcommand{\ph}{\hat{p}} \newcommand{\vpt}{\tilde{\bm{p}}} \newcommand{\pt}{\tilde{p}}
\newcommand{\vq}{\bm{q}} \newcommand{\vqh}{\hat{\bm{q}}} \newcommand{\qh}{\hat{q}} \newcommand{\vqt}{\tilde{\bm{q}}} \newcommand{\qt}{\tilde{q}}
\newcommand{\vr}{\bm{r}} \newcommand{\vrh}{\hat{\bm{r}}} \newcommand{\rh}{\hat{r}} \newcommand{\vrt}{\tilde{\bm{r}}} \newcommand{\rt}{\tilde{r}}
\newcommand{\vs}{\bm{s}} \newcommand{\vsh}{\hat{\bm{s}}} \newcommand{\sh}{\hat{s}} \newcommand{\vst}{\tilde{\bm{s}}} \newcommand{\st}{\tilde{s}}
\newcommand{\vt}{\bm{t}} \newcommand{\vth}{\hat{\bm{t}}} \newcommand{\that}{\hat{t}} \newcommand{\vtt}{\tilde{\bm{t}}} \newcommand{\ttil}{\tilde{t}}
\newcommand{\vu}{\bm{u}} \newcommand{\vuh}{\hat{\bm{u}}} \newcommand{\uh}{\hat{u}} \newcommand{\vut}{\tilde{\bm{u}}} \newcommand{\ut}{\tilde{u}}
\newcommand{\vv}{\bm{v}} \newcommand{\vvh}{\hat{\bm{v}}} \newcommand{\vhat}{\hat{v}} \newcommand{\vvt}{\tilde{\bm{v}}} \newcommand{\vtild}{\tilde{v}}
\newcommand{\vw}{\bm{w}} \newcommand{\vwh}{\hat{\bm{w}}} \newcommand{\wh}{\hat{w}} \newcommand{\vwt}{\tilde{\bm{w}}} \newcommand{\wt}{\tilde{w}}
\newcommand{\vx}{\bm{x}} \newcommand{\vxh}{\hat{\bm{x}}} \newcommand{\xh}{\hat{x}} \newcommand{\vxt}{\tilde{\bm{x}}} \newcommand{\xt}{\tilde{x}}
\newcommand{\vy}{\bm{y}} \newcommand{\vyh}{\hat{\bm{y}}} \newcommand{\yh}{\hat{y}} \newcommand{\vyt}{\tilde{\bm{y}}} \newcommand{\yt}{\tilde{y}}
\newcommand{\vz}{\bm{z}} \newcommand{\vzh}{\hat{\bm{z}}} \newcommand{\zh}{\hat{z}} \newcommand{\vzt}{\tilde{\bm{z}}} \newcommand{\zt}{\tilde{z}}
\newcommand{\valpha}{\bm{\alpha}}
\newcommand{\vbeta}{\bm{\beta}}
\newcommand{\vgamma}{\bm{\gamma}}
\newcommand{\vtheta}{\bm{\theta}}
\newcommand{\vlambda}{\bm{\lambda}}
\newcommand{\vmu}{\bm{\mu}}
\newcommand{\vomega}{\bm{\omega}}
\newcommand{\mSigma}{\bm{\Sigma}}
\newcommand{\Fc}{\mathcal{F}}
\newcommand{\Xc}{\mathcal{X}}
\newcommand{\Yc}{\mathcal{Y}}
\newcommand{\Zc}{\mathcal{Z}}
\newcommand{\Gc}{\mathcal{G}}
\newcommand{\Hc}{\mathcal{H}}
\newcommand{\Dc}{\mathcal{D}}
\newcommand{\Cc}{\mathcal{C}}
\newcommand{\Rc}{\mathcal{R}}
\newcommand{\Lc}{\mathcal{L}}
\newcommand{\Nc}{\mathcal{N}}
\newcommand{\Tc}{\mathcal{T}}
% matrices
\newcommand{\ma}{\bm{A}}
\newcommand{\mb}{\bm{B}}
\newcommand{\md}{\bm{D}}
\newcommand{\mH}{\bm{H}}
\newcommand{\mE}{\bm{E}}
\newcommand{\mi}{\bm{I}}
\newcommand{\mk}{\bm{K}}
\newcommand{\ml}{\bm{L}}
\newcommand{\mn}{\bm{N}}
\newcommand{\mP}{\bm{P}}
\newcommand{\mq}{\bm{Q}}
\newcommand{\mr}{\bm{R}}
\newcommand{\mU}{\bm{U}}
\newcommand{\mv}{\bm{V}}
\newcommand{\mw}{\bm{W}}
\newcommand{\mx}{\bm{X}}
\newcommand{\my}{\bm{Y}}
\newcommand{\mz}{\bm{Z}}
% tensors
\newcommand{\tp}{\mathsf{P}}
\newcommand{\tu}{\mathsf{U}}
\newcommand{\tx}{\mathsf{X}}
\newcommand{\ty}{\mathsf{Y}}
\newcommand{\tz}{\mathsf{Z}}
\newcommand{\tw}{\mathsf{W}}
\newcommand{\tf}{\mathsf{F}}
\newcommand{\ta}{\mathsf{A}}
\renewcommand{\th}{\mathsf{H}}
% norms
\newcommand{\mynorm}[2]{\| {#1} \|_{#2}}
\newcommand{\norm}[2]{\mynorm{#1}{#2}}
\newcommand{\bignorm}[2]{\left\| {#1} \right\|_{#2}}
\newcommand{\norml}[1]{\mynorm{#1}{1}}
\newcommand{\bignorml}[1]{\bignorm{#1}{1}}
\newcommand{\infnorm}[1]{\mynorm{#1}{\infty}}
\newcommand{\biginfnorm}[1]{\bignorm{#1}{\infty}}
\newcommand{\oneinf}{\ell_{1,\infty}}
\newcommand{\onetwo}{\ell_{1,2}}
\newcommand{\oneinfnorm}[1]{\mynorm{#1}{1,\infty}}
\newcommand{\bigoneinf}[1]{\bignorm{#1}{1,\infty}}
\newcommand{\onetwonorm}[1]{\mynorm{#1}{1,2}}
\newcommand{\bigonetwo}[1]{\bignorm{#1}{1,2}}
\newcommand{\enorm}[1]{\mynorm{#1}{2}}
\newcommand{\bigenorm}[1]{\bignorm{#1}{2}}
\newcommand{\znorm}[1]{\mynorm{#1}{0}}
\newcommand{\bigznorm}[1]{\bignorm{#1}{0}}
\newcommand{\frob}[1]{\|{#1}\|_{\text{F}}}
\newcommand{\bigfrob}[1]{\bignorm{#1}{\text{F}}}
\newcommand{\grpnorm}[2]{\norm{#1}{\text{Gr}(#2)}}
% math operators
\DeclareMathOperator*{\argmin}{argmin}
\DeclareMathOperator*{\argmax}{argmax}
\DeclareMathOperator{\divg}{div}
\DeclareMathOperator{\dom}{dom}
\DeclareMathOperator{\interior}{int}
\DeclareMathOperator{\ri}{ri}
\DeclareMathOperator{\sgn}{sgn}
\DeclareMathOperator{\trace}{Tr}
\DeclareMathOperator{\diag}{diag}
\DeclareMathOperator{\rank}{rank}
\DeclareMathOperator{\range}{range}
\DeclareMathOperator{\vect}{vec}
\DeclareMathOperator{\prox}{prox}
\DeclareMathOperator{\intr}{int}
\DeclareMathOperator{\relint}{ri}
\DeclareMathOperator{\hard}{hard}
\DeclareMathOperator{\id}{id}
% \DeclareMathOperator{\tf}{tf}
% \DeclareMathOperator{\idf}{idf}
% misc
\newcommand{\gs}{\geqslant}
\newcommand{\ls}{\leqslant}
\newcommand{\set}[1]{\left\{ {#1}\right\}}
\newcommand{\defeq}{\ \stackrel{\text{def}}{=}\ }
\newcommand{\ip}[2]{\left\langle#1, #2\right\rangle}
\newcommand{\reals}{\mathbb{R}}
\newcommand{\complex}{\mathbb{C}}
\newcommand{\half}{\frac{1}{2}}