\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{textisotope}
   [2012/11/14 v0.1 for type setting isotopes in text mode]
\newcommand{\isotopestyle}{\rm}
\newcommand{\isotope@atomicnumber}{}
\newcommand{\isotope@nuclearnumber}{}
\newcommand{\isotope}[1][]{%
  \begingroup%
  \renewcommand{\isotope@nuclearnumber}{#1}%
  \isotope@two}%
\newcommand{\isotope@two}[2][]{%
  \renewcommand{\isotope@atomicnumber}{#1}%
  {\settowidth\@tempdimb{\textsuperscript{\isotope@nuclearnumber}}%
  \settowidth\@tempdimc{\textsubscript{\isotope@atomicnumber}}%
  \ifdim\@tempdimb<\@tempdimc\@tempdimb=\@tempdimc\fi%
  \makebox[\@tempdimb][r]{\textsuperscript{\isotope@nuclearnumber}}%
  \hspace{-\@tempdimb}%
  \makebox[\@tempdimb][r]{\textsubscript{\isotope@atomicnumber}}%
    \isotopestyle#2%
  }%
  \endgroup%
}%
\endinput


