Next: , Previous: , Up: Introduction   [Contents][Index]


1.5 Preprocessors

An alternative approach to complexity management, particularly when constructing tables, setting mathematics, or drawing diagrams, lies in preprocessing. A preprocessor employs a domian-specific language to ease the generation of tables, equations, and so forth in terms that are convenient for human entry. Each preprocessor reads a document and translates the parts of it that apply to it into GNU troff input. Command-line options to groff tell it which preprocessors to use.

groff provides preprocessors for laying out tables (gtbl), typesetting equations (geqn), drawing diagrams (gpic and ggrn), inserting bibliographic references (grefer), and drawing chemical structures (gchem). An associated program that is useful when dealing with preprocessors is gsoelim.1

groff also supports grap, a preprocessor for drawing graphs. A free implementation of it can be obtained separately.

Unique to groff is the preconv preprocessor that enables groff to handle documents in a variety of input encodings.

Other preprocessors exist, but no free implementations are known. An example is ideal, which draws diagrams using a mathematical constraint language.