Skip to content

Examples

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

Source Rendered
H_2O CuSO_4
H 2 O Cu S O 4

(Hydrate notation — the middle-dot separator — is not yet in the grammar; carry the water of crystallisation as a separate term or an annotation.)

Source Rendered
^14C ^131I ^238U
C 14 I 131 U 238

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

Source Rendered
[Fe(CN)_6] [Fe(CN)_6]_3
[ Fe ( C N ) 6 ] [ Fe ( C N ) 6 ] 3

(Charges outside a bracket group don’t parse in v1 — see Molecules.)

Source Rendered
HAc <=> Ac^- + H^+
H Ac ⇌ Ac - + H +

For the K_a expression, see embedded math.

Source Rendered
2Na + Cl_2 -> 2NaCl MnO_4^- + 8H^+ -> Mn^2+ + 4H_2O
2 Na + Cl 2 → 2 Na Cl Mn O 4 - + 8 H + → Mn 2 + + 4 H 2 O

(Electrons as e^- are not yet in the grammar — no pseudo-element for the electron; balance the half-reaction without it or carry the electron count in prose.)

Source Rendered
CH_4 + 2O_2 -> CO_2 + 2H_2O CH_2=CH_2
C H 4 + 2 O 2 → C O 2 + 2 H 2 O C H 2 = C H 2
Source Rendered
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.

Source Rendered
N_2 + 3H_2 <=>[Fe][400°C] 2NH_3 2SO_2 + O_2 <=>[V_2O_5] 2SO_3
N 2 + 3 H 2 ⇌ Fe 400°C 2 N H 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"
Play