summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/lwarp/lwarp-physics.sty
blob: 69eec3f5eab2597ab0dbfe57061fda33fd13b68f (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
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
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
%%
%% This is file `lwarp-physics.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% lwarp.dtx  (with options: `physics')
%% This is a generated file.
%% Copyright 2016-2020 Brian Dunn
%% 
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%%   http://www.latex-project.org/lppl.txt
%% and version 1.3 or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
\LWR@ProvidesPackagePass{physics}% No date is provided by the package.
\begin{warpMathJax}
\CustomizeMathJax{\newcommand{\quantity}{}}
\CustomizeMathJax{\let\qty\quantity}
\CustomizeMathJax{\newcommand{\pqty}[1]{\left(#1\right)}}
\CustomizeMathJax{\newcommand{\bqty}[1]{\left\lbrack#1\right\rbrack}}
\CustomizeMathJax{\newcommand{\vqty}[1]{\left\vert#1\right\rvert}}
\CustomizeMathJax{\newcommand{\Bqty}[1]{\left\lbrace#1\right\rbrace}}

\CustomizeMathJax{\newcommand{\absolutevalue}[1]{\left\lvert#1\right\rvert}}
\CustomizeMathJax{\let\abs\absolutevalue}

\CustomizeMathJax{\newcommand{\norm}[1]{%
    \left\lvert\left\lvert#1\right\rvert\right\rvert}%
}

\CustomizeMathJax{\newcommand{\evaluated}[1]{#1\vert}}
\CustomizeMathJax{\let\eval\evaluated}

\CustomizeMathJax{\newcommand{\order}[1]{\mathcal{O}\left(#1\right)}}

\CustomizeMathJax{\newcommand{\commutator}[2]{\left\lbrack#1,#2\right\rbrack}}
\CustomizeMathJax{\let\comm\commutator}

\CustomizeMathJax{\newcommand{\anticommutator}[2]{%
    \left\lbrace#1,#2\right\rbrace}%
}
\CustomizeMathJax{\let\acomm\anticommutator}

\CustomizeMathJax{\let\poissonbracket\anticommutator}
\CustomizeMathJax{\let\pb\anticommutator}

\CustomizeMathJax{\newcommand{\vectorbold}[1]{\mathbf{#1}}}
\CustomizeMathJax{\let\vb\vectorbold}

\CustomizeMathJax{\newcommand{\vectorarrow}[1]{\vec{\mathbf{#1}}}}
\CustomizeMathJax{\let\va\vectorarrow}

\CustomizeMathJax{\newcommand{\vectorunit}[1]{\mathbf{\hat{#1}}}}
\CustomizeMathJax{\let\va\vectorunit}

\CustomizeMathJax{\newcommand{\dotproduct}{\boldsymbol\cdot}}
\CustomizeMathJax{\let\vdot\dotproduct}

\CustomizeMathJax{\newcommand{\crossproduct}{\boldsymbol\times}}
\CustomizeMathJax{\let\cross\crossproduct}
\CustomizeMathJax{\let\cp\crossproduct}

\CustomizeMathJax{\newcommand{\gradient}{\mathbf{\nabla}}}
\CustomizeMathJax{\let\grad\gradient}

\CustomizeMathJax{\let\divisionsymbol\div}

\CustomizeMathJax{\newcommand{\divergence}{\nabla\vdot}}
\CustomizeMathJax{\let\div\divergence}

\CustomizeMathJax{\newcommand{\curl}{\nabla\cross}}

\CustomizeMathJax{\newcommand{\laplacian}{\nabla^2}}

\ifx\trigopt 1
    \CustomizeMathJax{\DeclareMathOperator{\sine}{sin}}
    \CustomizeMathJax{\DeclareMathOperator{\cosine}{cos}}
    \CustomizeMathJax{\DeclareMathOperator{\tangent}{tan}}
    \CustomizeMathJax{\DeclareMathOperator{\cosecant}{csc}}
    \CustomizeMathJax{\DeclareMathOperator{\secant}{sec}}
    \CustomizeMathJax{\DeclareMathOperator{\cotangent}{cot}}
    \CustomizeMathJax{\DeclareMathOperator{\arcsine}{arcsin}}
    \CustomizeMathJax{\DeclareMathOperator{\arccosine}{arccos}}
    \CustomizeMathJax{\DeclareMathOperator{\arctangent}{arctan}}
    \CustomizeMathJax{\DeclareMathOperator{\hypsine}{sinh}}
    \CustomizeMathJax{\DeclareMathOperator{\hypcosine}{cosh}}
    \CustomizeMathJax{\DeclareMathOperator{\hyptangent}{tanh}}
    \CustomizeMathJax{\DeclareMathOperator{\hypcotangent}{coth}}
    \CustomizeMathJax{\DeclareMathOperator{\exponential}{exp}}
    \CustomizeMathJax{\DeclareMathOperator{\logarithm}{log}}
    \CustomizeMathJax{\DeclareMathOperator{\naturallogarithm}{\ln}}
    \CustomizeMathJax{\DeclareMathOperator{\determinant}{det}}
    \CustomizeMathJax{\DeclareMathOperator{\Probability}{Pr}}
    \CustomizeMathJax{\newcommand{\sin}[1][{}]{\mathrm{sin}^#1}}
    \CustomizeMathJax{\newcommand{\sinh}[1][{}]{\mathrm{sinh}^#1}}
    \CustomizeMathJax{\newcommand{\arcsin}[1][{}]{\mathrm{arcsin}^#1}}
    \CustomizeMathJax{\newcommand{\asin}[1][{}]{\mathrm{asin}^#1}}
    \CustomizeMathJax{\newcommand{\cos}[1][{}]{\mathrm{cos}^#1}}
    \CustomizeMathJax{\newcommand{\cosh}[1][{}]{\mathrm{cosh}^#1}}
    \CustomizeMathJax{\newcommand{\arccos}[1][{}]{\mathrm{arccos}^#1}}
    \CustomizeMathJax{\newcommand{\acos}[1][{}]{\mathrm{acos}^#1}}
    \CustomizeMathJax{\newcommand{\tan}[1][{}]{\mathrm{tan}^#1}}
    \CustomizeMathJax{\newcommand{\tanh}[1][{}]{\mathrm{tanh}^#1}}
    \CustomizeMathJax{\newcommand{\arctan}[1][{}]{\mathrm{arctan}^#1}}
    \CustomizeMathJax{\newcommand{\atan}[1][{}]{\mathrm{atan}^#1}}
    \CustomizeMathJax{\newcommand{\csc}[1][{}]{\mathrm{csc}^#1}}
    \CustomizeMathJax{\newcommand{\csch}[1][{}]{\mathrm{csch}^#1}}
    \CustomizeMathJax{\newcommand{\arccsc}[1][{}]{\mathrm{arccsc}^#1}}
    \CustomizeMathJax{\newcommand{\acsc}[1][{}]{\mathrm{acsc}^#1}}
    \CustomizeMathJax{\newcommand{\sec}[1][{}]{\mathrm{sec}^#1}}
    \CustomizeMathJax{\newcommand{\sech}[1][{}]{\mathrm{sech}^#1}}
    \CustomizeMathJax{\newcommand{\arcsec}[1][{}]{\mathrm{arcsec}^#1}}
    \CustomizeMathJax{\newcommand{\asec}[1][{}]{\mathrm{asec}^#1}}
    \CustomizeMathJax{\newcommand{\cot}[1][{}]{\mathrm{cot}^#1}}
    \CustomizeMathJax{\newcommand{\coth}[1][{}]{\mathrm{coth}^#1}}
    \CustomizeMathJax{\newcommand{\arccot}[1][{}]{\mathrm{arccot}^#1}}
    \CustomizeMathJax{\newcommand{\acot}[1][{}]{\mathrm{acot}^#1}}
\else
    \CustomizeMathJax{\DeclareMathOperator{\arccsc}{arccsc}}
    \CustomizeMathJax{\DeclareMathOperator{\arcsec}{arcsec}}
    \CustomizeMathJax{\DeclareMathOperator{\arccot}{arccot}}
    \CustomizeMathJax{\DeclareMathOperator{\asin}{asin}}
    \CustomizeMathJax{\DeclareMathOperator{\acos}{acos}}
    \CustomizeMathJax{\DeclareMathOperator{\atan}{atan}}
    \CustomizeMathJax{\DeclareMathOperator{\acsc}{acsc}}
    \CustomizeMathJax{\DeclareMathOperator{\asec}{asec}}
    \CustomizeMathJax{\DeclareMathOperator{\acot}{acot}}
    \CustomizeMathJax{\DeclareMathOperator{\csch}{csch}}
    \CustomizeMathJax{\DeclareMathOperator{\sech}{sech}}
    \CustomizeMathJax{\newcommand{\tr}{\trace}}
    \CustomizeMathJax{\newcommand{\Tr}{\Trace}}
    \CustomizeMathJax{\newcommand{\Res}{\Residue}}
\fi

\CustomizeMathJax{\DeclareMathOperator{\trace}{tr}}
\CustomizeMathJax{\let\tr\trace}
\CustomizeMathJax{\DeclareMathOperator{\Trace}{Tr}}
\CustomizeMathJax{\let\Tr\Trace}
\CustomizeMathJax{\DeclareMathOperator{\rank}{rank}}
\CustomizeMathJax{\DeclareMathOperator{\erf}{erf}}
\CustomizeMathJax{\DeclareMathOperator{\Residue}{Res}}
\CustomizeMathJax{\newcommand{\principalvalue}{\mathcal{P}}}
\CustomizeMathJax{\let\pv\principalvalue}
\CustomizeMathJax{\newcommand{\PV}{\text{P.V.}}}
\CustomizeMathJax{\newcommand{\real}{\mathcal{R}}}
\CustomizeMathJax{\newcommand{\imaginary}{\mathcal{I}}}

\CustomizeMathJax{\newcommand{\Re}[1]{\mathrm{Re}\left\lbrace#1\right\rbrace}}
\CustomizeMathJax{\newcommand{\Im}[1]{\mathrm{Im}\left\lbrace#1\right\rbrace}}

\CustomizeMathJax{\newcommand{\qqtext}[1]{\quad\mathrm{#1}\quad}}
\CustomizeMathJax{\let\qq\qqtext}
\CustomizeMathJax{\newcommand{\qqcomma}{\text{,}\quad}}
\CustomizeMathJax{\let\qc\qqcomma}
\CustomizeMathJax{\newcommand{\qcc}{\quad\text{c.c.}\quad}}
\CustomizeMathJax{\let\qcc}
\CustomizeMathJax{\newcommand{\qif}{\quad\text{if}\quad}}
\CustomizeMathJax{\newcommand{\qthen}{\quad\text{then}\quad}}
\CustomizeMathJax{\newcommand{\qelse}{\quad\text{else}\quad}}
\CustomizeMathJax{\newcommand{\qotherwise}{\quad\text{otherwise}\quad}}
\CustomizeMathJax{\newcommand{\qunless}{\quad\text{unless}\quad}}
\CustomizeMathJax{\newcommand{\qgiven}{\quad\text{given}\quad}}
\CustomizeMathJax{\newcommand{\qusing}{\quad\text{using}\quad}}
\CustomizeMathJax{\newcommand{\qassume}{\quad\text{assume}\quad}}
\CustomizeMathJax{\newcommand{\qsince}{\quad\text{since}\quad}}
\CustomizeMathJax{\newcommand{\qlet}{\quad\text{let}\quad}}
\CustomizeMathJax{\newcommand{\qfor}{\quad\text{for}\quad}}
\CustomizeMathJax{\newcommand{\qall}{\quad\text{all}\quad}}
\CustomizeMathJax{\newcommand{\qeven}{\quad\text{even}\quad}}
\CustomizeMathJax{\newcommand{\qodd}{\quad\text{odd}\quad}}
\CustomizeMathJax{\newcommand{\qinteger}{\quad\text{integer}\quad}}
\CustomizeMathJax{\newcommand{\qand}{\quad\text{and}\quad}}
\CustomizeMathJax{\newcommand{\qor}{\quad\text{or}\quad}}
\CustomizeMathJax{\newcommand{\qas}{\quad\text{as}\quad}}
\CustomizeMathJax{\newcommand{\qin}{\quad\text{in}\quad}}

\CustomizeMathJax{\newcommand{\differential}[1][]{\text{d}^{#1}}}
\CustomizeMathJax{\let\dd\differential}

\CustomizeMathJax{\newcommand{\derivative}[3][]{%
    \frac{\text{d}^{#1}#2}{\text{d}#3^{#1}}}%
}
\CustomizeMathJax{\let\dv\derivative}

\CustomizeMathJax{\newcommand{\partialderivative}[3][]{%
    \frac{\partial^{#1}#2}{\partial#3^{#1}}}%
}
\CustomizeMathJax{\let\pderivative\partialderivative}
\CustomizeMathJax{\let\pdv\partialderivative}

\CustomizeMathJax{\newcommand{\variation}{\delta}}
\CustomizeMathJax{\let\var\variation}

\CustomizeMathJax{\newcommand{\functionalderivative}[3][]{%
    \frac{\delta^{#1}#2}{\delta#3^{#1}}}%
}
\CustomizeMathJax{\let\fdv\functionalderivative}

\CustomizeMathJax{\newcommand{\bra}[1]{\langle{#1}\rvert}}
\CustomizeMathJax{\newcommand{\ket}[1]{\lvert{#1}\rangle}}

\CustomizeMathJax{\newcommand{\innerproduct}[2]{%
    \left\langle{#1}\middle\vert{#2}\right\rangle}%
}
\CustomizeMathJax{\let\braket\innerproduct}
\CustomizeMathJax{\let\ip\innerproduct}

\CustomizeMathJax{\newcommand{\outerproduct}[2]{%
    \left\lvert{#1}\middle\rangle\!\middle\langle#2\right\rvert}%
}
\CustomizeMathJax{\let\dyad\outerproduct}
\CustomizeMathJax{\let\op\outerproduct}

\CustomizeMathJax{\newcommand{\expectationvalue}[2]{%
    \left\langle{#2}\middle\vert{#1}\middle\vert{#2}\right\rangle}%
}
\CustomizeMathJax{\let\expval\expectationvalue}
\CustomizeMathJax{\let\ev\expectationvalue}

\CustomizeMathJax{\newcommand{\matrixelement}[3]{%
    \left\langle{#1}\middle\vert{#2}\middle\vert{#3}\right\rangle}%
}
\CustomizeMathJax{\let\mel\matrixelement}

\CustomizeMathJax{\newcommand{\matrixquantity}[1]{\begin{matrix}#1\end{matrix}}}
\CustomizeMathJax{\let\mqty\matrixquantity}
\CustomizeMathJax{\newcommand{\pmqty}[1]{\begin{pmatrix}#1\end{pmatrix}}}
\CustomizeMathJax{\newcommand{\Pmqty}[1]{%
    \left\lgroup\begin{matrix}#1\end{matrix}\right\rgroup}%
}
\CustomizeMathJax{\newcommand{\bmqty}[1]{\begin{bmatrix}#1\end{bmatrix}}}
\CustomizeMathJax{\newcommand{\vmqty}[1]{\begin{vmatrix}#1\end{vmatrix}}}

\CustomizeMathJax{\newcommand{\smallmatrixquantity}[1]{%
    \begin{smallmatrix}#1\end{smallmatrix}}%
}
\CustomizeMathJax{\let\smqty\smallmatrixquantity}
\CustomizeMathJax{\newcommand{\spmqty}[1]{%
    \pqty{\begin{smallmatrix}#1\end{smallmatrix}}}%
}
\CustomizeMathJax{\newcommand{\sPmqty}[1]{%
    \left\lgroup\begin{smallmatrix}#1\end{smallmatrix}\right\rgroup}%
}
\CustomizeMathJax{\newcommand{\sbmqty}[1]{%
    \bqty{\begin{smallmatrix}#1\end{smallmatrix}}}%
}
\CustomizeMathJax{\newcommand{\svmqty}[1]{%
    \vqty{\begin{smallmatrix}#1\end{smallmatrix}}}%
}

\CustomizeMathJax{\let\matrixdeterminant\vmqty}
\CustomizeMathJax{\let\mdet\vmqty}
\CustomizeMathJax{\let\smdet\svmqty}

\CustomizeMathJax{\newcommand{\identitymatrix}[1]{(\text{imat}\{#1\})}}
\CustomizeMathJax{\let\imat\identitymatrix}

\CustomizeMathJax{\newcommand{\xmatrix}[3]{(\text{xmat}\{\}\{#2\}\{#3\})}}
\CustomizeMathJax{\let\xmat\xmatrix}

\CustomizeMathJax{\newcommand{\zeromatrix}[2]{(\text{zmat}\{#1\}\{#2\})}}
\CustomizeMathJax{\let\zmat\zeromatrix}

\CustomizeMathJax{\newcommand{\paulimatrix}[1]{(\text{pmat}\{#1\})}}
\CustomizeMathJax{\let\pmat\paulimatrix}

\CustomizeMathJax{\newcommand{\diagonalmatrix}[2][]{%
    \left(\text{dmat}\right)}%
}
\CustomizeMathJax{\let\dmat\diagonalmatrix}

\CustomizeMathJax{\newcommand{\antidiagonalmatrix}[2][]{%
    \left(\text{admat}\right)}%
}
\CustomizeMathJax{\let\admat\antidiagonalmatrix}
\end{warpMathJax}
\endinput
%%
%% End of file `lwarp-physics.sty'.