forked from yochju/general_relativity
-
Notifications
You must be signed in to change notification settings - Fork 0
/
lmmath.sty
69 lines (69 loc) · 3.09 KB
/
lmmath.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
%
%
% lmmath.sty
% (c) 2001 Ben Crowell, licensed under the Creative Commons
% Attribution-ShareAlike license,
% http://creativecommons.org/licenses/by-sa/3.0/
%
% These are mainly convenience macros for typesetting math.
% Also, there's some stuff for typesetting math in sans serif ---
% as discussed Aug 2001 on comp.text.tex, there is supposed to be a better
% way to handle sans serif math. However, I can't figure out how to do it!
%
%
%================================ math ================================
%-------------------- differentials, vectors not in italics, units -------------------
\newcommand{\der}{\operatorname{d\!}}
% ... the \! is a negative thin space to keep the d close to the variable that comes after it
% http://tex.stackexchange.com/questions/14821/whats-the-proper-way-to-typeset-a-differential-operator
\newcommand{\divg}{\textup{div}\:}
\newcommand{\curl}{\textup{curl}\:}
\newcommand{\grad}{\textup{grad}\:}
\newcommand{\myvec}[1]{\mathbf{#1}} % Use /vc{} instead.
\newcommand{\myunit}[1]{\textup{#1}}
\newcommand{\kgunit}{\myunit{kg}}
\newcommand{\gunit}{\myunit{g}}
\newcommand{\munit}{\myunit{m}}
\newcommand{\sunit}{\myunit{s}}
\newcommand{\degunit}{\ensuremath{\,^{\circ}}}
\newcommand{\degcunit}{\degunit\textup{C}}
\newcommand{\junit}{\myunit{J}}
\newcommand{\nunit}{\myunit{N}}
\newcommand{\kunit}{\myunit{K}}
\newcommand{\unitdot}{\!\cdot\!}
\newcommand{\momunit}{\kgunit\unitdot\munit/\sunit}
\newcommand{\btheta}{\boldsymbol{\theta}}
\newcommand{\bomega}{\boldsymbol{\omega}}
\newcommand{\balpha}{\boldsymbol{\alpha}}
\newcommand{\bsigma}{\boldsymbol{\sigma}}
\newcommand{\btau}{\boldsymbol{\tau}}
\newcommand{\bell}{\boldsymbol{\ell}}
\newcommand{\gravunit}{\junit/\kgunit\unitdot\munit}
%========================= vectors in bold =========================
% The following is set up so vectors are in upright bold. If I ever change my mind and want them in
% slanted bold, it should be easy to change here.
\newcommand{\vc}[1]{\ensuremath{\mathbf{#1}}}
%========================= general math stuff =========================
\newcommand{\massenergy}{\Bbb{E}}% If I change this, need to change the verbal description of it in MR, ch. 1
%-------------------- math in sans-serif text -------------------
% $...\zs{x}...$ -- italic, for use when I need symbol font mixed in
% $...\zu{x}...$ -- upright, e.g. for digits and things in sans
% See DeclareMathAlphabet near top, and p. 177 of LaTeX companion, for \ms{}.
% Note: don't put superscripts or subscripts inside these, or any math commands
% at all.
% They can all be used outside of math mode in examples or other sans-serif
% text, but won't necessarily produce the right results in serif text,
% since zs forces sans serif. So when cutting and pasting from example text
% into serif text, have to change zs's.
\newcommand{\zs}[1]{\ensuremath{\ms{#1}}}
\newcommand{\zu}[1]{\textup{#1}}
\newcommand{\zb}[1]{\textbf{#1}}
%==============================================
\newenvironment{longnoteafterequation}
{%
\setlength{\saveleftskip}{\leftskip}%
\addtolength{\leftskip}{20mm}\noindent%
}
{%
\par\setlength{\leftskip}{\saveleftskip} \par
}