Chemistry

Unofficial ConTeXt Wiki mirror

Last modified: 2025-11-16

ConTeXt always came with extensive chemistry support including drawing of chemical structures and the typesetting of reactions. In MkII this was called PPCHTeX, which works also with plain TeX and LaTeX.

Some other links about chemistry in ConTeXt:

Using \chemical

This is the built-in version of the previous chemic module.

You can also typeset chemical reactions:

Chemical structures


(The “good” images are old; the broken ones are the result of the current code.)

Chemistry example1.png

Chemistry example2.png

To draw this structure horizontally:

Chemistry example3.png

An example of an amino acid: Histidine (Ace-His-Nme). The rest of the amino acids are shown in TT4Sci

Histidine.png

Simple Formulae in Text Mode

An alternative to using the chemistry module or mathmode for typesetting simple formulae are the ConTeXt commands \high, \low, \lohi, and \himilo. This might be useful if you want to typset the formula with the same font as the surrounding text (in titles or slanted fonts, although that might not be desired in all situations).

Taco’s macros implement this approach [1]:

This is broken code from 2006!

The main difference with the built-in chemistry is that the \molecule from this example uses the same font as the one in surrounding text, while the official module always uses the (mostly roman) math font (which is probably the proper way if you’re writing dozens of formulas).

Alternatively you can setup the style parameter used for chemical formulas manually:

\setupchemical[style=\bs]

Old Links