correct ms to microsec in cern muon graph
[light-and-matter.git] / lmmath.sty
blob21ab7c4f77661a4d11912d0abe7a6a2317efb284
3 % lmmath.sty
4 % (c) 2001 Ben Crowell, licensed under the Creative Commons
5 % Attribution-ShareAlike license,
6 % http://creativecommons.org/licenses/by-sa/3.0/
8 % These are mainly convenience macros for typesetting math.
9 % Also, there's some stuff for typesetting math in sans serif ---
10 % as discussed Aug 2001 on comp.text.tex, there is supposed to be a better
11 % way to handle sans serif math. However, I can't figure out how to do it!
14 %================================ math ================================
15 %-------------------- differentials, vectors not in italics, units -------------------
16 \newcommand{\der}{\operatorname{d\!}}
17 % ... the \! is a negative thin space to keep the d close to the variable that comes after it
18 % http://tex.stackexchange.com/questions/14821/whats-the-proper-way-to-typeset-a-differential-operator
19 \newcommand{\divg}{\textup{div}\:}
20 \newcommand{\curl}{\textup{curl}\:}
21 \newcommand{\grad}{\textup{grad}\:}
22 \newcommand{\myvec}[1]{\mathbf{#1}} % Use /vc{} instead.
23 \newcommand{\myunit}[1]{\textup{#1}}
24 \newcommand{\kgunit}{\myunit{kg}}
25 \newcommand{\gunit}{\myunit{g}}
26 \newcommand{\munit}{\myunit{m}}
27 \newcommand{\sunit}{\myunit{s}}
28 \newcommand{\degunit}{\ensuremath{\mspace{0mu}^\circ}} % the \mspace{0mu} is a zero-width math space; need it so that, e.g., $2\times10^{-3}\degunit$ doesn't get
29 % interpreted as a double superscript
30 \newcommand{\degcunit}{\degunit\textup{C}}
31 \newcommand{\junit}{\myunit{J}}
32 \newcommand{\nunit}{\myunit{N}}
33 \newcommand{\kunit}{\myunit{K}}
34 \newcommand{\unitdot}{\!\cdot\!}
35 \newcommand{\momunit}{\kgunit\unitdot\munit/\sunit}
36 \newcommand{\btheta}{\boldsymbol{\theta}}
37 \newcommand{\bomega}{\boldsymbol{\omega}}
38 \newcommand{\balpha}{\boldsymbol{\alpha}}
39 \newcommand{\bsigma}{\boldsymbol{\sigma}}
40 \newcommand{\btau}{\boldsymbol{\tau}}
41 \newcommand{\bell}{\boldsymbol{\ell}}
42 \newcommand{\gravunit}{\junit/\kgunit\unitdot\munit}
43 %========================= vectors in bold =========================
44 % The following is set up so vectors are in upright bold. If I ever change my mind and want them in
45 % slanted bold, it should be easy to change here.
46 \newcommand{\vc}[1]{\ensuremath{\mathbf{#1}}}
47 %========================= general math stuff =========================
48 % Symbols for relativity. These are described verbally when introduced in the text, so if I ever change them,
49 % I need to change the verbal descriptions as well.
50 \newcommand{\massenergy}{\mathcal{E}}
51 \newcommand{\interval}{\mathcal{I}}% spacetime interval
52 %-------------------- math in sans-serif text -------------------
53 % $...\zs{x}...$ -- italic, for use when I need symbol font mixed in
54 % $...\zu{x}...$ -- upright, e.g. for digits and things in sans
55 % See DeclareMathAlphabet near top, and p. 177 of LaTeX companion, for \ms{}.
56 % Note: don't put superscripts or subscripts inside these, or any math commands
57 % at all.
58 % They can all be used outside of math mode in examples or other sans-serif
59 % text, but won't necessarily produce the right results in serif text,
60 % since zs forces sans serif. So when cutting and pasting from example text
61 % into serif text, have to change zs's.
62 \newcommand{\zs}[1]{\ensuremath{\ms{#1}}}
63 \newcommand{\zu}[1]{\textup{#1}}
64 \newcommand{\zb}[1]{\textbf{#1}}
65 %==============================================
66 \newenvironment{longnoteafterequation}
68 \setlength{\saveleftskip}{\leftskip}%
69 \addtolength{\leftskip}{20mm}\noindent%
72 \par\setlength{\leftskip}{\saveleftskip} \par
74 %==============================================
75 \newcommand{\mygamma}{\textup{\textgamma}} % more legible for students who don't know Greek alphabet; they mistake Computer Modern gamma for Latin y
76 % For reasons I don't understand, this doesn't work in SN. In SN, ch 1 redefines it as plain old \gamma.