aboutsummaryrefslogtreecommitdiffstats
path: root/doc/thesis/tex/docmacros.sty
blob: 7fed6e80d3ef8cb68b0b56804f8792066e9d874e (plain)
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
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{tex/docmacros}[2021/09/27 v0.1 Document Macros]

\RequirePackage{mathtools}
\RequirePackage{amsmath}
\RequirePackage{amssymb}
\RequirePackage{bm}

%% MATHEMATICS

% Probability
\DeclareMathOperator{\expectation}{E}
\newcommand{\E}[1]{\expectation \left\{#1\right\}}

\DeclareMathOperator{\variance}{Var}
\newcommand{\Var}[1]{\variance \left\{#1\right\}}

\DeclareMathOperator{\probability}{Pr}
\renewcommand{\Pr}[1]{\probability \left\{#1\right\}}

% Functions
\DeclareMathOperator{\sinc}{sinc}
\DeclareMathOperator*{\argmax}{arg\,max}
\DeclareMathOperator*{\argmin}{arg\,min}

% Complex numbers
\renewcommand{\Re}[1]{\mathrm{Re} \left\{#1\right\}}
\renewcommand{\Im}[1]{\mathrm{Im} \left\{#1\right\}}

% Linear operators
\DeclareMathOperator{\fourier}{\mathcal{F}}
\DeclareMathOperator{\hilbert}{\mathcal{H}}

% Vectors and matrices
\renewcommand{\vec}[1]{\mathbf{\bm{#1}}}
\newcommand{\uvec}[1]{\vec{\hat{#1}}}

\newcommand{\dotp}{\boldsymbol\cdot}
\newcommand{\crossp}{\boldsymbol\times}

\newcommand{\mx}[1]{\bm{\mathrm{#1}}}

%% TYPESETTING

% Custom command IEEE references for figures and tables
\newcommand{\figref}[1]{Fig.~\ref{#1}}
\newcommand{\tabref}[1]{Tab.~\ref{#1}}