-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathunits.sty
executable file
·105 lines (71 loc) · 2.8 KB
/
units.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
%-------------------------------------------------------------------------------
% Define custom commands to write units
%-------------------------------------------------------------------------------
%-------------------------------------------------------------------------------
% length, angle, speed, acceleration
% rad
\newcommand{\rad}{\mbox{\,rad}}
% rad per second
\newcommand{\radpsf}{\mbox{$\, \frac{\mathrm{rad}}{\mathrm{s}}$}}
% meter, ...
\newcommand{\mm}{\mbox{\,mm}}
\newcommand{\cm}{\mbox{\,cm}}
\newcommand{\meter}{\mbox{\,m}}
\newcommand{\km}{ \mbox{\,km}}
% meter per second, ...
\newcommand{\mmpsf}{\mbox{$\, \frac{\mathrm{mm}}{\mathrm{s}}$}}
\newcommand{\mpsf}{\mbox{$\, \frac{\mathrm{m}}{\mathrm{s}}$}}
% meter per second^2, ...
\newcommand{\mmpssf}{\mbox{$\, \frac{\mathrm{mm}}{\mathrm{s}^2}$}}
\newcommand{\mpssf}{\mbox{$\, \frac{\mathrm{m}}{\mathrm{s}^2}$}}
\newcommand{\Npkgf}{\mbox{$\, \frac{\mathrm{N}}{\mathrm{kg}}$}}
%-------------------------------------------------------------------------------
% tolerance limits
% use: #1: upper limit, #2: lower limit
\newcommand{\tol}[2]{{{#2} \atop {#1}}}
%-------------------------------------------------------------------------------
% time and frequency
\newcommand{\s}{\mbox{\,s}}
%\renewcommand{\min}{\mbox{min}}
%\newcommand{\h}{\mbox{h}}
\newcommand{\Hz}{\mbox{\,Hz}}
\newcommand{\kHz}{\mbox{\,kHz}}
%\newcommand{\rev}{\mbox{rev}}
%\newcommand{\rpm}{\mbox{$ \frac{\rev}{\min}$}}
%-------------------------------------------------------------------------------
% temperature
\newcommand{\K}{\mbox{\,K}}
\newcommand{\degC}[1]{\mbox{$#1^{\circ}$C}}
%-------------------------------------------------------------------------------
% mass, density
\newcommand{\g}{\mbox{\,g}}
\newcommand{\kg}{\mbox{\,kg}}
%\newcommand{\ton}{\mbox{\,t}}
\newcommand{\kgpmc}{\mbox{$\, \mathrm{kg}/\mathrm{m}^3$}}
\newcommand{\kgpmcf}{\mbox{$\, \frac{\mathrm{kg}}{\mathrm{m}^3}$}}
%-------------------------------------------------------------------------------
% force, pressure, stress, ...
% newton
\newcommand{\N}{\mbox{\,N}}
% newton meter
%\newcommand{\Nmm}{\mbox{Nmm}}
\newcommand{\Nm}{\mbox{\,Nm}}
% newton seconds
\newcommand{\Ns}{\mbox{\,Ns}}
% pressure, stress
\newcommand{\Pa}{\mbox{\,Pa}}
\newcommand{\MPa}{\mbox{\,MPa}}
\newcommand{\barunit}{\mbox{\,bar}}
\newcommand{\Npmms}{\mbox{$\, \mathrm{N}/\mathrm{mm}^2$}}
\newcommand{\Npmmsf}{\mbox{$\, \frac{\mathrm{N}}{\mathrm{mm}^2}$}}
%-------------------------------------------------------------------------------
% electrical quantities
% voltage
\newcommand{\V}{\mbox{\,V}}
\newcommand{\mV}{\mbox{\,mV}}
% capacity
\newcommand{\uF}{\mbox{$\, \mu \mathrm{F}$}}
%-------------------------------------------------------------------------------
% work and power
\newcommand{\J}{\mbox{\,J}}
\newcommand{\kW}{\mbox{\,kW}}