Share Open book


Collapse Public view Title page

Asciidoc-LaTeX manual

2. dummyoutersection

2.8. Chemistry

2.8.1. Inline formulas and reactions

For inline formulas, use the chem macro, e.g.,

                chem::[H2O]

for \(\ce{ H2O }\). The same goes for reactions, e.g.,

             chem::[2H2 + O2 -> 2H2O]

for the explosive formula \(\ce{ 2H2 + O2 → 2H2O }\).

2.8.2. The chem environment

For displayed formulas and reactions, use the chem environment. Thus, the text

[env.chem#reaction-smelt]
--
2Fe2O3 + 3C -> 4Fe + 3CO2
--

yields

\[\ce{2Fe2O3 + 3C → 4Fe + 3CO2}\] (1)

Note the form of the label, which has prefix reaction-. If we say

"To smelt iron, use <<reaction-smelt>>."

we obtain

"To smelt iron, use reaction 1."

The form of the label here is as that used for the equation enviirnoment: the reaction- prefix is not mandatory but results in particular form for the reference.

Note
The prefixes equation-, reaction-, and formula- receive special treatment in Asciidoc-latex.

The chem environment relies on Martin Hensel’s mhchem ┬Ępackage

2.8.3. More examples

\[\ce{NaHCO3 + CH3COOH → CO2 + H2O + Na+ + CH3COO-}\] (2)
Source
[env.chem#fizz]
--
NaHCO3 + CH3COOH -> CO2 + H2O + Na+ + CH3COO-
--
\[\ce{Zn ←→ Zn^2+ + 2e-}\] (3)
Source
.Electrochemcial reactions
[env.chem]
--
Zn <--> Zn^2+ +  2e-
--
\[\ce{^{227}_{90}Th+}\] (4)
Source
[env.chem]
--
^{227}_{90}Th+
--
\[\ce{A\bond{-}B\bond{=}C\bond{#}D}\] (5)
Source
[env.chem]
--
A\bond{-}B\bond{=}C\bond{#}D
--
\[\ce{SO4^2- + Ba^2+ → BaSO4 v}\] (6)
Source
[env.chem]
--
SO4^2- + Ba^2+ -> BaSO4 v
--

Created February 6, 2015, last updated: August 18, 2015

Notes

The chem environment uses Martin Hensels mhchem package.