%***************************************************************************
% units.tex - provide SI units compatible with SIunits.sty
% -------------------
% begin : Sun Dec 2 2001
% copyright : (C) 2001 by Jan Rheinlaender
% email : jrheinlaender@gmx.de
% ***************************************************************************/
%***************************************************************************
% * *
% * This program is free software; you can redistribute it and/or modify *
% * it under the terms of the GNU General Public License as published by *
% * the Free Software Foundation; either version 2 of the License, or *
% * (at your option) any later version. *
% * *
% ***************************************************************************/
%Note on the use of \defunit
%By default, \defunit{<name>}{<definition} creates a Latex macro for <name> which simply
%substitutes the <name> with the <definition>. The asterix form \defunit* omits this definition.
%This is useful in two cases:
%1. The macro <name> already exists, as is the case with the units in SIunits.sty
%2. The printed unit should look different to the definition, as is the case with abbreviations and
% completely new units (although the latter case is not encouraged :-))
%For examples, see the abbreviations section below
%Note: Be sure to use exact numbers (not floating-point numbers) whenever possible in defining units
%For example: \defunit{\mm}{10^{-3}\m} is better than \defunit{\mm}{0.001\m}
%Switch language to english to avoid error message "invalid decimal marker"
\eqcoptions{save = lang; lang = "english"}
%------------------ short forms of the base units --------------------------
\defunit{\m}{\metre}
\defunit{\kg}{\kilogram}
\defunit{\s}{\second}
\defunit{\A}{\ampere}
\defunit{\K}{\kelvin}
\defunit{\mol}{\mole}
\defunit{\cd}{\candela}
%------------------SI Prefixes --------------------------------------------
\defunit*{\yotta}{10^{24}}
\defunit*{\zetta}{10^{21}}
\defunit*{\exa}{10^{18}}
\defunit*{\peta}{10^{15}}
\defunit*{\tera}{10^{12}}
\defunit*{\giga}{10^{9}}
\defunit*{\mega}{10^{6}}
\defunit*{\kilo}{10^{3}}
\defunit*{\hecto}{10^{2}}
\defunit*{\deka}{10}
\defunit*{\deca}{10}
\defunit*{\deci}{10^{-1}}
\defunit*{\centi}{10^{-2}}
\defunit*{\milli}{10^{-3}}
\defunit*{\micro}{10^{-6}}
\defunit*{\nano}{10^{-9}}
\defunit*{\pico}{10^{-12}}
\defunit*{\femto}{10^{-15}}
\defunit*{\atto}{10^{-18}}
\defunit*{\zepto}{10^{-21}}
\defunit*{\yocto}{10^{-24}}
%----------- SI derived units with special names and symbols --------------
\defunit*{\radian}{\m\usk\m^{-1}}
\defunit[rad]{\rad}{\radian}
\defunit*{\steradian}{\m^2\usk\m^{-2}}
\defunit{\sr}{\steradian}
\defunit*{\hertz}{\s^{-1}}
\defunit{\Hz}{\hertz}
\defunit*{\newton}{\frac{\kg\usk\m}{\s^2}}
\defunit{\N}{\newton}
\defunit*{\pascal}{\m^{-1}\kg\s^{-2}}
\defunit{\Pa}{\pascal}
\defunit*{\joule}{\m^2\usk\kg\usk\s^{-2}}
\defunit{\J}{\joule}
\defunit*{\watt}{\m^2\usk\kg\usk\s^{-3}}
\defunit{\W}{\watt}
\defunit*{\coulomb}{\A\usk\s}
\defunit{\C}{\coulomb}
\defunit*{\volt}{\m^2\usk\kg\usk\s^{-3}\usk\A^{-1}}
\defunit{\V}{\volt}
\defunit*{\farad}{\m^{-2}\usk\kg^{-1}\usk\s^4\usk\A^2}
\defunit{\F}{\farad}
\defunit*{\ohm}{\m^2\usk\kg\usk\s^{-3}\usk\A^{-2}}
%we can't define \Omega because that's already a Latex macro
\defunit*{\siemens}{\m^{-2}\usk\kg^{-1}\usk\s^3\usk\A^2}
\defunit{\S}{\siemens}
\defunit*{\weber}{\m^2\usk\kg\usk\s^{-2}\usk\A^{-1}}
\defunit{\Wb}{\weber}
\defunit*{\tesla}{\kg\usk\s^{-2}\usk\A^{-1}}
\defunit{\T}{\tesla}
\defunit*{\henry}{\m^2\usk\kg\usk\s^{-2}\usk\A^{-2}}
\defunit{\H}{\henry}
%\celsius is already defined in the code
\defunit*{\degreecelsius}{\celsius}
\defunit*{\lumen}{\cd\usk\m^2\usk\m^{-2}}
\defunit{\lm}{\lumen}
\defunit*{\lux}{\cd\usk\m^2\usk\m^{-4}}
\defunit{\lx}{\lux}
\defunit*{\becquerel}{\s^{-1}}
\defunit{\Bq}{\becquerel}
\defunit*{\gray}{\m^2\usk\s^{-2}}
\defunit{\Gy}{\gray}
\defunit*{\sievert}{\m^2\usk\s^{-2}}
\defunit{\Sv}{\sievert}
% --------------- Decimal values of prefixes ---------------------------
\defunit*{\yottad}{\yotta}
\defunit*{\zettad}{\zetta}
\defunit*{\exad}{\exa}
\defunit*{\petad}{\peta}
\defunit*{\terad}{\tera}
\defunit*{\gigad}{\giga}
\defunit*{\megad}{\mega}
\defunit*{\kilod}{\kilo}
\defunit*{\hectod}{\hecto}
\defunit*{\dekad}{\deka}
\defunit*{\decad}{\deca}
\defunit*{\decid}{\deci}
\defunit*{\centid}{\centi}
\defunit*{\millid}{\milli}
\defunit*{\microd}{\micro}
\defunit*{\nanod}{\nano}
\defunit*{\picod}{\pico}
\defunit*{\femtod}{\femto}
\defunit*{\attod}{\atto}
\defunit*{\zeptod}{\zepto}
\defunit*{\yoctod}{\yocto}
%--------------------units outside the SI ----------------------------------
%units accepted for use with the SI
\defunit*{\minute}{\unit{60}{\s}}
\defunit{\min}{\minute}
\defunit*{\hour}{\unit{60}{\min}}
\defunit{\h}{\hour}
\defunit*{\dday}{\unit{24}{\h}}
\defunit{\d}{\dday}
\defunit*{\degree}{\unit{\pi/180}{\rad}}
\defunit*{\paminute}{\unit{1/60}{\degree}}
\defunit*{\pasecond}{\unit{1/60}{\paminute}}
\defunit*{\litre}{\unit{10^{-3}}{\cubic{\m}}}
%liter is no SI unit but an US spelling
%\defunit{\l}{\litre} % removed in 1.4.3 because of clash with LaTeX diacritical symbol \l
%\defunit{\L}{\litre} % ditto
\defunit*{\tonne}{\unit{10^3}{\kg}}
\defunit*{\ton}{\tonne}
\defunit{\t}{\tonne}
\defunit*{\electronvolt}{\unit{1.60217733\cdot 10^{-19}}{\J}}
\defunit*{\atomicmass}{\unit{1.6605402\cdot 10^{-27}}{\kg}}
\defunit{\u}{\atomicmass}
\defunit*{\gram}{\unit{10^{-3}}{\kg}}
%units temporarily accepted for use with the SI
\defunit*{\angstrom}{\unit{10^{-10}}{\m}}
\defunit[nauticalmile]{\nauticalmile}{\unit{1852}{\m}}
\defunit[knot]{\knot}{\frac{\nauticalmile}{\hour}}
\defunit*{\are}{\unit{10^2}{\square{\m}}}
\defunit*{\hectare}{\unit{10^4}{\square{\m}}}
\defunit*{\barn}{\unit{10^{-28}}{\m^2}}
\defunit*{\bbar}{\unit{10^5}{\Pa}}
\defunit*{\gal}{\unit{10^{-2}}{\m\usk\square{\s}}}
\defunit*{\curie}{\unit{3.7\cdot 10^{10}}{\Bq}}
\defunit*{\roentgen}{\unit{2.58\cdot 10^{-4}}{\C\usk\s^{-1}}}
\defunit[rd]{\rd}{\unit{10^{-2}}{\Gy}} %to avoid confusion with angular unit rad
\defunit*{\rem}{\unit{10^{-2}}{\Sv}}
%------------------- useful abbreviations ----------------------------------
\defunit{\mm}{\milli\metre}
\defunit{\cm}{\centi\metre}
\defunit{\sqmm}{\square{\mm}}
\defunit{\Nm}{\N\usk\m}
\defunit{\Nosqmm}{{\ensuremath{\frac{\N}{\sqmm}}}}%added \ensuremaths in 0.4
\defunit[\%]{\percent}{1/100}%added in 0.5
\defunit{\kW}{\kilo\watt}
\defunit{\kWh}{\kilo\watt \hour}
\defunit{\kN}{\kilo\newton}
%------------------- US and British units ----------------------------------
\defunit[RPM]{\rpm}{\frac{1}{\min}}
\defunit[HP]{\hp}{\unit{745.72}{\W}}
\defunit[ft]{\ft}{\unit{0.3048}{\m}}
\eqcoptions{restore = lang}