plasTeX 3.0 — A Python Framework for Processing LaTeX Documents

4.2 Defining Macros in Python

Defining macros using Python classes (or, at least through Python interfaces) is done in one of three ways: INI files, Python classes, and the document context. These three methods are described in the following sections.