< Previous PageNext Page >

Man Page Generation Language (MPGL) Dialect

This section describes the basic syntax of the Man Page Generation Language (MPGL). Portions of the syntax are abridged due to complexity. For information on these details, see the examples later in this chapter.

Note: Many versions of man are exceptionally picky about blank lines. While the xml2man translator attempts to remove most of these, you should still avoid leaving blank lines in the input files.

The MPGL syntax includes a subset of mdoc. All text is unjustified, and some redundancy was reduced. In particular, the usage section in an MPGL file provides the source information for both the Synopsis and Description sections of a traditional man page. Beyond those changes, if you are familiar with the mdoc macro set, you should feel right at home.

At the top level (within the outer <manpage> tag), an MPGL page consists of some or all of the following large blocks:

Table 5-1 MPGL block tags

Block tag



the last modified date of the manual page


the title of the manual page


the operating system for which the manual page was written


the man section in which the manual pages should appear


names and descriptions of functions or tools described in this manual page (see example for syntax)


command-line usage or function parameters (see example for syntax)


function return value (text description)


interaction with environment variables


files used by a command-line tool


usage examples


troubleshooting information


function error values (generally restricted to those returned via the errno global variable)


cross-references to other manual pages (see example)


standards to which a tool or function conforms.


historical information


known bugs in a tool or function

Any field can contain either a block of raw text or the following subset of XHTML:

Table 5-2 XHTML tags supported by MPGL






indented block


indented literal text or code


unordered (bullet) list


ordered (numbered) list


list item (within a list)


literal text


term and definition list


term (within a term and definition list)


definition (within a term and definition list)

Any field can also contain any of the following MPGL-specific inline tags:

Table 5-3 Additional MPGL-specific inline tags




path name


function name


command name


man page cross-reference (see example)

< Previous PageNext Page >

© 1999, 2004 Apple Computer, Inc. All Rights Reserved. (Last updated: 2004-05-27)