-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathstarType.sty
129 lines (122 loc) · 3.6 KB
/
starType.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
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% starType.sty
%
% Edward Brown, Michigan State University
%
\def\fileversion{1.0}
\def\filedate{2014/05/06}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{starType}[\filedate v\fileversion]
\RequirePackage{ifthen}
% Define options for the class. Each set of macros can be loaded individually;
% the option all loads everything
%
% Options for which macros packages to load
\newboolean{@st_code}
\newboolean{@st_derivatives}
\newboolean{@st_nuclides}
\newboolean{@st_symbols}
\newboolean{@st_units}
\newboolean{@st_vectors}
\newboolean{@st_instruments}
\newboolean{@st_all}
% Options for derivative styles
\newboolean{@italic_dif} % default is to use upright d, D for dif, Dif
\newboolean{@pound_for_Lie} % default is to use calligraphic L for Lie derivative
\newboolean{@uppercase_convective} % default is to use lowercase d for convective derivative
% set defaults
\setboolean{@st_code}{false}
\setboolean{@st_derivatives}{false}
\setboolean{@st_nuclides}{false}
\setboolean{@st_symbols}{false}
\setboolean{@st_units}{false}
\setboolean{@st_vectors}{false}
\setboolean{@st_instruments}{false}
\setboolean{@st_all}{true}
\setboolean{@italic_dif}{false}
\setboolean{@pound_for_Lie}{false}
\setboolean{@uppercase_convective}{false}
\DeclareOption{code}{
\setboolean{@st_code}{true}\setboolean{@st_all}{false}
}
\DeclareOption{derivatives}{
\setboolean{@st_derivatives}{true}\setboolean{@st_all}{false}
}
\DeclareOption{nuclides}{
\setboolean{@st_nuclides}{true}\setboolean{@st_all}{false}
}
\DeclareOption{symbols}{
\setboolean{@st_symbols}{true}\setboolean{@st_all}{false}
}
\DeclareOption{units}{
\setboolean{@st_units}{true}\setboolean{@st_all}{false}
}
\DeclareOption{vectors}{
\setboolean{@st_vectors}{true}\setboolean{@st_all}{false}
}
\DeclareOption{instruments}{
\setboolean{@st_instruments}{true}\setboolean{@st_all}{false}
}
\DeclareOption{all}{\setboolean{@st_all}{true}}
\DeclareOption{italicdif}{\setboolean{@italic_dif}{true}}
\DeclareOption{poundLie}{\setboolean{@pound_for_Lie}{true}}
\DeclareOption{upperConvective}{\setboolean{@uppercase_convective}{true}}
\ProcessOptions
\ifthenelse{\boolean{@st_all}}
{
\setboolean{@st_code}{true}
\setboolean{@st_derivatives}{true}
\setboolean{@st_nuclides}{true}
\setboolean{@st_symbols}{true}
\setboolean{@st_units}{true}
\setboolean{@st_vectors}{true}
\setboolean{@st_instruments}{true}
}{}
\ifthenelse{\boolean{@st_code}}
{
\typeout{loading starType macros 'code'}
\input{st_code}
}{}
\ifthenelse{\boolean{@st_derivatives}}
{
\typeout{loading starType macros 'derivatives'}
\input{st_derivatives}
}{}
\ifthenelse{\boolean{@st_nuclides}}
{
\typeout{loading starType macros 'nuclides'}
\input{st_nuclides}
}{}
\ifthenelse{\boolean{@st_symbols}}
{
\typeout{loading starType macros 'symbols'}
\input{st_symbols}
}{}
\ifthenelse{\boolean{@st_units}}
{
\typeout{loading starType macros 'units'}
\input{st_units}
}{}
\ifthenelse{\boolean{@st_vectors}}
{
\typeout{loading starType macros 'vectors'}
\input{st_vectors}
}{}
\ifthenelse{\boolean{@st_vectors}}
{
\typeout{loading starType macros 'instruments'}
\input{st_instruments}
}{}
% miscellaneous command for typseting X-ray sources names
\makeatletter
\newcommand*{\source}[3]{%
\ifx\f@series\st@bold
\expandafter#1~$\mathbf{{#2}{#3}}$\ignorespaces
\else
\expandafter#1~$\mathrm{{#2}{#3}}$\ignorespaces
\fi
}
\newcommand*{\st@bold}{b}
\makeatother