Basic ChemTeX codes

Use the following ChemTeX codes when editing or creating chemical formula or expression answers. ChemTeX is a subset of TeX. While some variations on the codes below may work, use these basic codes to optimize the performance of your content.

ClosedTo enter ChemTeX for chemical expressions in the Simple Editor

Sample ChemTeX answer strings with rendered forms

Answer attribute Examples ChemTeX code
Dot

Ni(NO subscript 3)subscript 2 times 6H subscript 2 O

\cdot
Fraction

a series of 3 fractions as follows: 1 over 2, 3 over 2, 5 over 6

\frac {top}{bottom}
Reaction symbols
Forward reaction forward reaction arrow \rightarrow
Equilibrium reaction

equilibrium arrow

\rightleftharpoons
Stacked super/subscript isotope notation

stacked superscript 83 subscript 36 Kr

stacked superscript 222 subscript 86 Rn

{^{super}_{sub}} or
{_{sub}^{super}}

Single-digit super/subscripts do not need to be enclosed in a set of {}.

Subscript H subscript 2 O

C subscript 6 H subscript 12

_{sub} or _s

Single-digit subscripts do not need to be enclosed in a set of {}.

Superscripts
Pre-superscript only (isotope notation) superscript 137 Cs

superscript 228 Ra

{^{super}} or {^s}

The entire superscript expression must be enclosed in {}. Single-digit superscripts do not need to be enclosed in an extra set of {}.

Ion notation

Single atoms, like: O superscript 2-

Molecules, like: H subscript 3 O superscript +

{^{super}} or {^s}

The entire superscript expression must be enclosed in {}. Single-digit superscripts do not need to be enclosed in an extra set of {}.

Molecules ending with a subscript, like:

SO subscript 4-

CO subscript 32-

{molecule ending with a subscript}{^{super}}

A molecular formula that ends with multiple atoms of an element must be enclosed in {} before attaching the charge as a post-superscript.

Symbols and variables
Antineutrino nu with overbare and nu with overbar \bar{\nu}_{e} or \bar{\nu}
Energy energy, Energy, ENERGY energy, Energy, ENERGY
(not case- sensitive)
Equations of state (s), (l), (aq), and (g)

(s), (l), (aq), and (g)

s = solid, l ("ell") = liquid, aq = aqueous, and g = gas

Excited nuclei supercript 60 Co*

superscript 238 subscript 92 U*

{^\ast} or {^*}
Heat heat, Heat, HEAT heat, Heat, HEAT
(not case-sensitive)
Lowercase Greek Greek letter symbols: alpha, beta, gamma, nu \alpha, \beta, \gamma, and \nu
No reaction noreaction, Noreaction, NOREACTION

noreaction, Noreaction, NOREACTION (not case-sensitive)

Use for questions that ask students to predict a product formed when there is no reaction. When no reaction is used, it must be the complete answer.

Placeholders

Elements: A, B, C, D, X, Y, Z

A, B, C, D, X, Y, and Z

Lone pair of electrons: E

E
General ligand: L L
Generic metal: M M
Arbitrary metal or metal ion: Me, Me superscript +, Me superscript - Me, Me{^+} or Me{^-}
Organic functional group: R R
Arbitrary radical: R R

 

See also:

Chemical formula or expression (answer type)