Document Body

The document body begins with the first macro not in the prologue set (Dd, Dt, and Os). The document body consists of the manual content itself, and varies significantly between categories and, of course, the material itself.

.Sh NAME
.Nm mdoc
.Nd mdoc language reference
.Sh DESCRIPTION
The
.Nm mdoc
language is used to format
.Bx
.Ux
manuals.

The content of the document body is divided into sections. Sections are indicated by the Sh macro.

.Sh SECTION NAME
Text within the section...

As described in the introduction, a section consists of its line arguments and all subsequent lines until the end of file or another Sh macro.

By convention, Sh arguments are capitalised. I'll describe conventional sections at length in the next chapter, as for the most part follow long-standing document conventions.

In general, the document body requires at least the NAME and DESCRIPTION sections, and usually the SYNOPSIS section as well. The first section must be NAME, optionally followed by SYNOPSIS. The DESCRIPTION section must follow either the NAME or SYNOPSIS.

Last edited by $Author: kristaps $ on $Date: 2011/11/04 01:06:28 $. Copyright © 2011, Kristaps Dzonsons. CC BY-SA.