The ms macro package expects a certain amount of structure, but not as much as packages such as man or mdoc.
The simplest documents can begin with a paragraph macro (such as
LP or PP), and consist of text separated by paragraph
macros or even blank lines. Longer documents have a structure as
follows:
RP (report) macro on the first line of the
document, groff prints the cover page information on its own
page; otherwise it prints the information on the first page with your
document text immediately following. Other document formats found in
AT&T troff are specific to AT&T or Berkeley,
and are not supported in groff.
TC macro at the end of your document. The
ms macros have minimal indexing facilities, consisting of the
IX macro, which prints an entry on standard error. Printing the
table of contents at the end is necessary since groff is a
single-pass text formatter, thus it cannot determine the page number of
each section until that section has actually been set and printed.
Since ms output is intended for hardcopy, you can manually
relocate the pages containing the table of contents between the cover
page and the body text after printing.