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
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
|
% \iffalse meta-comment
%
% Copyright (C) 2005-2011 by David Zaslavsky <diazona@ellipsix.net>
%
% 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.
%
% This work has the LPPL maintenance status `maintained'.
%
% The Current Maintainer of this work is David Zaslavsky
%
% This work consists of the files physymb.dtx and physymb.ins
% and the derived files physymb.sty and physymb.pdf.
%
% \fi
% \iffalse
%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<package>\ProvidesPackage{physymb}[2010/12/15 v0.1 Physics symbol definitions]
%
%<*driver>
\documentclass{ltxdoc}
\usepackage[boldvectors,units]{physymb}
\usepackage{hyperref}
\EnableCrossrefs
\CodelineIndex
\RecordChanges
\begin{document}
\DocInput{physymb.dtx}
\end{document}
%</driver>
% \fi
% \CheckSum{0}
%% \CharacterTable
%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%% Digits \0\1\2\3\4\5\6\7\8\9
%% Exclamation \! Double quote \" Hash (number) \#
%% Dollar \$ Percent \% Ampersand \&
%% Acute accent \' Left paren \( Right paren \)
%% Asterisk \* Plus \+ Comma \,
%% Minus \- Point \. Solidus \/
%% Colon \: Semicolon \; Less than \<
%% Equals \= Greater than \> Question mark \?
%% Commercial at \@ Left bracket \[ Backslash \\
%% Right bracket \] Circumflex \^ Underscore \_
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
%
% \changes{v0.1}{2010/12/15}{Conversion from sty to dtx}
%
% \GetFileInfo{physymb.sty}
%
% \DoNotIndex{\#,\$,\%,\&,\@,\\,\{,\},\^,\_,\~,\ }
% \DoNotIndex{\accentset,\addunit,\allowdisplaybreaks}
% \DoNotIndex{\bar,\boolean}
% \DoNotIndex{\cos,\cubic}
% \DoNotIndex{\dagger,\DeclareFontShape,\DeclareMathAlphabet,\DeclareMathOperator}
% \DoNotIndex{\DeclareOption,\Delta}
% \DoNotIndex{\ell\ensuremath,\equal}
% \DoNotIndex{\frac}
% \DoNotIndex{\gamma}
% \DoNotIndex{\hat}
% \DoNotIndex{\ifthenelse}
% \DoNotIndex{\joule}
% \DoNotIndex{\Lambda,\langle,\left,\lVert,\lvert}
% \DoNotIndex{\mathbb,\mathbf,\mathcal,\mathcalligra,\mathrm,\meter,\mu}
% \DoNotIndex{\nabla,\newboolean,\newcommand,\nu}
% \DoNotIndex{\Omega,\omega}
% \DoNotIndex{\partial,\per,\phi,\pi,\ProcessOptions}
% \DoNotIndex{\rangle,\relax,\renewcommand,\RequirePackage,\rho,\right,\rightharpoonup}
% \DoNotIndex{\rpcubic,\rVert,\rvert}
% \DoNotIndex{\setboolean,\Sigma,\sin,\star}
% \DoNotIndex{\tan,\tau,\theta,\times}
% \DoNotIndex{\unit}
% \DoNotIndex{\vert}
% \DoNotIndex{\Xi}
%
% \title{The \textsf{physymb} package\thanks{This document corresponds to \textsf{physymb}~\fileversion, dated~\filedate.}}
% \author{David Zaslavsky \\ \texttt{diazona@ellipsix.net}}
%
% \maketitle
% \begin{abstract}
% The |physymb| package is nothing but a bunch of simple macro definitions that
% may be useful for typesetting physics papers.
% \end{abstract}
%
% \paragraph{What's so great about it?}
% If you're scanning over this document wondering what good a bunch of simple macro
% definitions are, allow me to point out some highlights:
% \begin{itemize}
% \item Total and partial derivatives can be typeset using two character macros.\\
% $\ud{y}{x}$ is now as easy as |\ud{y}{x}|.
% \item Numbers in scientific notation can also be typeset using a two character macro.
% $\sn{6.23}{6}$ is written |\sn{6.23}{6}|.
% \item Doing the same thing with units added is similarly convenient; you can write
% $\snunit{3.1}{6}{\meter^3}$ as |\snunit{3.1}{6}{\meter^3}|, which is a lot more
% convenient than writing the whole thing out ``manually.''
% \item There are standard, simple macros for writing Dirac notation: $\ket{\psi}$ is
% as easy as |\ket{\psi}|.
% \end{itemize}
%
% There are a lot of macros in this package, and it typically doesn't take as many
% lines to explain their meanings as it does to list them all. For that reason, when
% there are a bunch of similar macros that I explain together, I've usually only listed
% one or two in the left margin. In these cases, all the macros are given in the text.
%
% \section{Options}
%
% |physymb| recognizes the following options, in no particular order.
%
% \begin{itemize}
% \item |arrowvectors| causes vectors (specifically, the |\vec| command) to be rendered
% with an arrow above the symbol.
% \item |boldvectors| causes vectors (again, from |\vec|) to be rendered by typesetting
% the symbol in bold. It's the alternative to |arrowvectors|.
% \item |feynman| pulls in the |feynmp| package. (It's precisely equivalent to
% |\usepackage{feynmp}|, it's just here for convenience.)
% \item |particle| enables all the particle physics macros. (It's actually not implemented
% yet, so in practice the particle macros get defined regardless of whether you pass this
% option or not, but that will be fixed soon.)
% \item |units| pulls in the |SIunits| package and enables the additional unit macros.
% \end{itemize}
%
% \section{Macros}
%
% \subsection{Trigonometry}
%
% \DescribeMacro{\asin}
% \DescribeMacro{\acos}
% The AMS packages only define inverse trigonometric functions using the ``arc''
% syntax, i.e. they actually prefix ``arc'' to the name (as in $\arcsin x$).
% Sometimes you'd rather write them with a superscript $-1$ to save space, so
% those versions are included here. We have the inverse functions |\asin|,
% |\acos|, |\atan|, |\asec|, |\acsc|, and |\acot|.
%
% \DescribeMacro{\sech}
% \DescribeMacro{\cosh}
% For some reason, the hyperbolic sine and cosine |\sech| and |\cosh| aren't
% defined in the AMS packages. This fixes that.
%
% \DescribeMacro{\asinh}
% \DescribeMacro{\acosh}
% Finally, the inverse hyperbolic trig functions written with the superscript
% $-1$ are defined just as with the regular inverse trig functions. We have
% |\asinh|, |\acosh|, |\atanh|, |\asech|, |\acsch|, and |\acoth|.
%
% \subsection{Sets}
%
% There are certain sets of numbers that are semi-frequently referenced in physics.
% Typically they're used to say something like $n\in\intset$. Of course, a
% macro like |\intset| is not necessarily much quicker than writing
% |\mathbb{Z}|, but these macros are intended to have names that relate to
% their meanings so that you don't have to remember which letter goes to which set.
%
% \DescribeMacro{\whlset}
% |\whlset| ($\whlset$) denotes the set of whole numbers, which is typically
% defined to include all integers greater than zero, although there are different
% contradictory definitions floating around.
%
% \DescribeMacro{\natset}
% |\natset| ($\natset$) denotes the set of natural numbers, which is typically
% defined to include all integers greater than or equal to zero. Some people
% define ``natural numbers'' to exclude zero.
%
% \DescribeMacro{\intset}
% |\intset| ($\intset$) denotes the set of all integers.
%
% \DescribeMacro{\realset}
% |\realset| ($\realset$) denotes the set of all real numbers.
%
% \DescribeMacro{\imagset}
% |\imagset| ($\imagset$) denotes the set of all imaginary numbers, which is
% all complex numbers with real part equal to zero. This one is infrequently
% used.
%
% \DescribeMacro{\cpxset}
% |\cpxset| ($\cpxset$) denotes the set of all complex numbers.
%
% \subsection{Calculus}
%
% Probably the most useful macros in the package are the derivative operators.
% Since it's so common to write something of the form $\ud{y}{x}$ or $\pd{y}{x}$,
% we have two-character macros for each:
% \begin{itemize}
% \item \DescribeMacro{\ud} |\ud|\marg{top}\marg{bottom} typesets the normal total derivative
% \item \DescribeMacro{\pd} |\pd|\marg{top}\marg{bottom} typesets a partial derivative, which
% is the same thing but with a partial derivative symbol instead of the $\udc$.
% \end{itemize}
% \DescribeMacro{\udd}
% \DescribeMacro{\uddd}
% \DescribeMacro{\pdd}
% \DescribeMacro{\pddd}
% There are variants of these that produce higher-order derivatives; you can add
% an order by adding another |d|, up to a total of three.
% If you need something higher than the third derivative, you're on your own, but it's
% easy to construct it using |\frac| and |\udc| or |\pdc|,
% \begin{center}
% |\frac{\udc^4 y}{\udc x^4}|
% \end{center}
%
% \DescribeMacro{\udc}
% \DescribeMacro{\pdc}
% The macro |\udc| gives you the character that represents a differential. It's typically
% set in roman type to distinguish it from a variable. |\pdc| is also defined as the
% partial derivative character for consistency. There are variants of each with exponents
% (up to 3) built in; again, you get them by adding an extra |d| or two to the name of the
% command, |\uddc| and |\udddc| and so on.
%
% \DescribeMacro{\uds}
% \DescribeMacro{\pds}
% If you're using these in an integral, it's common to want a small space before the
% differential, so there are variants of the preceding commands defined that include
% this small space for you; they replace the |c| with an |s|. They follow the same
% pattern of adding additional |d|'s to get exponents. For example:
%
% \begin{minipage}{.64\textwidth}
% \begin{center}
% |\iint e^{i\vec{k}\cdot\vec{x}}\udds\vec{x}|
% \end{center}
% \end{minipage}
% \begin{minipage}{.34\textwidth}
% \begin{equation*}
% \iint e^{i\vec{k}\cdot\vec{x}}\udds\vec{x}
% \end{equation*}
% \end{minipage}
%
% \subsection{Vector Calculus}
%
% \DescribeMacro{\div}
% \DescribeMacro{\grad}
% \DescribeMacro{\curl}
% |\physymb| defines |\div|, |\grad|, and |\curl|, to represent the
% divergence, gradient, and curl. These are typeset with the nabla
% (or ``del'') character, $\nabla$, rather than being written out
% as words. Naturally, I would love to add an |\allthat| if I can
% find something good for it to represent.
%
% \DescribeMacro{\lapl}
% There is also a macro for the Laplacian operator (divergence of a
% gradient), |\lapl|.
%
% \subsection{Complex Analysis}
%
% \DescribeMacro{\conj}
% There is a macro to indicate the conjugate of a number, |\conj|\marg{number}.
% It puts a superscript star after the number, as in $\conj{z}$.
%
% \DescribeMacro{\realop}
% \DescribeMacro{\imagop}
% The traditional keywords indicating the real and imaginary parts of a complex number
% are given macros |\realop| and |\imagop|. They typeset $\realop$ and $\imagop$
% respectively.
%
% \DescribeMacro{\real}
% \DescribeMacro{\imag}
% Why the |op|? Well, there are alternate versions that will also put curly braces
% around the following argument, |\real| and |\imag|. This is the way $\realop$ and
% $\imagop$ are often used.
%
% \begin{minipage}{.64\textwidth}
% \begin{center}
% |\real{z}, \imag{z}|
% \end{center}
% \end{minipage}
% \begin{minipage}{.34\textwidth}
% \begin{equation*}
% \real{z}, \imag{z}
% \end{equation*}
% \end{minipage}
%
% \DescribeMacro{\abs}
% The macro |\abs|\marg{value} surrounds its argument with vertical bars.
%
% \subsection{Linear Algebra}
%
% There are several assorted macros for linear algebra keywords and concepts.
%
% \DescribeMacro{\vec}
% \DescribeMacro{\vecvar}
% Vectors can be written using the macro |\vec|\marg{label}, which typesets
% the \meta{label} either in bold or with an arrow over it, according to which
% option was passed to the package (|arrowvectors| or |boldvectors|).
% The default is to use an arrow, to resemble the builtin definition of
% |\vec| (which, by the way, is overridden by this package). In many cases
% I prefer bold. |\vecvar|\marg{label} is another macro that does the exact
% same thing, for consistency with the other kinds of variables.
%
% \DescribeMacro{\tnsvar}
% The macro |\tnsvar|\marg{label} is for typesetting tensors. This just makes
% the \meta{label} bold, it doesn't do anything with indices. If you want a way
% to typeset tensor indices, look at the
% \href{http://tug.ctan.org/cgi-bin/ctanPackageInformation.py?id=tensor}{tensor}
% package.
%
% \DescribeMacro{\matvar}
% |\matvar|\marg{label} is intended to designate matrices. It makes the label
% bold.
%
% \DescribeMacro{\identitym}
% The macro |\identitym| represents the identity matrix. It typesets a 1 in
% the same style as |\matvar| (so, bold).
%
% \DescribeMacro{\determinant}
% The macro |\determinant|\marg{matrix} uses vertical bars to denote the determinant
% of the \meta{matrix}. It's an alternative to the keyword operator |\det|, which
% just typesets as $\det$.
%
% \DescribeMacro{\trace}
% The macro |\trace| just typesets $\trace$. It's akin to |\det|.
%
% \DescribeMacro{\diag}
% This just typesets $\diag$, which is used to represent a matrix with the given entries
% on the diagonal. For example, one might write |\diag(1,2,3,4)|.
%
% \DescribeMacro{\norm}
% The norm of a vector can be denoted by double vertical bars. This is implemented by
% |\norm|\marg{value}.
%
% \DescribeMacro{\unitx}
% \DescribeMacro{\unity}
% \DescribeMacro{\unitz}
% Since it's so common to refer to unit vectors using hat notation, there are a
% bunch of macros for them using various letters. The package defines |\unitd|,
% |\unite|, |\uniti|, |\unitj|, |\unitk|, |\unitl| (which typesets as $\unitl$,
% not the normal $l$), |\unitn|, |\unitp|, |\unitq|, |\unitr|, |\units|, |\unitt|,
% |\unitu|, |\unitv|, |\unitw|, |\unitx|, |\unity|, |\unitz|, and for non-roman
% characters, |\unitphi|, |\unitrho|, |\unittheta|, and |\unitomega|.
% \DescribeMacro{\unitvec}
% If you want to use a different letter as a unit vector, it can be done with
% |\unitvec|\marg{symbol}.
%
% \DescribeMacro{\herm}
% |\herm|\marg{operator} designates the hermitian conjugate of an operator with
% a superscript dagger.
%
% \DescribeMacro{\transpose}
% |\transpose|\marg{matrix} sets a superscript $T$ after the matrix to denote
% the transpose.
%
% \DescribeMacro{\commut}
% \DescribeMacro{\acommut}
% There are simple macros for the commutator, |\commut|\marg{operator}\marg{operator},
% and the anticommutator, |\acommut|\marg{operator}\marg{operator}. They just
% put the appropriate kind of braces around the arguments (and the comma between
% them, of course).
%
% \subsection{Differential Geometry}
% \DescribeMacro{\exd}
% The exterior derivative has a macro, |\exd|, kind of like the macro for differentials
% ($\udc$) although typeset in bold to distinguish it. This one doesn't have any variants,
% though, because $\exd^2 = 0$.
%
% \DescribeMacro{\hodge}
% The macro |\hodge| just puts a star (not superscript) to represent the Hodge dual.
% Use it as a prefix to the variable, $\hodge\exd x$.
%
% \subsection{Classical Mechanics}
%
% \DescribeMacro{\pbrac}
% The Poisson brackets of a pair of variables can be typeset using the macro
% |\pbrac|\marg{function}\marg{function}. This just surrounds the two arguments
% with curly braces, producing $\pbrac{f}{g}$.
%
% \DescribeMacro{\pbracvars}
% If you want to specify which variables the derivatives in the Poisson brackets
% are being taken with respect to, use the variant
% \begin{center}
% |\pbracvars|\marg{function}\marg{function}\marg{variable}\marg{variable}
% \end{center}
% It comes out looking like $\pbracvars{f}{g}{q}{p}$.
%
% \subsection{Quantum Mechanics}
%
% |physymb| includes a full set of macros for working with Dirac notation.
%
% \DescribeMacro{\ket} To typeset a ket ($\ket\psi$), use |\ket|\marg{label}.
% \DescribeMacro{\bra} Similarly, you can get a bra ($\bra\psi$), with |\bra|\marg{label}.
% \DescribeMacro{\braket} To typeset a bracket (inner product), use
% |\braket|\marg{bra label}\marg{ket label}.
%
% \DescribeMacro{\melement} To typeset a matrix element ($\melement{\phi}{A}{\psi}$), or any
% case in which you have an operator between the bra and the ket, use
% |\melement|\marg{bra label}\marg{operator}\marg{ket label}.
% It should work fine to put an arbitrarily complicated expression in the middle of |\melement|,
% but if your operator is something complicated, you \emph{could} consider just using |\bra|
% and |\ket| for clarity,
% \begin{center}
% |\bra{|\meta{bra label}|}|\meta{operator}|\ket{|\meta{ket label}|}|
% \end{center}
%
% \DescribeMacro{\expect} To get an expectation value (an on-diagonal matrix element with
% the state left implicit, $\expect{A}$), use |\expect|\marg{operator}. Again, you can put
% an arbitrary expression within |\expect| but if it would make the code unclear, consider
% using |\langle| and |\rangle|.
%
% \DescribeMacro{\projop} For a projection operator (outer product between a state and itself),
% we have the command |\projop|\marg{label}\marg{value}, which comes out as $\projop{\psi}{x}$.
% To get a general outer product between two different states, use |\bra| and |\ket|,
% \begin{center}
% |\ket{|\meta{ket label}|}|\meta{value}|\bra{|\meta{bra label}|}|
% \end{center}
%
% \subsection{Units}
%
% If the |units| option is provided to |physymb|, it automatically includes the |SIunits|
% package and defines some additional units that are often useful in practice.
%
% \DescribeMacro{\snunit} |\snunit|\marg{abcissa}\marg{exponent}\marg{unit} combines
% the functionality of |\sn| and |\unit|: it typesets a number in scientific notation
% with a following unit. If the abcissa is equal to $1$, it is omitted, so that
% |\snunit{1}{6}{\meter}| gives you $\snunit{1}{6}{\meter}$.
%
% \paragraph{SI units}
% \DescribeMacro{\joulepercubicmeter}
% \DescribeMacro{\joulepercubicmeterrp}
% These units of energy density have been useful to me approximately twice.
% Naturally, I had to include them. These augment the list of
% composite units made available by |SIunits| itself.
%
% \paragraph{Additional units} The |SIunits| package only includes SI units (as
% the name would suggest), but there are certain non-SI units that turn out to
% be occasionally useful when dealing with American non-scientists. |physymb|
% defines a selection of them as macros.
%
% \DescribeMacro{\torr}
% \DescribeMacro{\mmHg}
% Torr, |\torr|, and millimeters of mercury, |\mmHg|, are common atmospheric pressure units.
%
% \DescribeMacro{\amu}
% |\amu| represents the atomic mass unit, defined as $\frac{1}{12}$ of the mass of a carbon 12
% atom.
%
% \DescribeMacro{\yr}
% |\yr| represents a year with the symbol $\yr$. There are various definitions of
% different kinds of years floating around, but generally the symbol is the same.
%
% \DescribeMacro{\erg}
% |\erg| represents an erg, the CGS unit of energy, which still finds occasional use.
% Its value is $\snunit{1}{-7}{\joule}$.
%
% \DescribeMacro{\gauss}
% |\gauss| is the Gauss, a unit of magnetic field equal to $\snunit{1}{-4}{\tesla}$.
%
% \DescribeMacro{\molar}
% |\molar| represents a molar, a unit of concentration equal to one mole per liter.
% Strictly speaking, this is a chemistry unit, but it occasionally comes up in
% physics so it shouldn't hurt to have the macro around.
%
% \DescribeMacro{\poise}
% The poise is the CGS unit of viscosity, equal to $\unit{0.1}{\pascal\usk\second}$.
%
% \DescribeMacro{\foot}
% The foot is the Imperial unit of length, equal to $\unit{30.48}{\centi\meter}$.
%
% \DescribeMacro{\mileperhour}
% This is typically (or perhaps almost exclusively) used to measure transportation
% speeds: cars, trains, airplanes, etc. It's equal to about
% $\unit{0.447}{\frac{\meter}{\second}}$.
%
% \DescribeMacro{\pound}
% The pound is the Imperial unit of either force or mass, depending on who you
% ask. Technically I believe it is a force, but in many situations
% I've often found it clearer to treat it as a unit of mass and use $\mathrm{lbf}$
% (pound of force) as the unit of force. In this sense, it's equal to about
% $\unit{453.59}{\gram}$, and the pound of force is the weight of that mass
% under standard Earth surface gravity, which works out to about
% $\unit{4.448}{\newton}$.
%
% \subsection{Particle Physics}
%
% As a particle physicist, I do a lot of work that involves notation for elementary particles,
% so it's become useful to have a set of macros that produce standard written representations
% for them.\footnote{If there are other areas of physics in which a lot of short macros like
% these would be useful, I'm open to suggestions for adding them.} The names of the commands
% are pretty cryptic, but I've found that once you get used to using them, the names aren't
% hard to remember and the effort saved by having short macro names at least \emph{feels}
% worthwhile.
%
% In general, all the macro names follow the same pattern. Each one ends with a type
% code that identifies the type of particle: |q| for quark, |lp| for a ``regular'' lepton,
% |nu| for a neutrino, |br| for a baryon, |m| for a meson, and |bsn| for a boson. At the
% beginning is a particle code consisting of one or two letters that identify the specific
% particle within that type.
%
% Most of the basic macros consist of just those two parts. Antifermion macros are
% constructed by prepending an |a| to the type code. For vector bosons that occur in
% charge triplets, you prepend one of |p| (plus), |z| (zero), or |m| (minus) to indicate
% which one of the triplet you want. The same goes for baryons which occur in ``triplets''
% with the same name (three particles denoted by the same letter, even though they
% may not actually be a triplet). Singlet baryons have the |z| as well for consistency.
%
% The proton and neutron are named differently because their names are so common.
%
% \paragraph{Quarks}
% \DescribeMacro{\upq}
% \DescribeMacro{\dnq}
% Each of the quark macros is named with three letters. The first two letters are the
% particle code representing the name of the quark, and the third is the type code |q|.
% The macros are |\upq|, |\dnq|, |\srq|, |\chq|, |\btq|, and |\tpq|, representing the
% up, down, strange, charm, bottom, and top quarks, respectively.
%
% \DescribeMacro{\upaq}
% \DescribeMacro{\dnaq}
% The corresponding macros for the antiquarks are obtained by prepending |a| to the
% type code |q|. We have |\upaq|, |\dnaq|, |\sraq|, |\chaq|, |\btaq|, and |\tpaq|.
%
% \paragraph{Leptons}
% \DescribeMacro{\elp}
% \DescribeMacro{\enu}
% Leptons are done a little differently because there are two distinct types. The macros for
% the electron, muon, and tau lepton are named with a letter and |lp|: we have |\elp| for the
% electron, |\ulp| for the muon, and |\tlp| for the tau. Neutrino macros are constructed
% using the same first letter, but |nu| instead of |lp|: |\enu|, |\unu|, and |\tnu|.
%
% \DescribeMacro{\ealp}
% \DescribeMacro{\eanu}
% Antileptons are named with an |a| between the particle code and the type code.
% So we get |\ealp|, |\ualp|, and |\talp| for the ``regular'' antileptons and
% |\eanu|, |\uanu|, and |\tanu| for the antineutrinos.
%
% \paragraph{Baryons}
% \DescribeMacro{\lmzbr}
% \DescribeMacro{\sgpbr}
% \DescribeMacro{\sgzbr}
% \DescribeMacro{\sgmbr}
% Many of the most commonly referenced baryons in the standard model have
% macros defined. Each of these ends with the type code |br|. Most of them are built
% by putting a particle code and a charge letter together: we have |\lmzbr| for the
% lambda baryon; |\sgpbr|, |\sgzbr|, |\sgmbr| for the sigmas, |\xizbr| and |\ximbr|
% for the xi particles, and |\ommbr| for the omega of charge $-1$. The delta macros
% are named on the same principle but since there are four of them, we use two charge
% letters to indicate the $+2$ charge: |\dlppbr|, |\dlpbr|, |\dlzbr|, and |\dlmbr|.
%
% \DescribeMacro{\sgspbr}
% \DescribeMacro{\sgszbr}
% \DescribeMacro{\sgsmbr}
% In addition, there are macros for the starred (excited) versions of the sigmas and
% xis (only), obtained by adding an |s| before the charge letter: |\sgspbr| etc. and
% |\xiszbr| etc.
%
% \DescribeMacro{\prbr}
% \DescribeMacro{\nebr}
% The proton and neutron don't quite fall into the pattern because their names aren't
% used for multiple particles. The proton is |\prbr| and the neutron is |\nebr|.
%
% \DescribeMacro{\dlmmabr}
% The antiparticles to all these are obtained in \emph{almost} the usual way, by
% adding |a| just before the type code |br|. The one difference is that the charge
% letters are updated to reflect the actual charge of the antiparticle, so for example
% the antipartcle of the $\dlppbr$ (|\dlppbr|), the $\dlmmabr$, is written |\dlmmabr|,
% with two |m|'s because of its double-minus charge.
%
% \paragraph{Mesons}
% \DescribeMacro{\pipm}
% \DescribeMacro{\pizm}
% \DescribeMacro{\pimm}
% Essentially all the mesons defined in the standard model have macros. The naming can
% be a bit tricky because some of them are named as charge triplets while others are
% named as antiparticles. In the former case, we have the $\pi$s, |\pipm|, |\pizm|, and |\pimm|,
% and the $\rho$s, |\ropm|, |\rozm|, and |\romm|. (I'm not sure if it'd make it cleaner
% to just add the |h| into the names) The kaons have similar names, |\kapm|,
% |\kazm|, and |\kamm|, but there is also the $\kazam$, |\kazam|. Finally, the neutral
% mesons are named |\etam|, |\etapm| (here the |p| is for ``prime,'' not ``plus''), and
% |\phim|.
%
% \paragraph{Bosons}
% \DescribeMacro{\phbsn}
% \DescribeMacro{\Wpbsn}
% \DescribeMacro{\Wmbsn}
% There aren't that many bosons so the naming is simple: |\phbsn| for the photon,
% |\Zzbsn| for the neutral $\Zzbsn$, and |\Wpbsn| and |\Wmbsn| for the $\Wbsn$s. There's
% also |\Wbsn|, which does not indicate either charge, for when you need to refer to
% a generic $\Wbsn$ boson. The Higgs boson is written |\hbsn|.
%
% \DescribeMacro{\photon}
% Also, there is a macro |\photon| which is defined to be the same thing as |\phbsn|.
% It's included to support some old LaTeX files I wrote and although it will
% \emph{probably} not be removed from the package in the future, I make no guarantees.
%
% \subsection{Miscellaneous}
%
% \DescribeMacro{\sn} |\sn|\marg{abcissa}\marg{exponent} is a shorthand for setting a number
% in scientific notation. It works just like |\snunit| except that it does not take any unit
% as an argument.
%
% \DescribeMacro{\scriptr} |\scriptr| produces the script r found in Griffiths'
% electromagnetism textbook, or at least the closest equivalent in LaTeX, $\scriptr$.
%
% \DescribeMacro{\orderof} |\orderof|\marg{expression} represents the order of an
% expression, for example the error term in a perturbation series. Typical usage
% would be like
%
% \begin{minipage}{.64\textwidth}
% \begin{center}
% |\frac{1}{1 - x} = 1 + x + \orderof{x^2}|
% \end{center}
% \end{minipage}
% \begin{minipage}{.34\textwidth}
% \begin{equation*}
% \frac{1}{1 - x} = 1 + x + \orderof{x^2}
% \end{equation*}
% \end{minipage}
%
% It can also be used to discuss the growth of a function, e.g.
% ``$\orderof{x^3}$ for large $x$,'' or for similar uses such as big-O notation
% in computer algorithm analysis.
%
% \DescribeMacro{\sgn}
% There is a macro for the sign operator, |\sgn|, defined as
% \begin{equation*}
% \sgn x = \begin{cases}1 & x > 0 \\ 0 & x = 0 \\ -1 & x < 0\end{cases}
% \end{equation*}
% (and yes, this is not really \emph{complex} analysis)
%
% \DescribeMacro{\round}
% Occasionally it's useful to have some way to designate rounding a number.
% The |\round| macro can be used for that. It comes out as $\round(x)$ (I do
% recommend the parentheses).
%
% \DescribeMacro{\evalat}
% The macro
% |\evalat|\marg{expression}\marg{lower limit}\marg{upper limit}
% is mainly useful for when you want to denote the numerical value
% of a derivative at a specific point, or when you want to represent the
% evaluation of an integral at the endpoints of the range of integration.
% It produces a vertical bar at the right of the \meta{expression},
% with the \meta{lower limit} and \meta{upper limit} typeset at the
% lower and upper endpoints of the bar, respectively.
%
% \begin{minipage}{.64\textwidth}
% \begin{center}
% |\evalat{x^3 + 3x - 5}{2}{7}|
% \end{center}
% \end{minipage}
% \begin{minipage}{.34\textwidth}
% \begin{equation*}
% \evalat{x^3 + 3x - 5}{2}{7}
% \end{equation*}
% \end{minipage}
%
% \StopEventually{\PrintChanges\PrintIndex}
%
% \section{Feedback}
%
% This package is always a work in progress, both in terms of adding new macros
% to the collection and fixing any errors or inconveniences in the ones that
% are already here. Any feedback you may have will be welcome at my email address,
% given at the top of the document.
%
% \section{Implementation}
%
% \subsection{Initialization}
% \begin{macrocode}
\RequirePackage{ifthen}
% \end{macrocode}
% This flag is set if the |particle| option is enabled. It enables definitions of particle symbol macros.
% \begin{macrocode}
\newboolean{pparticle}
% \end{macrocode}
% This flag is set if the |feynman| option is enabled. It pulls in the |feynmf| package.
% \begin{macrocode}
\newboolean{pfeynman}
% \end{macrocode}
% This flag is set if the |units| option is enabled. It pulls in the |SIunits| package and provides additional unit definitions.
% \begin{macrocode}
\newboolean{punits}
% \end{macrocode}
% This flag is set if the |boldvectors| option is enabled. It causes vectors to be rendered using a bold font instead of an overset arrow.
% \begin{macrocode}
\newboolean{pboldvectors}
% \end{macrocode}
%
% \subsection{Option Declarations}
% These are the option declarations, pretty self-explanatory.
% \begin{macrocode}
\DeclareOption{particle}{\setboolean{pparticle}{true}}
\DeclareOption{units}{\setboolean{punits}{true}}
\DeclareOption{feynman}{\setboolean{pfeynman}{true}}
\DeclareOption{arrowvectors}{\setboolean{pboldvectors}{false}}
\DeclareOption{boldvectors}{\setboolean{pboldvectors}{true}}
\ProcessOptions\relax
% \end{macrocode}
%
% \subsection{Macro Definitions}
% Here we bring in the AMS packages for mathematical notation.
% \begin{macrocode}
\RequirePackage{amsbsy}
\RequirePackage{amsmath}
\RequirePackage{amsfonts}
\RequirePackage{amssymb}
\allowdisplaybreaks[2]
\RequirePackage{accents}
% \end{macrocode}
% |calligra| is the package that includes the script r, $\scriptr$.
% \begin{macrocode}
\RequirePackage{calligra}
\DeclareMathAlphabet{\mathcalligra}{T1}{calligra}{m}{n}
\DeclareFontShape{T1}{calligra}{m}{n}{<->s*[2.2]callig15}{}
\newcommand{\scriptr}{\mathcalligra{r}}
% \end{macrocode}
% Scientific notation is implemented in the obvious way.
% \begin{macrocode}
\newcommand{\sn}[2]{\ensuremath{#1\times10^{#2}}}
% \end{macrocode}
% Here we load SIunits if the |units| option was passed.
% \begin{macrocode}
\ifthenelse{\boolean{punits}}
{
\RequirePackage[thinspace,mediumqspace,Gray,squaren]{SIunits}
% \end{macrocode}
% These are some SI derived units that have been useful on occasion
% \begin{macrocode}
\addunit{\joulepercubicmeter}{\joule\per\cubic\meter}
\addunit{\joulepercubicmeterrp}{\joule\usk\rpcubic\meter}
% \end{macrocode}
% These are some useful non-SI units, defined using the SIunits internal command |\addunits|
% \begin{macrocode}
\addunit{\torr}{torr}
\addunit{\mmhg}{mmHg}
\addunit{\amu}{amu}
\addunit{\yr}{yr}
\addunit{\erg}{erg}
\addunit{\gauss}{Ga}
\addunit{\molar}{M}
\addunit{\poise}{P}
\addunit{\foot}{ft}
\addunit{\mileperhour}{mph}
\addunit{\pound}{lb}
% \end{macrocode}
% |\snunit| is implemented using a combination of |\sn| and |\unit|
% \begin{macrocode}
\newcommand{\snunit}[3]{\ifthenelse{\equal{#1}{1}}%
{\unit{10^{#2}}{#3}}{\unit{\sn{#1}{#2}}{#3}}}
}
{}
% \end{macrocode}
% |\orderof| uses the calligraphic capital O, $\mathcal{O}$
% \begin{macrocode}
\newcommand{\orderof}[1]{\ensuremath{\mathcal{O}\left(#1\right)}}
% \end{macrocode}
% Now we come to assorted functions and keywords. First some inverse trig functions:
% \begin{macrocode}
\DeclareMathOperator{\asin}{\sin^{-1}}
\DeclareMathOperator{\acos}{\cos^{-1}}
\DeclareMathOperator{\atan}{\tan^{-1}}
\DeclareMathOperator{\asec}{\sec^{-1}}
\DeclareMathOperator{\acsc}{\csc^{-1}}
\DeclareMathOperator{\acot}{\cot^{-1}}
% \end{macrocode}
% and hyperbolic trig functions:
% \begin{macrocode}
\DeclareMathOperator{\sech}{sech}
\DeclareMathOperator{\csch}{csch}
\DeclareMathOperator{\asinh}{\sinh^{-1}}
\DeclareMathOperator{\acosh}{\cosh^{-1}}
\DeclareMathOperator{\atanh}{\tanh^{-1}}
\DeclareMathOperator{\asech}{\sech^{-1}}
\DeclareMathOperator{\acsch}{\csch^{-1}}
\DeclareMathOperator{\acoth}{\coth^{-1}}
% \end{macrocode}
% Next are some linear algebra keywords.
% \begin{macrocode}
\DeclareMathOperator{\diag}{diag}
\DeclareMathOperator{\realop}{Re}
\DeclareMathOperator{\imagop}{Im}
\newcommand{\real}[1]{\realop\{#1\}}
\newcommand{\imag}[1]{\imagop\{#1\}}
% \end{macrocode}
% The sign and absolute value keywords:
% \begin{macrocode}
\DeclareMathOperator{\sgn}{sgn}
\newcommand{\abs}[1]{\left\lvert#1\right\rvert}
% \end{macrocode}
% Norm of a vector:
% \begin{macrocode}
\newcommand{\norm}[1]{\left\lVert#1\right\rVert}
% \end{macrocode}
% Evaluation at endpoints uses |\left.| to get no visible mark on the left side.
% \begin{macrocode}
\newcommand{\evalat}[3]{\left.#1\right|_{#2}^{#3}}
% \end{macrocode}
% Poisson brackets are just braces
% \begin{macrocode}
\newcommand{\pbrac}[2]{\left\{#1,#2\right\}}
\newcommand{\pbracvars}[4]{\left\{#1,#2\right\}_{#3,#4}}
% \end{macrocode}
% This handles the redefinition of |\vec|. If the |boldvectors| option was passed,
% a vector is denoted by bolding the argument. If |arrowvectors| was passed, the
% vector is denoted by putting an arrow over the argument.
% Some people use an undertilde, which will probably be added in the future.
% \begin{macrocode}
\ifthenelse{\boolean{pboldvectors}}%
{\renewcommand{\vec}[1]{\mathbf{#1}}}%
{\renewcommand{\vec}[1]{\accentset{\rightharpoonup}{#1}}}
% \end{macrocode}
% |\vecvar| is just a synonym for |\vec|
% \begin{macrocode}
\newcommand{\vecvar}[1]{\vec{#1}}
% \end{macrocode}
% |\tnsvar| always uses bold. Some people use undertildes, which will be added.
% \begin{macrocode}
\newcommand{\tnsvar}[1]{\mathbf{#1}}
% \end{macrocode}
% |\matvar| always uses bold.
% \begin{macrocode}
\newcommand{\matvar}[1]{\mathbf{#1}}
% \end{macrocode}
% |\identitym| is a bold $1$
% \begin{macrocode}
\newcommand{\identitym}{\mathbf{1}}
% \end{macrocode}
% |\determinant| uses vertical bars.
% \begin{macrocode}
\newcommand{\determinant}[1]{\left\lvert#1\right\rvert}
% \end{macrocode}
% |\trace| uses capital Tr.
% \begin{macrocode}
\DeclareMathOperator{\trace}{Tr}
% \end{macrocode}
% Now we get to some unit vectors, all just the relevant letter with a hat.
% \begin{macrocode}
\newcommand{\unitd}{\hat{d}}
\newcommand{\unite}{\hat{e}}
\newcommand{\uniti}{\hat{i}}
\newcommand{\unitj}{\hat{j}}
\newcommand{\unitk}{\hat{k}}
\newcommand{\unitl}{\hat{\ell}}
\newcommand{\unitn}{\hat{n}}
\newcommand{\unitp}{\hat{p}}
\newcommand{\unitq}{\hat{q}}
\newcommand{\unitr}{\hat{r}}
\newcommand{\units}{\hat{s}}
\newcommand{\unitt}{\hat{t}}
\newcommand{\unitu}{\hat{u}}
\newcommand{\unitv}{\hat{v}}
\newcommand{\unitw}{\hat{w}}
\newcommand{\unitx}{\hat{x}}
\newcommand{\unity}{\hat{y}}
\newcommand{\unitz}{\hat{z}}
\newcommand{\unitphi}{\hat{\phi}}
\newcommand{\unitrho}{\hat{\rho}}
\newcommand{\unittheta}{\hat{\theta}}
\newcommand{\unitomega}{\hat{\omega}}
% \end{macrocode}
% This turns any letter into a unit vector.
% \begin{macrocode}
\newcommand{\unitvec}[1]{\hat{#1}}
% \end{macrocode}
% |\udc| is just an upright (roman) d, and similarly for higher-order differentials.
% \begin{macrocode}
\newcommand{\udc}{\mathrm{d}}
\newcommand{\uddc}{\mathrm{d}^2}
\newcommand{\udddc}{\mathrm{d}^3}
% \end{macrocode}
% |\pdc| is just |\partial|, defined for similarity with |\udc|.
% \begin{macrocode}
\newcommand{\pdc}{\partial}
\newcommand{\pddc}{\partial^2}
\newcommand{\pdddc}{\partial^3}
% \end{macrocode}
% |\uds| is just like |\udc| but it includes a small space in front. If I can figure
% out how to do it I'll make the command autodetect the preceding character(s) and
% figure out whether to add the space or not.
% \begin{macrocode}
\newcommand{\uds}{\,\mathrm{d}}
\newcommand{\udds}{\,\mathrm{d}^2}
\newcommand{\uddds}{\,\mathrm{d}^3}
% \end{macrocode}
% |\pds| is also defined for similarity as just |\partial| with a space in front,
% although I'm not sure this one is really useful.
% \begin{macrocode}
\newcommand{\pds}{\,\partial}
\newcommand{\pdds}{\,\partial^2}
\newcommand{\pddds}{\,\partial^3}
% \end{macrocode}
% |\ud| typesets a derivative using |\udc|. Similarly for second and third derivatives.
% \begin{macrocode}
\newcommand{\ud}[2]{\frac{\mathrm{d}#1}{\mathrm{d}#2}}
\newcommand{\udd}[2]{\frac{\mathrm{d}^2#1}{\mathrm{d} #2^2}}
\newcommand{\uddd}[2]{\frac{\mathrm{d}^3#1}{\mathrm{d} #2^3}}
% \end{macrocode}
% |\pd| does the same for partial derivatives with |\pdc|.
% \begin{macrocode}
\newcommand{\pd}[2]{\frac{\partial #1}{\partial #2}}
\newcommand{\pdd}[2]{\frac{\partial^2#1}{\partial #2^2}}
\newcommand{\pddd}[2]{\frac{\partial^3#1}{\partial #2^3}}
% \end{macrocode}
% |\grad| typesets the gradient symbol, a nabla with an arrow over it (actually a harpoon).
% This is done the same way regardless of the |arrowvectors| or |boldvectors| setting.
% \begin{macrocode}
\newcommand{\grad}{\accentset{\rightharpoonup}{\nabla}}
% \end{macrocode}
% |\div| is the divergence, defined using |\grad|. Ordinarily |\div| stands for the
% division symbol but nobody really uses that, so I figured it's worth replacing.
% \begin{macrocode}
\renewcommand{\div}{\grad\cdot}
% \end{macrocode}
% |\curl| is done in the obvious way using |\grad|
% \begin{macrocode}
\newcommand{\curl}{\grad\times}
% \end{macrocode}
% |\lapl| is written without a harpoon since it's a scalar operator
% \begin{macrocode}
\newcommand{\lapl}{\nabla^2}
% \end{macrocode}
% |\conj| just puts a superscript star
% \begin{macrocode}
\newcommand{\conj}[1]{{#1 ^{*}}}
% \end{macrocode}
% |\herm| is the same thing but for operators or matrices, so with a dagger
% \begin{macrocode}
\newcommand{\herm}[1]{{#1 ^{\dagger}}}
% \end{macrocode}
% |\transpose| does the same with a $T$
% \begin{macrocode}
\newcommand{\transpose}[1]{{#1 ^{T}}}
% \end{macrocode}
% These set notations are mostly done with |\mathbb|
% \begin{macrocode}
\newcommand{\natset}{\mathbb{N}}
\newcommand{\intset}{\mathbb{Z}}
\newcommand{\cpxset}{\mathbb{C}}
\newcommand{\whlset}{\mathbb{Q}}
\newcommand{\realset}{\mathbb{R}}
\newcommand{\imagset}{\mathbb{I}}
% \end{macrocode}
% Now Dirac notation, implemented using vertical bars and angle brackets in various combinations
% \begin{macrocode}
\newcommand{\bra}[1]{\left\langle #1 \right\rvert}
\newcommand{\ket}[1]{\left\lvert #1 \right\rangle}
\newcommand{\braket}[2]{\langle #1 \vert #2 \rangle}
\newcommand{\melement}[3]{\langle #1 \vert #2 \vert #3 \rangle}
\newcommand{\projop}[2]{\vert #1 \rangle #2 \langle #1 \vert}
\newcommand{\expect}[1]{\left\langle #1 \right\rangle}
% \end{macrocode}
% Commutators and anticommutators are done in the obvious way
% \begin{macrocode}
\newcommand{\commut}[2]{\left[ #1, #2 \right]}
\newcommand{\acommut}[2]{\left\{ #1, #2 \right\}}
% \end{macrocode}
% The |\round| operator just typesets the word ``round''
% \begin{macrocode}
\DeclareMathOperator{\round}{round}
% \end{macrocode}
% The exterior derivative is typeset in bold, in contrast to the differential $\udc$ which
% is just a plain roman font
% \begin{macrocode}
\DeclareMathOperator{\exd}{\mathbf{d}}
% \end{macrocode}
% The Hodge dual uses a star, but not superscript like |\conj|.
% \begin{macrocode}
\newcommand{\hodge}{\star}
% \end{macrocode}
% These are short macros to typeset the symbols for the elementary (and common non-elementary)
% particles. Each one is set in math roman font, as opposed to text roman font if it makes
% a difference. They're followed by an empty token |{}| for reasons which I forget.
%
% Theoretically these should only be loaded if the |particle| option was passed but I'll get
% to that later; in the meantime they're unlikely to conflict with anything important.
% \begin{macrocode}
\newcommand{\upq}{\ensuremath{\mathrm{u}}{}}
\newcommand{\dnq}{\ensuremath{\mathrm{d}}{}}
\newcommand{\srq}{\ensuremath{\mathrm{s}}{}}
\newcommand{\chq}{\ensuremath{\mathrm{c}}{}}
\newcommand{\btq}{\ensuremath{\mathrm{b}}{}}
\newcommand{\tpq}{\ensuremath{\mathrm{t}}{}}
\newcommand{\upaq}{\ensuremath{\bar{\mathrm{u}}}{}}
\newcommand{\dnaq}{\ensuremath{\bar{\mathrm{d}}}{}}
\newcommand{\sraq}{\ensuremath{\bar{\mathrm{s}}}{}}
\newcommand{\chaq}{\ensuremath{\bar{\mathrm{c}}}{}}
\newcommand{\btaq}{\ensuremath{\bar{\mathrm{b}}}{}}
\newcommand{\tpaq}{\ensuremath{\bar{\mathrm{t}}}{}}
\newcommand{\elp}{\ensuremath{\mathrm{e}^-}{}}
\newcommand{\enu}{\ensuremath{\nu_\mathrm{e}}{}}
\newcommand{\ulp}{\ensuremath{\mu^-}{}}
\newcommand{\unu}{\ensuremath{\nu_{\mu}}{}}
\newcommand{\tlp}{\ensuremath{\tau^-}{}}
\newcommand{\tnu}{\ensuremath{\nu_{\tau}}{}}
\newcommand{\ealp}{\ensuremath{\mathrm{e}^+}{}}
\newcommand{\eanu}{\ensuremath{\bar{\nu}_\mathrm{e}}{}}
\newcommand{\ualp}{\ensuremath{\mu^+}{}}
\newcommand{\uanu}{\ensuremath{\bar{\nu}_{\mu}}{}}
\newcommand{\talp}{\ensuremath{\tau^+}{}}
\newcommand{\tanu}{\ensuremath{\bar{\nu}_{\tau}}{}}
\newcommand{\prbr}{\ensuremath{\mathrm{p}^+}{}}
\newcommand{\nebr}{\ensuremath{\mathrm{n}^0}{}}
\newcommand{\lmzbr}{\ensuremath{\Lambda^0}{}}
\newcommand{\sgpbr}{\ensuremath{\Sigma^+}{}}
\newcommand{\sgzbr}{\ensuremath{\Sigma^0}{}}
\newcommand{\sgmbr}{\ensuremath{\Sigma^-}{}}
\newcommand{\dlppbr}{\ensuremath{\Delta^{++}}{}}
\newcommand{\dlpbr}{\ensuremath{\Delta^+}{}}
\newcommand{\dlzbr}{\ensuremath{\Delta^0}{}}
\newcommand{\dlmbr}{\ensuremath{\Delta^-}{}}
\newcommand{\xizbr}{\ensuremath{\Xi^0}{}}
\newcommand{\ximbr}{\ensuremath{\Xi^-}{}}
\newcommand{\ommbr}{\ensuremath{\Omega^-}{}}
\newcommand{\sgspbr}{\ensuremath{\Sigma^{*+}}{}}
\newcommand{\sgszbr}{\ensuremath{\Sigma^{*0}}{}}
\newcommand{\sgsmbr}{\ensuremath{\Sigma^{*-}}{}}
\newcommand{\xiszbr}{\ensuremath{\Xi^{*0}}{}}
\newcommand{\xismbr}{\ensuremath{\Xi^{*-}}{}}
\newcommand{\prabr}{\ensuremath{\mathrm{p}^-}{}}
\newcommand{\neabr}{\ensuremath{\bar{\mathrm{n}}^0}{}}
\newcommand{\dlpabr}{\ensuremath{\bar{\Delta}^{+}}{}}
\newcommand{\dlzabr}{\ensuremath{\bar{\Delta}^{0}}{}}
\newcommand{\dlmabr}{\ensuremath{\bar{\Delta}^{-}}{}}
\newcommand{\dlmmabr}{\ensuremath{\bar{\Delta}^{--}}{}}
\newcommand{\pipm}{\ensuremath{\pi^+}{}}
\newcommand{\pizm}{\ensuremath{\pi^0}{}}
\newcommand{\pimm}{\ensuremath{\pi^-}{}}
\newcommand{\kapm}{\ensuremath{K^+}{}}
\newcommand{\kazm}{\ensuremath{K^0}{}}
\newcommand{\kazam}{\ensuremath{\bar{K}^0}{}}
\newcommand{\kamm}{\ensuremath{K^-}{}}
\newcommand{\ropm}{\ensuremath{\rho^+}{}}
\newcommand{\rozm}{\ensuremath{\rho^0}{}}
\newcommand{\romm}{\ensuremath{\rho^-}{}}
\newcommand{\etam}{\ensuremath{\eta}{}}
\newcommand{\etapm}{\ensuremath{\eta'}{}}
\newcommand{\kaspm}{\ensuremath{\mathrm{K}^{*+}}{}}
\newcommand{\kaszm}{\ensuremath{\mathrm{K}^{*0}}{}}
\newcommand{\kaszam}{\ensuremath{\bar{\mathrm{K}}^{*0}}{}}
\newcommand{\kasmm}{\ensuremath{\mathrm{K}^{*-}}{}}
\newcommand{\omm}{\ensuremath{\omega}{}}
\newcommand{\phim}{\ensuremath{\phi}{}}
\newcommand{\phbsn}{\ensuremath{\gamma}{}}
\newcommand{\Wbsn}{\ensuremath{\mathrm{W}}{}}
\newcommand{\Wpbsn}{\ensuremath{\mathrm{W}^{+}}{}}
\newcommand{\Wmbsn}{\ensuremath{\mathrm{W}^{-}}{}}
\newcommand{\Zzbsn}{\ensuremath{\mathrm{Z}^{0}}{}}
\newcommand{\hbsn}{\ensuremath{\mathrm{h}}{}}
\newcommand{\photon}{\phbsn}
% \end{macrocode}
% The |feynman| option is implemented by just loading the package |feynmp|.
% \begin{macrocode}
\ifthenelse{\boolean{pfeynman}}%
{\RequirePackage{feynmp}}%
{}
% \end{macrocode}
%
% \pagebreak[2]
% \Finale
|