BSD 4_4 development
[unix-history] / usr / share / man / cat7 / mdoc.0
MDOC(7) BSD Reference Manual MDOC(7)
N\bNA\bAM\bME\bE
m\bmd\bdo\boc\bc - quick reference guide for the -\b-m\bmd\bdo\boc\bc macro package
S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
g\bgr\bro\bof\bff\bf -\b-m\bm_\bd_\bo_\bc _\bf_\bi_\bl_\be_\bs _\b._\b._\b.
D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
The -\b-m\bmd\bdo\boc\bc 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).
The macros are described in two groups, the first includes the structural
and physical page layout macros. The second contains the manual and gen-
eral text domain macros which differentiate the -\b-m\bmd\bdo\boc\bc package from other
troff formatting packages.
P\bPA\bAG\bGE\bE S\bST\bTR\bRU\bUC\bCT\bTU\bUR\bRE\bE D\bDO\bOM\bMA\bAI\bIN\bN
T\bTi\bit\btl\ble\be M\bMa\bac\bcr\bro\bos\bs
To create a valid manual page, these three macros, in this order, are re-
quired:
.Dd _\bM_\bo_\bn_\bt_\bh _\bd_\ba_\by_\b, _\by_\be_\ba_\br Document date.
.Dt _\bD_\bO_\bC_\bU_\bM_\bE_\bN_\bT_\b__\bT_\bI_\bT_\bL_\bE _\b[_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b] _\b[_\bv_\bo_\bl_\bu_\bm_\be_\b] Title, in upper case.
.Os _\bO_\bP_\bE_\bR_\bA_\bT_\bI_\bN_\bG_\b__\bS_\bY_\bS_\bT_\bE_\bM _\b[_\bv_\be_\br_\bs_\bi_\bo_\bn_\b/_\br_\be_\bl_\be_\ba_\bs_\be_\b] Operating system (BSD).
P\bPa\bag\bge\be L\bLa\bay\byo\bou\but\bt M\bMa\bac\bcr\bro\bos\bs
Section headers, paragraph breaks, lists and displays.
.Sh Section Headers. Valid headers, in the order of presentation:
_\bN_\bA_\bM_\bE Name section, should include the `.Nm' or `.Fn' and
the `.Nd' macros.
_\bS_\bY_\bN_\bO_\bP_\bS_\bI_\bS Usage.
_\bD_\bE_\bS_\bC_\bR_\bI_\bP_\bT_\bI_\bO_\bN General description, should include options and pa-
rameters.
_\bR_\bE_\bT_\bU_\bR_\bN _\bV_\bA_\bL_\bU_\bE_\bS Sections two and three function calls.
_\bE_\bN_\bV_\bI_\bR_\bO_\bN_\bM_\bE_\bN_\bT Describe environment variables.
_\bF_\bI_\bL_\bE_\bS Files associated with the subject.
_\bE_\bX_\bA_\bM_\bP_\bL_\bE_\bS Examples and suggestions.
_\bD_\bI_\bA_\bG_\bN_\bO_\bS_\bT_\bI_\bC_\bS Normally used for section four device interface di-
agnostics.
_\bE_\bR_\bR_\bO_\bR_\bS Sections two and three error and signal handling.
_\bS_\bE_\bE _\bA_\bL_\bS_\bO Cross references and citations.
_\bS_\bT_\bA_\bN_\bD_\bA_\bR_\bD_\bS Conformance to standards if applicable.
_\bH_\bI_\bS_\bT_\bO_\bR_\bY If a standard is not applicable, the history of the
subject should be given.
_\bB_\bU_\bG_\bS Gotchas and caveats.
_\bo_\bt_\bh_\be_\br Customized headers may be added at the authors dis-
cretion.
.Ss Subsection Headers.
.Pp Paragraph Break. Vertical space (one line).
.D1 (D-one) Display-one Indent and display one text line.
.Dl (D-ell) Display-one literal. Indent and display one line of liter-
al text.
.Bd Begin-display block. Display options:
-\b-r\bra\bag\bgg\bge\bed\bd Unjustified (ragged edges).
-\b-f\bfi\bil\bll\ble\bed\bd Justified.
-\b-l\bli\bit\bte\ber\bra\bal\bl Literal text or code.
-\b-f\bfi\bil\ble\be _\bn_\ba_\bm_\be Read in named _\bf_\bi_\bl_\be and display.
-\b-o\bof\bff\bfs\bse\bet\bt _\bs_\bt_\br_\bi_\bn_\bg Offset display. Acceptable _\bs_\bt_\br_\bi_\bn_\bg values:
_\bl_\be_\bf_\bt Align block on left (default).
_\bc_\be_\bn_\bt_\be_\br Approximate center margin.
_\bi_\bn_\bd_\be_\bn_\bt Six constant width spaces (a tab).
_\bi_\bn_\bd_\be_\bn_\bt_\b-_\bt_\bw_\bo Two tabs.
_\br_\bi_\bg_\bh_\bt Left aligns block 2 inches from right.
_\bx_\bxn\bn Where _\bx_\bx is a number from 4n\bn to 99n\bn.
_\bA_\ba Where _\bA_\ba is a callable macro name.
_\bs_\bt_\br_\bi_\bn_\bg The width of _\bs_\bt_\br_\bi_\bn_\bg is used.
.Ed End-display (matches .Bd).
.Bl Begin-list. Create lists or columns. Options:
_\bL_\bi_\bs_\bt_\b-_\bt_\by_\bp_\be_\bs
-\b-b\bbu\bul\bll\ble\bet\bt Bullet Item List
-\b-i\bit\bte\bem\bm Unlabeled List
-\b-e\ben\bnu\bum\bm Enumerated List
-\b-t\bta\bag\bg Tag Labeled List
-\b-d\bdi\bia\bag\bg Diagnostic List
-\b-h\bha\ban\bng\bg Hanging Labeled List
-\b-o\boh\bha\ban\bng\bg Overhanging Labeled List
-\b-i\bin\bns\bse\bet\bt Inset or Run-on Labeled List
List-parameters
-\b-o\bof\bff\bfs\bse\bet\bt (All lists.) See `.Bd' begin-display above.
-\b-w\bwi\bid\bdt\bth\bh (-\b-t\bta\bag\bg and -\b-h\bha\ban\bng\bg lists only.) See `.Bd'.
-\b-c\bco\bom\bmp\bpa\bac\bct\bt (All lists.) Suppresses blank lines.
.El End-list.
.It List item.
M\bMA\bAN\bNU\bUA\bAL\bL A\bAN\bND\bD G\bGE\bEN\bNE\bER\bRA\bAL\bL T\bTE\bEX\bXT\bT D\bDO\bOM\bMA\bAI\bIN\bN M\bMA\bAC\bCR\bRO\bOS\bS
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 [-\b-s\bs _\bf_\bi_\bl_\be]
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 _\bp_\ba_\br_\bs_\be_\bd and _\bc_\ba_\bl_\bl_\ba_\bb_\bl_\be columns below.
Unless stated, manual domain macros share a common syntax:
.Va argument [ . , ; : ( ) [ ] argument ... ]
N\bNo\bot\bte\be: Opening and closing punctuation characters are only recognized as
such if they are presented one at a time. The string `),' is not recog-
nized as punctuation and will be output with a leading white space and in
what ever font the calling macro uses. The the argument list `] ) ,' is
recognized as three sequential closing punctuation characters and a lead-
ing white space is not output between the characters and the previous ar-
gument (if any). The special meaning of a punctuation character may be
escaped with the string `\&'. For example the following string,
.Ar file1 , file2 , file3 ) . Produces _\bf_\bi_\bl_\be_\b1, _\bf_\bi_\bl_\be_\b2, _\bf_\bi_\bl_\be_\b3).
M\bMa\ban\bnu\bua\bal\bl D\bDo\bom\bma\bai\bin\bn M\bMa\bac\bcr\bro\bos\bs
_\bN_\ba_\bm_\be _\bP_\ba_\br_\bs_\be_\bd _\bC_\ba_\bl_\bl_\ba_\bb_\bl_\be _\bD_\be_\bs_\bc_\br_\bi_\bp_\bt_\bi_\bo_\bn
Ad Yes Yes Address. (This macro may be deprecated.)
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.
G\bGe\ben\bne\ber\bra\bal\bl T\bTe\bex\bxt\bt D\bDo\bom\bma\bai\bin\bn M\bMa\bac\bcr\bro\bos\bs
_\bN_\ba_\bm_\be _\bP_\ba_\br_\bs_\be_\bd _\bC_\ba_\bl_\bl_\ba_\bb_\bl_\be _\bD_\be_\bs_\bc_\br_\bi_\bp_\bt_\bi_\bo_\bn
%A Yes No Reference author.
%B Yes Yes Reference book title.
%C No No Reference place of publishing (city).
%D No No Reference date.
%J Yes Yes Reference journal title.
%N No No Reference issue number.
%O No No Reference optional information.
%P No No Reference page number(s).
%R No No Reference report Name.
%T Yes Yes Reference article title.
%V No No Reference volume.
Ac Yes Yes Angle close quote.
Ao Yes Yes Angle open quote.
Aq Yes Yes Angle quote.
At No No AT&T UNIX
Bc Yes Yes Bracket close quote.
Bf No No Begin font mode.
Bo Yes Yes Bracket open quote.
Bq Yes Yes Bracket quote.
Bx Yes Yes Bx.
Db No No Debug (default is "off")
Dc Yes Yes Double close quote.
Do Yes Yes Double open quote.
Dq Yes Yes Double quote.
Ec Yes Yes Enclose string close quote.
Ef No No End font mode.
Em Yes Yes Emphasis (traditional English).
Eo Yes Yes Enclose string open quote.
No Yes Yes Normal text (no-op).
Ns Yes Yes No space.
Pc Yes Yes Parenthesis close quote.
Pf Yes No Prefix string.
Po Yes Yes Parenthesis open quote.
Pq Yes Yes Parentheses quote.
Qc Yes Yes Strait Double close quote.
Ql Yes Yes Quoted literal.
Qo Yes Yes Strait Double open quote.
Qq Yes Yes Strait Double quote.
Re No No Reference start.
Rs No No Reference start.
Sc Yes Yes Single close quote.
So Yes Yes Single open quote.
Sq Yes Yes Single quote.
Sm No No Space mode (default is "on")
Sx Yes Yes Section Cross Reference.
Sy Yes Yes Symbolic (traditional English).
Tn Yes Yes Trade or type name (small Caps).
Ux Yes Yes Ux
Xc Yes Yes Extend argument list close.
Xo Yes Yes Extend argument list close.
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 limi-
tation of nine arguments.
C\bCO\bON\bNF\bFI\bIG\bGU\bUR\bRA\bAT\bTI\bIO\bON\bN
For site specific configuration of the macro package, see the file
_\b/_\bu_\bs_\br_\b/_\bs_\br_\bc_\b/_\bs_\bh_\ba_\br_\be_\b/_\bt_\bm_\ba_\bc_\b/_\bR_\bE_\bA_\bD_\bM_\bE.
F\bFI\bIL\bLE\bES\bS
tmac.doc Manual and general text domain macros.
tmac.doc-common Common structural macros and definitions.
tmac.doc-nroff Site dependent nroff style file.
tmac.doc-ditroff Site dependent troff style file.
tmac.doc-syms Special defines (such as the standards macro).
S\bSE\bEE\bE A\bAL\bLS\bSO\bO
mdoc.samples(7)
4.4BSD June 9, 1993 4