Skip to content

Examples

Real chemistry, real AsciiChem. Each example shows the source, the model, and the rendered MathML.

H_2O
H 2 O
CuSO_4 · 5H_2O
Cu S O 4 · 5H_2O
^14C
C 14
^131I
I 131
^238U
U 238

Carbon-14 for radiodating, iodine-131 for medical imaging, uranium-238 for the decay series.

[Fe(CN)_6]^4-
[ Fe ( C N ) 6 ] ^4-
[Co(NH_3)_6]^3+
Install the asciichem gem to see this rendered.
HAc <=> Ac^- + H^+
H Ac Ac - + H +

For the K_a expression, see embedded math.

2Na + Cl_2 -> 2NaCl
2 Na + Cl 2 2 Na Cl
MnO_4^- + 8H^+ + 5e^- -> Mn^2+ + 4H_2O
Install the asciichem gem to see this rendered.
CH_4 + 2O_2 -> CO_2 + 2H_2O
C H 4 + 2 O 2 C O 2 + 2 H 2 O
CH_2=CH_2
C H 2 = C H 2
1s^2 2s^2 2p^6 3s^2 3p^6 4s^2 3d^10
1s^2 2s^2 2p^6 3s^2 3p^6 4s^2 3d^10

Ground state of zinc.

N_2 + 3H_2 <=>[Fe][400°C] 2NH_3
N 2 + 3 H 2 Fe 400°C 2 N H 3
2SO_2 + O_2 <=>[V_2O_5] 2SO_3
2 S O 2 + O 2 V 2 O 5 2 S O 3

The Haber process and the contact process — both with catalysts and conditions on the equilibrium arrow.

Every example on this page round-trips through the parser. Verify locally:

Terminal window
bundle exec asciichem roundtrip -i "N_2 + 3H_2 <=>[Fe][400°C] 2NH_3"