Skip to content

Reactions

A reaction has reactants, an arrow, and products. Conditions sit in bracketed groups immediately after the arrow.

ArrowKindUse
->:forwardNet forward reaction
<-:reverseNet reverse reaction
<=>:equilibriumEquilibrium (Haber, acid/base)
<->:resonanceResonance structures
2H_2 + O_2 -> 2H_2O
2 H 2 + O 2 2 H 2 O
HCl + NaOH -> NaCl + H_2O
H Cl + Na O H Na Cl + H 2 O
CH_4 + 2O_2 -> CO_2 + 2H_2O
C H 4 + 2 O 2 C O 2 + 2 H 2 O

Reactants and products are each a +-separated list of molecules. The + operators are stripped from the model; the renderer reinserts them.

The Haber process — nitrogen and hydrogen over an iron catalyst at elevated temperature:

N_2 + 3H_2 <=>[Fe][400°C] 2NH_3
N 2 + 3 H 2 Fe 400°C 2 N H 3

The first bracketed group [Fe] is the above condition (catalyst). The second bracketed group [400°C] is the below condition (temperature). Both are captured as Reaction#conditions.

The MathML renderer emits the arrow as an <munderover>:

<munderover>
<mo></mo>
<mtext>Fe</mtext>
<mtext>400°C</mtext>
</munderover>

Only the above condition:

A <=>[H_2O] B
A H 2 O B

Only the below:

A <=>[Δ] B
A Δ B

(Use the second form when the condition is energy/heat, by convention placed below the arrow.)

Ag^+ + Cl^- -> AgCl
Ag + + Cl - Ag Cl

Ions on either side are full Molecule instances with their charge captured on the relevant atom. Round-trip is exact.

  • Reversible resonance is supported; tautomerism arrows are not.
  • Multi-step reactions (chained arrows) require explicit Reaction nodes per step.
  • Rates and stoichiometry validation are out of scope for the parser — a separate linter pass can verify balancing.