Debian Codegraph @

texmf-dist/source/latex/physunits/physunits.dtx

raw
1 % \iffalse meta-comment
2 %
3 % Copyright (C) 2020 by Brian W. Mulligan <[email protected]>
4 % -----------------------------------------------------------
5 %
6 % This file may be distributed and/or modified under the conditions of
7 % the LaTeX Project Public License, either version 1.3c of this license
8 % or (at your option) any later version. The latest version of this
9 % license is in:
10 %
11 % http://www.latex-project.org/lppl.txt
12 %
13 % and version 1.3c or later is part of all distributions of LaTeX
14 % version 2006/05/20 or later.
15 %
16 % \fi
17 %
18 % \iffalse
19 %<*driver>
20 \ProvidesFile{physunits.dtx}
21 %</driver>
22 %<package>\NeedsTeXFormat{LaTeX2e}[1994/06/01]
23 %<package> \ProvidesPackage{physunits}
24 %<*package>
25 [2020/03/26 v1.2.0 Physical units package]
26 %</package>
27 %<package>\ProcessOptions\relax
28 %<*driver>
29 \documentclass{ltxdoc}
30 \usepackage{physunits}
31 \usepackage[backref]{hyperref}
32 \EnableCrossrefs
33 \CodelineIndex
34 \RecordChanges
35 %\OnlyDescription
36 \begin{document}
37 \DocInput{physunits.dtx}
38 \PrintChanges
39 \PrintIndex
40 \end{document}
41 %</driver>
42 % \fi
43 %
44 % \CheckSum{496}
45 %
46 % \CharacterTable
47 % {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
48 % 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
49 % Digits \0\1\2\3\4\5\6\7\8\9
50 % Exclamation \! Double quote \" Hash (number) \#
51 % Dollar \$ Percent \% Ampersand \&
52 % Acute accent \' Left paren \( Right paren \)
53 % Asterisk \* Plus \+ Comma \,
54 % Minus \- Point \. Solidus \/
55 % Colon \: Semicolon \; Less than \<
56 % Equals \= Greater than \> Question mark \?
57 % Commercial at \@ Left bracket \[ Backslash \\
58 % Right bracket \] Circumflex \^ Underscore \_
59 % Grave accent \` Left brace \{ Vertical bar \|
60 % Right brace \} Tilde \~}
61 %
62 % \changes{v1.0}{2020/01/23}{Initial version}
63 % \changes{v1.0.1}{2020/01/25}{Clean up formatting, fix index}
64 % \changes{v1.0.2}{2020/01/25}{External changes in makefile}
65 % \changes{v1.0.3}{2020/01/26}{External changes in makefile}
66 % \changes{v1.0.4}{2020/03/26}{Corrected version number and date in
67 % documentation}
68 % \changes{v1.1.0}{2020/11/02}{Corrected spelling of Celsius}
69 % \changes{v1.2.0}{2020/03/26}{Added centigrade}
70 %
71 % \GetFileInfo{physunits.dtx}
72 % \DeclareRobustCommand{\fileversion}{v1.2.0}
73 % \DeclareRobustCommand{\filedate}{2021/03/26}
74 %
75 % \DoNotIndex{\DeclareRobustCommand,\newenvironment,\DeclareRobustCommand,
76 % \left,\right,\textbf,\mathrm,\ensuremath,\units@separator,\expandafter,\,}
77 %
78 % \title{The \textsf{physunits} package\thanks{This document corresponds to%
79 % \textsf{physunits}~\fileversion, dated \filedate.}}
80 % \author{Brian W. Mulligan \\ \texttt{[email protected]}}
81 %
82 % \maketitle
83 % \setlength{\parindent}{0em}
84 % \setlength{\parskip}{1em}
85 %
86 % \section{Introduction}
87 %
88 %
89 % This package consists of several macros that are shorthand for a variety of
90 % physical units that are commonly used in introductory level physics and
91 % astronomy classes.
92 %
93 % At present, this package provides some similar units to those in siunitx, but
94 % is uses slightly different macro names for each. This package also provides
95 % a number of non-SI units (e.g. erg, cm, BTU).
96 %
97 %
98 % \section{Prerequisites / Dependencies}
99 % \changes{v1.0.4}{2020/03/26}{Added section for dependencies.}
100 %
101 % \subsection{General}
102 % This package requires the \verb|physunits| package.%
103 %
104 % \subsection{Generating Documentation}
105 % The \verb|hyperref| package are required to generate the documentation
106 % (this file) for this package.
107 %
108 % \section{Acknowledgements}
109 % \changes{v1.0.4}{2020/03/26}{Added section for acknowledgements.}
110 %
111 % The author would like to thank Brian Dunn for catching bugs in the temperature
112 % units and kcal, leading to changes in v1.0.4.
113 %
114 % \section{Bug Reporting}
115 % \changes{v1.0.4}{2020/03/26}{Added section for bug reporting.}
116 %
117 % Please report bugs or issues in this package using github, at
118 % \url{https://github.com/astrobit/physunits/issues}.%
119 %
120 % \section{Naming Convention}
121 %
122 % most macros consist of just the commonly used letter or unit, e.g.
123 % \textbackslash m for
124 % meters. In cases where the simple form of the unit conflicts with an existing
125 % \LaTeX~macro, then the full word is used, starting with a upper-case letter,
126 % e.g. \textbackslash Coulomb.
127 %
128 % One notable exception to the above naming convention is the use of
129 % \textbackslash gm for
130 % grams, instead of \textbackslash g or \textbackslash Gram.
131 %
132 % \section{Base and Prefixes}
133 %
134 % Most units are in the base unit only, but some very commonly used prefixes
135 % are available as part of the macro, e.g. \textbackslash kg for kilogram,
136 % \textbackslash cm for centimeter.
137 % For base units, each macro accepts one option that can be used to specify
138 % the prefix, for example \textbackslash m[n] will result in nm. The macros
139 % enforce math
140 % mode, so \textbackslash m[\textbackslash micro] will result in
141 % $\mathrm{\mu m}$.
142 %
143 %
144 % \section{Macro Usage}
145 %
146 %
147 % \subsection{Special Macros}
148 %
149 %
150 % \DescribeMacro{\units@separator}
151 % |\units@separator| is a special macro used to set the spacing between a
152 % quantity and the associated units.
153 %
154 % \DescribeMacro{\micro}
155 % |\micro| is a special macro that can be used for the prefix $\mathrm{\mu}$
156 % (micro-). Internally it just uses \textbackslash mu.
157 %
158 % \subsection{Electricity \& Magnetism}
159 % \index{Electricity \& Magnetism|usage(}
160 %
161 % \DescribeMacro{\V}
162 % \index{Electricity \& Magnetism>Volts|usage}
163 % |\V| is a macro for Volts (V).
164 % This macro accepts an optional argument for a prefix. If no option is
165 % supplied, no prefix will be prepended.
166 %
167 % \DescribeMacro{\Volt}
168 % \index{Electricity \& Magnetism>Volts|usage}
169 % |\Volt| is a macro for Volts (V).
170 % This macro accepts an optional argument for a prefix. If no option is
171 % supplied, no prefix will be prepended.
172 %
173 % \DescribeMacro{\Coulomb}
174 % \index{Electricity \& Magnetism>Coulomb|usage}
175 % |\Coulomb| is a macro for Coulombs (C).
176 % This macro accepts an optional argument for a prefix. If no option is
177 % supplied, no prefix will be prepended.
178 %
179 % \DescribeMacro{\esu}
180 % \index{Electricity \& Magnetism>esu|usage}
181 % |\esu| is a macro for electrostatic units (esu), the units of charge in
182 % Gaussian cgs.
183 %
184 % \DescribeMacro{\Ohm}
185 % \index{Electricity \& Magnetism>Ohm|usage}
186 % |\Ohm| is a macro for Ohms ($\Omega$).
187 % This macro accepts an optional argument for a prefix. If no option is
188 % supplied, no prefix will be prepended.
189 %
190 % \DescribeMacro{\Amp}
191 % \index{Electricity \& Magnetism>Amperes|usage}
192 % |\Amp| is a macro for Amperes (A).
193 % This macro accepts an optional argument for a prefix. If no option is
194 % supplied, no prefix will be prepended.
195 %
196 % \DescribeMacro{\Farad}
197 % \index{Electricity \& Magnetism>Farad|usage}
198 % |\Farad| is a macro for Farads (F).
199 % This macro accepts an optional argument for a prefix. If no option is
200 % supplied, no prefix will be prepended.
201 %
202 % \DescribeMacro{\Tesla}
203 % \index{Electricity \& Magnetism>Tesla|usage}
204 % |\Tesla| is a macro for Teslas (T).
205 % This macro accepts an optional argument for a prefix. If no option is
206 % supplied, no prefix will be prepended.
207 %
208 % \DescribeMacro{\Gauss}
209 % \index{Electricity \& Magnetism>Gauss|usage}
210 % |\Gauss| is a macro for Gauss (G), the units for magnetic field strength in
211 % Gaussian cgs.
212 % This macro accepts an optional argument for a prefix. If no option is
213 % supplied, no prefix will be prepended.
214 %
215 % \DescribeMacro{\Henry}
216 % \index{Electricity \& Magnetism>Henry|usage}
217 % |\Henry| is a macro for Henrys (H).
218 % This macro accepts an optional argument for a prefix. If no option is
219 % supplied, no prefix will be prepended.
220 % \index{Electricity \& Magnetism|usage)}
221 %
222 % \subsection{Energy}
223 % \index{Energy|usage(}
224 %
225 % \DescribeMacro{\eV}
226 % \index{Energy>eV|usage}
227 % |\eV| is a macro for electron Volts (eV).
228 % This macro accepts an optional argument for a prefix. If no option is
229 % supplied, no prefix will be prepended.
230 %
231 % \DescribeMacro{\keV}
232 % \index{Energy>eV|usage}
233 % |\keV| is a macro for kilo-electron Volts (keV).
234 %
235 % \DescribeMacro{\MeV}
236 % \index{Energy>eV|usage}
237 % |\MeV| is a macro for mega-electron Volts (MeV).
238 %
239 % \DescribeMacro{\J}
240 % \index{Energy>Joules|usage}
241 % |\J| is a macro for Joules (J).
242 % This macro accepts an optional argument for a prefix. If no option is
243 % supplied, no prefix will be prepended.
244 %
245 % \DescribeMacro{\Joule}
246 % \index{Energy>Joules|usage}
247 % |\Joule| is a macro for Joules (J).
248 % This macro accepts an optional argument for a prefix. If no option is
249 % supplied, no prefix will be prepended.
250 %
251 % \DescribeMacro{\erg}
252 % \index{Energy>erg|usage}
253 % |\erg| is a macro for ergs (erg), the unit of energy in cgs.
254 %
255 % \DescribeMacro{\kcal}
256 % \index{Energy>kcal|usage}
257 % \index{Energy>Calories|usage}
258 % \index{Energy>calories|usage}
259 % |\kcal| is a macro for kilo-calories (kcal).
260 %
261 % \DescribeMacro{\Cal}
262 % \index{Energy>kcal|usage}
263 % \index{Energy>Calories|usage}
264 % \index{Energy>calories|usage}
265 % |\Cal| is a macro for kilo=calories (Cal).
266 %
267 % \DescribeMacro{\calorie}
268 % \index{Energy>kcal|usage}
269 % \index{Energy>Calories|usage}
270 % \index{Energy>calories|usage}
271 % |\calorie| is a macro for calories (cal).
272 % This macro accepts an optional argument for a prefix. If no option is
273 % supplied, no prefix will be prepended.
274 %
275 % \DescribeMacro{\BTU}
276 % \index{Energy>BTU|usage}
277 % |\BTU| is a macro for British Thermal Units (BTU).
278 %
279 % \DescribeMacro{\tnt}
280 % \index{Energy>TNT|usage}
281 % |\tnt| is a macro for tons of TNT.
282 % \index{Energy|usage)}
283 %
284 % \subsection{Power}
285 % \index{Power|usage(}
286 %
287 % \DescribeMacro{\Watt}
288 % \index{Power>Watts|usage}
289 % |\Watt| is a macro for Watts (W).
290 % This macro accepts an optional argument for a prefix. If no option is
291 % supplied, no prefix will be prepended.
292 %
293 % \DescribeMacro{\hpi}
294 % \index{Power>Horsepower|usage}
295 % \index{Power>Horsepower>Imperial|usage}
296 % |\hpi| is a macro for Imperial Horsepower (hp(I)).
297 %
298 % \DescribeMacro{\hpi}
299 % \index{Power>Horsepower|usage}
300 % \index{Power>Horsepower>Metric|usage}
301 % |\hpi| is a macro for Metric Horsepower (hp(M)).
302 %
303 % \DescribeMacro{\hp}
304 % \index{Power>Horsepower|usage}
305 % |\hp| is a macro for Horsepower (hp).
306 % \index{Power|usage)}
307 %
308 % \subsection{Distance}
309 % \index{Distance|usage)}
310 %
311 % \DescribeMacro{\meter}
312 % \index{Distance>Meter|usage}
313 % |\meter| is a macro for meters (m).
314 % This macro accepts an optional argument for a prefix. If no option is
315 % supplied, no prefix will be prepended.
316 %
317 % \DescribeMacro{\m}
318 % \index{Distance>Meter|usage}
319 % |\m| is a macro for meters (m).
320 % This macro accepts an optional argument for a prefix. If no option is
321 % supplied, no prefix will be prepended.
322 %
323 % \DescribeMacro{\km}
324 % \index{Distance>Meter>Kilometer|usage}
325 % |\km| is a macro for kilometers (km).
326 %
327 % \DescribeMacro{\au}
328 % \index{Distance>Astronomical Unit|usage}
329 % |\au| is a macro for astronmical units (au).
330 %
331 % \DescribeMacro{\pc}
332 % \index{Distance>Parsec|usage}
333 % |\pc| is a macro for parsecs (pc).
334 % This macro accepts an optional argument for a prefix. If no option is
335 % supplied, no prefix will be prepended.
336 %
337 % \DescribeMacro{\ly}
338 % \index{Distance>Light Years|usage}
339 % |\ly| is a macro for light-years (ly).
340 % This macro accepts an optional argument for a prefix. If no option is
341 % supplied, no prefix will be prepended.
342 %
343 % \DescribeMacro{\cm}
344 % \index{Distance>Meter>Centimeter|usage}
345 % |\cm| is a macro for centimeters (cm).
346 %
347 % \DescribeMacro{\nm}
348 % \index{Distance>Meter>Nanometer|usage}
349 % |\nm| is a macro for nanometers (nm).
350 %
351 % \DescribeMacro{\ft}
352 % \index{Distance>Imperial>Feet|usage}
353 % |\ft| is a macro for feet (ft).
354 %
355 % \DescribeMacro{\inch}
356 % \index{Distance>Imperial>Inch|usage}
357 % |\inch| is a macro for inches (in).
358 %
359 % \DescribeMacro{\mi}
360 % \index{Distance>Imperial>Mile|usage}
361 % |\mi| is a macro for miles (mi).
362 %
363 % \index{Distance|usage)}
364 %
365 % \subsection{Time}
366 % \index{Time|usage(}
367 %
368 % \DescribeMacro{\s}
369 % \index{Time>Seconds|usage}
370 % |\s| is a macro for seconds (s).
371 % This macro accepts an optional argument for a prefix. If no option is
372 % supplied, no prefix will be prepended.
373 %
374 % \DescribeMacro{\Sec}
375 % \index{Time>Seconds|usage}
376 % |\Sec| is a macro for seconds (s).
377 % This macro accepts an optional argument for a prefix. If no option is
378 % supplied, no prefix will be prepended.
379 %
380 % \DescribeMacro{\Min}
381 % \index{Time>Minutes|usage}
382 % |\Min| is a macro for minutes (m).
383 %
384 % \DescribeMacro{\h}
385 % \index{Time>Hours|usage}
386 % |\h| is a macro for hours (h).
387 %
388 % \DescribeMacro{\y}
389 % \index{Time>Years|usage}
390 % |\y| is a macro for years (y).
391 % This macro accepts an optional argument for a prefix. If no option is
392 % supplied, no prefix will be prepended.
393 %
394 % \DescribeMacro{\Day}
395 % \index{Time>Days|usage}
396 % |\Day| is a macro for days (d).
397 %
398 % \index{Time|usage)}
399 %
400 % \subsection{Mass}
401 %
402 % \index{Mass|usage(}
403 %
404 % \DescribeMacro{\gm}
405 % \index{Mass>Grams|usage}
406 % |\gm| is a macro for grams (g).
407 % This macro accepts an optional argument for a prefix. If no option is
408 % supplied, no prefix will be prepended.
409 %
410 % \DescribeMacro{\kg}
411 % \index{Mass>Gram>Kilograms|usage}
412 % |\kg| is a macro for kilograms (kg).
413 %
414 % \DescribeMacro{\lb}
415 % \index{Mass>Pounds|usage}
416 % |\lb| is a macro for pounds (weight) (lb).
417 %
418 % \DescribeMacro{\amu}
419 % \index{Mass>AMU|usage}
420 % \index{Mass>Dalton|usage}
421 % |\amu| is a macro for atomic mass units (amu).
422 %
423 % \index{Mass|usage)}
424 %
425 % \subsection{Force}
426 %
427 % \index{Force|usage(}
428 %
429 % \DescribeMacro{\N}
430 % \index{Force>Newton|usage}
431 % |\N| is a macro for Newtons (N).
432 % This macro accepts an optional argument for a prefix. If no option is
433 % supplied, no prefix will be prepended.
434 %
435 % \DescribeMacro{\Newton}
436 % \index{Force>Newton|usage}
437 % |\Newton| is a macro for Newtons (N).
438 % This macro accepts an optional argument for a prefix. If no option is
439 % supplied, no prefix will be prepended.
440 %
441 % \DescribeMacro{\dyne}
442 % \index{Force>Dyne|usage}
443 % |\dyne| is a macro for dynes (dyn).
444 % This macro accepts an optional argument for a prefix. If no option is
445 % supplied, no prefix will be prepended.
446 %
447 % \DescribeMacro{\lbf}
448 % \index{Force>Pounds|usage}
449 % |\lbf| is a macro for pounds of force (lbf).
450 %
451 % \index{Force|usage)}
452 %
453 % \subsection{Velocity}
454 %
455 % \index{Velocity|usage(}
456 %
457 % \DescribeMacro{\kmps}
458 % \index{Velocity>Kilometers per Second|usage}
459 % |\kmps| is a macro for kilometers per second ($\kmps$).
460 %
461 % \DescribeMacro{\kmph}
462 % \index{Velocity>Kilometers per Hour|usage}
463 % |\kmph| is a macro for kilometers per hour ($\kmph$).
464 %
465 % \DescribeMacro{\mps}
466 % \index{Velocity>Meters per Second|usage}
467 % |\mps| is a macro for meters per second ($\mps$).
468 % This macro accepts an optional argument for a prefix. If no option is
469 % supplied, no prefix will be prepended.
470 %
471 % \DescribeMacro{\miph}
472 % \index{Velocity>Miles per Hour|usage}
473 % |\miph| is a macro for miles per hour ($\miph$).
474 %
475 % \DescribeMacro{\kts}
476 % \index{Velocity>Knots|usage}
477 % \index{Velocity>Nautical Miles per Hour|usage}
478 % |\kts| is a macro for knots ($\kts$)., i.e. nautical miles per hour
479 %
480 % \index{Velocity|usage)}
481 %
482 % \subsection{Acceleration}
483 %
484 % \index{Acceleration|usage(}
485 %
486 % \DescribeMacro{\mpss}
487 % \index{Acceleration>Meters per Second squared|usage}
488 % |\mpss| is a macro for acceleration in meters per second squared ($\mpss$).
489 % This macro accepts an optional argument for a prefix. If no option is
490 % supplied, no prefix will be prepended.
491 %
492 % \DescribeMacro{\gacc}
493 % \index{Acceleration>Gravity|usage}
494 % |\gacc| is a macro for acceleration due to gravity ($\gacc$).
495 %
496 % \DescribeMacro{\ftpss}
497 % \index{Acceleration>Feet per Second squared|usage}
498 % |\ftpss| is a macro for acceleration in feet per second squared ($\ftpss$).
499 %
500 % \index{Velocity|usage)}
501 %
502 %
503 % \subsection{Temperature}
504 %
505 % \index{Temperature|usage(}
506 %
507 % \DescribeMacro{\K}
508 % \index{Temperature>Kelvin|usage}
509 % |\K| is a macro for Kelvin (K).
510 % This macro accepts an optional argument for a prefix. If no option is
511 % supplied, no prefix will be prepended.
512 %
513 % \DescribeMacro{\Kelvin}
514 % \index{Temperature>Kelvin|usage}
515 % |\Kelvin| is a macro for Kelvin (K).
516 % This macro accepts an optional argument for a prefix. If no option is
517 % supplied, no prefix will be prepended.
518 %
519 % \changes{v1.1.0}{2020/11/02}{Corrected spelling of Celsius.}
520 % \changes{v1.2.0}{2020/03/26}{Added centigrade.}
521 % \DescribeMacro{\Celsius}
522 % \index{Temperature>Celsius|usage}
523 % |\Celsius| is a macro for degrees Celsius $(\Celsius)$.
524 % |\Celcius| and |\centigrade| are identical macros $(\Celsius)$.
525 %
526 % \DescribeMacro{\Rankine}
527 % \index{Temperature>Rankine|usage}
528 % |\Rankine| is a macro for degrees Rankine $(\Rankine)$.
529 %
530 % \DescribeMacro{\Fahrenheit}
531 % \index{Temperature>Fahrenheit|usage}
532 % |\Fahrenheit| is a macro for degrees Fahrenheit $(\Fahrenheit)$.
533 %
534 % \index{Temperature|usage)}
535 %
536 % \subsection{Angular Velocity}
537 %
538 % \index{Angular Velocity|usage(}
539 %
540 % \DescribeMacro{\rpm}
541 % \index{Angular Velocity>RPM|usage}
542 % |\rpm| is a macro for revolutions per minute $(\rpm)$.
543 %
544 % \index{Angular Velocity|usage)}
545 %
546 % \subsection{Frequency}
547 %
548 % \index{Frequency|usage(}
549 %
550 % \DescribeMacro{\Hz}
551 % \index{Frequency>Hertz|usage}
552 % |\Hz| is a macro for Hertz (Hz).
553 % This macro accepts an optional argument for a prefix. If no option is
554 % supplied, no prefix will be prepended.
555 %
556 % \index{Frequency|usage)}
557 %
558 %
559 % \subsection{Pressure}
560 %
561 % \index{Pressure|usage(}
562 %
563 % \DescribeMacro{\barP}
564 % \index{Pressure>bar|usage}
565 % |\barP| is a macro for bar (bar). (The use of barP instead of just bar is due
566 % the \LaTeX~command \textbackslash bar.)
567 % This macro accepts an optional argument for a prefix. If no option is
568 % supplied, no prefix will be prepended.
569 %
570 % \DescribeMacro{\atm}
571 % \index{Pressure>atmosphere|usage}
572 % |\atm| is a macro for atmosphere (atm).
573 %
574 % \DescribeMacro{\Pa}
575 % \index{Pressure>Pascal|usage}
576 % |\Pa| is a macro for Pascals (Pa).
577 % This macro accepts an optional argument for a prefix. If no option is
578 % supplied, no prefix will be prepended.
579 %
580 % \DescribeMacro{\mmHg}
581 % \index{Pressure>mm Hg|usage}
582 % |\mmHg| is a macro for millimeters of mercury (mmHg).
583 %
584 % \DescribeMacro{\inHg}
585 % \index{Pressure>in Hg|usage}
586 % |\inHg| is a macro for inches of mercury (inHg).
587 %
588 % \DescribeMacro{\lbsi}
589 % \index{Pressure>psi|usage}
590 % \index{Pressure>Pound per square inch|usage}
591 % |\lbsi| is a macro for pounds per square inch (psi). (Note that \textbackslash
592 % psi is a latex command for the greek letter $\psi$).
593 %
594 % \DescribeMacro{\lbsf}
595 % \index{Pressure>psf|usage}
596 % \index{Pressure>Pound per square foot|usage}
597 % |\lbsf| is a macro for pounds per square foot (psf).
598 %
599 % \DescribeMacro{\Ba}
600 % \index{Pressure>Barre|usage}
601 % |\Ba| is a macro for Barre (Ba).
602 % This macro accepts an optional argument for a prefix. If no option is
603 % supplied, no prefix will be prepended.
604 %
605 % \DescribeMacro{\Torr}
606 % \index{Pressure>Torr|usage}
607 % |\Torr| is a macro for Torr (Torr).
608 % This macro accepts an optional argument for a prefix. If no option is
609 % supplied, no prefix will be prepended.
610 %
611 % \index{Pressure|usage)}
612 %
613 % \subsection{Other}
614 %
615 % \index{Other|usage(}
616 %
617 % \DescribeMacro{\mol}
618 % \index{Other>mole|usage(}
619 % \index{mole|usage(}
620 % |\mol| is a macro for moles (mol).
621 %
622 % \index{Other|usage)}
623
624 % \StopEventually{}
625 %
626
627 \makeatletter
628 % \section{Implementation}
629 %
630 % \subsection{Special}
631 %
632 %\iffalse
633 %<*package>
634 %\fi
635 % \begin{macro}{\units@separator}
636 % |\units@separator| is a special macro used to set the spacing between a
637 % quantity and the associated units.
638 %
639 % \begin{macrocode}
640 \DeclareRobustCommand{\units@separator}{\,}
641 % \end{macrocode}
642 % \end{macro}
643 %\iffalse
644 %</package>
645 %\fi
646 %
647 %\iffalse
648 %<*package>
649 %\fi
650 % \begin{macro}{\micro}
651 % \changes{v1.0.4}{2020/03/26}{Corrected version number and date in
652 % documentation}
653 % |\micro| is a special macro used to typeset the symbol \textbackslash mu.
654 % It is compatable with the \textbackslash micro in siunitx.
655 %
656 % \begin{macrocode}
657 \ifx\micro\undefined
658 \DeclareRobustCommand{\micro}{\ensuremath{%
659 \mu}}
660 \fi
661 % \end{macrocode}
662 % \end{macro}
663 %\iffalse
664 %</package>
665 %\fi
666 %
667 %
668 % \subsection{Electricity \& Magnetism}
669 %
670 %\iffalse
671 %<*package>
672 %\fi
673 % \begin{macro}{\V}
674 % |\V| is a macro for Volts (V).
675 % This macro accepts an optional argument for a prefix. If no option is
676 % supplied, no prefix will be prepended.
677 %
678 % \begin{macrocode}
679 \DeclareRobustCommand{\V}[1][ ]{\ensuremath{%
680 \expandafter\units@separator\mathrm{#1V}}}
681 % \end{macrocode}
682 % \end{macro}
683 %\iffalse
684 %</package>
685 %\fi
686 %
687 %\iffalse
688 %<*package>
689 %\fi
690 % \begin{macro}{\Volt}
691 % |\Volt| is a macro for Volts (V).
692 % This macro accepts an optional argument for a prefix. If no option is
693 % supplied, no prefix will be prepended.
694 %
695 % \begin{macrocode}
696 \DeclareRobustCommand{\Volt}[1][ ]{\ensuremath{%
697 \expandafter\units@separator\mathrm{#1V}}}
698 % \end{macrocode}
699 % \end{macro}
700 %\iffalse
701 %</package>
702 %\fi
703 %
704 %\iffalse
705 %<*package>
706 %\fi
707 % \begin{macro}{\Coulomb}
708 % |\Coulomb| is a macro for Coulombs (C).
709 % This macro accepts an optional argument for a prefix. If no option is
710 % supplied, no prefix will be prepended.
711 %
712 % \begin{macrocode}
713 \DeclareRobustCommand{\Coulomb}[1][ ]{\ensuremath{%
714 \expandafter\units@separator\mathrm{#1C}}}
715 % \end{macrocode}
716 % \end{macro}
717 %\iffalse
718 %</package>
719 %\fi
720 %
721 %\iffalse
722 %<*package>
723 %\fi
724 % \begin{macro}{\esu}
725 % |\esu| is a macro for electrostatic units (esu).
726 %
727 % \begin{macrocode}
728 \DeclareRobustCommand{\esu}{\ensuremath{%
729 \expandafter\units@separator\mathrm{esu}}}
730 % \end{macrocode}
731 % \end{macro}
732 %\iffalse
733 %</package>
734 %\fi
735 %
736 %\iffalse
737 %<*package>
738 %\fi
739 % \begin{macro}{\Ohm}
740 % |\Ohm| is a macro for Ohms ($\Omega$).
741 % This macro accepts an optional argument for a prefix. If no option is
742 % supplied, no prefix will be prepended.
743 %
744 % \begin{macrocode}
745 \DeclareRobustCommand{\Ohm}[1][ ]{\ensuremath{%
746 \expandafter\units@separator\mathrm{#1\Omega}}}
747 % \end{macrocode}
748 % \end{macro}
749 %\iffalse
750 %</package>
751 %\fi
752 %
753 %\iffalse
754 %<*package>
755 %\fi
756 % \begin{macro}{\Amp}
757 % |\Amp| is a macro for Amperes (A).
758 % This macro accepts an optional argument for a prefix. If no option is
759 % supplied, no prefix will be prepended.
760 %
761 % \begin{macrocode}
762 \DeclareRobustCommand{\Amp}[1][ ]{\ensuremath{%
763 \expandafter\units@separator\mathrm{#1A}}}
764 % \end{macrocode}
765 % \end{macro}
766 %\iffalse
767 %</package>
768 %\fi
769 %
770 %\iffalse
771 %<*package>
772 %\fi
773 % \begin{macro}{\Farad}
774 % |\Farad| is a macro for Farads (F).
775 % This macro accepts an optional argument for a prefix. If no option is
776 % supplied, no prefix will be prepended.
777 %
778 % \begin{macrocode}
779 \DeclareRobustCommand{\Farad}[1][ ]{\ensuremath{%
780 \expandafter\units@separator\mathrm{#1F}}}
781 % \end{macrocode}
782 % \end{macro}
783 %\iffalse
784 %</package>
785 %\fi
786 %
787 %\iffalse
788 %<*package>
789 %\fi
790 % \begin{macro}{\Tesla}
791 % |\Tesla| is a macro for Teslas (T).
792 % This macro accepts an optional argument for a prefix. If no option is
793 % supplied, no prefix will be prepended.
794 %
795 % \begin{macrocode}
796 \DeclareRobustCommand{\Tesla}[1][ ]{\ensuremath{%
797 \expandafter\units@separator\mathrm{#1T}}}
798 % \end{macrocode}
799 % \end{macro}
800 %\iffalse
801 %</package>
802 %\fi
803 %
804 %\iffalse
805 %<*package>
806 %\fi
807 % \begin{macro}{\Gauss}
808 % |\Gauss| is a macro for Gauss (G).
809 % This macro accepts an optional argument for a prefix. If no option is
810 % supplied, no prefix will be prepended.
811 %
812 % \begin{macrocode}
813 \DeclareRobustCommand{\Gauss}[1][ ]{\ensuremath{%
814 \expandafter\units@separator\mathrm{#1G}}}
815 % \end{macrocode}
816 % \end{macro}
817 %\iffalse
818 %</package>
819 %\fi
820 %
821 %\iffalse
822 %<*package>
823 %\fi
824 % \begin{macro}{\Henry}
825 % |\Henry| is a macro for Henrys (H).
826 % This macro accepts an optional argument for a prefix. If no option is
827 % supplied, no prefix will be prepended.
828 %
829 % \begin{macrocode}
830 \DeclareRobustCommand{\Henry}[1][ ]{\ensuremath{%
831 \expandafter\units@separator\mathrm{#1H}}}
832 % \end{macrocode}
833 % \end{macro}
834 %\iffalse
835 %</package>
836 %\fi
837 %
838 % \subsection{Energy}
839 %
840 %\iffalse
841 %<*package>
842 %\fi
843 % \begin{macro}{\eV}
844 % |\eV| is a macro for electron Volts (eV).
845 % This macro accepts an optional argument for a prefix. If no option is
846 % supplied, no prefix will be prepended.
847 %
848 % \begin{macrocode}
849 \DeclareRobustCommand{\eV}[1][ ]{\ensuremath{%
850 \expandafter\units@separator\mathrm{#1eV}}}
851 % \end{macrocode}
852 % \end{macro}
853 %\iffalse
854 %</package>
855 %\fi
856 %
857 %\iffalse
858 %<*package>
859 %\fi
860 % \begin{macro}{\keV}
861 % |\keV| is a macro for kilo-electron Volts (keV).
862 %
863 % \begin{macrocode}
864 \DeclareRobustCommand{\keV}{\ensuremath{%
865 \expandafter\units@separator\mathrm{keV}}}
866 % \end{macrocode}
867 % \end{macro}
868 %\iffalse
869 %</package>
870 %\fi
871 %
872 %\iffalse
873 %<*package>
874 %\fi
875 % \begin{macro}{\MeV}
876 % |\MeV| is a macro for mega-electron Volts (MeV).
877 %
878 % \begin{macrocode}
879 \DeclareRobustCommand{\MeV}{\ensuremath{%
880 \expandafter\units@separator\mathrm{MeV}}}
881 % \end{macrocode}
882 % \end{macro}
883 %\iffalse
884 %</package>
885 %\fi
886 %
887 %\iffalse
888 %<*package>
889 %\fi
890 % \begin{macro}{\J}
891 % |\J| is a macro for Joules (J).
892 % This macro accepts an optional argument for a prefix. If no option is
893 % supplied, no prefix will be prepended.
894 %
895 % \begin{macrocode}
896 \DeclareRobustCommand{\J}[1][ ]{\ensuremath{%
897 \expandafter\units@separator\mathrm{#1J}}}
898 % \end{macrocode}
899 % \end{macro}
900 %\iffalse
901 %</package>
902 %\fi
903 %
904 %\iffalse
905 %<*package>
906 %\fi
907 % \begin{macro}{\Joule}
908 % |\Joule| is a macro for Joules (J).
909 % This macro accepts an optional argument for a prefix. If no option is
910 % supplied, no prefix will be prepended.
911 %
912 % \begin{macrocode}
913 \DeclareRobustCommand{\Joule}[1][ ]{\ensuremath{%
914 \expandafter\units@separator\mathrm{#1J}}}
915 % \end{macrocode}
916 % \end{macro}
917 %\iffalse
918 %</package>
919 %\fi
920 %
921 %\iffalse
922 %<*package>
923 %\fi
924 % \begin{macro}{\erg}
925 % |\erg| is a macro for ergs (erg).
926 %
927 % \begin{macrocode}
928 \DeclareRobustCommand{\erg}{\ensuremath{%
929 \expandafter\units@separator\mathrm{erg}}}
930 % \end{macrocode}
931 % \end{macro}
932 %\iffalse
933 %</package>
934 %\fi
935 %
936 %\iffalse
937 %<*package>
938 %\fi
939 % \begin{macro}{\kcal}
940 % \changes{v1.0.4}{2020/03/26}{kcal appeared to take a prefix, but the prefix
941 % was ignored; removed the prefix.}
942 % |\kcal| is a macro for kilo-calories (kcal).
943 %
944 % \begin{macrocode}
945 \DeclareRobustCommand{\kcal}{\ensuremath{%
946 \expandafter\units@separator\mathrm{kcal}}}
947 % \end{macrocode}
948 % \end{macro}
949 %\iffalse
950 %</package>
951 %\fi
952 %
953 %\iffalse
954 %<*package>
955 %\fi
956 % \begin{macro}{\Cal}
957 % |\Cal| is a macro for kilo=calories (Cal).
958 %
959 % \begin{macrocode}
960 \DeclareRobustCommand{\Cal}{\ensuremath{%
961 \expandafter\units@separator\mathrm{Cal}}}
962 % \end{macrocode}
963 % \end{macro}
964 %\iffalse
965 %</package>
966 %\fi
967 %
968 %\iffalse
969 %<*package>
970 %\fi
971 % \begin{macro}{\calorie}
972 % |\calorie| is a macro for calories (cal).
973 % This macro accepts an optional argument for a prefix. If no option is
974 % supplied, no prefix will be prepended.
975 %
976 % \begin{macrocode}
977 \DeclareRobustCommand{\calorie}[1][ ]{%
978 \ensuremath{%
979 \expandafter\units@separator\mathrm{#1cal}}}
980 % \end{macrocode}
981 % \end{macro}
982 %\iffalse
983 %</package>
984 %\fi
985 %
986 %\iffalse
987 %<*package>
988 %\fi
989 % \begin{macro}{\BTU}
990 % |\BTU| is a macro for British Thermal Units (BTU).
991 %
992 % \begin{macrocode}
993 \DeclareRobustCommand{\BTU}{\ensuremath{%
994 \expandafter\units@separator\mathrm{BTU}}}
995 % \end{macrocode}
996 % \end{macro}
997 %\iffalse
998 %</package>
999 %\fi
1000 %
1001 %\iffalse
1002 %<*package>
1003 %\fi
1004 % \begin{macro}{\tnt}
1005 % |\tnt| is a macro for tons of TNT).
1006 %
1007 % \begin{macrocode}
1008 \DeclareRobustCommand{\tnt}{\ensuremath{%
1009 \expandafter\units@separator\mathrm{ton%
1010 \expandafter\units@separator of%
1011 \expandafter\units@separator TNT}}}
1012 % \end{macrocode}
1013 % \end{macro}
1014 %\iffalse
1015 %</package>
1016 %\fi
1017 %
1018 %
1019 % \subsection{Power}
1020 %
1021 %\iffalse
1022 %<*package>
1023 %\fi
1024 % \begin{macro}{\Watt}
1025 % |\Watt| is a macro for Watts (W).
1026 % This macro accepts an optional argument for a prefix. If no option is
1027 % supplied, no prefix will be prepended.
1028 %
1029 % \begin{macrocode}
1030 \DeclareRobustCommand{\Watt}[1][ ]{\ensuremath{%
1031 \expandafter\units@separator\mathrm{#1W}}}
1032 % \end{macrocode}
1033 % \end{macro}
1034 %\iffalse
1035 %</package>
1036 %\fi
1037 %
1038 %\iffalse
1039 %<*package>
1040 %\fi
1041 % \begin{macro}{\hpi}
1042 % |\hpi| is a macro for Imperial Horsepower (hp(I)).
1043 %
1044 % \begin{macrocode}
1045 \DeclareRobustCommand{\hpi}{\ensuremath{%
1046 \expandafter\units@separator\mathrm{hp(I)}}}
1047 % \end{macrocode}
1048 % \end{macro}
1049 %\iffalse
1050 %</package>
1051 %\fi
1052 %
1053 %\iffalse
1054 %<*package>
1055 %\fi
1056 % \begin{macro}{\hpi}
1057 % |\hpi| is a macro for Metric Horsepower (hp(M)).
1058 %
1059 % \begin{macrocode}
1060 \DeclareRobustCommand{\hpm}{\ensuremath{%
1061 \expandafter\units@separator\mathrm{hp(M)}}}
1062 % \end{macrocode}
1063 % \end{macro}
1064 %\iffalse
1065 %</package>
1066 %\fi
1067 %
1068 %\iffalse
1069 %<*package>
1070 %\fi
1071 % \begin{macro}{\hp}
1072 % |\hp| is a macro for Horsepower (hp).
1073 %
1074 % \begin{macrocode}
1075 \DeclareRobustCommand{\hp}{\ensuremath{%
1076 \expandafter\units@separator\mathrm{hp}}}
1077 % \end{macrocode}
1078 % \end{macro}
1079 %\iffalse
1080 %</package>
1081 %\fi
1082 %
1083 %
1084 % \subsection{Distance}
1085 %
1086 %\iffalse
1087 %<*package>
1088 %\fi
1089 % \begin{macro}{\meter}
1090 % |\meter| is a macro for meters (m).
1091 % This macro accepts an optional argument for a prefix. If no option is
1092 % supplied, no prefix will be prepended.
1093 %
1094 % \begin{macrocode}
1095 \DeclareRobustCommand{\meter}[1][ ]{\ensuremath{%
1096 \expandafter\units@separator\mathrm{#1m}}}
1097 % \end{macrocode}
1098 % \end{macro}
1099 %\iffalse
1100 %</package>
1101 %\fi
1102 %
1103 %\iffalse
1104 %<*package>
1105 %\fi
1106 % \begin{macro}{\m}
1107 % |\m| is a macro for meters (m).
1108 % This macro accepts an optional argument for a prefix. If no option is
1109 % supplied, no prefix will be prepended.
1110 %
1111 % \begin{macrocode}
1112 \DeclareRobustCommand{\m}[1][ ]{\ensuremath{%
1113 \expandafter\units@separator\mathrm{#1m}}}
1114 % \end{macrocode}
1115 % \end{macro}
1116 %\iffalse
1117 %</package>
1118 %\fi
1119 %
1120 %\iffalse
1121 %<*package>
1122 %\fi
1123 % \begin{macro}{\km}
1124 % |\km| is a macro for kilometers (km).
1125 %
1126 % \begin{macrocode}
1127 \DeclareRobustCommand{\km}{\ensuremath{%
1128 \expandafter\units@separator\mathrm{km}}}
1129 % \end{macrocode}
1130 % \end{macro}
1131 %\iffalse
1132 %</package>
1133 %\fi
1134 %
1135 %\iffalse
1136 %<*package>
1137 %\fi
1138 % \begin{macro}{\au}
1139 % |\au| is a macro for astronmical units (au).
1140 %
1141 % \begin{macrocode}
1142 \DeclareRobustCommand{\au}{\ensuremath{%
1143 \expandafter\units@separator\mathrm{au}}}
1144 % \end{macrocode}
1145 % \end{macro}
1146 %\iffalse
1147 %</package>
1148 %\fi
1149 %
1150 %\iffalse
1151 %<*package>
1152 %\fi
1153 % \begin{macro}{\pc}
1154 % |\pc| is a macro for parsecs (pc).
1155 % This macro accepts an optional argument for a prefix. If no option is
1156 % supplied, no prefix will be prepended.
1157 %
1158 % \begin{macrocode}
1159 \DeclareRobustCommand{\pc}[1][ ]{\ensuremath{%
1160 \expandafter\units@separator\mathrm{#1pc}}}
1161 % \end{macrocode}
1162 % \end{macro}
1163 %\iffalse
1164 %</package>
1165 %\fi
1166 %
1167 %\iffalse
1168 %<*package>
1169 %\fi
1170 % \begin{macro}{\ly}
1171 % |\ly| is a macro for light-years (ly).
1172 % This macro accepts an optional argument for a prefix. If no option is
1173 % supplied, no prefix will be prepended.
1174 %
1175 % \begin{macrocode}
1176 \DeclareRobustCommand{\ly}[1][ ]{\ensuremath{%
1177 \expandafter\units@separator\mathrm{#1ly}}}
1178 % \end{macrocode}
1179 % \end{macro}
1180 %\iffalse
1181 %</package>
1182 %\fi
1183 %
1184 %\iffalse
1185 %<*package>
1186 %\fi
1187 % \begin{macro}{\cm}
1188 % |\cm| is a macro for centimeters (cm).
1189 %
1190 % \begin{macrocode}
1191 \DeclareRobustCommand{\cm}{\ensuremath{%
1192 \expandafter\units@separator\mathrm{cm}}}
1193 % \end{macrocode}
1194 % \end{macro}
1195 %\iffalse
1196 %</package>
1197 %\fi
1198 %
1199 %\iffalse
1200 %<*package>
1201 %\fi
1202 % \begin{macro}{\nm}
1203 % |\nm| is a macro for nanometers (nm).
1204 %
1205 % \begin{macrocode}
1206 \DeclareRobustCommand{\nm}{\ensuremath{%
1207 \expandafter\units@separator\mathrm{nm}}}
1208 % \end{macrocode}
1209 % \end{macro}
1210 %\iffalse
1211 %</package>
1212 %\fi
1213 %
1214 %\iffalse
1215 %<*package>
1216 %\fi
1217 % \begin{macro}{\ft}
1218 % |\ft| is a macro for feet (ft).
1219 %
1220 % \begin{macrocode}
1221 \DeclareRobustCommand{\ft}{\ensuremath{%
1222 \expandafter\units@separator\mathrm{ft}}}
1223 % \end{macrocode}
1224 % \end{macro}
1225 %\iffalse
1226 %</package>
1227 %\fi
1228 %
1229 %\iffalse
1230 %<*package>
1231 %\fi
1232 % \begin{macro}{\inch}
1233 % |\inch| is a macro for inches (in).
1234 %
1235 % \begin{macrocode}
1236 \DeclareRobustCommand{\inch}{\ensuremath{%
1237 \expandafter\units@separator\mathrm{in}}}
1238 % \end{macrocode}
1239 % \end{macro}
1240 %\iffalse
1241 %</package>
1242 %\fi
1243 %
1244 %\iffalse
1245 %<*package>
1246 %\fi
1247 % \begin{macro}{\mi}
1248 % |\mi| is a macro for miles (mi).
1249 %
1250 % \begin{macrocode}
1251 \DeclareRobustCommand{\mi}{\ensuremath{%
1252 \expandafter\units@separator\mathrm{mi}}}
1253 % \end{macrocode}
1254 % \end{macro}
1255 %\iffalse
1256 %</package>
1257 %\fi
1258 %
1259 %
1260 % \subsection{Time}
1261 %
1262 %\iffalse
1263 %<*package>
1264 %\fi
1265 % \begin{macro}{\s}
1266 % |\s| is a macro for seconds (s).
1267 % This macro accepts an optional argument for a prefix. If no option is
1268 % supplied, no prefix will be prepended.
1269 %
1270 % \begin{macrocode}
1271 \DeclareRobustCommand{\s}[1][ ]{\ensuremath{%
1272 \expandafter\units@separator\mathrm{#1s}}}
1273 % \end{macrocode}
1274 % \end{macro}
1275 %\iffalse
1276 %</package>
1277 %\fi
1278 %
1279 %\iffalse
1280 %<*package>
1281 %\fi
1282 % \begin{macro}{\Sec}
1283 % |\Sec| is a macro for seconds (s).
1284 % This macro accepts an optional argument for a prefix. If no option is
1285 % supplied, no prefix will be prepended.
1286 %
1287 % \begin{macrocode}
1288 \DeclareRobustCommand{\Sec}[1][ ]{\ensuremath{%
1289 \expandafter\units@separator\mathrm{#1s}}}
1290 % \end{macrocode}
1291 % \end{macro}
1292 %\iffalse
1293 %</package>
1294 %\fi
1295 %
1296 %\iffalse
1297 %<*package>
1298 %\fi
1299 % \begin{macro}{\Min}
1300 % |\Min| is a macro for minutes (m).
1301 %
1302 % \begin{macrocode}
1303 \DeclareRobustCommand{\Min}{\ensuremath{%
1304 \expandafter\units@separator\mathrm{min}}}
1305 % \end{macrocode}
1306 % \end{macro}
1307 %\iffalse
1308 %</package>
1309 %\fi
1310 %
1311 %\iffalse
1312 %<*package>
1313 %\fi
1314 % \begin{macro}{\h}
1315 % |\h| is a macro for hours (h).
1316 %
1317 % \begin{macrocode}
1318 \DeclareRobustCommand{\h}{\ensuremath{%
1319 \expandafter\units@separator\mathrm{h}}}
1320 % \end{macrocode}
1321 % \end{macro}
1322 %\iffalse
1323 %</package>
1324 %\fi
1325 %
1326 %\iffalse
1327 %<*package>
1328 %\fi
1329 % \begin{macro}{\y}
1330 % |\y| is a macro for years (y).
1331 % This macro accepts an optional argument for a prefix. If no option is
1332 % supplied, no prefix will be prepended.
1333 %
1334 % \begin{macrocode}
1335 \DeclareRobustCommand{\y}[1][ ]{\ensuremath{%
1336 \expandafter\units@separator\mathrm{#1y}}}
1337 % \end{macrocode}
1338 % \end{macro}
1339 %\iffalse
1340 %</package>
1341 %\fi
1342 %
1343 %\iffalse
1344 %<*package>
1345 %\fi
1346 % \begin{macro}{\Day}
1347 % |\Day| is a macro for days (d).
1348 %
1349 % \begin{macrocode}
1350 \DeclareRobustCommand{\Day}{\ensuremath{%
1351 \expandafter\units@separator\mathrm{d}}}
1352 % \end{macrocode}
1353 % \end{macro}
1354 %\iffalse
1355 %</package>
1356 %\fi
1357 %
1358 %
1359 % \subsection{Mass}
1360 %
1361 %\iffalse
1362 %<*package>
1363 %\fi
1364 % \begin{macro}{\gm}
1365 % |\gm| is a macro for grams (g).
1366 % This macro accepts an optional argument for a prefix. If no option is
1367 % supplied, no prefix will be prepended.
1368 %
1369 % \begin{macrocode}
1370
1371 \DeclareRobustCommand{\gm}[1][ ]{\ensuremath{%
1372 \expandafter\units@separator\mathrm{#1g}}}
1373 % \end{macrocode}
1374 % \end{macro}
1375 %\iffalse
1376 %</package>
1377 %\fi
1378 %
1379 %\iffalse
1380 %<*package>
1381 %\fi
1382 % \begin{macro}{\kg}
1383 % |\kg| is a macro for kilograms (kg).
1384 %
1385 % \begin{macrocode}
1386 \DeclareRobustCommand{\kg}{\ensuremath{%
1387 \expandafter\units@separator\mathrm{kg}}}
1388 % \end{macrocode}
1389 % \end{macro}
1390 %\iffalse
1391 %</package>
1392 %\fi
1393 %
1394 %\iffalse
1395 %<*package>
1396 %\fi
1397 % \begin{macro}{\lb}
1398 % |\lb| is a macro for pounds (weight) (lb).
1399 %
1400 % \begin{macrocode}
1401 \DeclareRobustCommand{\lb}{\ensuremath{%
1402 \expandafter\units@separator\mathrm{lb}}}
1403 % \end{macrocode}
1404 % \end{macro}
1405 %\iffalse
1406 %</package>
1407 %\fi
1408 %
1409 %\iffalse
1410 %<*package>
1411 %\fi
1412 % \begin{macro}{\amu}
1413 % |\amu| is a macro for atomic mass units (amu).
1414 %
1415 % \begin{macrocode}
1416 \DeclareRobustCommand{\amu}{\ensuremath{%
1417 \expandafter\units@separator\mathrm{amu}}}
1418 % \end{macrocode}
1419 % \end{macro}
1420 %\iffalse
1421 %</package>
1422 %\fi
1423 %
1424 %
1425 % \subsection{Force}
1426 %
1427 %\iffalse
1428 %<*package>
1429 %\fi
1430 % \begin{macro}{\N}
1431 % |\N| is a macro for Newtons (N).
1432 % This macro accepts an optional argument for a prefix. If no option is
1433 % supplied, no prefix will be prepended.
1434 %
1435 % \begin{macrocode}
1436 \DeclareRobustCommand{\N}[1][ ]{\ensuremath{%
1437 \expandafter\units@separator\mathrm{#1N}}}
1438 % \end{macrocode}
1439 % \end{macro}
1440 %\iffalse
1441 %</package>
1442 %\fi
1443 %
1444 %\iffalse
1445 %<*package>
1446 %\fi
1447 % \begin{macro}{\Newton}
1448 % |\Newton| is a macro for Newtons (N).
1449 % This macro accepts an optional argument for a prefix. If no option is
1450 % supplied, no prefix will be prepended.
1451 %
1452 % \begin{macrocode}
1453 \DeclareRobustCommand{\Newton}[1][ ]{\ensuremath{%
1454 \expandafter\units@separator\mathrm{#1N}}}
1455 % \end{macrocode}
1456 % \end{macro}
1457 %\iffalse
1458 %</package>
1459 %\fi
1460 %
1461 %\iffalse
1462 %<*package>
1463 %\fi
1464 % \begin{macro}{\dyne}
1465 % |\dyne| is a macro for dynes (dyn).
1466 % This macro accepts an optional argument for a prefix. If no option is
1467 % supplied, no prefix will be prepended.
1468 %
1469 % \begin{macrocode}
1470 \DeclareRobustCommand{\dyne}[1][ ]{\ensuremath{%
1471 \expandafter\units@separator\mathrm{#1dyn}}}
1472 % \end{macrocode}
1473 % \end{macro}
1474 %\iffalse
1475 %</package>
1476 %\fi
1477 %
1478 %\iffalse
1479 %<*package>
1480 %\fi
1481 % \begin{macro}{\lbf}
1482 % |\lbf| is a macro for pounds of force (lbf).
1483 %
1484 % \begin{macrocode}
1485 \DeclareRobustCommand{\lbf}{\ensuremath{%
1486 \expandafter\units@separator\mathrm{lbf}}}
1487 % \end{macrocode}
1488 % \end{macro}
1489 %\iffalse
1490 %</package>
1491 %\fi
1492 %
1493 %
1494 % \subsection{Velocity}
1495 %
1496 %\iffalse
1497 %<*package>
1498 %\fi
1499 % \begin{macro}{\kmps}
1500 % |\kmps| is a macro for kilometers per second ($\kmps$).
1501 %
1502 % \begin{macrocode}
1503 \DeclareRobustCommand{\kmps}{\ensuremath{%
1504 \expandafter\units@separator\mathrm{km}%
1505 \expandafter\units@separator\mathrm{s}^{-1}}}
1506 % \end{macrocode}
1507 % \end{macro}
1508 %\iffalse
1509 %</package>
1510 %\fi
1511 %
1512 %\iffalse
1513 %<*package>
1514 %\fi
1515 % \begin{macro}{\kmph}
1516 % |\kmph| is a macro for kilometers per hour ($\kmph$).
1517 %
1518 % \begin{macrocode}
1519 \DeclareRobustCommand{\kmph}{\ensuremath{%
1520 \expandafter\units@separator\mathrm{km}%
1521 \expandafter\units@separator\mathrm{h}^{-1}}}
1522 % \end{macrocode}
1523 % \end{macro}
1524 %\iffalse
1525 %</package>
1526 %\fi
1527 %
1528 %\iffalse
1529 %<*package>
1530 %\fi
1531 % \begin{macro}{\mps}
1532 % |\mps| is a macro for meters per second ($\mps$).
1533 % This macro accepts an optional argument for a prefix. If no option is
1534 % supplied, no prefix will be prepended.
1535 %
1536 % \begin{macrocode}
1537 \DeclareRobustCommand{\mps}[1][ ]{\ensuremath{%
1538 \expandafter\units@separator\mathrm{#1m}%
1539 \expandafter\units@separator\mathrm{s}^{-1}}}
1540 % \end{macrocode}
1541 % \end{macro}
1542 %\iffalse
1543 %</package>
1544 %\fi
1545 %
1546 %\iffalse
1547 %<*package>
1548 %\fi
1549 % \begin{macro}{\miph}
1550 % |\miph| is a macro for miles per hour ($\miph$).
1551 %
1552 % \begin{macrocode}
1553 \DeclareRobustCommand{\miph}{\ensuremath{%
1554 \expandafter\units@separator\mathrm{mi}%
1555 \expandafter\units@separator\mathrm{h}^{-1}}}
1556 % \end{macrocode}
1557 % \end{macro}
1558 %\iffalse
1559 %</package>
1560 %\fi
1561 %
1562 %\iffalse
1563 %<*package>
1564 %\fi
1565 % \begin{macro}{\kts}
1566 % |\kts| is a macro for knots ($\kts$).
1567 %
1568 % \begin{macrocode}
1569 \DeclareRobustCommand{\kts}{\ensuremath{%
1570 \expandafter\units@separator\mathrm{kts}}}
1571 % \end{macrocode}
1572 % \end{macro}
1573 %\iffalse
1574 %</package>
1575 %\fi
1576 %
1577 %
1578 % \subsection{Acceleration}
1579 %
1580 %\iffalse
1581 %<*package>
1582 %\fi
1583 % \begin{macro}{\mpss}
1584 % |\mpss| is a macro for acceleration in meters per second squared ($\mpss$).
1585 % This macro accepts an optional argument for a prefix. If no option is
1586 % supplied, no prefix will be prepended.
1587 %
1588 % \begin{macrocode}
1589
1590 \DeclareRobustCommand{\mpss}[1][ ]{\ensuremath{%
1591 \expandafter\units@separator\mathrm{#1m}%
1592 \expandafter\units@separator\mathrm{s}^{-2}}}
1593 % \end{macrocode}
1594 % \end{macro}
1595 %\iffalse
1596 %</package>
1597 %\fi
1598 %
1599 %\iffalse
1600 %<*package>
1601 %\fi
1602 % \begin{macro}{\gacc}
1603 % |\gacc| is a macro for acceleration due to gravity ($\gacc$).
1604 %
1605 % \begin{macrocode}
1606 \DeclareRobustCommand{\gacc}{\ensuremath{%
1607 \expandafter\units@separator\mathrm{g}}}
1608 % \end{macrocode}
1609 % \end{macro}
1610 %\iffalse
1611 %</package>
1612 %\fi
1613 %
1614 %\iffalse
1615 %<*package>
1616 %\fi
1617 % \begin{macro}{\ftpss}
1618 % |\ftpss| is a macro for acceleration in feet per second squared ($\ftpss$).
1619 %
1620 % \begin{macrocode}
1621 \DeclareRobustCommand{\ftpss}{\ensuremath{%
1622 \expandafter\units@separator\mathrm{ft}%
1623 \expandafter\units@separator\mathrm{s}^{-2}}}
1624 % \end{macrocode}
1625 % \end{macro}
1626 %\iffalse
1627 %</package>
1628 %\fi
1629 %
1630 %
1631 % \subsection{Temperature}
1632 %
1633 %\iffalse
1634 %<*package>
1635 %\fi
1636 % \begin{macro}{\K}
1637 % |\K| is a macro for Kelvin (K).
1638 % This macro accepts an optional argument for a prefix. If no option is
1639 % supplied, no prefix will be prepended.
1640 %
1641 % \begin{macrocode}
1642 \DeclareRobustCommand{\K}[1][ ]{\ensuremath{%
1643 \expandafter\units@separator\mathrm{#1K}}}
1644 % \end{macrocode}
1645 % \end{macro}
1646 %\iffalse
1647 %</package>
1648 %\fi
1649 %
1650 %\iffalse
1651 %<*package>
1652 %\fi
1653 % \begin{macro}{\Kelvin}
1654 % |\Kelvin| is a macro for Kelvin (K).
1655 % This macro accepts an optional argument for a prefix. If no option is
1656 % supplied, no prefix will be prepended.
1657 %
1658 % \begin{macrocode}
1659 \DeclareRobustCommand{\Kelvin}[1][ ]{\ensuremath{%
1660 \expandafter\units@separator\mathrm{#1K}}}
1661 % \end{macrocode}
1662 % \end{macro}
1663 %\iffalse
1664 %</package>
1665 %\fi
1666 %
1667 %\iffalse
1668 %<*package>
1669 %\fi
1670 % \begin{macro}{\Celsius}
1671 % \changes{v1.0.4}{2020/03/26}{had ${}^\circ$ outside of
1672 % ensuremath, causing problems for text mode. It is also more common to typeset
1673 % the $^\circ$ with the unit instead of the number. Corrects both of these
1674 % issues}
1675 % \changes{v1.1.0}{2020/11/02}{corrected spelling of Celsius and added
1676 % duplicate macro with incorrect spelling (``Celcius'')}
1677 % \changes{v1.2.0}{2021/03/26}{Added centigrade}
1678 %
1679 % \begin{macrocode}
1680 \DeclareRobustCommand{\Celsius}{\ensuremath{\expandafter\units@separator{}%
1681 ^\circ\mathrm{C}}}
1682 \DeclareRobustCommand{\Celcius}{\Celsius}
1683 \DeclareRobustCommand{\centigrade}{\Celsius}
1684 % \end{macrocode}
1685 % \end{macro}
1686 %\iffalse
1687 %</package>
1688 %\fi
1689 %
1690 %\iffalse
1691 %<*package>
1692 %\fi
1693 % \begin{macro}{\Rankine}
1694 % \changes{v1.0.4}{2020/03/26}{had ${}^\circ$ outside of
1695 % ensuremath, causing problems for text mode. It is also more common to typeset
1696 % the $^\circ$ with the unit instead of the number. Corrects both of these
1697 % issues}
1698 % |\Rankine| is a macro for degrees Rankine $(\Rankine)$.
1699 %
1700 % \begin{macrocode}
1701 \DeclareRobustCommand{\Rankine}{\ensuremath{%
1702 \expandafter\units@separator{}^\circ\mathrm{R}}}
1703 % \end{macrocode}
1704 % \end{macro}
1705 %\iffalse
1706 %</package>
1707 %\fi
1708 %
1709 %\iffalse
1710 %<*package>
1711 %\fi
1712 % \begin{macro}{\Fahrenheit}
1713 % \changes{v1.0.4}{2020/03/26}{had ${}^\circ$ outside of
1714 % ensuremath, causing problems for text mode. It is also more common to typeset
1715 % the $^\circ$ with the unit instead of the number. Corrects both of these
1716 % issues}
1717 % |\Fahrenheit| is a macro for degrees Fahrenheit $(\Fahrenheit)$.
1718 %
1719 % \begin{macrocode}
1720 \DeclareRobustCommand{\Fahrenheit}{\ensuremath{%
1721 \expandafter\units@separator{}^\circ\mathrm{F}}}
1722 % \end{macrocode}
1723 % \end{macro}
1724 %\iffalse
1725 %</package>
1726 %\fi
1727 %
1728 %
1729 % \subsection{Angular Velocity}
1730 %
1731 %\iffalse
1732 %<*package>
1733 %\fi
1734 % \begin{macro}{\rpm}
1735 % |\rpm| is a macro for revolutions per minute $(\rpm)$.
1736 %
1737 % \begin{macrocode}
1738
1739 \DeclareRobustCommand{\rpm}{\ensuremath{%
1740 \expandafter\units@separator\mathrm{rev}%
1741 \expandafter\units@separator\Min^{-1}}}
1742 % \end{macrocode}
1743 % \end{macro}
1744 %\iffalse
1745 %</package>
1746 %\fi
1747 %
1748 % \subsection{Frequency}
1749 %
1750 %\iffalse
1751 %<*package>
1752 %\fi
1753 % \begin{macro}{\Hz}
1754 % |\Hz| is a macro for Hertz (Hz).
1755 % This macro accepts an optional argument for a prefix. If no option is
1756 % supplied, no prefix will be prepended.
1757 %
1758 % \begin{macrocode}
1759
1760 \DeclareRobustCommand{\Hz}[1][ ]{\ensuremath{%
1761 \expandafter\units@separator\mathrm{#1Hz}}}
1762 % \end{macrocode}
1763 % \end{macro}
1764 %\iffalse
1765 %</package>
1766 %\fi
1767 %
1768 %
1769 % \subsection{Pressure}
1770 %
1771 %\iffalse
1772 %<*package>
1773 %\fi
1774 % \begin{macro}{\barP}
1775 % |\barP| is a macro for bar (bar). (The use of barP instead of just bar is due
1776 % the \LaTeX~command \textbackslash bar.)
1777 % This macro accepts an optional argument for a prefix. If no option is
1778 % supplied, no prefix will be prepended.
1779 %
1780 % \begin{macrocode}
1781 \DeclareRobustCommand{\barP}[1][ ]{\ensuremath{%
1782 \expandafter\units@separator\mathrm{#1bar}}}
1783 % \end{macrocode}
1784 % \end{macro}
1785 %\iffalse
1786 %</package>
1787 %\fi
1788 %
1789 %\iffalse
1790 %<*package>
1791 %\fi
1792 % \begin{macro}{\atm}
1793 % |\atm| is a macro for atmosphere (atm).
1794 %
1795 % \begin{macrocode}
1796 \DeclareRobustCommand{\atm}{\ensuremath{%
1797 \expandafter\units@separator\mathrm{atm}}}
1798 % \end{macrocode}
1799 % \end{macro}
1800 %\iffalse
1801 %</package>
1802 %\fi
1803 %
1804 %\iffalse
1805 %<*package>
1806 %\fi
1807 % \begin{macro}{\Pa}
1808 % |\Pa| is a macro for Pascals (Pa).
1809 % This macro accepts an optional argument for a prefix. If no option is
1810 % supplied, no prefix will be prepended.
1811 %
1812 % \begin{macrocode}
1813 \DeclareRobustCommand{\Pa}[1][ ]{\ensuremath{%
1814 \expandafter\units@separator\mathrm{#1Pa}}}
1815 % \end{macrocode}
1816 % \end{macro}
1817 %\iffalse
1818 %</package>
1819 %\fi
1820 %
1821 %\iffalse
1822 %<*package>
1823 %\fi
1824 % \begin{macro}{\mmHg}
1825 % |\mmHg| is a macro for millimeters of mercury (mmHg).
1826 %
1827 % \begin{macrocode}
1828 \DeclareRobustCommand{\mmHg}{\ensuremath{%
1829 \expandafter\units@separator\mathrm{mmHg}}}
1830 % \end{macrocode}
1831 % \end{macro}
1832 %\iffalse
1833 %</package>
1834 %\fi
1835 %
1836 %\iffalse
1837 %<*package>
1838 %\fi
1839 % \begin{macro}{\inHg}
1840 % |\inHg| is a macro for inches of mercury (inHg).
1841 %
1842 % \begin{macrocode}
1843 \DeclareRobustCommand{\inHg}{\ensuremath{%
1844 \expandafter\units@separator\mathrm{inHg}}}
1845 % \end{macrocode}
1846 % \end{macro}
1847 %\iffalse
1848 %</package>
1849 %\fi
1850 %
1851 %\iffalse
1852 %<*package>
1853 %\fi
1854 % \begin{macro}{\lbsi}
1855 % |\lbsi| is a macro for pounds per square inch (psi). (Note that \textbackslash
1856 % psi is a latex command for the greek letter $\psi$).
1857 %
1858 % \begin{macrocode}
1859 \DeclareRobustCommand{\lbsi}{\ensuremath{%
1860 \expandafter\units@separator\mathrm{psi}}}
1861 % \end{macrocode}
1862 % \end{macro}
1863 %\iffalse
1864 %</package>
1865 %\fi
1866 %
1867 %\iffalse
1868 %<*package>
1869 %\fi
1870 % \begin{macro}{\lbsf}
1871 % |\lbsf| is a macro for pounds per square foot (psf).
1872 %
1873 % \begin{macrocode}
1874 \DeclareRobustCommand{\lbsf}{\ensuremath{%
1875 \expandafter\units@separator\mathrm{psf}}}
1876 % \end{macrocode}
1877 % \end{macro}
1878 %\iffalse
1879 %</package>
1880 %\fi
1881 %
1882 %\iffalse
1883 %<*package>
1884 %\fi
1885 % \begin{macro}{\Ba}
1886 % |\Ba| is a macro for Barre (Ba).
1887 % This macro accepts an optional argument for a prefix. If no option is
1888 % supplied, no prefix will be prepended.
1889 %
1890 % \begin{macrocode}
1891 \DeclareRobustCommand{\Ba}[1][ ]{\ensuremath{%
1892 \expandafter\units@separator\mathrm{#1Ba}}}
1893 % \end{macrocode}
1894 % \end{macro}
1895 %\iffalse
1896 %</package>
1897 %\fi
1898 %
1899 %\iffalse
1900 %<*package>
1901 %\fi
1902 % \begin{macro}{\Torr}
1903 % |\Torr| is a macro for Torr (Torr).
1904 % This macro accepts an optional argument for a prefix. If no option is
1905 % supplied, no prefix will be prepended.
1906 %
1907 % \begin{macrocode}
1908 \DeclareRobustCommand{\Torr}[1][ ]{\ensuremath{%
1909 \expandafter\units@separator\mathrm{#1Torr}}}
1910 % \end{macrocode}
1911 % \end{macro}
1912 %\iffalse
1913 %</package>
1914 %\fi
1915 %
1916 %
1917 % \subsection{Other}
1918 %
1919 %\iffalse
1920 %<*package>
1921 %\fi
1922 % \begin{macro}{\mol}
1923 % |\mol| is a macro for moles (mol).
1924 %
1925 % \begin{macrocode}
1926 \DeclareRobustCommand{\mol}{\ensuremath{%
1927 \expandafter\units@separator\mathrm{mol}}}
1928 % \end{macrocode}
1929 % \end{macro}
1930 %\iffalse
1931 %</package>
1932 %\fi
1933 %
1934 \makeatother
1935
1936 %
1937 % \Finale
1938 %