% siunit.sty
% from http://www.jokr.de/stefan/
% File created by Stefan Krause -- version 1.2.
% Defines commands for typesetting SI units.
% You may access
%  \Ohm
%  \micro
%  \cxul{}
%  \siunit{}
%  \siunit*{}
%  \siunitcramped{}
%  \siunitcramped*{}
%  \sifracunit{}{}
%  \sifracunit*{}{}
% from this document.
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{siunit}[2016/03/14]
\RequirePackage{amsmath,mathtools,textcomp}
\newcommand{\Ohm}{\textohm}
\newcommand{\micro}{\textmu}
\newcommand{\cxul}[1]{\mathrlap{\underline{\protect\phantom{#1}\hspace{-0.16em}}}#1}
\newcommand{\siunit}{\@ifstar{\@siunitnospace}{~\@siunitnospace}}
\newcommand{\siunitcramped}{\@ifstar{\@siunitcrampednospace}{~\@siunitcrampednospace}}
\newcommand{\@siunitnospace}[1]{\ifmmode\text{\@siunitintext{#1}}\else\@siunitintext{#1}\fi}
\newcommand{\@siunitcrampednospace}[1]{\ifmmode\text{\@siunitcrampedintext{#1}}\else\@siunitcrampedintext{#1}\fi}
\newcommand{\@siunitintext}[1]{{\def\^##1{${}^{##1}$}\textup{#1}}}
\newcommand{\@siunitcrampedintext}[1]{{\def\^##1{$\cramped{{}^{##1}}$}\textup{#1}}}
\newcommand{\sifracunit}{\@ifstar{\@sifracunitnospace}{~\@sifracunitnospace}}
\newcommand{\@sifracunitnospace}[2]{\ifmmode\frac{\siunit*{#1}}{\siunitcramped*{#2}}\else%
 $\frac{\siunit*{#1}}{\siunitcramped*{#2}}$\fi}
