-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdsdshorthand.sty
219 lines (203 loc) · 6.96 KB
/
dsdshorthand.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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
%%
%% `dsdshorthand.sty' -- Macros for everyday use, generally to improve
%% code readability with a consistent shorthand. Macro names are
%% usually based more on the appearance of the symbol rather than the
%% meaning (e.g. \Z for \mathbb{Z}, instead of \Integers, or \cA for
%% \mathcal{A}). Choices are geared towards mathematical physics,
%% sort of.
%%
%% Author: David Simmons-Duffin <davidsd@gmail.com>
%% Last modified August 18, 2017
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{dsdshorthand}[2017/08/18 David Simmons-Duffin's macros]
\RequirePackage{amsmath, amssymb, amsthm}
\RequirePackage{ifthen} % LaTeX logic
%%%%%%% Not Required, but Oft-Used Packages %%%%%%%
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{ifthen}
\usepackage{graphicx} % \includegraphics
\usepackage{epstopdf} % allow inclusion of eps files
\usepackage{bm} % access to bold math fonts, via \bm
\usepackage{xspace} % \xspace puts space where needed
\usepackage{mathrsfs} % fancy script: \mathscr
\DeclareGraphicsRule{*}{mps}{*}{} % not sure what this does, but it's
% necessary to make feynmp work correctly
%%%%%%% Argument-taking Macros, Size Control %%%%%%%
\newcommand \pdr [2] {\frac{\partial #1}{\partial #2}}
\newcommand \rdr [2] {\frac{d #1}{d #2}}
\newcommand \lr [3] {\left #1 #2 \right #3}
\newcommand \p [1] {\lr({#1})}
\newcommand \tl [1] {\widetilde{#1}}
\renewcommand \bar [1] {\overline{#1}}
\newcommand* \pFq [5]
{{}_{#1}F_{#2}\left(\genfrac..{0pt}{}{#3}{#4};#5\right)}
\renewcommand \hat [1] {\widehat{#1}}
%%%%%%% Notation Shortcuts %%%%%%%
\newcommand \< {\langle}
\renewcommand \> {\rangle}
\renewcommand \. {\cdot}
\newcommand \x {\times}
\newcommand \oo {\infty}
\newcommand \aeq {\thickapprox}
\newcommand \ptl {\partial}
\newcommand \grad {\nabla}
\newcommand \mto {\mapsto}
\newcommand \half{\frac 1 2}
% derivatives with arrows
\newcommand \lptl{\raise .8ex\hbox{$^\leftarrow$} \hspace{-9pt} \partial}
\newcommand \lrptl{\raise .8ex\hbox{$^\leftrightarrow$} \hspace{-9pt} \partial}
%%%%%%% Greek %%%%%%%
\renewcommand \a {\alpha}
\renewcommand \b {\beta}
\newcommand \g {\gamma}
\newcommand \de {\delta}
\newcommand \De {\Delta}
\newcommand \e {\epsilon}
\renewcommand \l {\lambda}
\renewcommand \L {\Lambda}
\renewcommand \r {\rho}
\newcommand \f {\phi}
\newcommand \vf {\varphi}
\newcommand \s {\sigma}
\newcommand \w {\omega}
\renewcommand \O {\Omega}
\renewcommand \th {\theta}
\newcommand \ka {\kappa}
\newcommand \z {\zeta}
%%%%%%% Spaces and Fields %%%%%%%
\newcommand \R {\mathbb{R}}
\newcommand \Z {\mathbb{Z}}
\newcommand \N {\mathbb{N}}
\newcommand \Q {\mathbb{Q}}
\newcommand \Qp {\mathbb{Q}_p}
\renewcommand \P {\mathbb{P}}
\newcommand \A {\mathbb{A}}
%%%%%%% Multi-letter Functors/Functions %%%%%%%
% how many of these should be mathops?
\newcommand \Ad {\mathrm{Ad}}
\newcommand \SU {\mathrm{SU}}
\newcommand \SO {\mathrm{SO}}
\newcommand \GL {\mathrm{GL}}
\newcommand \SL {\mathrm{SL}}
\newcommand \PSL {\mathrm{PSL}}
\newcommand \PGL {\mathrm{PGL}}
\newcommand \Sp {\mathrm{Sp}}
\newcommand \Spin {\mathrm{Spin}}
\newcommand \Span {\mathrm{Span}}
\newcommand \Aut {\mathrm{Aut}}
\newcommand \Res {\mathop{\mathrm{Res}}}
\renewcommand \Re {\mathop{\mathrm{Re}}}
\renewcommand \Im {\mathop{\mathrm{Im}}}
\newcommand \Tr {\mathrm{Tr}}
\newcommand \Pf {\mathrm{Pf}}
\newcommand \Ker {\mathop{\mathrm{Ker}}}
\newcommand \Coker {\mathop{\mathrm{Coker}}}
\newcommand \Hom {\mathrm{Hom}}
\newcommand \Mor {\mathrm{Mor}}
\newcommand \Gal {\mathrm{Gal}}
\newcommand \Sym {\mathrm{Sym}}
\newcommand \codim {\mathop{\mathrm{codim}}}
\newcommand \ind {\mathop{\mathrm{ind}}}
\newcommand \Vol {\mathrm{Vol}}
\newcommand \vol {\mathrm{vol}}
%%%%%%% Single-letter Shortcuts %%%%%%%
%%%%%%% Bold Letters %%%%%%%
% some letters are commented out to not conflict with the usual TeX commands
%% lowercase
\newcommand \ba {\mathbf{a}}
\newcommand \bb {\mathbf{b}}
\newcommand \bc {\mathbf{c}}
\newcommand \bd {\mathbf{d}}
\newcommand \be {\mathbf{e}}
%\newcommand \bf {\mathbf{f}}
\newcommand \bg {\mathbf{g}}
\newcommand \bh {\mathbf{h}}
\newcommand \bi {\mathbf{i}}
\newcommand \bj {\mathbf{j}}
\newcommand \bk {\mathbf{k}}
\newcommand \bl {\mathbf{l}}
\newcommand \bfm {\mathbf{m}}
\newcommand \bn {\mathbf{n}}
\newcommand \bo {\mathbf{o}}
\newcommand \bp {\mathbf{p}}
\newcommand \bq {\mathbf{q}}
\newcommand \br {\mathbf{r}}
\newcommand \bs {\mathbf{s}}
\newcommand \bt {\mathbf{t}}
\newcommand \bu {\mathbf{u}}
\newcommand \bv {\mathbf{v}}
\newcommand \bw {\mathbf{w}}
\newcommand \bx {\mathbf{x}}
\newcommand \by {\mathbf{y}}
\newcommand \bz {\mathbf{z}}
%% Uppercase
\newcommand \bA {\mathbf{A}}
\newcommand \bB {\mathbf{B}}
\newcommand \bC {\mathbf{C}}
\newcommand \bD {\mathbf{D}}
\newcommand \bE {\mathbf{E}}
\newcommand \bF {\mathbf{F}}
\newcommand \bG {\mathbf{G}}
\newcommand \bH {\mathbf{H}}
\newcommand \bI {\mathbf{I}}
\newcommand \bJ {\mathbf{J}}
\newcommand \bK {\mathbf{K}}
\newcommand \bL {\mathbf{L}}
\newcommand \bM {\mathbf{M}}
\newcommand \bN {\mathbf{N}}
\newcommand \bO {\mathbf{O}}
\newcommand \bP {\mathbf{P}}
\newcommand \bQ {\mathbf{Q}}
\newcommand \bR {\mathbf{R}}
\newcommand \bS {\mathbf{S}}
\newcommand \bT {\mathbf{T}}
\newcommand \bU {\mathbf{U}}
\newcommand \bV {\mathbf{V}}
\newcommand \bW {\mathbf{W}}
\newcommand \bX {\mathbf{X}}
\newcommand \bY {\mathbf{Y}}
\newcommand \bZ {\mathbf{Z}}
% Special characters
\newcommand*\Bell{\ensuremath{\boldsymbol\ell}}
%%%%%%% Caligraphic Capitals %%%%%%%
\newcommand \cA {\mathcal{A}}
\newcommand \cB {\mathcal{B}}
\newcommand \cC {\mathcal{C}}
\newcommand \cD {\mathcal{D}}
\newcommand \cE {\mathcal{E}}
\newcommand \cF {\mathcal{F}}
\newcommand \cG {\mathcal{G}}
\newcommand \cH {\mathcal{H}}
\newcommand \cI {\mathcal{I}}
\newcommand \cJ {\mathcal{J}}
\newcommand \cK {\mathcal{K}}
\newcommand \cL {\mathcal{L}}
\newcommand \cM {\mathcal{M}}
\newcommand \cN {\mathcal{N}}
\newcommand \cO {\mathcal{O}}
\newcommand \cP {\mathcal{P}}
\newcommand \cQ {\mathcal{Q}}
\newcommand \cR {\mathcal{R}}
\newcommand \cS {\mathcal{S}}
\newcommand \cT {\mathcal{T}}
\newcommand \cU {\mathcal{U}}
\newcommand \cV {\mathcal{V}}
\newcommand \cW {\mathcal{W}}
\newcommand \cX {\mathcal{X}}
\newcommand \cY {\mathcal{Y}}
\newcommand \cZ {\mathcal{Z}}
%%%%%%% Unit Vectors %%%%%%%
\newcommand \xhat {\hat{\bx}}
\newcommand \yhat {\hat{\by}}
\newcommand \zhat {\hat{\bz}}
\newcommand \rhat {\hat{\br}}
\newcommand \nhat {\hat{\bn}}
%%%%%%% Equations %%%%%%%
\def\be#1\ee{\begin{align}#1\end{align}}
\newcommand \nn {\nonumber}
%%%%%%%% Theorem Types %%%%%%%%
% last arg means number by sections (e.g. Theorem 2.3)
% the second arg means share the same counter with 'theorem'