Next: ms Document Control Settings, Previous: ms Introduction, Up: ms [Contents][Index]
The ms macro package expects a certain amount of structure: a well-formed document contains at least one paragraphing or heading macro call. Organize longer documents as follows.
Calling the RP macro at the beginning of your document puts the
document description (see below) on a cover page. Otherwise, ms
places the information (if any) on the first page, followed immediately
by the body text. Some document types found in other ms
implementations are specific to AT&T or Berkeley, and are not
supported by groff ms.
By setting registers and strings, you can configure your document’s typeface, margins, spacing, headers and footers, and footnote arrangement. See ms Document Control Settings.
A document description consists of any of: a title, one or more authors’ names and affiliated institutions, an abstract, and a date or other identifier. See ms Document Description Macros.
The main matter of your document follows its description (if any). ms supports highly structured text consisting of paragraphs interspersed with multi-level headings (chapters, sections, subsections, and so forth) and augmented by lists, footnotes, tables, diagrams, and similar material. See ms Body Text.
Macros enable the collection of entries for a table of contents
(or index)
as the material they discuss appears in the document.
A macro call at the end of the document emits the collected entries.
This material necessarily follows the rest of the text since
troff is a single-pass formatter;
it cannot determine the page number of a division of the text
until it has been set and output.
Since
ms
output was designed for the production of hard copy,
the traditional procedure was to manually relocate the pages containing
the table of contents between the cover page and the body text.
Today,
page resequencing is more often done in the digital domain.
An index works similarly,
but because it typically needs to be sorted after collection,
its preparation requires separate processing.
Next: ms Document Control Settings, Previous: ms Introduction, Up: ms [Contents][Index]