Macros Troff includes macros that are run before starting to process the document. These macros include setting up page headers and footers, defining new commands, and influencing how the output will be formatted. The command-line argument for including a macro set is -mname, which has led to many macro sets being known as the base filename with a leading m. The standard macro sets, with leading m are: man for creating manual pages mdoc for semantically-annotated manual pages, which are better adapted to mandoc conversion to other formats. mandoc is a fusion that supports both sets of manual commands. me for creating research papers mm for creating memorandums ms''' for creating books, reports, and technical documentation A more comprehensive list of macros available is usually listed in a tmac(5) manual page. Preprocessors As troff evolved, since there are several things which cannot be done easily in troff, several preprocessors were developed. These programs transform certain parts of a document into troff input, fitting naturally into the use of "pipelines" in Unix — sending the output of one program as the input to another (see pipes and filters). Typically, each preprocessor translates only sections of the input file that are specially marked, passing the rest of the file through unchanged. The embedded preprocessing instructions are written in a simple application-specific programming language, which provides a high degree of power and flexibility. eqn preprocessor allows mathematical formulae to be specified in simple and intuitive manner. tbl is a preprocessor for formatting tables. refer (and the similar program bib) processes citations in a document according to a bibliographic database. Three preprocessors provide troff with drawing capabilities by defining a domain-specific language for describing the picture. pic is a procedural programming language providing various drawing functions like circle and box. ideal allows the drawing of pictures declaratively, deriving the picture by solving a system of simultaneous equations based on vectors and transformations described by its input. grn describes the pictures through graphical elements drawn at absolute coordinates, based on the gremlin file format defined by an early graphics workstation. Yet more preprocessors allow the drawing of more complex pictures by generating output for pic. grap draws charts, like scatter plots and histograms. chem draws chemical structure diagrams. dformat'' draws record-based data structures. See also Desktop publishing DocBook groff GNU troff/nroff replacement nroff SGML TeX Scribe (markup language) References External links The Text Processor for