Developer's Daily | Unix by Example |
main | java | perl | unix | dev directory | web log |
MDOC(7) BSD Miscellaneous Information Manual MDOC(7)
NAME
mdoc ? quick reference guide for the ?mdoc macro package |
SYNOPSIS
groff ?mdoc files ... |
DESCRIPTION |
The ?mdoc package is a set of content-based and domain-based macros used to format the BSD man pages. The macro names and their meanings are listed below for quick reference; for a detailed explanation on using the package, see the tutorial sampler mdoc.samples(7). Note that this is not the usual macro package for Linux documentation, although it is used for documentation of several widely-used programs; see man(7). The macros are described in two groups, the first includes the structural and physical page layout macros. The second contains the manual and general text domain macros which differentiate the -oc package from other troff formatting packages. |
PAGE STRUCTURE DOMAIN
Title Macros |
To create a valid manual page, these three macros, in this order, are required: |
.Dd Month day, year’ Documentdate.
.Dt DOCUMENT_TITLE [section] [volume]’
Title, in upper case. Page Layout Macros |
?bullet Bullet Item List |
?item Unlabeled List |
?enum Enumerated List |
?tag Tag Labeled List |
?diag Diagnostic List |
?hang Hanging Labeled List |
?ohang Overhanging Labeled List |
?inset Inset or Run-on Labeled List |
List-parameters
?offset’ (All lists.) See
’.Bd’ begin-display above. MANUAL AND GENERAL TEXT DOMAIN MACROS |
The manual and general text domain macros are special in that most of them are parsed for callable macros for example: |
.Op Fl s Ar file
Produces [?s file] In this example, the option enclosure macro ’.Op’ is parsed, and calls the callable content macro ’Fl’ which operates on the argument ’s’ and then calls the callable content macro ’Ar’ which operates on the argument ’file’. Some macros may be callable, but are not parsed and vice versa. These macros are indicated in the parsed and callable columns below. Unless stated, manual domain macros share a common syntax: .Va argument [ . , ; : ( ) [ ] argument ... ] Note: Opening and closing punctuation characters are only recognized as such if they are presented one at a time. The string ’),’ is not recognized as punctuation and will be output with a leading white space and in what ever font the calling macro uses. The argument list ’] ) ,’ is recognized as three sequential closing punctuation characters and a leading white space is not output between the characters and the previous argument (if any). The special meaning of a punctuation character may be escaped with the string ’\&’. For example the following string, .Ar file1 , file2 , file3 ) . Manual Domain Macros |
Name Parsed Callable Description |
Ad Yes Yes Address. (This macro may be deprecated.) |
An Yes Yes Author name. |
Ar Yes Yes Command line argument. |
Cd No No Configuration declaration (section four only). |
Cm Yes Yes Command line argument modifier. |
Dv Yes Yes Defined variable (source code). |
Er Yes Yes Error number (source code). |
Ev Yes Yes Environment variable. |
Fa Yes Yes Function argument. |
Fd Yes Yes Function declaration. |
Fn Yes Yes Function call (also .Fo and .Fc). |
Ic Yes Yes Interactive command. |
Li Yes Yes Literal text. |
Nm Yes Yes Command name. |
Op Yes Yes Option (also .Oo and .Oc). |
Ot Yes Yes Old style function type (Fortran only). |
Pa Yes Yes Pathname or file name. |
St Yes Yes Standards (-p1003.2, -p1003.1 or -ansiC) |
Va Yes Yes Variable name. |
Vt Yes Yes Variable type (Fortran only). |
Xr Yes Yes Manual Page Cross Reference. |
General Text Domain Macros |
Name Parsed Callable Description Macro names ending in ’q’ quote remaining items on the argument list. Macro names ending in ’o’ begin a quote which may span more than one line of input and are close quoted with the matching macro name ending in ’c’. Enclosure macros may be nested and are limited to eight arguments. Note: the extended argument list macros (’.Xo’, ’.Xc’) and the function enclosure macros (’.Fo’, ’.Fc’) are irregular. The extended list macros are used when the number of macro arguments would exceed the troff limitation of nine arguments. The macros UR (starting a URI/URL hypertext reference), UE (ending one), and UN (identifying a target for a reference) are also available. See man(7) for more information on these macros. |
CONFIGURATION
For site specific configuration of the macro package, see the file /usr/src/share/tmac/README. |
FILES
tmac.doc’ Manual and general text domain macros.
tmac.doc-common SEE ALSO |
mdoc.samples(7), man(7) Linux July 11, 1999 Linux |