-
Notifications
You must be signed in to change notification settings - Fork 0
/
notexmacros.sty
72 lines (62 loc) · 1.67 KB
/
notexmacros.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
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{notexmacros}[2024 ElBi21 LaTeX package with custom macros]
%%% Needed Measures and Commands %%%%%%%%%%%%%%
% Determine the font size
\newlength{\docfontsize}
\makeatletter
\setlength{\docfontsize}{\f@size pt}
\makeatother
%%% Math Macros %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% General Purpouse Math
\newcommand{\eq}{\; = \;}
\newcommand{\thus}{\quad \Longrightarrow \quad}
\newcommand{\nextline}{\quad \Longrightarrow}
\newcommand{\prevline}{\Longrightarrow \quad}
% Probability
\newcommand{\cov}{\mbox{Cov}}
\newcommand{\bino}{\mbox{Bin}}
\newcommand{\berno}{\mbox{Bern}}
\newcommand{\unif}{\mbox{Unif}}
\newcommand{\geom}{\mbox{Geom}}
\newcommand{\poiss}{\mbox{Poisson}}
\newcommand{\multin}{\mbox{Multi}}
%%% General Purpouse Macros %%%%%%%%%%%%%%%%%%%
\newcommand{\angbrack}[1]{
\relax\ifmmode {
\langle \;
} \else {
$\langle$ \hspace{-0.5\docfontsize}
} \fi #1 \relax\ifmmode {
\; \rangle
} \else {
\hspace{-0.5\docfontsize} $\rangle$
} \fi
}
\newcommand{\st}{
\relax\ifmmode {
^{\mbox{\footnotesize st}}
} \else {
\hspace*{-\docfontsize} $^{\mbox{\footnotesize st}}$
} \fi
}
\newcommand{\nd}{
\relax\ifmmode {
^{\mbox{\footnotesize nd}}
} \else {
\hspace*{-\docfontsize} $^{\mbox{\footnotesize nd}}$
} \fi
}
\newcommand{\rd}{
\relax\ifmmode {
^{\mbox{\footnotesize rd}}
} \else {
\hspace*{-\docfontsize} $^{\mbox{\footnotesize rd}}$
} \fi
}
\newcommand{\nth}{
\relax\ifmmode {
^{\mbox{\footnotesize th}}
} \else {
\hspace*{-\docfontsize} $^{\mbox{\footnotesize th}}$
}\fi
}