[NTG-context] Chemical reaction formulas

David van Diepen david at diepenvan.nl
Wed Mar 17 15:07:57 CET 2021


Dear list,

According to the information on contextgarden (section chemistry)
chemical reactions should be entered as follows:

\usemodule[chemic]
\startformula
   \chemical{CaCO_3(s),+,HCl(g),->,CaCl(HCO_3)(s)}
\stopformula

That produces a formula with the comma's in it, so that's not good. If
I enter it as follows

\usemodule[chemic]
\startformula
   \chemical{CaCO_3(s) + HCl(g) \rightarrow CaCl(HCO_3)(s)}
\stopformula

Then somehow after the \rightarrow the math/chemical environment is
lost and the remainder gets typeset as text. The same is true if I use
any math command such as \beta or \cdot.

The closest I get to the desired result is with the following:

\usemodule[chemic]
\startformula
   \chemical{CaCO_3(s) + HCl(g) -->
CaCl(HCO_3)(s)}
\stopformula

But that is a bit of a compromise.

Regards, David van Diepen



More information about the ntg-context mailing list