The »bohr« package

Sometimes things go fast. This weekend a question on TeX.sx popped about how to create Bohr models with LaTeX. Soon some very nice answers were given but I had a feeling that a more generic approach would be nice. I decided to answer the question myself. Since the code got a little longer I put it into a package for convenience but soon after thought it might also be useful for others. So, here it is.

\documentclass{article}
\usepackage{bohr}
\begin{document}

\bohr{11}{Na}
\bohr{28}{Ni}

\setbohr{name-options-set={font=\footnotesize\sffamily}}
\bohr{18}{Ar}
\bohr{2}{He}
\bohr{7}{F
}% damn, that should have been N...

\bohr[3]{10}{$\mathrm{Na^+}$}

\end{document
}