Our LaTeX macros support LaTeX as well as mhchem.
There are 2 LaTeX macros available:
LaTeX (Block) for block level equations
LaTeX (Inline) for inline equations
Example syntax
LaTeX syntax
TODO
mhchem syntax
Comprehensive mhchem syntax documentation is available here.
Chemical equations
Example 1.
Macro body:
\ce{CO2 + C -> 2 CO}
Output:
Example 2.
Macro body:
\ce{Hg^2+ ->[I-] HgI2 ->[I-] [Hg^{II}I4]^2-}
Output:
Chemical formulae
Example 1.
Macro body:
\ce{H2O}
Output:
Example 2.
Macro body:
\ce{Sb2O3}
Output:
Charges
Example 1.
Macro body:
\ce{CrO4^2-}
Output:
Example 2.
Macro body:
[AgCl2]-
Output:
Nuclides, isotopes
Example 1.
Macro body:
\ce{^{227}_{90}Th+}
or
\ce{^227_90Th+}
Output:
Example 2.
Macro body:
\ce{^{0}_{-1}n^{-}}
or
\ce{^0_-1n-}
Output:
It might be ambiguous whether a superscript belongs to the left or right element. There is automatic detection (digits only = mass number = belongs to right side), but to make sure you can type {}
as a separator.
Example 3.
Macro body:
\ce{H{}^3HO}
or
\ce{H^3HO}
Output:
Reaction arrows
Example 1.
Macro body:
\ce{A -> B}
Output:
Example 2.
Macro body:
\ce{A <- B}
Output:
Example 3.
Macro body:
\ce{A <-> B}
Output:
Not to be used according to IUPAC and ACS
Example 4.
Macro body:
\ce{A <--> B}
Output:
Example 5.
Macro body:
\ce{A <=> B}
Output:
Example 6.
Macro body:
\ce{A <=>> B}
Output:
Example 7.
Macro body:
\ce{A <<=> B}
Output:
Each arrow can take two optional arguments: one for above and one for below. The arrow arguments use the same input syntax as the \ce
command.
Example 8.
Macro body:
\ce{A ->[H2O] B}
Output:
Example 9.
Macro body:
A ->[{text above}][{text below}] B}
Output:
Example 10.
Macro body:
\ce{A ->[$x$][$x_i$] B}
Output:
Parentheses, brackets, braces
Use parentheses ( )
and brackets [ ]
normally. Write braces as \{ \}
.
Example 11.
Macro body:
\ce{(NH4)2S}
Output:
Example 12.
Macro body:
\ce{[\{(X2)3\}2]^3+}
Output:
For large parentheses, \left
and \right
macros need to be in the same math environment, so you might have to put \ce
into $
into \ce
, but that’s fine.
Example 13.
Macro body:
\ce{CH4 + 2 $\left( \ce{O2 + 79/21 N2} \right)$}
Output: