Skip to content
§13.1

Chemical Molecules

A chemical formula or structure—how is it encoded?

✅ NormativeSettled. The requirement holds as written.📄 Page ruleCan be applied from the page alone.Read §13.1 in the RFC ↗

The requirement

Linear formulae, ions and reactions MUST be written with \ce{...}, and drawn structures, rings and branches with \chemfig{...}. Standalone chemical markup MUST be placed in a fenced latex block. Legible structure MUST be preserved; an unreadable portion MUST be described rather than guessed.

When it applies

Structural formulae and reaction equations printed as figures.

chemical-molecule.png

A structural formula printed as a figure — exactly the case a prose description cannot reconstruct.

Reading the examples. Each one pairs a source page with the output the rule expects. ✅ Sample: the rule applies. ❌ Counter-sample: it looks like it applies and does not, or a rendering got it wrong. A non-conforming output, in red, is shown only for contrast. … marks content left out of an excerpt.

The point, in a small example

Compare a linear reaction, a ring and stereochemical bonds. Each source was rendered from the complete displayed mhchem or chemfig encoding. These pages are made up to isolate the rule.

01

✅ SampleConstructedThe rule applies

A printed reaction keeps coefficients and its arrow

Use mhchem for a linear reaction. Preserve the printed coefficients and arrow; do not replace the reaction with its name or add conditions that are not printed.

Source page
Chemical Molecules — A printed reaction keeps coefficients and its arrow. Source page.
Expected output
Markdown
```latex
\ce{2H2 + O2 -> 2H2O}
```
Chemical Molecules · Source page

A printed reaction keeps coefficients and its arrow

Chemical Molecules — A printed reaction keeps coefficients and its arrow. Source page.
02

✅ SampleConstructedThe rule applies

A ring needs its bond pattern

The six-membered ring has three alternating double bonds. A formula such as C6H6 alone would discard the drawn structure. This is a complete chemfig encoding of the shown ring.

Source page
Chemical Molecules — A ring needs its bond pattern. Source page.
Expected output
Markdown
```latex
\chemfig{*6(-=-=-=)}
```
Chemical Molecules · Source page

A ring needs its bond pattern

Chemical Molecules — A ring needs its bond pattern. Source page.
03

✅ SampleConstructedThe rule applies

Solid and hashed wedges must survive

Preserve the solid wedge to F, hashed wedge to Br and ordinary bonds to H and Cl. Do not flatten them to four identical bonds or infer an R/S name not printed on the source.

Source page
Chemical Molecules — Solid and hashed wedges must survive. Source page.
Expected output
Markdown
```latex
\chemfig{C(-[:180]H)(-[:0]Cl)(<[:90]F)(<:[:270]Br)}
```
Chemical Molecules · Source page

Solid and hashed wedges must survive

Chemical Molecules — Solid and hashed wedges must survive. Source page.

Which markup

The markup follows what is printed:

Printed Markup Examples
A formula, ion or reaction written on a line mhchem — \ce{...} \ce{SO4^2-}, \ce{2H2 + O2 -> 2H2O}
A 2D molecular structure: rings, branches, drawn bonds chemfig — \chemfig{...} a ring with its substituents

Why a code representation rather than a description

A structural formula is exactly reconstructable — unlike a photograph, it has a canonical textual encoding that a chemist or a downstream tool can render back to the same picture. A prose description ("a benzene ring with a hydroxyl group") is lossy and unverifiable, and it silently discards stereochemistry, charges and substituent positions. A legible structure therefore MUST NOT be rendered as prose.

The same reasoning governs Electrical Schematics (§12.2.3) and Blueprints (§12.2.1): a domain-specific code block is preferred wherever a faithful one exists.

Placement and unreadable structures

  • A formula standing on its own — a displayed structure or reaction — MUST be in a fenced latex block.
  • Every legible atom, bond, charge and substituent MUST be kept (never drop).
  • Where part of a structure cannot be read, that part MUST be described in words, and the output MUST NOT fill it in with a plausible guess (never invent).

More

Rule id other-chemical-molecules · other rule images diagrams math