-
Notifications
You must be signed in to change notification settings - Fork 0
/
math_macros.sty
138 lines (112 loc) · 4.11 KB
/
math_macros.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
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
\RequirePackage{amsmath}
\RequirePackage{amssymb}
\RequirePackage{mathtools}
\RequirePackage{amsfonts}
\RequirePackage{amsthm}
\RequirePackage{empheq}
\RequirePackage{gensymb}
\RequirePackage{diffcoeff}
\RequirePackage{accents} %Fucks up the amsmath \lim ???
\RequirePackage{slashed}
\RequirePackage{dsfont}
\RequirePackage{bm}
\RequirePackage{cancel}
\RequirePackage{thmtools}
\RequirePackage{thm-restate}
\RequirePackage[per-mode=symbol, binary-units]{siunitx}[=v2] %Breaks \micro if running on v3 with T1 fonts
\sisetup{group-minimum-digits=4}
\newcommand*{\numR}[2]{\num[round-precision=#2]{#1}}
\newcommand*{\numRF}[2]{\num[round-mode=figures,round-precision=#2]{#1}}
\newcommand*{\numRP}[2]{\num[round-mode=places, round-precision=#2]{#1}}
\newcommand{\numpmerr}[3]{\ensuremath{^{\num[round-precision=#3]{#1}}_{\num[round-precision=#3]{#2}}}}
\newcommand{\numpmRF}[3]{\ensuremath{^{\num[round-mode=figures,round-precision=#3]{#1}}_{\num[round-mode=figures,round-precision=#3]{#2}}}}
\newcommand{\numpmRP}[3]{\ensuremath{^{\num[round-mode=places, round-precision=#3]{#1}}_{\num[round-mode=places, round-precision=#3]{#2}}}}
\let\unit\relax % Due to the \qty collition between siunitx and units
\let\qty\relax % Due to the \qty collition between siunitx and physics
\RequirePackage{physics}
\RequirePackage{tensor}
%\RequirePackage{simplewick}
%\RequirePackage{ytableau}
%\ytableausetup{centertableaux}
%% Allow for page-breaks in long equations and aligns
\allowdisplaybreaks
% --- MATH DEFINITIONS ---------------------------------------
% --- Trig Functions ---
\DeclareMathOperator{\sinc}{sinc}
%\DeclareMathOperator{\sech}{sech}
%\DeclareMathOperator{\csch}{csch}
%\DeclareMathOperator{\arcsec}{arcsec}
%\DeclareMathOperator{\arccot}{arccot}
%\DeclareMathOperator{\arccsc}{arccsc}
%\DeclareMathOperator{\arccosh}{arccosh}
%\DeclareMathOperator{\arcsinh}{arcsinh}
%\DeclareMathOperator{\arctanh}{arctanh}
%\DeclareMathOperator{\arcsech}{arcsech}
%\DeclareMathOperator{\arccsch}{arccsch}
%\DeclareMathOperator{\arccoth}{arccoth}
% --- Other Functions ---
%\DeclareMathOperator{\Log}{Log}
\DeclareMathOperator{\Arg}{Arg}
%\DeclareMathOperator{\Res}{Res}
%\let\real\Re
%\let\Re\relax
%\DeclareMathOperator{\Re}{Re}
%\let\imaginary\Im
%\let\Im\relax
%\DeclareMathOperator{\Im}{Im}
\DeclareMathOperator{\weight}{wt}
\DeclareMathOperator{\Poly}{Poly}
\DeclareMathOperator{\Vol}{Vol}
% --- Sets / Groups / Structures ---
\newcommand{\realSet}{\mathbb{R}}
\newcommand{\complexSet}{\mathbb{C}}
% --- Useful macros ---
\newcommand{\inv}[1]{\frac{1}{#1}}
% --- Useful (re)definitions ---
\renewcommand{\vb}[1]{\bm{#1}}
%\newcommand{\vb}[1]{\bm{#1}}
% --- Physics Definitions ---
\newcommand{\Lag}{\mathcal{L}}
\newcommand{\Ham}{\mathcal{H}}
%\renewcommand{\a}{\hat{a}}
%\renewcommand{\b}{\hat{b}}
%\renewcommand{\c}{\hat{c}}
%\renewcommand{\a}[1]{\hat{a}_{#1}}
%\renewcommand{\b}[1]{\hat{b}_{#1}}
\newcommand{\x}{\vb{x}}
\newcommand{\y}{\vb{y}}
\newcommand{\z}{\vb{z}}
\newcommand{\p}{\vb{p}}
\newcommand{\q}{\vb{q}}
\renewcommand{\k}{\vb{k}}
\newcommand{\tx}{\tilde{x}}
\newcommand{\E}{\vb{E}}
\newcommand{\B}{\vb{B}}
% --- Physics Text Shortcuts ---
\newcommand{\oref}{$\mathcal{O}$ }
\newcommand{\opref}{$\mathcal{O}'$ }
\newcommand{\oppref}{$\mathcal{O}''$ }
\newcommand{\ttau}{$\tau$ }
\newcommand{\ttaus}{$\tau$s }
\newcommand{\thad}{$\tau_{\text{had}}$ }
\newcommand{\thads}{$\tau_{\text{had}}$s }
% --- UNITS DEFINITIONS ---------------------------------------
\DeclareSIUnit\clight{\text{\ensuremath{c}}}
\DeclareSIUnit\keV{\kilo\electronvolt}
\DeclareSIUnit\MeV{\mega\electronvolt}
\DeclareSIUnit\GeV{\giga\electronvolt}
\DeclareSIUnit\TeV{\tera\electronvolt}
\DeclareSIUnit\keVpc{\keV\per\clight\squared}
\DeclareSIUnit\MeVpc{\MeV\per\clight\squared}
\DeclareSIUnit\GeVpc{\GeV\per\clight\squared}
\DeclareSIUnit\TeVpc{\TeV\per\clight\squared}
\DeclareSIUnit\atmosphere{\text{atm}}
\DeclareSIUnit\barn{\text{b}}
\DeclareSIUnit\fb{\femto\barn}
\DeclareSIUnit\event{\text{evento}}
\DeclareSIUnit\yr{\text{año}}
\DeclareSIUnit\sample{Sa}
\DeclareSIUnit\pixel{\text{píxeles}}
\DeclareSIUnit\photon{\gamma}
% --- To be able to place \eqref in captions...
\MakeRobust{\eqref}