Common formulae
Every block on this page is rendered at build time by invoking the
asciichem gem. Source on the left; MathML output on the right. If you
view the page source, you’ll see the same is what you’d type.
Water and simple molecules
Section titled “Water and simple molecules”
Source
Rendered
H_2O
CO_2
NaCl
CH_4
Install the
asciichem gem to see this rendered.
Acids and bases
Section titled “Acids and bases”
Source
Rendered
HCl
H_2SO_4
HNO_3
H_3PO_4
NaOH
Ca(OH)_2
Install the
asciichem gem to see this rendered.
Ionic compounds
Section titled “Ionic compounds”
Source
Rendered
Na^+
Cl^-
SO_4^2-
NO_3^-
Ca^2+
Install the
asciichem gem to see this rendered.
Isotopes — the headline semantic fix
Section titled “Isotopes — the headline semantic fix”
Source
Rendered
^14C
^131I
^238U
^3H
Install the
asciichem gem to see this rendered.
The prefix isotope binds to the atom. See Atoms for the full story.
Coordination complexes
Section titled “Coordination complexes”
Source
Rendered
[Fe(CN)_6]
[Fe(CN)_6]_3
[PtCl_4]
Install the
asciichem gem to see this rendered.
Stoichiometric coefficients
Section titled “Stoichiometric coefficients”
Source
Rendered
2H_2O
3H_2
C_6H_12O_6
Install the
asciichem gem to see this rendered.
Reactions
Section titled “Reactions”
Source
Rendered
2H_2 + O_2 -> 2H_2O
N_2 + 3H_2 <=>[Fe][400°C] 2NH_3
CH_4 + 2O_2 -> CO_2 + 2H_2O
Install the
asciichem gem to see this rendered.
Bonds in linear notation
Section titled “Bonds in linear notation”
Source
Rendered
H-O-H
H_2C=CH_2
HC#CH
Install the
asciichem gem to see this rendered.
Electron configurations
Section titled “Electron configurations”
Source
Rendered
1s^2 2s^2 2p^6
1s^2 2s^2 2p^6 3s^2 3p^6 4s^2 3d^10
Install the
asciichem gem to see this rendered.
Verify locally
Section titled “Verify locally”gem install asciichemasciichem convert -i "2H_2 + O_2 -> 2H_2O" -t mathmlasciichem convert -i "2H_2 + O_2 -> 2H_2O" -t latexasciichem roundtrip -i "2H_2 + O_2 -> 2H_2O"