Scheikunde

Reactiepijlen, isotopen, bindingen en toestandssymbolen.

Chemistry symbols in LaTeX: reaction arrows, equilibrium and formulas

For chemistry symbols in LaTeX, the mhchem package does most of the work: \ce{2H2 + O2 -> 2H2O} typesets a whole reaction with upright element symbols, subscripts and a yields arrow. Without mhchem, the yields arrow is \rightarrow, the equilibrium symbol is \rightleftharpoons, and formulas are written as \mathrm{H_2O} in math mode so the element letters stay upright. Reaction conditions go over a stretchy arrow with \xrightarrow{\Delta} from amsmath. The table lists the chemistry symbols people use most, with the package each one needs; the full list follows below.

Quick reference: reactions, arrows and formulas

SymbolCommandUsePackageCopy
2H2+O2→2H2O2\mathrm{H_2} + \mathrm{O_2} \rightarrow 2\mathrm{H_2O}
\ce{2H2 + O2 -> 2H2O}Whole reactionmhchem
A⇌B\mathrm{A} \rightleftharpoons \mathrm{B}
\ce{A <=> B}Equilibrium in mhchemmhchem
→\rightarrow
\rightarrowYields (reaction arrow)built in
⇌\rightleftharpoons
\rightleftharpoonsEquilibrium symbol (harpoons)built in
→Δ\xrightarrow{\Delta}
\xrightarrow{\Delta}Arrow with heat or conditions aboveamsmath
H2O\mathrm{H_2O}
\mathrm{H_2O}Chemical formula in math modebuilt in
Na+\mathrm{Na^+}
\mathrm{Na^+}Ion chargebuilt in
614C{}^{14}_{6}\mathrm{C}
{}^{14}_{6}\mathrm{C}Isotope (mass and atomic number)built in
ΔH∘\Delta H^\circ
\Delta H^\circStandard enthalpy changebuilt in
↑\uparrow
\uparrowGas evolvedbuilt in
↓\downarrow
\downarrowPrecipitatebuilt in
HC≡CH\mathrm{HC{\equiv}CH}
\ce{HC#CH}Triple bond (= for a double bond)mhchem

Writing reactions with mhchem

Load mhchem with version 4. Inside \ce, -> is the yields arrow, <=> the equilibrium arrow, numbers after an element become subscripts, ^ sets a charge, and a lone ^ or v after a species marks a gas or a precipitate. Text in square brackets after an arrow goes above it:

\usepackage[version=4]{mhchem}

\ce{CaCO3 ->[\Delta] CaO + CO2 ^}

Frequently asked questions about chemistry in LaTeX

How do I write the yields arrow in LaTeX?
In math mode the yields arrow is \rightarrow, or \longrightarrow for a longer one. With mhchem, type -> inside \ce{...}, for example \ce{A + B -> C}. To print conditions above the arrow use \xrightarrow{\Delta} from amsmath, or ->[\Delta] inside \ce.
How do I write the equilibrium symbol in LaTeX?
The equilibrium symbol ⇌ is \rightleftharpoons, which is built in: $\mathrm{N_2} + 3\mathrm{H_2} \rightleftharpoons 2\mathrm{NH_3}$. In mhchem write <=> inside \ce{...}; it also offers <=>> and <<=> for equilibria that lie to the right or to the left.
How do I write chemical formulas with subscripts in LaTeX?
Use \ce{H2SO4} from mhchem, which sets the digits as subscripts and keeps the letters upright. Without mhchem, write \mathrm{H_2SO_4} in math mode; plain H_2SO_4 would set the letters in italics like variables.
⇌\rightleftharpoons

Equilibrium Arrow

\rightleftharpoons
⇆\leftrightarrows

Reversible Reaction

\leftrightarrows
→\rightarrow

Right Arrow

\rightarrow
⟶\longrightarrow

Yields

\longrightarrow
↑\uparrow
↓\downarrow
614C{}^{14}_{6}\text{C}

Isotope

{}^{14}_{6}\text{C}
Na+\text{Na}^{+}

Superscript Charge

\text{Na}^{+}
H2O\text{H}_2\text{O}

Subscript Count

\text{H}_2\text{O}
Δ\Delta
∘^{\circ}

Degree

^{\circ}
∘C^{\circ}\text{C}

Celsius

^{\circ}\text{C}
C−C\text{C}-\text{C}

Bond

\text{C}-\text{C}
C=C\text{C}=\text{C}

Double Bond

\text{C}=\text{C}
C≡C\text{C}\equiv\text{C}

Triple Bond

\text{C}\equiv\text{C}
δ+\delta^{+}

Partial Charge

\delta^{+}
e−e^{-}
(aq)\text{(aq)}

Aqueous

\text{(aq)}
(s)\text{(s)}

Solid

\text{(s)}
(l)\text{(l)}

Liquid

\text{(l)}
(g)\text{(g)}

Gas

\text{(g)}