Next: , Previous: , Up: ms Body Text   [Contents][Index]


4.6.5.9 Tables, figures, equations, and references

The ms package is often used with the tbl, pic, eqn, and refer preprocessors. Mark text meant for preprocessors by enclosing it in pairs of tokens as follows, with nothing between the dot and the macro name. The preprocessors match these tokens only at the start of an input line.

Macro: .TS [H]
Macro: .TE

Demarcate a table to be processed by the tbl preprocessor. The optional argument H to TS instructs ms to repeat table rows (often column headings) at the top of each new page the table spans, if applicable; calling the TH macro marks the end of such rows. The GNU tbl(1) man page provides a comprehensive reference to the preprocessor and offers examples of its use.

Macro: .PS
Macro: .PE
Macro: .PF

PS begins a picture to be processed by the gpic preprocessor; either of PE or PF ends it, the latter with “flyback” to the vertical position at its top. You can create pic input manually or with a program such as xfig.

Macro: .EQ [align [label]]
Macro: .EN

Demarcate an equation to be processed by the eqn preprocessor. The equation is centered by default; align can be ‘C’, ‘L’, or ‘I’ to (explicitly) center, left-align, or indent it by the amount stored in the DI register, respectively. If specified, label is set right-aligned.

Macro: .[
Macro: .]

Demarcate a bibliographic citation to be processed by the refer preprocessor. The GNU refer(1) man page provides a comprehensive reference to the preprocessor and the format of its bibliographic database. Type ‘man refer’ at the command line to view it.

When refer emits collected references (as might be done on a “Works Cited” page), it interpolates the REFERENCES string as an unnumbered heading (SH).

The following is an example of how to set up a table that may print across two or more pages.

.TS H
allbox;
Cb | Cb .
Part→Description
_
.TH
.T&
GH-1978→Fribulating gonkulator
…the rest of the table follows…
.TE

Attempting to place a multi-page table inside a keep can lead to unpleasant results, particularly if the tbl allbox option is used.

Mathematics can be typeset using the language of the eqn preprocessor.

.EQ C (\*[SN-NO-DOT]a)
p ~ = ~ q sqrt { ( 1 + ~ ( x / q sup 2 ) }
.EN

This input formats a labelled equation. We used the SN-NO-DOT string to base the equation label on the current heading number, giving us more flexibility to reorganize the document.

Use groff options to run preprocessors on the input: -e for geqn, -p for gpic, -R for grefer, and -t for gtbl.


Next: , Previous: , Up: ms Body Text   [Contents][Index]