Representing atoms

Now that we can draw molecules, how about digging deeper? Can we draw atoms? Sure!

How to do it...

We will use a package named after the famous physicist Niels Bohr. That's bohr.

  1. Start with a document class.
    \documentclass{article}
  2. Load the bohr package:
    \usepackage{bohr}
  3. Start the document:
    \begin{document}
  4. Use the command \bohr{number of electrons}{element name}, for Fluorine:
    \bohr{10}{F}
  5. We can modify the nucleus radius this way:
    \setbohr{nucleus-radius=1.5em}
  6. Now we have more space in the center for an ion symbol. This time we use the command with an optional argument for the number of electron shells since we need an empty one. We need to do that in square brackets. We will display a Sodium ion:
    \bohr[3]{10}{$\mathrm{Na^+}$}
  7. That's all ...

Get LaTeX Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.