mhchem

This file contains all the examples in the mhchem manual.
Ref: https://mhchem.github.io/MathJax-mhchem/

Chemical Equations (ce)

Source Temml
\ce{CO2 + C -> 2 CO}CO2+C2CO
\ce{Hg^2+ ->[I-] HgI2 ->[I-] [Hg^{II}I4]^2-}Hg2+IHgI2I[HgXIII4]2
C_p[\ce{H2O(l)}] = \pu{75.3 J // mol K}Cp[H2O(l)]=75.3 JmolK

Chemical Formulae

Source Temml
\ce{H2O}H2O
\ce{Sb2O3}Sb2O3

Charges

Source Temml
\ce{H+}H+
\ce{CrO4^2-}CrO42
\ce{[AgCl2]-}[AgCl2]
\ce{Y^99+}Y99+
\ce{Y^{99+}}Y99+

Stoichiometric Numbers

Source Temml
\ce{2 H2O}2H2O
\ce{2H2O}2H2O
\ce{0.5 H2O}0.5H2O
\ce{1/2 H2O}12H2O
\ce{(1/2) H2O}(1/2)H2O
\ce{$n$ H2O}n H2O

Isotopes

\ce{^{227}_{90}Th+}X90227X290902227227Th+
\ce{^227_90Th+}X90227X290902227227Th+
\ce{^{0}_{-1}n^{-}}X10X211200n
\ce{^0_-1n-}X10X211200n
\ce{H{}^3HO}HX3X2233HO
\ce{H^3HO}HX3X2233HO

Reaction Arrows

Source Temml
\ce{A -> B}AB
\ce{A <- B}AB
\ce{A <-> B}AB
\ce{A <--> B}AB
\ce{A <=> B}AB
\ce{A <=>> B}AB
\ce{A <<=> B}AB
\ce{A ->[H2O] B}AH2OB
\ce{A ->[{text above}][{text below}] B}Atext belowtext aboveB
\ce{A ->[$x$][$x_i$] B}AxixB

Parentheses, Brackets, Braces

Source Temml
\ce{(NH4)2S}(NH4)2S
\ce{[\{(X2)3\}2]^3+}[{(X2)3}2]3+
\ce{CH4 + 2 $\left( \ce{O2 + 79/21 N2} \right)$}CH4+2 (O2+7921N2)

States of Aggregation

Source Temml
\ce{H2(aq)}H2(aq)
\ce{CO3^2-_{(aq)}}CO32(aq)
\ce{NaOH(aq,$\infty$)}NaOH(aq,)

Crystal Systems

Source Temml
\ce{ZnS($c$)}ZnS( c)
\ce{ZnS(\ca$c$)}ZnS(c)

Variables

Source Temml
\ce{NO_x}NOx
\ce{Fe^n+}Fen+
\ce{x Na(NH4)HPO4 ->[\Delta]
(NaPO3)_x + x NH3 ^ + x H2O}
xNa(NH4)HPO4Δ(NaPO3)x+xNH3+xH2O

Greek Characters

Source Temml
\ce{\mu-Cl}μ-Cl
\ce{[Pt(\eta^2-C2H4)Cl3]-}[Pt(η2-C2H4)Cl3]
\ce{\beta +}β+
\ce{^40_18Ar + \gamma{} + \nu_e}X1840X2181824040Ar+γ+νe

(Italic) Math

Source Temml
\ce{NaOH(aq,$\infty$)}NaOH(aq,)
\ce{Fe(CN)_{$\frac{6}{2}$}}Fe(CN)62 
\ce{X_{$i$}^{$x$}}Xix
\ce{X_$i$^$x$}Xix

Italic Text

Source Temml
\ce{$cis${-}[PtCl2(NH3)2]}cis-[PtCl2(NH3)2]
\ce{CuS($hP12$)}CuS( hP12)

Upright Text, Escape Parsing

Source Temml
\ce{{Gluconic Acid} + H2O2}Gluconic Acid+H2O2
\ce{X_{{red}}}Xred
\ce{{(+)}_589{-}[Co(en)3]Cl3}(+)589-[Co(en)3]Cl3

Bonds

Source Temml
\ce{C6H5-CHO}C6H5CHO
\ce{A-B=C#D}AB=CD
\ce{A\bond{-}B\bond{=}C\bond{#}D}AB=CD
\ce{A\bond{1}B\bond{2}C\bond{3}D}AB=CD
\ce{A\bond{~}B\bond{~-}C}ABC
\ce{A\bond{~--}B\bond{~=}C\bond{-~-}D}ABCD
\ce{A\bond{...}B\bond{....}C}ABC
\ce{A\bond{->}B\bond{<-}C}ABC

Addition Compounds

Source Temml
\ce{KCr(SO4)2*12H2O}KCr(SO4)212H2O
\ce{KCr(SO4)2.12H2O}KCr(SO4)212H2O
\ce{KCr(SO4)2 * 12 H2O}KCr(SO4)212H2O

Oxidation States

Source Temml
\ce{Fe^{II}Fe^{III}2O4}FeXIIFeXIII2O4

Unpaired Electrons, Radical Dots

Source Temml
\ce{OCO^{.-}}OCO
\ce{NO^{(2.)-}}NO(2)

Kröger-Vink Notation

Source Temml
\ce{Li^x_{Li,1-2x}Mg^._{Li,x}
$V$'_{Li,x}Cl^x_{Cl}}
LiXLi,12x×MgXLi,x VXLi,xClXCl×
\ce{O''_{i,x}}OXi,x
\ce{M^{..}_i}MXi
\ce{$V$^{4'}_{Ti}}VXTi4
\ce{V_{V,1}C_{C,0.8}$V$_{C,0.2}}VV,1CC,0.8 VC,0.2

Equation Operators

Source Temml
\ce{A + B}A+B
\ce{A - B}AB
\ce{A = B}A=B
\ce{A \pm B}A±B

Precipitate and Gas

Source Temml
\ce{SO4^2- + Ba^2+ -> BaSO4 v}SO42+Ba2+BaSO4
\ce{A v B (v) -> B ^ B (^)}A BB B

Other Symbols and Shortcuts

Source Temml
\ce{NO^*}NO*
\ce{1s^2-N}1s2-N
\ce{n-Pr}n-Pr
\ce{iPr}iPr
\ce{\ca Fe}Fe
\ce{A, B, C; F}A,B,C;F
\ce{{and others}}and others

Complex Examples

Source Temml
\ce{Zn^2+ <=>[+ 2OH-][+ 2H+]
$\underset{\text{amphoteres Hydroxid}}
{\ce{Zn(OH)2 v}}$ <=>[+ 2OH-][+ 2H+]
$\underset{\text{Hydroxozikat}}
{\ce{[Zn(OH)4]^2-}}$}
Zn2++2H++2OH+2H++2OHZn(OH)2amphoteres Hydroxid+2H++2OH+2H++2OH[Zn(OH)4]2Hydroxozikat 
\ce{$K = \frac{[\ce{Hg^2+}][\ce{Hg}]}
{[\ce{Hg2^2+}]}$}
K=[Hg2+][Hg][Hg22+]
\ce{$K =
\ce{\frac{[Hg^2+][Hg]}{[Hg2^2+]}}$}
K=[Hg2+][Hg][Hg22+]
\ce{Hg^2+ ->[I-]
$\underset{\mathrm{red}}{\ce{HgI2}}$
->[I-] $\underset{\mathrm{red}}
{\ce{[Hg^{II}I4]^2-}}$}
Hg2+IHgI2redI[HgXIII4]2red

Physical Units

Source Temml
\pu{123 kJ}123 kJ
\pu{123 mm2}123 mm2
\pu{123 J s}123 Js
\pu{123 J*s}123 Js
\pu{123 kJ/mol}123 kJ/mol
\pu{123 kJ//mol}123 kJmol
\pu{123 kJ mol-1}123 kJmol1
\pu{123 kJ*mol-1}123 kJmol1
\pu{1.2e3 kJ}1.2103 kJ
\pu{1,2e3 kJ}1,2103 kJ
\pu{1.2E3 kJ}1.2×103 kJ
\pu{1,2E3 kJ}1,2×103 kJ