Writing chemical formulae
Chemical formulae and equations have a different style compared to mathematical formulae and equations. For example:
- Letters mean atomic symbols and are written upright, unlike italic math variables
- Numbers are commonly used in subscripts, indicating the number of atoms
- We use a lot of subscripts and superscripts, and they should be aligned properly
- We need also left subscripts and superscripts
- We need special symbols such as for bonds and arrows for chemical equations
With basic LaTeX, it's hard to achieve all of this. Let's find a better way.
How to do it...
We will use the chemformula
package. We will boldly go ahead and type some chemical stuff to see how it works. The LaTeX output will follow, so you may look ahead line by line if you like. Let's start:
- Begin with a document class of your choice, such as
scrartcl
of KOMA-Script:\documentclass{scrartcl}
- Load the
chemformula
package:\usepackage{chemformula}
- Start the document:
\begin{document}
- We begin with...