Debian Codegraph @

texmf-dist/doc/latex/thubeamer/macros.tex

raw
1 % About: Macros for Vector, Matrix, Tensor, Math Operator and Misc
2 % Author: Jingxuan Yang
3
4 % vectors
5 \newcommand{\va}{\bm{a}} \newcommand{\vah}{\hat{\bm{a}}} \newcommand{\ah}{\hat{a}} \newcommand{\vat}{\tilde{\bm{a}}} \newcommand{\at}{\tilde{a}}
6 \newcommand{\vb}{\bm{b}} \newcommand{\vbh}{\hat{\bm{b}}} \newcommand{\bh}{\hat{b}} \newcommand{\vbt}{\tilde{\bm{b}}} \newcommand{\bt}{\tilde{b}}
7 \newcommand{\vc}{\bm{c}} \newcommand{\vch}{\hat{\bm{c}}} \newcommand{\ch}{\hat{c}} \newcommand{\vct}{\tilde{\bm{c}}} \newcommand{\ct}{\tilde{c}}
8 \newcommand{\vd}{\bm{d}} \newcommand{\vdh}{\hat{\bm{d}}} \newcommand{\dhat}{\hat{d}} \newcommand{\vdt}{\tilde{\bm{d}}} \newcommand{\dt}{\tilde{d}}
9 \newcommand{\ve}{\bm{e}} \newcommand{\veh}{\hat{\bm{e}}} \newcommand{\eh}{\hat{e}} \newcommand{\vet}{\tilde{\bm{e}}} \newcommand{\et}{\tilde{e}}
10 \newcommand{\vf}{\bm{f}} \newcommand{\vfh}{\hat{\bm{f}}} \newcommand{\fh}{\hat{f}} \newcommand{\vft}{\tilde{\bm{f}}} \newcommand{\ft}{\tilde{f}}
11 \newcommand{\vg}{\bm{g}} \newcommand{\vgh}{\hat{\bm{g}}} \newcommand{\gh}{\hat{g}} \newcommand{\vgt}{\tilde{\bm{g}}} \newcommand{\gt}{\tilde{g}}
12 \newcommand{\vh}{\bm{h}} \newcommand{\vhh}{\hat{\bm{h}}} \newcommand{\hh}{\hat{h}} \newcommand{\vht}{\tilde{\bm{h}}} \newcommand{\htild}{\tilde{h}}
13 \newcommand{\vi}{\bm{i}} \newcommand{\vih}{\hat{\bm{i}}} \newcommand{\ih}{\hat{i}} \newcommand{\vit}{\tilde{\bm{i}}} \newcommand{\itild}{\tilde{i}}
14 \newcommand{\vj}{\bm{j}} \newcommand{\vjh}{\hat{\bm{j}}} \newcommand{\jh}{\hat{j}} \newcommand{\vjt}{\tilde{\bm{j}}} \newcommand{\jt}{\tilde{j}}
15 \newcommand{\vk}{\bm{k}} \newcommand{\vkh}{\hat{\bm{k}}} \newcommand{\kh}{\hat{k}} \newcommand{\vkt}{\tilde{\bm{k}}} \newcommand{\kt}{\tilde{k}}
16 \newcommand{\vl}{\bm{l}} \newcommand{\vlh}{\hat{\bm{l}}} \newcommand{\lh}{\hat{l}} \newcommand{\vlt}{\tilde{\bm{l}}} \newcommand{\lt}{\tilde{l}}
17 \newcommand{\vm}{\bm{m}} \newcommand{\vmh}{\hat{\bm{m}}} \newcommand{\mh}{\hat{m}} \newcommand{\vmt}{\tilde{\bm{m}}} \newcommand{\mt}{\tilde{m}}
18 \newcommand{\vn}{\bm{n}} \newcommand{\vnh}{\hat{\bm{n}}} \newcommand{\nh}{\hat{n}} \newcommand{\vnt}{\tilde{\bm{n}}} \newcommand{\nt}{\tilde{n}}
19 \newcommand{\vo}{\bm{o}} \newcommand{\voh}{\hat{\bm{o}}} \newcommand{\oh}{\hat{o}} \newcommand{\vot}{\tilde{\bm{o}}} \newcommand{\ot}{\tilde{o}}
20 \newcommand{\vp}{\bm{p}} \newcommand{\vph}{\hat{\bm{p}}} \newcommand{\ph}{\hat{p}} \newcommand{\vpt}{\tilde{\bm{p}}} \newcommand{\pt}{\tilde{p}}
21 \newcommand{\vq}{\bm{q}} \newcommand{\vqh}{\hat{\bm{q}}} \newcommand{\qh}{\hat{q}} \newcommand{\vqt}{\tilde{\bm{q}}} \newcommand{\qt}{\tilde{q}}
22 \newcommand{\vr}{\bm{r}} \newcommand{\vrh}{\hat{\bm{r}}} \newcommand{\rh}{\hat{r}} \newcommand{\vrt}{\tilde{\bm{r}}} \newcommand{\rt}{\tilde{r}}
23 \newcommand{\vs}{\bm{s}} \newcommand{\vsh}{\hat{\bm{s}}} \newcommand{\sh}{\hat{s}} \newcommand{\vst}{\tilde{\bm{s}}} \newcommand{\st}{\tilde{s}}
24 \newcommand{\vt}{\bm{t}} \newcommand{\vth}{\hat{\bm{t}}} \newcommand{\that}{\hat{t}} \newcommand{\vtt}{\tilde{\bm{t}}} \newcommand{\ttil}{\tilde{t}}
25 \newcommand{\vu}{\bm{u}} \newcommand{\vuh}{\hat{\bm{u}}} \newcommand{\uh}{\hat{u}} \newcommand{\vut}{\tilde{\bm{u}}} \newcommand{\ut}{\tilde{u}}
26 \newcommand{\vv}{\bm{v}} \newcommand{\vvh}{\hat{\bm{v}}} \newcommand{\vhat}{\hat{v}} \newcommand{\vvt}{\tilde{\bm{v}}} \newcommand{\vtild}{\tilde{v}}
27 \newcommand{\vw}{\bm{w}} \newcommand{\vwh}{\hat{\bm{w}}} \newcommand{\wh}{\hat{w}} \newcommand{\vwt}{\tilde{\bm{w}}} \newcommand{\wt}{\tilde{w}}
28 \newcommand{\vx}{\bm{x}} \newcommand{\vxh}{\hat{\bm{x}}} \newcommand{\xh}{\hat{x}} \newcommand{\vxt}{\tilde{\bm{x}}} \newcommand{\xt}{\tilde{x}}
29 \newcommand{\vy}{\bm{y}} \newcommand{\vyh}{\hat{\bm{y}}} \newcommand{\yh}{\hat{y}} \newcommand{\vyt}{\tilde{\bm{y}}} \newcommand{\yt}{\tilde{y}}
30 \newcommand{\vz}{\bm{z}} \newcommand{\vzh}{\hat{\bm{z}}} \newcommand{\zh}{\hat{z}} \newcommand{\vzt}{\tilde{\bm{z}}} \newcommand{\zt}{\tilde{z}}
31
32 \newcommand{\valpha}{\bm{\alpha}}
33 \newcommand{\vbeta}{\bm{\beta}}
34 \newcommand{\vgamma}{\bm{\gamma}}
35 \newcommand{\vtheta}{\bm{\theta}}
36 \newcommand{\vlambda}{\bm{\lambda}}
37 \newcommand{\vmu}{\bm{\mu}}
38 \newcommand{\vomega}{\bm{\omega}}
39
40 \newcommand{\mSigma}{\bm{\Sigma}}
41
42 \newcommand{\Fc}{\mathcal{F}}
43 \newcommand{\Xc}{\mathcal{X}}
44 \newcommand{\Yc}{\mathcal{Y}}
45 \newcommand{\Zc}{\mathcal{Z}}
46 \newcommand{\Gc}{\mathcal{G}}
47 \newcommand{\Hc}{\mathcal{H}}
48 \newcommand{\Dc}{\mathcal{D}}
49 \newcommand{\Cc}{\mathcal{C}}
50 \newcommand{\Rc}{\mathcal{R}}
51 \newcommand{\Lc}{\mathcal{L}}
52 \newcommand{\Nc}{\mathcal{N}}
53 \newcommand{\Tc}{\mathcal{T}}
54
55 % matrices
56 \newcommand{\ma}{\bm{A}}
57 \newcommand{\mb}{\bm{B}}
58 \newcommand{\md}{\bm{D}}
59 \newcommand{\mH}{\bm{H}}
60 \newcommand{\mE}{\bm{E}}
61 \newcommand{\mi}{\bm{I}}
62 \newcommand{\mk}{\bm{K}}
63 \newcommand{\ml}{\bm{L}}
64 \newcommand{\mn}{\bm{N}}
65 \newcommand{\mP}{\bm{P}}
66 \newcommand{\mq}{\bm{Q}}
67 \newcommand{\mr}{\bm{R}}
68 \newcommand{\mU}{\bm{U}}
69 \newcommand{\mv}{\bm{V}}
70 \newcommand{\mw}{\bm{W}}
71 \newcommand{\mx}{\bm{X}}
72 \newcommand{\my}{\bm{Y}}
73 \newcommand{\mz}{\bm{Z}}
74
75 % tensors
76 \newcommand{\tp}{\mathsf{P}}
77 \newcommand{\tu}{\mathsf{U}}
78 \newcommand{\tx}{\mathsf{X}}
79 \newcommand{\ty}{\mathsf{Y}}
80 \newcommand{\tz}{\mathsf{Z}}
81 \newcommand{\tw}{\mathsf{W}}
82 \newcommand{\tf}{\mathsf{F}}
83 \newcommand{\ta}{\mathsf{A}}
84 \renewcommand{\th}{\mathsf{H}}
85
86 % norms
87 \newcommand{\mynorm}[2]{\| {#1} \|_{#2}}
88 \newcommand{\norm}[2]{\mynorm{#1}{#2}}
89 \newcommand{\bignorm}[2]{\left\| {#1} \right\|_{#2}}
90 \newcommand{\norml}[1]{\mynorm{#1}{1}}
91 \newcommand{\bignorml}[1]{\bignorm{#1}{1}}
92 \newcommand{\infnorm}[1]{\mynorm{#1}{\infty}}
93 \newcommand{\biginfnorm}[1]{\bignorm{#1}{\infty}}
94 \newcommand{\oneinf}{\ell_{1,\infty}}
95 \newcommand{\onetwo}{\ell_{1,2}}
96 \newcommand{\oneinfnorm}[1]{\mynorm{#1}{1,\infty}}
97 \newcommand{\bigoneinf}[1]{\bignorm{#1}{1,\infty}}
98 \newcommand{\onetwonorm}[1]{\mynorm{#1}{1,2}}
99 \newcommand{\bigonetwo}[1]{\bignorm{#1}{1,2}}
100 \newcommand{\enorm}[1]{\mynorm{#1}{2}}
101 \newcommand{\bigenorm}[1]{\bignorm{#1}{2}}
102 \newcommand{\znorm}[1]{\mynorm{#1}{0}}
103 \newcommand{\bigznorm}[1]{\bignorm{#1}{0}}
104 \newcommand{\frob}[1]{\|{#1}\|_{\text{F}}}
105 \newcommand{\bigfrob}[1]{\bignorm{#1}{\text{F}}}
106 \newcommand{\grpnorm}[2]{\norm{#1}{\text{Gr}(#2)}}
107
108 % math operators
109 \DeclareMathOperator*{\argmin}{argmin}
110 \DeclareMathOperator*{\argmax}{argmax}
111 \DeclareMathOperator{\divg}{div}
112 \DeclareMathOperator{\dom}{dom}
113 \DeclareMathOperator{\interior}{int}
114 \DeclareMathOperator{\ri}{ri}
115 \DeclareMathOperator{\sgn}{sgn}
116 \DeclareMathOperator{\trace}{Tr}
117 \DeclareMathOperator{\diag}{diag}
118 \DeclareMathOperator{\rank}{rank}
119 \DeclareMathOperator{\range}{range}
120 \DeclareMathOperator{\vect}{vec}
121 \DeclareMathOperator{\prox}{prox}
122 \DeclareMathOperator{\intr}{int}
123 \DeclareMathOperator{\relint}{ri}
124 \DeclareMathOperator{\hard}{hard}
125 \DeclareMathOperator{\id}{id}
126 % \DeclareMathOperator{\tf}{tf}
127 % \DeclareMathOperator{\idf}{idf}
128
129 % misc
130 \newcommand{\gs}{\geqslant}
131 \newcommand{\ls}{\leqslant}
132 \newcommand{\set}[1]{\left\{ {#1}\right\}}
133
134 \newcommand{\defeq}{\ \stackrel{\text{def}}{=}\ }
135 \newcommand{\ip}[2]{\left\langle#1, #2\right\rangle}
136 \newcommand{\reals}{\mathbb{R}}
137 \newcommand{\complex}{\mathbb{C}}
138 \newcommand{\half}{\frac{1}{2}}