xref: /csrg-svn/share/man/man7/mdoc.samples.7 (revision 50363)
143435Scael.\" Copyright (c) 1990 The Regents of the University of California.
243435Scael.\" All rights reserved.
343435Scael.\"
448889Scael.\" %sccs.include.redist.roff%
543435Scael.\"
6*50363Sbostic.\"     @(#)mdoc.samples.7	5.7 (Berkeley) 07/01/91
743435Scael.\"
8*50363Sbostic
9*50363Sbostic.\" This sampler invokes every macro in the package several
10*50363Sbostic.\" times and is garanteed to give a worst case performance
11*50363Sbostic.\" for an already extremely slow package.
12*50363Sbostic
1343435Scael.Dd
1443435Scael.Os BSD 4.4
1543435Scael.Dt MDOC.SAMPLES 7
1643435Scael.Sh NAME
1743435Scael.Nm mdoc.sample
1848888Scael.Nd writing manual pages with
1943435Scael.Nm -mdoc
2043435Scaelmacro package
2143435Scael.Sh SYNOPSIS
2243435Scael.Nm man mdoc.sample
2343435Scael.Sh DESCRIPTION
2448888ScaelA tutorial sampler for writing
2548888Scael.Bx
2648888Scaelmanual pages with the
2743435Scael.Nm \-mdoc
2850362Scaelmacro package, a
2950362Scael.Em content Ns \-based
3050362Scaelformatting
3148888Scaelpackage for
3248888Scael.Xr troff 1 .
3348888ScaelIts predecessor, the
3448888Scael.Xr \-man 7
3548888Scaelpackage,
3648888Scaeladdressed page structure leaving the
3748888Scaelmanipulation of fonts and other
3848888Scaeltypesetting details to the individual author.
3948888ScaelThe
4048888Scael.Nm \-mdoc
4148888Scaelpackage
4248888Scaelallows the author to ignore font considerations by
4348888Scaelusing macros to label
4448888Scaelpieces of text according to content.
4548888ScaelIn the context of manual pages, examples of content
4648888Scaelare a command name, a file pathname or a cross
4748888Scaelreference to another manual page; these
4848888Scaelitems have value
4948888Scaelfor both the author and the future user of the manual page.
5048888ScaelIt is hoped the consistency gained
5148888Scaelacross the manual set will provide easier
5248888Scaeltranslation to future documentation tools.
5348888Scael.Pp
5448888ScaelThrough out the
5548888Scael.Ux
5648888Scaelmanual pages, a manual entry
5748888Scaelis simply referred
5848888Scaelto as a man page, regardless of actual length and without
5948888Scaelsexist intention.
6043435Scael.Sh TROFF IDIOSYNCRASIES
6148888ScaelThe
6248888Scael.Nm \-mdoc
6348888Scaelpackage attempts to simplify the process of writing a man page.
6448888ScaelTheoretically, one should not have to learn the dirty details of
6543435Scael.Xr troff 1
6648888Scaelto use
6748888Scael.Nm \-mdoc ;
6848888Scaelhowever, there are a few
6943435Scaellimitations which are unavoidable and best gotten out
7048888Scaelof the way. And, too, be forewarned, this package is
7148888Scael.Em not
7248888Scaelfast.
7343435Scael.Ss Macro Usage
7443435ScaelAs in
7543435Scael.Xr troff 1 ,
7648888Scaela macro is called by placing a
7748888Scael.Ql \&\.
7843435Scael(dot character)
7943435Scaelat the beginning of
8043435Scaela line followed by the two character name for the macro.
8148888ScaelArguments may follow the macro separated by spaces.
8243435ScaelIt is the dot character at the beginning of the line which causes
8343435Scael.Xr troff 1
8448888Scaelto interpret the next two characters as a macro name.
8543435ScaelTo place a
8648888Scael.Ql \&\.
8743435Scael(dot character)
8843435Scaelat the beginning of a line in some context other than
8948888Scaela macro macro, precede the
9048888Scael.Ql \&\.
9143435Scael(dot) with a
9248888Scael.Ql \e& .
9348888Scael.Pp
9448888ScaelIn general,
9548888Scael.Xr troff 1
9648888Scaelmacros accept up to nine arguments, any
9748888Scaelextra arguments are ignored.
9848888ScaelMost macros in
9948888Scael.Nm \-mdoc
10048888Scaelaccept nine arguments and,
10148888Scaelin limited cases, arguments may be continued or extended
10248888Scaelon the
10348888Scaelnext line (See
10448888Scael.Sx Extensions
10548888Scael\-
10648888Scaelmacro
10748888Scael.Ql \&.Xo
10848888Scaeland
10948888Scael.Ql \&.Xc ) .
11048888ScaelA few macros handle quoted aguments (see
11148888Scael.Sx Passing Space Characters in an Argument
11248888Scaelbelow).
11348888ScaelMany
11448888Scael.Nm \-mdoc
11548888Scaelmacros may be given the
11643435Scaelname of another macro as an argument. In this case
11743435Scaelthe argument, although the name of a macro,
11843435Scaelis not preceded by a
11948888Scael.Ql \&\.
12043435Scael(dot),
12148888Scaeland is
12248888Scael.Em called
12348888Scaelwhen the argument is processed.
12448888ScaelIt is in this manner that some macros are nested; for
12548888Scaelexample
12648888Scaelthe option macro,
12748888Scael.Ql \&.Op ,
12848888Scaelmay
12943435Scael.Em call
13048888Scaelthe flag and argument macros,
13148888Scael.Ql \&.Fl
13248888Scaeland
13348888Scael.Ql \&.Ar ,
13448888Scaelto specify an optional flag with an argument:
13548888Scael.nr D 1
13648888Scael.Bl -tag -width "\&.Op \&Fl s \&Ar bytes" -offset indent
13748888Scael.It Op Fl s Ar bytes
13843435Scaelis produced by
13948888Scael.Li \&.Op \&Fl s \&Ar bytes
14048888Scael.El
14143435Scael.Pp
14248888ScaelTo prevent a two character
14348888Scaelstring from being interpreted as a macro name, precede
14448888Scaelthe string with the
14548888Scaelescape sequence
14648888Scael.Ql \e& :
14748888Scael.Bl -tag -width "[\&Fl s \&Ar bytes]" -offset indent
14848888Scael.It Op \&Fl s \&Ar bytes
14948888Scaelis produced by
15048888Scael.Li \&.Op \e&Fl s \e&Ar bytes
15148888Scael.El
15243435Scael.Pp
15348888Scael.nr D 0
15448888ScaelHere the strings
15548888Scael.Ql \&Fl
15648888Scaeland
15748888Scael.Ql \&Ar
15848888Scaelwere not interpreted as macros.
15948888ScaelDetails on callable macros are presented in the
16048888Scaelsections
16148888Scael.Sx CONTENT MACROS
16248888Scaeland
16348888Scael.Sx PAGE LAYOUT MACROS.
16448888Scael.Ss Passing Space Characters in an Argument
16548888ScaelSometimes it is desirable to give as one argument a string
16648888Scaelcontaining one or more blank space characters. This may be necessary
16748888Scaelto defeat the nine argument limit or to specify arguments to macros
16848888Scaelwhich expect particular arrangement of items in the argument list.
16948888ScaelFor example,
17048888Scaelthe function macro
17148888Scael.Ql \&.Fn
17248888Scaelexpects the first argument to be the name of a function and any
17348888Scaelremaining arguments to be function parameters. As
17448888Scael.Tn "ANSI C"
17548888Scaelstipulates the declaration of function parameters in the
17648888Scaelparenthesized parameter list, each parameter is guaranteed
17748888Scaelto be at minimum a two word string. For example,
17848888Scael.Fa int foo .
17948888ScaelThere are two possible ways to pass an argument which contains
18048888Scaelan imbedded space. Unfortunately, the most convient way
18148888Scaelof passing such a space between quotes was too expensive to implement for
18248888Scaelall the macros. It is however, implemented for the following macros which need
18348888Scaelit the most:
18443435Scael.Pp
18548888Scael.Bl -tag -width 4n -offset indent -compact
18648888Scael.It Li \&Cd
18748888ScaelConfiguration declaration (section 4 SYNOPSIS)
18848888Scael.It Li \&Bl
18948888ScaelBegin list (for the width specifier).
19048888Scael.It Li \&Em
19148888ScaelEmphasized text.
19248888Scael.It Li \&Fn
19348888ScaelFunctions (sections two and four).
19448888Scael.It Li \&It
19548888ScaelList items.
19648888Scael.It Li \&Li
19748888ScaelLiteral text.
19848888Scael.It Li \&Sy
19948888ScaelSymbolic text.
20048888Scael.It Li \&%B
20148888ScaelBook titles.
20248888Scael.It Li \&%J
20348888ScaelJournal names.
20448888Scael.It Li \&%O
20548888ScaelOptional notes for a reference.
20648888Scael.It Li \&%R
20748888ScaelReport title (in a reference).
20848888Scael.It Li \&%T
20948888ScaelTitle of article in a book or journal.
21048888Scael.El
21148888Scael.Pp
21248888ScaelOne way of passing a string
21348888Scaelcontaining blank spaces is to use the hard or unpaddable space character
21448888Scael.Ql \e\  ,
21548888Scaelthat is, a blank space preceeded by the escape character
21648888Scael.Ql \e .
21748888ScaelThis method may be used with any macro but has the side effect
21848888Scaelof interfering with the adjustment of text
21948888Scaelover the length of a line.
22048888Scael.Xr Troff
22148888Scaelsees the hard space as if it were any other printable character and
22248888Scaelcannot split the string into blank or newline separated pieces as one
22348888Scaelwould expect. The method is useful for strings which are not expected
22448888Scaelto overlap a line boundary. For example:
22548888Scael.Bl -tag -width "fetch(char *str)" -offset indent
22648888Scael.It Fn fetch char\ *str
22743435Scaelis created by
22848888Scael.Ql \&.Fn fetch char\e *str
22948888Scael.It Fn fetch "char *str"
23048888Scaelcan also be created by
23148888Scael.Ql \&.Fn fetch "\\*q*char *str\\*q"
23248888Scael.El
23348888Scael.Pp
23448888ScaelIf the
23548888Scael.Ql \e
23648888Scaelor quotes
23748888Scaelwere omitted,
23848888Scael.Ql \&.Fn
23948888Scaelwould see three arguments and
24048888Scaelthe result would be:
24148888Scael.Pp
24248888Scael.Dl Fn fetch char *str
24348888Scael.Pp
24450362ScaelFor an example of what happens when the parameter list overlaps
24550362Scaela newline boundary, see the
24650362Scael.Sx BUGS
24750362Scaelsection.
24850362Scael.\" Note what happens if the parameter list overlaps a newline
24950362Scael.\" boundary. For example, the next two examples are repeated several times
25050362Scael.\" to make sure a line boundary is crossed:
25150362Scael.\" .Bd -literal
25250362Scael.\" \&.Fn struct\e\ dictionarytable\e\ *dictionarylookup struct\e\ dictionarytable\e\ *tab[]
25350362Scael.\" .Ed
25450362Scael.\" .Pp
25550362Scael.\" produces, nudge nudge,
25650362Scael.\" .Fn struct\ dictionarytable\ *dictionarylookup char\ *h struct\ dictionarytable\ *tab[] ,
25750362Scael.\" .Fn struct\ dictionarytable\ *dictionarylookup char\ *h struct\ dictionarytable\ *tab[] ,
25850362Scael.\" nudge
25950362Scael.\" .Fn struct\ dictionarytable\ *dictionarylookup char\ *h struct\ dictionarytable\ *tab[] .
26050362Scael.\" .Pp
26150362Scael.\" If double quotes are used, for example:
26250362Scael.\" .Bd -literal
26350362Scael.\" \&.Fn \*qstruct dictionarytable *dictionarylookup\*q \*qchar *h\*q \*qstruct dictionarytable *tab[]\*q
26450362Scael.\" .Ed
26550362Scael.\" .Pp
26650362Scael.\" produces, nudge nudge,
26750362Scael.\" .Fn "struct dictionarytable *dictionarylookup" "char *h" "struct dictionarytable *tab[]" ,
26850362Scael.\" nudge
26950362Scael.\" .Fn "struct dictionarytable *dictionarylookup" "char *h" "struct dictionarytable *tab[]" ,
27050362Scael.\" nudge
27150362Scael.\" .Fn "struct dictionarytable *dictionarylookup" "char *h" "struct dictionarytable *tab[]" .
27250362Scael.\" .Pp
27350362Scael.\" Not a pretty sight...
27450362Scael.\" In a paragraph, a long parameter containing unpaddable spaces as
27550362Scael.\" in the former example will cause
27650362Scael.\" .Xr troff
27750362Scael.\" to break the line and spread
27850362Scael.\" the remaining words out.  The latter example will adjust nicely to
27950362Scael.\" justified margins, but may break in between an argument and its
28050362Scael.\" declaration. In
28150362Scael.\" .Xr nroff
28250362Scael.\" the right margin adjustment is normally ragged and the problem is
28350362Scael.\" not as severe.
28448888Scael.Ss Trailing Blank Space Characters
28548888Scael.Xr Troff
28648888Scaelcan be confused by blank space characters at the end of a line. It
28748888Scaelis wise preventative measure to globally remove all blank spaces
28848888Scaelfrom <blank-space><end-of-line> character sequences. Should the need
28948888Scaelarise to force a blank character at the end of a line,
29048888Scaelit may be forced with an unpaddable space and the
29148888Scael.Ql \e&
29248888Scaelescape character.
29348888ScaelFor example,
29448888Scael.Ql string\e\ \e& .
29543435Scael.Ss Escaping Special Characters
29643435ScaelSpecial characters
29743435Scaellike the newline character
29848888Scael.Ql \en ,
29943435Scaelare handled by replacing the
30048888Scael.Ql \e
30143435Scaelwith
30248888Scael.Ql \ee
30343435Scael(e.g.
30448888Scael.Ql \een )
30543435Scaelto preserve
30643435Scaelthe backslash.
30748888Scael.Sh THE ANATOMY OF A MAN PAGE (Getting Started)
30848888ScaelThere are three basic groups of macros: specific header macros
30948888Scaelcalled only once at the very beginning of
31048888Scaeleach manual page, page layout or structure macros
31148888Scaelwhich may be called many times, and content macros which also
31248888Scaelmay be called many times.
31348888ScaelThe body of a man page is easily constructed from a basic
31448888Scaeltemplate found in the file:
31548888Scael.Bd -literal -offset indent
31648888Scael\&.\e" /usr/share/misc/man.tempate :
31748888Scael\&.\e" The following six lines are required.
31848888Scael\&.Dt DOCUMENT_TITLE [section number] [volume]
31948888Scael\&.Os OPERATING_SYSTEM [version/release]
32048888Scael\&.Dd Month day, year
32148888Scael\&.Sh NAME
32248888Scael\&.Sh SYNOPSIS
32348888Scael\&.Sh DESCRIPTION
32448888Scael\&.\e" The following requests should be uncommented and
32548888Scael\&.\e" used where appropriate.  This next request is
32648888Scael\&.\e" for sections 2 and 3 function return values only.
32748888Scael\&.\e" .Sh RETURN VALUES
32848888Scael\&.\e" This next request is for sections 1, 6, 7 & 8 only
32948888Scael\&.\e" .Sh ENVIRONMENT
33048888Scael\&.\e" .Sh FILES
33148888Scael\&.\e" .Sh EXAMPLES
33248888Scael\&.\e" This next request is for sections 1, 6, 7 & 8 only
33348888Scael\&.\e"     (command return values (to shell) and
33448888Scael\&.\e"	  fprintf/stderr type diagnostics)
33548888Scael\&.\e" .Sh DIAGNOSTICS
33648888Scael\&.\e" The next request is for sections 2 and 3 error
33748888Scael\&.\e" and signal handling only.
33848888Scael\&.\e" .Sh ERRORS
33948888Scael\&.\e" .Sh SEE ALSO
34048888Scael\&.\e" .Sh STANDARDS
34148888Scael\&.\e" .Sh HISTORY
34248888Scael\&.\e" .Sh AUTHORS
34348888Scael\&.\e" .Sh BUGS
34448888Scael.Ed
34548888Scael.Pp
34648888ScaelThe first items in the template are the macros
34748888Scael.Pq Li \&.Dt , \&.Dd , \&.Os ;
34848888Scaelthe document or man page title
34948888Scael.Pq Em in upper case ,
35048888Scaelthe section of the manual the page
35148888Scaelbelongs to, the (document) date,
35248888Scaeland the operating system the man page is derived
35348888Scaelfrom. These macros identify the page,
35448888Scaeland are discussed below in
35548888Scael.Sx TITLE MACROS .
35648888Scael.Pp
35748888ScaelThe remaining items in the template are section headers
35848888Scael.Pq Li \&.Sh ;
35948888Scaelof which NAME, SYNOPSIS and DESCRIPTION
36048888Scaelare mandatory. The
36148888Scaelheaders are
36248888Scaeldiscussed in
36348888Scael.Sx PAGE LAYOUT MACROS,
36448888Scaelafter
36548888Scaelpresentation of
36648888Scael.Sx CONTENT MACROS .
36748888ScaelSeveral content macros are used to demonstrate page layout macros;
36848888Scaelreading about content macros before page layout macros is
36948888Scaelrecommended.
37048888Scael.Sh TITLE MACROS
37143435ScaelThree header macros designate the document title or manual page title,
37243435Scaelthe operating system,
37348888Scaeland the date of authorship.
37443435ScaelThese macros are one called once at the very beginning of the document
37543435Scaeland are used to construct the headers and footers only.
37648888Scael.Bl -tag -width 6n
37748888Scael.It Li \&.Dt DOCUMENT_TITLE section# [volume]
37843435ScaelThe document title is the
37943435Scaelsubject of the man page and must be in CAPITALS due to troff
38043435Scaellimitations.
38148888ScaelThe section number may be 1,\ ...,\ 8,
38243435Scaeland if it is specified,
38343435Scaelthe volume title may be omitted.
38443435ScaelA volume title may be arbitrary or one of the following:
38543435Scael.\" .Cl
38643435Scael.\" USD	UNIX User's Supplementary Documents
38743435Scael.\" .Cl
38843435Scael.\" PS1	UNIX Programmers's Supplementary Documents
38948888Scael.Pp
39048888Scael.Bl -column SMM -offset indent -compact
39148888Scael.It AMD	UNIX Ancestral Manual Documents
39248888Scael.It SMM	UNIX System Manager's Manual
39348888Scael.It URM	UNIX Reference Manual
39448888Scael.It PRM	UNIX Programmers's Manual
39548888Scael.El
39648888Scael.Pp
39743435Scael.\" .Cl
39843435Scael.\" MMI	UNIX Manual Master Index
39943435Scael.\" .Cl
40043435Scael.\" CON	UNIX Contributed Software Manual
40143435Scael.\" .Cl
40243435Scael.\" LOC	UNIX Local Manual
40348888Scael.It Li \&.Os operating_system release#
40443435ScaelThe name of the operating system
40543435Scaelshould be the common acronym, e.g. BSD
40643435Scaelor ATT.  The release should be the standard release
40748888Scaelnomenclature for the system specified, e.g. 4.3, 4.3+Tahoe, V.3,
40843435ScaelV.4. Unrecognized arguments are displayed as given in the page footer.
40943435ScaelFor instance, for the footer on this page, the 4.4 Berkeley Distribution
41043435Scaelwas produced by:
41143435Scael.Pp
41248888Scael.Dl \&.Os BSD 4.4
41348888Scael.It Li \&.Dd month day, year
41443435ScaelThe date should be written formally:
41543435Scael.Pp
41643435Scael.Dl January 25, 1989
41748888Scael.El
41848888Scael.Sh CONTENT MACROS
41948888Scael.Ss What's in a name...
42048888ScaelContent macro names are derived from the day to day
42148888Scaelinformal language used to describe commands, subroutines and related
42248888Scaelfiles. Slightly
42348888Scaeldifferent variations of this language are used to describe
42448888Scaelthe three different aspects of writing a man page.
42548888ScaelFirst, there is the description of
42648888Scael.Nm \-mdoc
42748888Scaelmacro request usage.
42848888ScaelSecond is the description of a
42948888Scael.Ux
43048888Scaelcommand
43148888Scael.Em with
43248888Scael.Nm \-mdoc
43348888Scaelmacros and third,
43448888Scaelthe
43548888Scaeldescription a command to a user in the verbal sense;
43648888Scaelthat is, discussion of a command in the text of a man page.
43748888Scael.Pp
43848888ScaelIn the first case,
43948888Scael.Xr troff 1
44048888Scaelmacros are themselves a type of command;
44148888Scaelthe general syntax for a troff command is:
44248888Scael.Bd -filled -offset indent
44348888Scael\&.Va argument1 argument2 ... argument9
44448888Scael.Ed
44548888Scael.Pp
44648888ScaelThe
44748888Scael.Ql \&.Va
44848888Scaelis a macro command or request, and anything following it is an argument to
44948888Scaelbe processed.
45048888ScaelIn the second case,
45148888Scaelthe description of a
45248888Scael.Ux
45348888Scaelcommand using the content macros is a
45448888Scaelbit more involved;
45548888Scaela typical SYNOPSIS command line might be displayed as:
45648888Scael.Pp
45748888Scael.Bd -filled -offset indent
45848888Scael.Nm filter
45948888Scael.Op Fl flag
46048888Scael.Ar infile outfile
46148888Scael.Ed
46248888Scael.Pp
46348888ScaelHere,
46448888Scael.Nm filter
46548888Scaelis the command name and the
46648888Scaelbracketed string
46748888Scael.Fl flag
46848888Scaelis a
46948888Scael.Em flag
47048888Scaelargument designated as optional by the option brackets.
47148888ScaelIn
47248888Scael.Nm \-mdoc
47348888Scaelterms,
47448888Scael.Ar infile
47543435Scaeland
47648888Scael.Ar outfile
47748888Scaelare
47848888Scaelcalled
47948888Scael.Em arguments .
48048888ScaelThe macros which formatted the above example:
48143435Scael.Pp
48250362Scael.Bd -literal -offset indent
48350362Scael\&.Nm filter
48450362Scael\&.Op \&Fl flag
48550362Scael\&.Ar infile outfile
48648888Scael.Ed
48748888Scael.Pp
48848888ScaelIn the third case, discussion of commands and command syntax
48948888Scaelincludes both examples above, but may add more detail. The
49048888Scaelarguments
49148888Scael.Ar infile
49248888Scaeland
49348888Scael.Ar outfile
49448888Scaelfrom the example above might be refered to as
49548888Scael.Em operands
49648888Scaelor
49748888Scael.Em file arguments .
49848888ScaelSome command line argument lists are quite long:
49948888Scael.\" .Bl -tag -width make -offset indent
50048888Scael.Bl -tag -width make -offset indent
50148888Scael.It Nm make
50248888Scael.Op Fl eiknqrstv
50348888Scael.Op Fl D Ar variable
50448888Scael.Op Fl d Ar flags
50548888Scael.Op Fl f Ar makefile
50648888Scael.Op Fl I Ar directory
50748888Scael.Op Fl j Ar max_jobs
50848888Scael.Op Ar variable=value
50948888Scael.br
51048888Scael.Op Ar "target\ ..."
51148888Scael.El
51248888Scael.Pp
51348888ScaelHere one might talk about the command
51448888Scael.Nm make
51548888Scaeland qualify the argument
51648888Scael.Ar makefile ,
51748888Scaelas an argument to the flag,
51848888Scael.Fl f ,
51948888Scaelor discuss the optional
52048888Scaelfile
52148888Scaeloperand
52248888Scael.Ar target .
52348888ScaelIn the verbal context, such detail can prevent confusion,
52448888Scaelhowever the
52548888Scael.Nm \-mdoc
52648888Scaelpackage
52748888Scaeldoes not have a macro for an argument
52848888Scael.Em to
52948888Scaela flag.
53048888ScaelInstead the
53148888Scael.Ql \&Ar
53248888Scaelargument macro is used for an operand or file argument like
53348888Scael.Ar target
53448888Scaelas well as an argument to a flag like
53548888Scael.Ar variable :
53648888Scael.Bd -literal -offset indent
53748888Scael\&.Nm make
53848888Scael\&.Op Fl eiknqrstv
53948888Scael\&.Op Fl D Ar variable
54048888Scael\&.Op Fl d Ar flags
54148888Scael\&.Op Fl f Ar makefile
54248888Scael\&.Op Fl I Ar directory
54348888Scael\&.Op Fl j Ar max_jobs
54448888Scael\&.Op Ar variable=value
54548888Scael\&.Op Ar target ...
54648888Scael.Ed
54748888Scael.Ss General Syntax
54848888ScaelAll content macros share a similar
54948888Scaelsyntax with a few minor deviations:
55048888Scael.Ql \&.Ar ,
55148888Scael.Ql \&.Fl ,
55248888Scael.Ql \&.Nm ,
55348888Scaeland
55448888Scael.Ql \&.Pa
55548888Scaeldiffer only when called without arguments;
55648888Scael.Ql \&.Fn
55748888Scaeland
55848888Scael.Ql \&.Xr
55948888Scaelimpose an order on their argument lists
56048888Scaeland the
56148888Scael.Em enclosure
56248888Scaeland
56348888Scael.Em quoting
56448888Scaelmacros
56548888Scaelhave nesting limitations. All content macros
56648888Scaelare capable of handling punctuation.
56743435ScaelAny argument which may be tested for punctuation
56843435Scaeland contains a member of the mathematical, logical or
56948888Scaelquotation set:
57048888Scael.Bd -literal -offset indent -compact
57143435Scael{+,\-,/,*,%,<,>,<=,>=,=,==,&,`,',"}
57248888Scael.Ed
57343435Scaelshould have
57448888Scaelthe character escaped with
57548888Scael.Ql \e& .
57648888ScaelTypical syntax is shown in the first content macro displayed
57748888Scaelbelow,
57848888Scael.Ql \&.Ad ,
57948888Scaeland the syntax for enclosure/quoting macros is shown in
58048888Scael.Sx Enclosure and Quoting Macros .
58148888Scael.Ss Address Macro
58248888ScaelThe address macro constructs an address
58343435Scaelof the form addr1[,addr2[,addr3]].
58443435Scael.Pp
58548888Scael.Dl Usage: .Ad address ... \*(Pu
58648888Scael.Bl -tag -width ".Ad f1 , f2 , f3 :" -compact -offset 14n
58748888Scael.It Li \&.Ad addr1
58843435Scael.Ad addr1
58948888Scael.It Li \&.Ad addr1\ .
59043435Scael.Ad addr1 .
59148888Scael.It Li \&.Ad addr1\ , file2
59243435Scael.Ad addr1 , file2
59348888Scael.It Li \&.Ad f1\ , f2\ , f3\ :
59443435Scael.Ad f1 , f2 , f3 :
59548888Scael.It Li \&.Ad addr\ )\ )\ ,
59643435Scael.Ad addr ) ) ,
59748888Scael.El
59848888Scael.Pp
59943435ScaelIt is an error to call
60043435Scael.Li \&.Ad
60143435Scaelwithout arguments.
60248888Scael.Li \&.Ad
60348888Scaelis callable by other macros and may call other macros.
60448888Scael.Ss Argument Macro
60543435ScaelThe
60643435Scael.Li \&.Ar
60748888Scaelargument macro may be used whenever
60843435Scaela command line argument is referenced.
60943435Scael.Pp
61043435Scael.Dl Usage: .Ar argument ... \*(Pu
61148888Scael.Bl -tag -width ".Ar file1 file2" -compact -offset 15n
61248888Scael.It Li \&.Ar
61343435Scael.Ar
61448888Scael.It Li \&.Ar file1
61543435Scael.Ar file1
61648888Scael.It Li \&.Ar file1\ .
61743435Scael.Ar file1 .
61848888Scael.It Li \&.Ar file1 file2
61943435Scael.Ar file1 file2
62048888Scael.It Li \&.Ar f1 f2 f3\ :
62143435Scael.Ar f1 f2 f3 :
62248888Scael.It Li \&.Ar file\ )\ )\ ,
62343435Scael.Ar file ) ) ,
62448888Scael.El
62543435Scael.Pp
62643435ScaelIf
62743435Scael.Li \&.Ar
62848888Scaelis called without arguments
62948888Scael.Ql Ar
63043435Scaelis assumed. The
63143435Scael.Li \&.Ar
63248888Scaelmacro may call other macros, and may be
63348888Scaelcalled by other macros.
63448888Scael.Ss Angle Bracket Quote/Enclosure
63548888ScaelEncloses a string or strings in between angle brackets. The macro
63648888Scael.Ql \&.Aq
63748888Scaelencloses the remaining arguments on the macro command line, and the
63848888Scael.Ql \&.Ao
63948888Scael(angle open) and
64048888Scael.Ql \&.Ac
64148888Scael(angle close) macros may be used across one or more lines.
64248888Scael.Pp
64348888Scael.Dl Usage: .Aq string ... \*(Pu
64448888Scael.Bl -tag -width ".Aq Pa ctype.h ) ," -compact -offset 14n
64548888Scael.It Li \&.Aq
64648888Scael.Aq
64748888Scael.It Li \&.Aq string.
64848888Scael.Aq string.
64948888Scael.It Li \&.Aq string\ .
65048888Scael.Aq string .
65148888Scael.It Li \&.Aq stdio.h
65248888Scael.Aq stdio.h
65348888Scael.It Li \&.Aq \&Ar ctype.h\ )\ ,
65448888Scael.Aq Ar ctype.h ) ,
65548888Scael.El
65648888Scael.Pp
65748888ScaelSee
65848888Scael.Sx Enclosure Macros
65948888Scaelfor discussion and
66048888Scael.Sx Options
66148888Scaelfor examples of the open and close
66248888Scaelmacros
66348888Scael.Ql \&.Ac
66448888Scaeland
66548888Scael.Ql \&.Ao .
66648888Scael.Ql \&.Aq
66748888Scaelis callable by other macros and may call other macros.
66848888Scael.Ss Bracket Quotes/Enclosure
66948888ScaelBracket quotes should be used when the string being bracketed is
67048888Scael.Em not
67148888Scaelan option string.  The brackets for an option may be different
67248888Scaelthan the default brackets. The macro
67348888Scael.Ql \&.Bq
67448888Scaelencloses the remaining arguments on a macro command line and the
67548888Scaelmacros
67648888Scael.Ql \&.Bo
67748888Scaeland
67848888Scael.Ql \&.Bc
67948888Scaelmay be used across one or more lines.
68043435Scael.Pp
68148888Scael.Dl Usage: .Bq string ... \*(Pu
68248888Scael.Pp
68348888ScaelThe
68448888Scael.Li \&.Bq
68548888Scaelmacro exists for statements which use other macros:
68648888Scael.Bq Em Greek , French .
68748888ScaelThis was done with:
68848888Scael.Pp
68948888Scael.Dl Li \&.Bq \&Em Greek \&, French \&.
69048888Scael.Pp
69148888ScaelIt also could have been done using the prefix macro:
69248888Scael.Pp
69348888Scael.Dl Li ".Pf [ Em Greek , French ] ."
69448888Scael.Pp
69548888ScaelSee
69648888Scael.Sx Enclosure Macros
69748888Scaelfor discussion and
69848888Scael.Sx Options
69948888Scaelfor examples of the open and close
70048888Scaelmacros
70148888Scael.Ql \&.Bc
70248888Scaeland
70348888Scael.Ql \&.Bo .
70448888ScaelThe
70548888Scael.Ql \&.Bq
70648888Scaelmacro
70748888Scaelis callable and may call other macros.
70848888Scael.Ss Configuration Declaration (section four only)
70948888ScaelThe
71048888Scael.Ql \&.Cd
71148888Scaelmacro is used to demonstrate a
71248888Scael.Xr config 8
71348888Scaeldeclaration for a device interface in a section four manual.
71448888ScaelThis macro accepts quoted arguments (double quotes only).
71548888Scael.Pp
71648888Scael.Bl -tag -width "device le0 at scode?" -offset indent
71748888Scael.It Cd "device le0 at scode?"
71848888Scaelproduced by:
71948888Scael.Ql ".Cd device le0 at scode?" .
72048888Scael.El
72148888Scael.Ss Command Modifier
72248888ScaelThe command modifier is identical to the
72348888Scael.Ql \&.Fl
72448888Scael(flag) command with the exception
72548888Scaelthe
72648888Scael.Ql \&.Cm
72748888Scaelmacro does not assert a dash
72848888Scaelin front of every argument. Traditionally flags are marked by the
72948888Scaelpreceding dash, some commands or subsets of commands do not use them.
73048888ScaelCommand modifiers may also be specified in conjunction with interactive
73148888Scaelcommands such as editor commands.
73248888ScaelSee
73348888Scael.Sx Flags .
73448888Scael.Ss Double Quote macro/Enclosure
73548888ScaelThe
73648888Scael.Ql \&.Dq
73748888Scaeldouble quote encloses
73848888Scaelany remaining strings on the command line with double quotes.
73948888ScaelPunctuation is
74048888Scaelplaced after the end quote.
74148888ScaelThe macros
74248888Scael.Ql \&.Do
74348888Scaeland
74448888Scael.Ql \&.Dc
74548888Scaelmay be used across one or more lines.
74648888Scael.Pp
74743435Scael.Dl Usage: .Dq string ... \*(Pu
74848888Scael.Bl -tag -width ".Dq Ar patternx ) ) ," -compact -offset 14n
74948888Scael.It Li \&.Dq
75043435Scael.Dq
75148888Scael.It Li ".Dq string."
75248888Scael.Dq string.
75348888Scael.It Li ".Dq string abc ."
75448888Scael.Dq string abc .
75548888Scael.It Li ".Dq \'^[A-Z]\'"
75648888Scael.Dq \'^[A-Z]\'
75748888Scael.It Li \&.Dq \&Ar pattern\ )\ )\ ,
75843435Scael.Dq Ar pattern ) ) ,
75948888Scael.El
76043435Scael.Pp
76143435ScaelIf
76248888Scael.Ql \&.Dq
76343435Scaelis called with no arguments
76443435Scael.Dq
76543435Scaelis assumed. The
76648888Scael.Ql \&.Dq
76748888Scaelmacro may call or be called by
76848888Scaelother macros.
76948888ScaelSee
77048888Scael.Sx Enclosure Macros
77148888Scaelfor discussion of
77248888Scael.Ql \&.Dc
77343435Scaeland
77448888Scael.Ql \&.Do
77548888Scaelmacro types.
77648888Scael.Ss Defined Variables
77748888ScaelA variable which is defined in an include file is specified
77848888Scaelby the macro
77948888Scael.Ql \&.Dv .
78043435Scael.Pp
78148888Scael.Dl Usage: .Dv defined_variable ... \*(Pu
78248888Scael.Bl -tag -width ".Dv MAXHOSTNAMELEN" -compact -offset 14n
78348888Scael.It Li ".Dv MAXHOSTNAMELEN"
78448888Scael.Dv MAXHOSTNAMELEN
78548888Scael.It Li ".Dv TIOCGPGRP )"
78648888Scael.Dv TIOCGPGRP )
78748888Scael.El
78848888Scael.Pp
78948888ScaelIt is an error to call
79048888Scael.Ql \&.Dv
79148888Scaelwithout arguments.
79248888Scael.Ql \&.Dv
79348888Scaelmay call other macros and
79448888Scaelmay be called by other macros.
79548888Scael.Ss Emphasis Macro
79648888ScaelText may be stressed or emphasized with the
79748888Scael.Ql \&.Em
79848888Scaelmacro.  The usual font for emphasis is italic.
79948888Scael.Pp
80043435Scael.Dl Usage: .Em argument ... \*(Pu
80148888Scael.Bl -tag -width ".Em vide infra ) ) ," -compact -offset 14n
80248888Scael.It Li ".Em does not"
80343435Scael.Em does not
80448888Scael.It Li ".Em exceed 1024 ."
80543435Scael.Em exceed 1024 .
80648888Scael.It Li ".Em vide infra ) ) ,"
80743435Scael.Em vide infra ) ) ,
80848888Scael.El
80943435Scael.Pp
81048888ScaelThe emphasis can be forced across several lines of text by using
81148888Scaelthe
81248888Scael.Ql \&.Bf
81348888Scaelmacro discussed in
81448888Scael.Sx Modes
81548888Scaelunder
81648888Scael.Sx PAGE LAYOUT .
81748888Scael.\" .Pp
81848888Scael.\" .Em
81948888Scael.\" I'm certain the reason so many people desire an MBA from Harvard
82048888Scael.\" is because they want to be successful philanthropists.
82148888Scael.\" .Em
82248888Scael.Pp
82348888ScaelThe
82448888Scael.Ql \&.Em
82548888Scaelmacro
82648888Scaelis callable and may call other macros.
82743435ScaelIt is an error to call
82848888Scael.Ql \&.Em
82943435Scaelwithout arguments.
83048888Scael.Ss Enclosure and Quoting Macros
83148888ScaelThe concept of enclosure is similar to quoting.
83248888ScaelThe object is to enclose a string or more between
83348888Scaela pair of characters like quotes or parentheses.
83448888ScaelThe terms quoting and enclosure are used
83548888Scaelinterchangeably throughout this document.  Many of the
83648888Scaelone line enclosure macros end
83748888Scaelend in small letter
83848888Scael.Ql q
83948888Scaelto give a hint of quoting, but there are a few exceptions
84048888Scael(the macros
84148888Scael.Ql \&.En ,
84248888Scael.Ql \&.Fn
84348888Scaeland
84448888Scael.Ql \&.Op
84548888Scaelare also enclosure macros).
84648888ScaelFor each enclosure macro
84748888Scaelthere is also a pair of open and close macros which end
84848888Scaelin small letters
84948888Scael.Ql o
85048888Scaeland
85148888Scael.Ql c
85248888Scaelrespectively. These can be used across one or more lines of text
85348888Scaeland while they cannot be nested, the one line quote macros
85448888Scaelcan be used inside
85548888Scaelof them.
85648888ScaelFor a good example of one these macros, see
85748888Scael.Sx Options .
85848888Scael.Pp
85948888Scael.Bd -filled -offset indent
86048888Scael.Bl -column "quote" "close" "open" "Enclose Stringx(in XX)" XXstringXX
86148888Scael.Em " quote	 close	 open	function	result"
86248888Scael\&.Aq,	.Ac,	.Ao	Angle Bracket Enclosure	<string>
86348888Scael\&.Bq,	.Bc,	.Bo	Bracket Enclosure	[string]
86448888Scael\&.Dq,	.Dc,	.Do	Double Quote	``string''
86548888Scael	.Ec,	.Eo	Enclose String (in XX)	XXstringXX
86648888Scael\&.Fn,	.Fc,	.Fo	Function Enclosure	function(string)
86748888Scael\&.Op,	.Oc,	.Oo	Option Enclosure	[string]
86848888Scael\&.Pq,	.Pc,	.Po	Parenthesis Enclosure	(string)
86948888Scael\&.Qq,	.Qc,	.Qo	Straight Double Quote	"string"
87048888Scael\&.Sq,	.Sc,	.So	Single Quote	`string'
87148888Scael\&	.Xc,	.Xo	Extend Argument	\ \-\-
87248888Scael.El
87348888Scael.Ed
87448888Scael.Pp
87548888ScaelThe macros
87648888Scael.Ql \&.Eo
87748888Scaeland
87848888Scael.Ql \&.Ec
87948888Scaelallow a user to specify an open and close with the first argument as the
88048888Scaelopening or closing string respectively.
88148888Scael.Ss Errno's (Section two only)
88243435ScaelThe
88348888Scael.Ql \&.Er
88448888Scaelerrno macro specifies the error return value
88548888Scaelfor section two library routines. The second example
88643435Scaelbelow shows
88748888Scael.Ql \&.Er
88843435Scaelused with the
88948888Scael.Ql \&.Bq
89048888Scaelmacro, as it would be used in
89148888Scaela section two manual page.
89243435Scael.Pp
89343435Scael.Dl Usage: .Er ERRNOTYPE ... \*(Pu
89448888Scael.Bl -tag -width ".Bq Er ENOTDIR" -compact -offset 14n
89548888Scael.It Li \&.Er ENOENT
89643435Scael.Er ENOENT
89748888Scael.It Li \&.Er ENOENT\ )\ ;
89848888Scael.Er ENOENT ) ;
89948888Scael.It Li \&.Bq \&Er ENOTDIR
90048888Scael.Bq Er ENOTDIR
90148888Scael.El
90243435Scael.Pp
90343435ScaelIt is an error to call
90448888Scael.Ql \&.Er
90543435Scaelwithout arguments.
90648888ScaelThe
90748888Scael.Ql \&.Er
90848888Scaelmacro
90948888Scaelis callable and may call other macros.
91043435Scael.Ss Environment Variables
91143435ScaelThe
91248888Scael.Ql \&.Ev
91348888Scaelmacro specifies a environment variable.
91443435Scael.Pp
91543435Scael.Dl Usage: .Ev argument ... \*(Pu
91648888Scael.Bl -tag -width ".Ev PRINTER ) ) ," -compact -offset 14n
91748888Scael.It Li \&.Ev DISPLAY
91843435Scael.Ev  DISPLAY
91948888Scael.It Li \&.Ev PATH\ .
92043435Scael.Ev PATH .
92148888Scael.It Li \&.Ev PRINTER\ )\ )\ ,
92243435Scael.Ev PRINTER ) ) ,
92348888Scael.El
92443435Scael.Pp
92543435ScaelIt is an error to call
92648888Scael.Ql \&.Ev
92743435Scaelwithout arguments.
92848888ScaelThe
92948888Scael.Ql \&.Ev
93048888Scaelmacro
93148888Scaelis callable by other macros and may call other macros.
93248888Scael.Ss Function Argument
93348888ScaelThe
93448888Scael.Ql \&.Fa
93548888Scaelmacro is used to refer to function arguments (parameters)
93648888Scaeloutside of the SYNOPSIS section of the manual or inside
93748888Scaelthe SYNOPSIS section should a parameter list be too
93848888Scaellong for the
93948888Scael.Ql \&.Fn
94048888Scaelmacro and the enclosure macros
94148888Scael.Ql \&.Fo
94248888Scaeland
94348888Scael.Ql \&.Fc
94448888Scaelmust be used.
94548888Scael.Ql \&.Fa
94648888Scaelmay also be used to refer to structure members.
94748888Scael.Pp
94848888Scael.Dl Usage: .Fa function_argument ... \*(Pu
94948888Scael.Bl -tag -width ".Fa d_namlen\ )\ )\ ," -compact -offset 14n
95048888Scael.It Li \&.Fa d_namlen\ )\ )\ ,
95148888Scael.Fa d_namlen ) ) ,
95248888Scael.It Li \&.Fa iov_len
95348888Scael.Fa iov_len
95448888Scael.El
95548888Scael.Pp
95648888ScaelIt is an error to call
95748888Scael.Ql \&.Fa
95848888Scaelwithout arguments.
95948888Scael.Ql \&.Fa
96048888Scaelis callable by other macros and may call other macros.
96148888Scael.Ss Function Declaration
96248888ScaelThe
96348888Scael.Ql \&.Fd
96448888Scaelmacro is used in the SYNOPSIS section with section two or three
96548888Scaelfunctions. The
96648888Scael.Ql \&.Fd
96748888Scaelmacro does not call other macros and is not callable by other
96848888Scaelmacros.
96948888Scael.Pp
97048888Scael.Dl Usage: .Fd include_file (or defined variable)
97148888Scael.Pp
97248888ScaelIn the SYNOPSIS section a
97348888Scael.Ql \&.Fd
97448888Scaelrequest causes a line break if a function has already been presented
97548888Scaeland a break has not occurred. This leaves a nice vertical space
97648888Scaelin between the previous function call and the declaration for the
97748888Scaelnext function.
97843435Scael.Ss Flags
97943435ScaelThe
98048888Scael.Ql \&.Fl
98148888Scaelmacro handles command line flags. It prepends
98243435Scaela dash,
98348888Scael.Ql \- ,
98443435Scaelto the flag. For interactive command flags, which
98543435Scaelare not prepended with a dash, the
98648888Scael.Ql \&.Cm
98748888Scael(command modifier)
98848888Scaelmacro is identical, but with out the dash.
98943435Scael.Pp
99043435Scael.Dl Usage: .Fl argument ... \*(Pu
99148888Scael.Bl -tag -width ".Fl \-s \-t \-v" -compact -offset 14n
99248888Scael.It Li \&.Fl
99343435Scael.Fl
99448888Scael.It Li \&.Fl cfv
99543435Scael.Fl cfv
99648888Scael.It Li \&.Fl cfv\ .
99743435Scael.Fl cfv .
99848888Scael.It Li \&.Fl s v t
99943435Scael.Fl s v t
100048888Scael.It Li \&.Fl -\ ,
100143435Scael.Fl - ,
100248888Scael.It Li \&.Fl xyz\ )\ ,
100343435Scael.Fl xyz ) ,
100448888Scael.El
100543435Scael.Pp
100643435ScaelThe
100748888Scael.Ql \&.Fl
100848888Scaelmacro without any arguments results
100948888Scaelin a dash representing stdin/stdout.
101043435ScaelNote that giving
101148888Scael.Ql \&.Fl
101243435Scaela single dash, will result in two dashes.
101348888ScaelThe
101448888Scael.Ql \&.Fl
101548888Scaelmacro
101648888Scaelis callable and may call other macros.
101743435Scael.Ss Functions (library routines)
101848888ScaelThe .Fn macro is modeled on ANSI C conventions.
101948888Scael.Bd -literal
102048888ScaelUsage: .Fn [type] function [[type] params ... \*(Pu]
102148888Scael.Ed
102250362Scael.Bl -tag -width ".Fn .int align. .const * char *sptrsxx" -compact
102348888Scael.It Li "\&.Fn getchar"
102443435Scael.Fn getchar
102548888Scael.It Li "\&.Fn strlen ) ,"
102643435Scael.Fn strlen ) ,
102748888Scael.It Li \&.Fn "\\*qint align\\*q" "\\*qconst * char *sptrs\\*q" ,
102848888Scael.Fn "int align" "const * char *sptrs" ,
102948888Scael.El
103043435Scael.Pp
103143435ScaelIt is an error to call
103248888Scael.Ql \&.Fn
103343435Scaelwithout any arguments.
103448888ScaelThe
103548888Scael.Ql \&.Fn
103648888Scaelmacro
103748888Scaelis callable by other macros and may call other macros, but
103848888Scaelnote that any call to another macro signals the end of
103948888Scaelthe
104048888Scael.Ql \&.Fn
104148888Scaelcall (it will close-paren at that point).
104248888Scael.Pp
104348888ScaelIn the SYNOPSIS section, the function will always begin at
104448888Scaelthe beginning of line. If there is more than one function
104548888Scaelpresented in the SYNOPSIS section and a function type has not been
104648888Scaelgiven, a line break will occur, leaving a nice vertical space
104748888Scaelbetween the current function name and the one prior.
104843435ScaelAt the moment,
104948888Scael.Ql \&.Fn
105043435Scaeldoes not check its word boundaries
105148888Scaelagainst troff line lengths and may split across a newline
105248888Scaelungracefully. This will be fixed in the near future.
105348888Scael.Ss Function Type
105448888ScaelThis macro is intended for the SYNOPSIS section. It may be used
105548888Scaelanywhere else in the manpage without problems, but its main purpose
105648888Scaelis to present the function type in kernel normal form for the SYNOPSIS
105748888Scaelof sections two and three
105848888Scael(it causes a page break allowing the function name to appear
105948888Scaelon the next line).
106048888Scael.Pp
106148888Scael.Dl Usage: .Ft type ... \*(Pu
106248888Scael.Pp
106348888Scael.Bl -tag -width "\&.Ft struct stat" -offset 14n -compact
106448888Scael.It Li \&.Ft struct stat
106548888Scael.Ft struct stat
106648888Scael.El
106748888Scael.Pp
106843435ScaelThe
106948888Scael.Ql \&.Ft
107048888Scaelrequest is not callable by other macros.
107148888Scael.Ss Interactive Commands
107248888ScaelThe
107348888Scael.Ql \&.Ic
107448888Scaelmacro designates an interactive or internal command.
107548888Scael.Pp
107648888Scael.Dl Usage: .Li argument ... \*(Pu
107748888Scael.Bl -tag -width ".Ic setenv , unsetenv" -compact -offset 14n
107848888Scael.It Li \&.Ic :wq
107948888Scael.Ic :wq
108048888Scael.It Li \&.Ic do while {...}
108148888Scael.Ic do while {...}
108248888Scael.It Li \&.Ic setenv\ , unsetenv
108348888Scael.Ic setenv , unsetenv
108448888Scael.El
108548888Scael.Pp
108648888ScaelIt is an error to call
108748888Scael.Ql \&.Ic
108848888Scaelwithout arguments.
108948888ScaelThe
109048888Scael.Ql \&.Ic
109148888Scaelmacro may call other macros and is callable.
109243435Scael.Ss Literals
109343435ScaelThe
109448888Scael.Ql \&.Li
109548888Scaelliteral macro may be used for special characters,
109643435Scaelvariable constants, anything which should be displayed as it
109743435Scaelwould be typed.
109843435Scael.Pp
109943435Scael.Dl Usage: .Li argument ... \*(Pu
110048888Scael.Bl -tag -width ".Li cntrl-D ) ,"  -compact -offset 14n
110148888Scael.It Li \&.Li \een
110243435Scael.Li \en
110348888Scael.It Li \&.Li M1 M2 M3\ ;
110443435Scael.Li M1 M2 M3 ;
110548888Scael.It Li \&.Li cntrl-D\ )\ ,
110643435Scael.Li cntrl-D ) ,
110748888Scael.It Li \&.Li 1024\ ...
110843435Scael.Li 1024 ...
110948888Scael.El
111043435Scael.Pp
111143435ScaelThe
111248888Scael.Ql \&.Li
111348888Scaelmacro
111448888Scaelis callable by other macros and may call other macros.
111548888Scael.Ss Name Macro
111648888ScaelThe
111748888Scael.Ql \&.Nm
111848888Scaelmacro is used for the document title or subject name.
111948888ScaelIt has the peculiarity of remembering the first
112043435Scaelargument it was called with, which should
112143435Scaelalways be the subject name of the page.  When called without
112243435Scaelarguments,
112348888Scael.Ql \&.Nm
112443435Scaelregurgitates this initial name for the sole purpose
112543435Scaelof making less work for the author.
112648888ScaelNote:
112748888Scaela section two
112843435Scaelor three document function name is addressed with the
112948888Scael.Ql \&.Nm
113048888Scaelin the NAME section, and with
113148888Scael.Ql \&.Fn
113248888Scaelin the SYNOPSIS
113348888Scaeland remaining sections.
113443435ScaelFor interactive commands, such as the
113548888Scael.Ql while
113643435Scaelcommand keyword in
113743435Scael.Xr csh 1 ,
113843435Scaelthe
113948888Scael.Ql \&.Ic
114048888Scaelmacro should be used.
114143435ScaelWhile the
114248888Scael.Ql \&.Ic
114343435Scaelis nearly identical
114443435Scaelto
114548888Scael.Ql \&.Nm ,
114643435Scaelit can not recall the first argument it was invoked with.
114743435Scael.Pp
114843435Scael.Dl Usage: .Nm argument ... \*(Pu
114948888Scael.Bl -tag -width ".Nm mdoc.sample" -compact -offset 14n
115048888Scael.It Li \&.Nm mdoc.sample
115143435Scael.Nm  mdoc.sample
115248888Scael.It Li \&.Nm \-mdoc
115343435Scael.Nm \-mdoc .
115448888Scael.It Li \&.Nm foo\ )\ )\ ,
115543435Scael.Nm foo ) ) ,
115648888Scael.It Li \&.Nm
115743435Scael.Nm
115848888Scael.El
115943435Scael.Pp
116043435ScaelThe
116148888Scael.Ql \&.Nm
116248888Scaelmacro
116348888Scaelis callable by other macros and may call other macros.
116448888Scael.Ss No\-Op or Normal Text Macro
116548888ScaelThe macro
116648888Scael.Li \&.No
116748888Scaelis
116848888Scaela hack for words in a macro command line which should
116948888Scael.Em not
117048888Scaelbe formatted and follows the conventional syntax
117148888Scaelfor content macros.
117248888Scael.Ss No Space Macro
117348888ScaelThe
117448888Scael.Ql \&.Ns
117548888Scaelmacro eliminates unwanted spaces in between macro requests.
117648888ScaelIt is useful for old style argument lists where there is no space
117748888Scaelbetween the flag and argument:
117848888Scael.Bl -tag -width ".Op Fl I Ns Ar directory" -offset indent
117948888Scael.It Li ".Op Fl I Ns Ar directory"
118048888Scaelproduces
118148888Scael.Op Fl I Ns Ar directory
118248888Scael.El
118348888Scael.Pp
118448888ScaelNote: the
118548888Scael.Ql \&.Ns
118648888Scaelmacro always invokes the
118748888Scael.Ql \&.No
118848888Scaelmacro after eliminating the space unless another macro name
118948888Scaelfollows it.
119048888ScaelThe macro
119148888Scael.Ql \&.Ns
119248888Scaelis callable and may call other macros.
119348888Scael.Ss Options
119448888ScaelThe
119548888Scael.Ql \&.Op
119648888Scaelmacro
119748888Scaelplaces option brackets around the any remaining arguments on the command
119848888Scaelline, and places any
119948888Scaeltrailing punctuation outside the brackets. The macros
120048888Scael.Ql \&.Oc
120148888Scaeland
120248888Scael.Ql \&.Oo
120348888Scaelmay be used across one or more lines.
120448888Scael.Pp
120548888Scael.Dl Usage: .Op options ... \*(Pu
120648888Scael.Bl -tag -width ".Op Fl c Ar objfil Op Ar corfil ," -compact -offset indent
120748888Scael.It Li \&.Op
120848888Scael.Op
120948888Scael.It Li ".Op Fl k"
121048888Scael.Op Fl k
121148888Scael.It Li ".Op Fl k ) ."
121248888Scael.Op Fl k ) .
121348888Scael.It Li ".Op Fl k Ar kookfile"
121448888Scael.Op Fl k Ar kookfile
121548888Scael.It Li ".Op Fl k Ar kookfile ,"
121648888Scael.Op Fl k Ar kookfile ,
121748888Scael.It Li ".Op Ar objfil Op Ar corfil"
121848888Scael.Op Ar objfil Op Ar corfil
121948888Scael.It Li ".Op Fl c Ar objfil Op Ar corfil ,"
122048888Scael.Op Fl c Ar objfil Op Ar corfil ,
122148888Scael.It Li \&.Op word1 word2
122248888Scael.Op word1 word2
122348888Scael.El
122448888Scael.Pp
122548888ScaelThe
122648888Scael.Ql \&.Oc
122748888Scaeland
122848888Scael.Ql \&.Oo
122948888Scaelmacros:
123048888Scael.Bd -literal -offset indent
123148888Scael\&.Oo
123248888Scael\&.Op \&Fl k \&Ar kilobytes
123348888Scael\&.Op \&Fl i \&Ar interval
123448888Scael\&.Op \&Fl c \&Ar count
123548888Scael\&.Oc
123648888Scael.Ed
123748888Scael.Pp
123848888ScaelProduce:
123948888Scael.Oo
124048888Scael.Op Fl k Ar kilobytes
124148888Scael.Op Fl i Ar interval
124248888Scael.Op Fl c Ar count
124348888Scael.Oc
124448888Scael.Pp
124548888ScaelThe macros
124648888Scael.Ql \&.Op ,
124748888Scael.Ql \&.Oc
124848888Scaeland
124948888Scael.Ql \&.Oo
125048888Scaelare callable and may call other macros.
125148888Scael.Ss Parenthesis Quote/Enclosure
125248888ScaelMacros
125348888Scael.Li \&.Pq , \&.Pc
125448888Scaeland
125548888Scael.Li \&.Po
125648888Scaelfollow the conventions for a typical quoting macros,
125748888Scaelsee
125848888Scael.Sx Enclosure Macros
125948888Scaeland
126048888Scael.Sx Options
126148888Scaelabove.
126243435Scael.Ss Pathnames
126343435ScaelThe
126448888Scael.Ql \&.Pa
126548888Scaelmacro formats path or file names.
126643435Scael.Pp
126743435Scael.Dl Usage: .Pa pathname \*(Pu
126848888Scael.Bl -tag -width ".Pa /tmp/fooXXXXX ) ." -compact -offset 14n
126948888Scael.It Li \&.Pa /usr/share
127043435Scael.Pa /usr/share
127148888Scael.It Li \&.Pa /tmp/fooXXXXX\ )\ .
127243435Scael.Pa /tmp/fooXXXXX ) .
127348888Scael.El
127443435Scael.Pp
127548888ScaelThe
127648888Scael.Ql \&.Pa
127748888Scaelmacro
127848888Scaelis callable by other macros and may call other macros.
127948888Scael.Ss Single Quotes/Enclosure
128048888ScaelSee
128148888Scael.Sx Enclosure Macros .
128248888ScaelSee
128348888Scael.Sx Double Quote/Enclosure
128448888Scaelabove.
128548888ScaelThe single quoting macro
128648888Scael.Ql \&.Sq
128748888Scaelworks in the identical manner as
128848888Scael.Ql \&.Dq.
128948888Scael.Ss Prefix Macro
129048888ScaelThe
129150362Scael.Ql \&.Pf
129250362Scaelmacro
129350362Scaelis a short cut for combining
129448888Scaeltwo strings together, the first of which is
129550362Scaelin the default font, and the second a content
129648888Scaelspecified string.
129748888Scael.Pp
129848888Scael.Bl -tag -width ".Pf ( Fa name2 " -offset 14n -compact
129948888Scael.It Li ".Pf ( Fa name2"
130048888Scaelbecomes
130148888Scael.Pf ( Fa name2
130248888Scael.El
130348888Scael.Pp
130448888ScaelThe
130548888Scael.Ql \&.Pf
130648888Scaelmacro is not callable, but may call other macros.  The
130748888Scael.Ql \&.Ns
130848888Scaelmacro performs the analogus suffix function.
130948888Scael.Ss Section Cross References
131048888ScaelThe
131148888Scael.Ql \&.Sx
131248888Scaelmacro designates a reference to a section header
131348888Scaelwithin the same document. It is callable by other macros and may
131448888Scaelcall other macros.
131548888Scael.Pp
131648888Scael.Bl -tag -width "Li \&.Sx FILES" -offset 14n
131748888Scael.It Li \&.Sx FILES
131848888Scael.Sx FILES
131948888Scael.El
132048888Scael.Ss References and Citations
132148888ScaelThe following macros make a modest attempt to handle references.
132248888ScaelAt best, the macros make it convientent to manually drop in a subset of
132348888Scaelrefer style references.
132448888Scael.Pp
132548888Scael.Bl -tag -width 6n -offset indent -compact
132648888Scael.It Li ".Rs"
132748888ScaelReference Start. Causes a line break and begins collection
132848888Scaelof reference information until the
132948888Scaelreference end macro is read.
133048888Scael.It Li ".Re"
133148888ScaelReference End. The reference is printed.
133248888Scael.It Li ".%A"
133348888ScaelReference author name, one name per invocation.
133448888Scael.It Li ".%B"
133548888ScaelBook title.
133648888Scael.It Li ".%J"
133748888ScaelJournal title.
133848888Scael.It Li ".%N"
133948888ScaelIssue number.
134048888Scael.It Li ".%O"
134148888ScaelOptional information.
134248888Scael.It Li ".%R"
134348888ScaelReport name.
134448888Scael.It Li ".%T"
134548888ScaelTitle of article.
134648888Scael.It Li ".%V"
134748888ScaelVolume(s).
134848888Scael.El
134948888Scael.Pp
135048888ScaelThe macros begining with
135148888Scael.Ql %
135248888Scaelare not callable, but may call only the trade name macro which
135348888Scaelreturns to its caller. The purpose is to allow trade names
135448888Scaelto be pretty printed in troff/ditroff output. WARNING: this
135548888Scaelhas very few trade names defined at the moment and will print unknown
135648888Scaeltrade names in the default font.
135743435Scael.Ss Symbolic
135848888ScaelThe symbolic emphasis macro is generally a boldface macro in
135948888Scaeleither the symbolic sense or the traditional English usage.
136043435Scael.Pp
136143435Scael.Dl Usage: .Sy symbol ... \*(Pu
136248888Scael.Bl -tag -width ".Sy Important Notice" -compact -offset 14n
136348888Scael.It Li \&.Sy Important Notice
136448888Scael.Sy Important Notice
136548888Scael.El
136643435Scael.Pp
136743435ScaelThe
136848888Scael.Ql \&.Sy
136948888Scaelmacro
137048888Scaelis callable by other macros and may call other macros, except
137148888Scaelin the second form.  Arguments to
137248888Scael.Ql \&.Sy
137348888Scaelmay be quoted.
137443435Scael.Ss Variables
137543435ScaelGeneric variable reference:
137643435Scael.Pp
137743435Scael.Dl Usage: .Va variable ... \*(Pu
137848888Scael.Bl -tag -width ".Va char s ] ) ) ," -compact -offset 14n
137948888Scael.It Li \&.Va count
138043435Scael.Va count
138148888Scael.It Li \&.Va settimer ,
138243435Scael.Va settimer ,
138348888Scael.It Li \&.Va int\ *prt\ )\ :
138443435Scael.Va int\ *prt ) :
138548888Scael.It Li \&.Va char\ s\ ]\ )\ )\ ,
138643435Scael.Va char\ s ] ) ) ,
138748888Scael.El
138843435Scael.Pp
138948888ScaelIt is an error to call
139048888Scael.Ql \&.Va
139148888Scaelwithout any arguments.
139248888ScaelThe
139348888Scael.Ql \&.Va
139448888Scaelmacro
139548888Scaelis callable by other macros and may call other macros.
139643435Scael.Ss Cross References
139743435ScaelThe
139848888Scael.Ql \&.Xr
139948888Scaelmacro expects the first argument to be
140043435Scaela manual page name, and the second argument, if it exists,
140143435Scaelto be either a section page number or punctuation.  Any
140243435Scaelremaining arguments are assumed to be punctuation.
140343435Scael.Pp
140443435Scael.Dl Usage: .Xr manpage [1,...,8] \*(Pu
140548888Scael.Bl -tag -width ".Xr mdoc 7 ) ) ," -compact -offset 14n
140648888Scael.It Li \&.Xr mdoc
140743435Scael.Xr mdoc
140848888Scael.It Li \&.Xr mdoc\ ,
140943435Scael.Xr mdoc ,
141048888Scael.It Li \&.Xr mdoc 7
141143435Scael.Xr mdoc 7
141248888Scael.It Li \&.Xr mdoc 7\ )\ )\ ,
141343435Scael.Xr mdoc 7 ) ) ,
141448888Scael.El
141543435Scael.Pp
141643435ScaelThe
141748888Scael.Ql \&.Xr
141848888Scaelmacro
141948888Scaelis callable by other macros and may call other macros.
142043435ScaelIt is an error to call
142148888Scael.Ql \&.Xr
142243435Scaelwithout
142343435Scaelany arguments.
142448888Scael.Ss Extended  Arguments
142548888ScaelThe
142648888Scael.Li \&.Xo
142748888Scaeland
142848888Scael.Li \&.Xc
142948888Scaelmaxros allow one to extend an argument list
143048888Scaelon a macro boundary.  Argument lists cannot
143148888Scaelbe extended within a macro
143248888Scaelwhich expects all of its arguments on one line such
143348888Scaelas
143448888Scael.Ql \&.Op .
143543435Scael.\" ---
143643435Scael.Sh PAGE LAYOUT MACROS
143743435Scael.Ss Section Headers
143848888ScaelThe first three
143948888Scael.Ql \&.Sh
144048888Scaelsection header macros
144148888Scaellist below are required in every
144248888Scaelman page. The remaining section headers
144348888Scaelare recommended at the disgression of the author
144448888Scaelwriting the manual page. The
144548888Scael.Ql \&.Sh
144648888Scaelmacro can take up to nine arguments. It may call
144748888Scaelother macros, but it may not be called by other macros.
144848888Scael.Bl -tag -width ".Sh SYNOPSIS"
144948888Scael.It \&.Sh NAME
145043435ScaelThe
145148888Scael.Ql \&.Sh NAME
145248888Scaelmacro is mandatory. If not specified,
145343435Scaelthe headers, footers and page layout defaults
145443435Scaelwill not be set and things will be rather unpleasant.
145543435ScaelThe NAME section consists of at least three items.
145643435ScaelThe first is the
145748888Scael.Ql \&.Nm
145848888Scaelname macro naming the subject of the man page.
145948888ScaelThe second is the Name Description macro,
146048888Scael.Ql \&.Nd ,
146143435Scaelwhich separates the subject
146243435Scaelname from the third item, which is the description. The
146343435Scaeldescription should be the most terse and lucid possible,
146443435Scaelas the space available is small.
146548888Scael.It \&.Sh SYNOPSIS
146643435ScaelThe SYNOPSIS section describes the typical usage of the
146748888Scaelsubject of a man page. The  macros required
146843435Scaelare either
146948888Scael.Ql ".Nm" ,
147048888Scael.Ql ".Cd" ,
147143435Scaelor
147248888Scael.Ql ".Fn"
147348888Scael(and possibly
147448888Scael.Ql ".Fd" ,
147548888Scael.Ql ".Ft"
147648888Scaelmacros).
147743435ScaelThe function name
147848888Scaelmacro
147948888Scael.Ql ".Fn"
148043435Scaelis required
148143435Scaelfor manual page sections 2 and 3, the command and general
148248888Scaelname macro
148348888Scael.Ql \&.Nm
148448888Scaelis required for sections 1, 5, 6, 7, 8.
148548888ScaelSection 4 manuals require a
148648888Scael.Ql ".Nm" , ".Fd"
148748888Scaelor a
148848888Scael.Ql ".Cd"
148948888Scaelconfiguration device usage macro.
149048888ScaelSeveral other macros may be necessary to produce
149143435Scaelthe synopsis line as shown below:
149243435Scael.Pp
149348888Scael.Bd -filled -offset indent
149443435Scael.Nm cat
149543435Scael.Op Fl benstuv
149643435Scael.Op Fl
149743435Scael.Ar
149848888Scael.Ed
149943435Scael.Pp
150048888ScaelThe following macros were used:
150143435Scael.Pp
150243435Scael.Dl \&.Nm cat
150348888Scael.Dl \&.Op \&Fl benstuv
150448888Scael.Dl \&.Op \&Fl
150543435Scael.Dl \&.Ar
150648888Scael.It \&.Sh DESCRIPTION
150743435ScaelIn most cases the first text in the DESCRIPTION section
150843435Scaelis a brief paragraph on the command, function or file,
150943435Scaelfollowed by a lexical list of options and respective
151043435Scaelexplanations. To create such a list, the
151148888Scael.Ql \&.Bl
151248888Scaelbegin-list,
151348888Scael.Ql \&.It
151448888Scaellist-item and
151548888Scael.Ql \&.El
151648888Scaelend-list
151748888Scaelmacros are used (see
151848888Scael.Sx Lists and Columns
151948888Scaelbelow).
152048888Scael.El
152143435Scael.Pp
152243435ScaelThe following
152348888Scael.Ql \&.Sh
152443435Scaelsection headers are part of the
152543435Scaelpreferred manual page layout and must be used appropriately
152643435Scaelto maintain consistency. They are listed in the order
152743435Scaelin which they would be used.
152848888Scael.Bl -tag -width SYNOPSIS
152948888Scael.It \&.Sh ENVIRONMENT
153043435ScaelThe ENVIRONMENT section should reveal any related
153143435Scaelenvironment
153243435Scaelvariables and clues to their behaviour and/or usage.
153348888Scael.It \&.Sh EXAMPLES
153443435ScaelThere are several ways to create examples. See
153543435Scaelthe EXAMPLES section below
153643435Scaelfor details.
153748888Scael.It \&.Sh FILES
153843435ScaelFiles which are used or created by the man page subject
153943435Scaelshould be listed via the
154048888Scael.Ql \&.Pa
154148888Scaelmacro in the FILES section.
154248888Scael.It \&.Sh SEE ALSO
154343435ScaelReferences to other material on the man page topic and
154443435Scaelcross references to other relevant man pages should
154543435Scaelbe placed in the SEE ALSO section.  Cross references
154643435Scaelare specified using the
154748888Scael.Ql \&.Xr
154848888Scaelmacro.  At this time
154943435Scael.Xr refer 1
155043435Scaelstyle references are not accommodated.
155148888Scael.It \&.Sh STANDARDS
155243435ScaelIf the command, library function or file adheres to a
155343435Scaelspecific implementation such as POSIX 1003.1 or
155443435ScaelANSI C X3.159-1989 this should be noted here.  If the
155543435Scaelcommand does not adhere to any standard, its history
155643435Scaelshould be noted in the HISTORY section.
155748888Scael.It \&.Sh HISTORY
155843435ScaelAny command which does not adhere to any specific standards
155943435Scaelshould be outlined historically in this section.
156048888Scael.It \&.Sh AUTHORS
156143435ScaelCredits, if need be, should be placed here.
156248888Scael.It \&.Sh DIAGNOSTICS
156343435ScaelDiagnostics from a command should be placed in this section.
156448888Scael.It \&.Sh ERRORS
156543435ScaelSpecific error handling, especially from library functions
156643435Scael(man page sections 2 and 3) should go here.  The
156748888Scael.Ql \&.Er
156848888Scaelmacro is used to specify an errno.
156948888Scael.It \&.Sh BUGS
157043435ScaelBlatant problems with the topic go here...
157148888Scael.El
157243435Scael.Pp
157348888ScaelUser specified
157448888Scael.Ql \&.Sh
157548888Scaelsections may be added,
157648888Scaelfor example, this section was set with:
157748888Scael.Bd -literal -offset 14n
157848888Scael\&.Sh PAGE LAYOUT MACROS
157948888Scael.Ed
158043435Scael.Ss Paragraphs and Line Spacing.
158148888Scael.Bl -tag -width 6n
158248888Scael.It \&.Pp
158343435ScaelThe \&.Pp paragraph command may
158443435Scaelbe used to specify a line space where necessary.
158548888ScaelThe macro is not necessary after a
158648888Scael.Ql \&.Sh
158743435Scaelor
158848888Scael.Ql \&.Ss
158948888Scaelmacro or before
159043435Scaela
159148888Scael.Ql \&.Bl
159248888Scaelmacro.
159348888Scael(The
159448888Scael.Ql \&.Bl
159548888Scaelmacro asserts a vertical distance unless the -compact flag is given).
159648888Scael.El
159748888Scael.\" .Pp
159848888Scael.\" .Ds I
159948888Scael.\" .Cw (ax+bx+c) \ is\ produced\ by\ \&
160048888Scael.\" .\".Cw (ax+bx+c) \&.Va_by_) \&_and_\& \&[?/]m_b1_e1_f1[?/]\&
160148888Scael.\" .Cl Cx \t\t
160248888Scael.\" .Li \&.Cx\ (
160348888Scael.\" .Cx
160448888Scael.\" .Cl Cx \t\t
160548888Scael.\" .Li \&.Va ax
160648888Scael.\" .Cx
160748888Scael.\" .Cl Cx \t\t
160848888Scael.\" .Li \&.Sy \+
160948888Scael.\" .Cx
161048888Scael.\" .Cl Cx \&(\&
161148888Scael.\" .Va ax
161248888Scael.\" .Cx +
161348888Scael.\" .Va by
161448888Scael.\" .Cx +
161548888Scael.\" .Va c )
161648888Scael.\" .Cx \t
161748888Scael.\" .Em is produced by
161848888Scael.\" .Cx \t
161948888Scael.\" .Li \&.Va by
162048888Scael.\" .Cx
162148888Scael.\" .Cl Cx \t\t
162248888Scael.\" .Li \&.Sy \+
162348888Scael.\" .Cx
162448888Scael.\" .Cl Cx \t\t
162548888Scael.\" .Li \&.Va c )
162648888Scael.\" .Cx
162748888Scael.\" .Cl Cx \t\t
162848888Scael.\" .Li \&.Cx
162948888Scael.\" .Cx
163048888Scael.\" .Cw
163148888Scael.\" .De
163248888Scael.\" .Pp
163348888Scael.\" This example shows the same equation in a different format. The spaces
163448888Scael.\" around the
163548888Scael.\" .Li \&+
163648888Scael.\" signs were forced with
163748888Scael.\" .Li \e :
163848888Scael.\" .Pp
163948888Scael.\" .Ds I
164048888Scael.\" .Cw (ax\ +\ bx\ +\ c) \ is\ produced\ by\ \&
164148888Scael.\" .\".Cw (ax+bx+c) \&.Va_by_) \&_and_\& \&[?/]m_b1_e1_f1[?/]\&
164248888Scael.\" .Cl Cx \t\t
164348888Scael.\" .Li \&.Cx\ (
164448888Scael.\" .Cx
164548888Scael.\" .Cl Cx \t\t
164648888Scael.\" .Li \&.Va a
164748888Scael.\" .Cx
164848888Scael.\" .Cl Cx \t\t
164948888Scael.\" .Li \&.Sy x
165048888Scael.\" .Cx
165148888Scael.\" .Cl Cx \t\t
165248888Scael.\" .Li \&.Cx \e\ +\e\ \e&
165348888Scael.\" .Cx
165448888Scael.\" .Cl Cx \&(\&
165548888Scael.\" .Va a
165648888Scael.\" .Sy x
165748888Scael.\" .Cx \ +\ \&
165848888Scael.\" .Va b
165948888Scael.\" .Sy y
166048888Scael.\" .Cx \ +\ \&
166148888Scael.\" .Va c )
166248888Scael.\" .Cx \t
166348888Scael.\" .Em is produced by
166448888Scael.\" .Cl Cx \t\t
166548888Scael.\" .Li \&.Va b
166648888Scael.\" .Cx
166748888Scael.\" .Cl Cx \t\t
166848888Scael.\" .Li \&.Sy y
166948888Scael.\" .Cx
167048888Scael.\" .Cl Cx \t\t
167148888Scael.\" .Li \&.Cx \e\ +\e\ \e&
167248888Scael.\" .Cx
167348888Scael.\" .Cl Cx \t\t
167448888Scael.\" .Li \&.Va c )
167548888Scael.\" .Cx
167648888Scael.\" .Cl Cx \t\t
167748888Scael.\" .Li \&.Cx
167848888Scael.\" .Cx
167948888Scael.\" .Cw
168048888Scael.\" .De
168148888Scael.\" .Pp
168248888Scael.\" The incantation below was
168348888Scael.\" lifted from the
168448888Scael.\" .Xr adb 1
168548888Scael.\" manual page:
168648888Scael.\" .Pp
168748888Scael.\" .Ds I
168848888Scael.\" .Cw \&[?/]m_b1_e1_f1[?/]\& is\ produced\ by
168948888Scael.\" .Cl Cx \t\t
169048888Scael.\" .Li \&.Cx Op Sy ?/
169148888Scael.\" .Cx
169248888Scael.\" .Cl Cx \t\t
169348888Scael.\" .Li \&.Nm m
169448888Scael.\" .Cx
169548888Scael.\" .Cl Cx Op Sy ?/
169648888Scael.\" .Nm m
169748888Scael.\" .Ad \ b1 e1 f1
169848888Scael.\" .Op Sy ?/
169948888Scael.\" .Cx \t
170048888Scael.\" .Em is produced by
170148888Scael.\" .Cx \t
170248888Scael.\" .Li \&.Ar \e\ b1 e1 f1
170348888Scael.\" .Cx
170448888Scael.\" .Cl Cx \t\t
170548888Scael.\" .Li \&.Op Sy ?/
170648888Scael.\" .Cx
170748888Scael.\" .Cl Cx \t\t
170848888Scael.\" .Li \&.Cx
170948888Scael.\" .Cx
171048888Scael.\" .Cw
171148888Scael.\" .De
171248888Scael.\" .Pp
171348888Scael.Ss Examples and Displays
171448888ScaelThere are five types of displays, a quickie one line indented display
171548888Scael.Ql \&.D1 ,
171648888Scaela quickie one line literal display
171748888Scael.Ql \&.Dl ,
171848888Scaela block literal, block filled and block ragged which use
171948888Scaelthe
172048888Scael.Ql \&.Bd
172148888Scaelbegin-display
172248888Scaeland
172348888Scael.Ql \&.Ed
172448888Scaelend-display macros.
172543435Scael.Pp
172648888Scael.Bl -tag -width \&.D1
172748888Scael.It Li \&.D1
172848888Scael(D-one) Display one line of indented text.
172948888ScaelArguments are checked to see if they are callable.
173048888Scael.Bd -ragged -offset indent
173148888Scael.Li \&.D1 \&Fl ldghfstru
173248888Scael.Ed
173343435Scael.Pp
173448888Scaelproduces:
173543435Scael.Pp
173648888Scael.Dl Fl ldghfstru
173748888Scael.It Li \&.Dl
173848888Scael(D-ell)
173948888ScaelDisplay one line of indented
174048888Scael.Em literal
174148888Scaeltext.  The
174248888Scael.Ql \&.Dl
174348888Scaelexample macro has been used throughout this
174448888Scaelfile.  It allows
174548888Scaelthe indent (display) of one line of text.
174648888ScaelIts default font is set to
174748888Scaelconstant width (literal) however
174848888Scael.Ql \&.Dl
174948888Scaeldoes check arguments to see it they are callable.
175048888ScaelMacros called from
175143435Scael.Li \&.Dl
175248888Scaelshould be content macros; calling macros from
175348888Scaelthe page layout section
175448888Scaelis redundant and may cause unpredictable errors.
175548888Scael.Bd -ragged -offset indent
175643435Scael.Li \&.Dl % ls -ldg /usr/local/bin
175748888Scael.Ed
175843435Scael.Pp
175943435Scaelproduces:
176048888Scael.Pp
176143435Scael.Dl % ls -ldg /usr/local/bin
176248888Scael.It Li \&.Bd
176348888ScaelBegin-display. The
176448888Scael.Ql \&.Bd
176548888Scaeldisplay must be ended with the
176648888Scael.Ql \&.Ed
176748888Scaelmacro. Displays may be nested within displays and
176848888Scaellists.
176948888Scael.Ql \&.Bd
177048888Scaelhas the following syntax:
177143435Scael.Pp
177248888Scael.Dl ".Bd display-type [offset offset_value]"
177343435Scael.Pp
177448888ScaelThe display-type must be one of the following four types and
177548888Scaelmay have an offset specifier for indentation:
177648888Scael.Ql \&.Bd .
177743435Scael.Pp
177848888Scael.Bl -tag -width "literalxx" -compact
177948888Scael.It Fl ragged
178043435ScaelDisplay a block of text as typed,
178148888Scaelright (and left) margin edges are left ragged.
178248888Scael.It Fl filled
178348888ScaelDisplay a filled (formatted) block.
178448888ScaelThe block of text is formatted (the edges are filled \-
178548888Scaelnot left ragged).
178648888Scael.It Fl literal
178748888ScaelDisplay a literal block, useful for source code or
178848888Scaelsimple tabbed or spaced text.
178948888Scael.It Fl file Ar file_name
179048888ScaelThe file name following the
179148888Scael.Fl file
179248888Scaelflag is read and displayed. Literal mode is
179348888Scaelasserted and tabs are set at 8 constant width character
179448888Scaelintervals, however any
179548888Scael.Xr troff/ Ns Nm \-mdoc
179648888Scaelcommands in file will be processed.
179748888Scael.It Fl offset Ar string
179848888ScaelIf
179948888Scael.Fl offset
180048888Scaelis specified with one of the following strings, the string
180148888Scaelis interpreted to indicate the level of indentation for the
180248888Scaelforthcoming block of text:
180348888Scael.Pp
180448888Scael.Bl -tag -width "indent" -compact
180548888Scael.It Ar left
180643435ScaelAlign block on the current left margin,
180743435Scaelthis is the default mode of
180848888Scael.Ql \&.Bd .
180948888Scael.It Ar center
181043435ScaelSupposedly center the block. At this time
181143435Scaelunfortunately, the block merely gets
181243435Scaelleft aligned about an imaginary center margin.
181348888Scael.It Ar indent
181448888ScaelIndents by one default indent value or tab. The default
181548888Scaelindent value is also used for the
181648888Scael.Ql \&.D1
181748888Scaeldisplay so one can be garanteed of the two types of displays
181848888Scaellining up. This indent is nornally set to 6n or about two
181948888Scaelthirds of an inch (six constant width characters).
182048888Scael.It Ar indent-two
182148888ScaelIndents two times the default indent value.
182248888Scael.It Ar right
182348888ScaelThis
182448888Scael.Em left
182548888Scaelaligns the block about two inches from
182648888Scaelthe right side of the page. This macro also needs
182748888Scaelwork and perhaps may never be right in
182848888Scael.Xr troff .
182948888Scael.El
183048888Scael.El
183148888Scael.It ".Ed"
183248888ScaelEnd-display.
183348888Scael.El
183448888Scael.Ss Tagged Lists and Columns
183548888ScaelThere are several types of lists which may be initiated with the
183648888Scael.Ql ".Bl"
183748888Scaelbegin-list macro.  Items within the list
183848888Scaelare specified with the
183948888Scael.Ql ".It"
184048888Scaelitem macro and
184148888Scaeleach list must end with the
184248888Scael.Ql ".El"
184348888Scaelmacro. Lists may be nested within themselves and within displays.
184448888ScaelColumns may be used inside of lists, but lists are unproven
184548888Scaelinside of columns.
184643435Scael.Pp
184748888ScaelIn addition, several list attributes may be specified such as
184848888Scaelthe width of a tag, the list offset, and compactness specified
184948888Scael(blank lines between items allowed or disallowed).
185048888ScaelThe following list types are accepted by
185148888Scael.Ql ".Bl":
185243435Scael.Pp
185348888Scael.Bl -ohang -compact
185448888Scael.It Fl bullet
185548888Scael.It Fl item
185648888Scael.It Fl enum
185748888ScaelThese three are the simplest types of lists. Once the
185848888Scael.Ql ".Bl"
185948888Scaelmacro has been given, items in the list are merely
186048888Scaelindicated by a line consisting solely of the
186148888Scael.Ql ".It"
186248888Scaelmacro. For example, the source text for a simple enumerated list
186348888Scaelwould look like:
186448888Scael.Bd -literal -offset indent-two
186548888Scael\&.Bl -enum -compact
186648888Scael\&.It
186748888Scael\&Item one goes here.
186848888Scael\&.It
186948888Scael\&And item two here.
187048888Scael\&.It
187148888Scael\&Lastly item three goes here.
187248888Scael\&.El
187348888Scael.Ed
187443435Scael.Pp
187548888ScaelThe results:
187643435Scael.Pp
187748888Scael.Bl -enum -offset indent-two -compact
187848888Scael.It
187948888ScaelItem one goes here.
188048888Scael.It
188148888ScaelAnd item two here.
188248888Scael.It
188348888ScaelLastly item three goes here.
188448888Scael.El
188543435Scael.Pp
188648888ScaelA simple bullet list construction:
188748888Scael.Bd -literal -offset indent-two
188848888Scael\&.Bl -bullet -compact
188948888Scael\&.It
189048888Scael\&Bullet one goes here.
189148888Scael\&.It
189248888Scael\&Bullet two here.
189348888Scael\&.El
189448888Scael.Ed
189543435Scael.Pp
189648888ScaelProduces:
189748888Scael.Bl -bullet -offset indent-two -compact
189848888Scael.It
189948888ScaelBullet one goes here.
190048888Scael.It
190148888ScaelBullet two here.
190248888Scael.El
190343435Scael.Pp
190448888Scael.It Fl tag
190548888Scael.It Fl diag
190648888Scael.It Fl hang
190748888Scael.It Fl ohang
190848888Scael.It Fl inset
190948888ScaelThese list-types collect arguments specified with the
191048888Scael.Ql \&.It
191148888Scaelmacro and create a label which may be
191248888Scael.Em inset
191348888Scaelinto the forth coming text,
191448888Scael.Em hanged
191548888Scael(exdented) from the forth coming text,
191648888Scael.Em overhanged
191748888Scaelset above the forth coming paragraph or
191848888Scael.Em tagged
191948888Scael(exdented and offset). This
192048888Scaellist was constructed with the
192148888Scael.Ql Fl ohang
192248888Scaellist-type.  The
192348888Scael.Ql \&.It
192448888Scaelmacro may call any callable macros for the inset, hang
192548888Scaeland tag list-types, but will not call macros for the
192648888Scaeldiag type.
192748888ScaelHere is an example of inset labels:
192848888Scael.Bl -inset -offset indent
192948888Scael.It Em Tag
193048888ScaelThe tagged list (also called a tagged paragraph) is the
193148888Scaelmost common type of list used in the Berkeley manuals.
193248888Scael.It Em Diag
193348888ScaelDiag lists create section four diagnostic lists
193448888Scaeland are similar to inset lists except callable
193548888Scaelmacros are ignored.
193648888Scael.It Em Hang
193748888ScaelHanged labels are a matter of taste.
193848888Scael.It Em Ohang
193948888ScaelOver hanging labels are nice when space is constrained.
194048888Scael.It Em Inset
194148888ScaelInset labels are useful for controlling blocks of
194248888Scaelparagraphs and are valuable for converting
194348888Scael.Nm \-mdoc
194448888Scaelmanuals to other formats.
194548888Scael.El
194643435Scael.Pp
194748888ScaelHere is the source text which produced the above example:
194848888Scael.Bd -literal -offset indent
194948888Scael\&.Bl -inset -offset indent
195048888Scael\&.It Em Tag
195148888Scael\&The tagged list (also called a tagged paragraph) is the
195248888Scael\&most common type of list used in the Berkeley manuals.
195348888Scael\&.It Em Diag
195448888Scael\&Diag lists create section four diagnostic lists
195548888Scael\&and are similar to inset lists except callable
195648888Scael\&macros are ignored.
195748888Scael\&.It Em Hang
195848888Scael\&Hanged labels are a matter of taste.
195948888Scael\&.It Em Ohang
196048888Scael\&Over hanging labels are nice when space is constrained.
196148888Scael\&.It Em Inset
196248888Scael\&Inset labels are useful for controlling blocks of
196348888Scael\&paragraphs and are valuable for converting
196448888Scael\&.Nm \-mdoc
196548888Scael\&manuals to other formats.
196648888Scael\&.El
196748888Scael.Ed
196843435Scael.Pp
196948888ScaelHere is a hanged list with just one item:
197048888Scael.Bl -hang -offset indent
197148888Scael.It Em Hanged
197248888Scaellabels appear similar to tagged lists when the
197348888Scaellabel is smaller than the label width.
197448888Scael.It Em Longer hanged list labels
197548888Scaelblend in to the paragraph unlike
197648888Scaeltagged paragraph labels.
197748888Scael.El
197843435Scael.Pp
197948888ScaelAnd the unfomatted text which created it:
198048888Scael.Bd -literal -offset indent
198148888Scael\&.Bl -hang -offset indent
198248888Scael\&.It Em Hanged
198348888Scael\&labels appear similar to tagged lists when the
198448888Scael\&label is smaller than the label width.
198548888Scael\&.It Em Longer hanged list labels
198648888Scael\&blend in to the paragraph unlike
198748888Scael\&tagged paragraph labels.
198848888Scael\&.El
198948888Scael.Ed
199048888Scael.Pp
199148888ScaelThe tagged list which follows uses an optional width specifier to controll
199248888Scaelthe width of the tag.
199348888Scael.Pp
199448888Scael.Bl -tag -width "PAGEIN 10" -compact -offset indent
199548888Scael.It SL 10
199643435Scaelsleep time of the process (seconds blocked)
199748888Scael.It PAGEIN 10
199848888Scaelnumber of disk i/o's resulting from references
199948888Scaelby the process to pages not loaded in core.
200048888Scael.It UID 10
200143435Scaelnumerical user-id of process owner
200248888Scael.It PPID 10
200348888Scaelnumerical id of parent of process process priority
200448888Scael(non-positive when in non-interruptible wait)
200548888Scael.El
200643435Scael.Pp
200743435ScaelThe raw text:
200848888Scael.Bd -literal -offset indent
200948888Scael\&.Bl -tag -width "PAGEIN 10" -compact -offset indent
201048888Scael\&.It SL 10
201148888Scael\&sleep time of the process (seconds blocked)
201248888Scael\&.It PAGEIN 10
201348888Scael\&number of disk i/o's resulting from references
201448888Scael\&by the process to pages not loaded in core.
201548888Scael\&.It UID 10
201648888Scael\&numerical user-id of process owner
201748888Scael\&.It PPID 10
201848888Scael\&numerical id of parent of process process priority
201948888Scael\&(non-positive when in non-interruptible wait)
202048888Scael\&.El
202148888Scael.Ed
202243435Scael.Pp
202348888ScaelAcceptable width specifiers:
202448888Scael.Bl -tag -width Ar -offset indent
202548888Scael.It Fl width Ar "\&Fl"
202648888Scaelsets the width to the default width for a flag. All callable
202748888Scaelmacros have a default width value. The
202848888Scael.Ql \&.Fl ,
202948888Scaelvalue is presently
203048888Scaelset to ten constant width characters or about five sixth of
203148888Scaelan inch.
203248888Scael.It Fl width Ar "24n"
203348888Scaelsets the width to 24 constant width characters or about two
203448888Scaelinches.  The
203548888Scael.Ql n
203648888Scaelis absolutely necessary for the scaling to work correctly.
203748888Scael.It Fl width Ar "ENAMETOOLONG"
203848888Scaelsets width to the constant width length of the
203948888Scaelstring given.
204048888Scael.It Fl width  Ar "\\*qint mkfifo\\*q"
204148888Scaelagain, the width is set to the constant width of the string
204248888Scaelgiven.
204348888Scael.El
204443435Scael.Pp
204548888ScaelIf a width is not specified for the tag list type, the first
204648888Scaeltime
204748888Scael.Ql \&.It
204848888Scaelis invoked, an attempt is made to determine an appropriate
204948888Scaelwidth.  If the first argument to
205048888Scael.Ql ".It"
205148888Scaelis a callable macro, the default width for that macro will be used
205248888Scaelas if the macro name had been supplied as the width.  However,
205348888Scaelif another item in the list is given with a different callable
205448888Scaelmacro name, a new and nested list is assumed. Here is an involved
205548888Scaelexample of a self nesting list:
205648888Scael.Sh DIAGNOSTICS
205748888ScaelThe debugging facilities for
205848888Scael.Nm \-mdoc
205948888Scaelare limited, but can help detect subtle errors such
206048888Scaelas the collision of an argument name with an internal
206148888Scaelregister or macro name. (A what?)
206248888ScaelA register is an arithmetic storage class for
206348888Scael.Xr troff
206448888Scaelwith a one or two character name.
206548888ScaelAll registers internal to
206648888Scael.Nm \-mdoc
206748888Scaelfor
206848888Scael.Xr troff
206948888Scaeland
207048888Scael.Xr ditroff
207148888Scaelare two characters and
207248888Scaelof the form <uppercase><lowercase> such as
207348888Scael.Ql \&Ar ,
207448888Scael<lowercase><uppercase> as
207548888Scael.Ql \&aR
207643435Scaelor
207748888Scael<upper or lower letter><digit> as
207848888Scael.Ql \&C\&1 .
207948888ScaelAnd adding to the muddle,
208048888Scael.Xr troff
208148888Scaelhas its own internal registers all of which are either
208248888Scaeltwo lowercase characters or a dot plus a letter or meta-character
208348888Scaelcharacter.
208448888ScaelIn one of the introduction examples, it was shown how to
208548888Scaelprevent the interpretation of a macro name with the escape sequence
208648888Scael.Ql \e& .
208748888ScaelThis is sufficient for the internal register names also.
208843435Scael.Pp
208948888Scael.\" Every callable macro name has a corresponding register
209048888Scael.\" of the same name (<Uppercase><lowercase>).
209148888Scael.\" There are also specific registers which have
209248888Scael.\" been used for stacks and arrays and are listed in the
209348888Scael.\" .Sx Appendix .
209448888Scael.\" .Bd -ragged -offset 4n
209548888Scael.\" [A-Z][a-z]	registers corresponding to macro names (example ``Ar'')
209648888Scael.\" [a-z][A-Z]	registers corresponding to macro names (example ``aR'')
209748888Scael.\" C[0-9]		argument types (example C1)
209848888Scael.\" O[0-9]		offset stack (displays)
209948888Scael.\" h[0-9]		horizontal spacing stack (lists)
210048888Scael.\" o[0-9]		offset (stack) (lists)
210148888Scael.\" t[0-9]		tag stack (lists)
210248888Scael.\" v[0-9]		vertical spacing stack (lists)
210348888Scael.\" w[0-9]		width tag/label stack
210448888Scael.\" .Ed
210548888Scael.\" .Pp
210648888ScaelIf a non-escaped register name is given in the argument list of a request
210748888Scaelunpredictable behaviour will occur. In general, anytime huge portions
210848888Scaelof text do not appear where expected in the output, or small strings
210948888Scaelsuch as list tags disappear, chances are there is a misunderstanding
211048888Scaelabout an argument type in the argument list.
211148888ScaelYour mother never intended for you to remember this evil stuff - so here
211248888Scaelis a way to find out whether or not your arguments are valid: The
211348888Scael.Ql \&.Db
211448888Scael(debug)
211548888Scaelmacro displays the interpretation of the argument list for most
211648888Scaelmacros.  Macros such as the
211748888Scael.Ql \&.Pp
211848888Scael(paragraph)
211948888Scaelmacro do not contain debugging information. All of the callable macros do,
212048888Scaeland it is strongly advised whenever in doubt,
212148888Scaelturn on the
212248888Scael.Ql \&.Db
212348888Scaelmacro.
212443435Scael.Pp
212548888Scael.Dl Usage: \&.Db [on | off]
212643435Scael.Pp
212748888ScaelAn example of a portion of text with
212848888Scaelthe debug macro placed above and below an
212948888Scaelartificially created problem (a flag argument
213048888Scael.Ql \&aC
213148888Scaelwhich should be
213248888Scael.Ql \e&aC
213348888Scaelin order to work):
213448888Scael.Bd -literal -offset indent
213548888Scael\&.Db on
213648888Scael\&.Op Fl aC Ar file )
213748888Scael\&.Db off
213848888Scael.Ed
213943435Scael.Pp
214048888ScaelThe resulting output:
214148888Scael.Bd -literal -offset indent
214248888ScaelDEBUGGING ON
214348888ScaelDEBUG(argv) MACRO: `.Op'  Line #: 2
214448888Scael	Argc: 1  Argv: `Fl'  Length: 2
214548888Scael	Space: `'  Class: Executable
214648888Scael	Argc: 2  Argv: `aC'  Length: 2
214748888Scael	Space: `'  Class: Executable
214848888Scael	Argc: 3  Argv: `Ar'  Length: 2
214948888Scael	Space: `'  Class: Executable
215048888Scael	Argc: 4  Argv: `file'  Length: 4
215148888Scael	Space: ` '  Class: String
215248888Scael	Argc: 5  Argv: `)'  Length: 1
215348888Scael	Space: ` '  Class: Closing Punctuation or suffix
215448888Scael	MACRO REQUEST: .Op Fl aC Ar file )
215548888ScaelDEBUGGING OFF
215648888Scael.Ed
215743435Scael.Pp
215848888ScaelThe first line of information tells the name of the calling
215948888Scaelmacro, here
216048888Scael.Ql \&.Op ,
216148888Scaeland the line number it appears on. If one or more files are involved
216248888Scael(especially if text from another file is included) the line number
216348888Scaelmay be bogus.  If there is only one file, it should be accurate.
216448888ScaelThe second line gives the argument count, the argument
216548888Scael.Pq Ql \&Fl
216648888Scaeland its length. If the length of an argument is two characters, the
216748888Scaelargument is tested to see if it is executable (unfortunately, any
216848888Scaelregister which contains a non-zero value appears executable).
216948888ScaelThe third line gives the space allotted for a class, and the
217048888Scaelclass type. The problem here is the argument aC should not be
217148888Scaelexecutable. The four types of classes are string, executable, closing
217248888Scaelpunctuation and opening punctuation.  The last line shows the entire
217348888Scaelargument list as it was read. In this next example, the offending
217448888Scael.Ql \&aC
217548888Scaelis escaped:
217648888Scael.Bd -literal -offset indent
217748888Scael\&.Db on
217848888Scael\&.Em An escaped \e&aC
217948888Scael\&.Db off
218048888Scael.Ed
218148888Scael.Bd -literal -offset indent
218248888ScaelDEBUGGING ON
218348888ScaelDEBUG(fargv) MACRO: `.Em'  Line #: 2
218448888Scael	Argc: 1  Argv: `An'  Length: 2
218548888Scael	Space: ` '  Class: String
218648888Scael	Argc: 2  Argv: `escaped'  Length: 7
218748888Scael	Space: ` '  Class: String
218848888Scael	Argc: 3  Argv: `aC'  Length: 2
218948888Scael	Space: ` '  Class: String
219048888Scael	MACRO REQUEST: .Em An escaped &aC
219148888ScaelDEBUGGING OFF
219248888Scael.Ed
219343435Scael.Pp
219448888ScaelThe argument
219548888Scael.Ql \e&aC
219648888Scaelshows up with the same length of 2 as the
219748888Scael.Ql \e&
219848888Scaelsequence produces a zero width, but a register
219948888Scaelnamed
220048888Scael.Ql \e&aC
220148888Scaelwas not found and the type classified as string.
220248888Scael.Pp
220348888ScaelOther diagnostics consist of usage statements and are self explanatory.
220443435Scael.Sh FILES
220548888Scael.Bl -tag -width /usr/share/man0/template.doc -compact
220648888Scael.It Pa /usr/share/tmac/tmac.doc
220743435Scaelmanual macro package
220848888Scael.It Pa /usr/share/man0/template.doc
220943435Scaeltemplate for writing a man page
221048888Scael.El
221143435Scael.Sh HISTORY
221243435Scael4.4 BSD
221343435Scael.Sh SEE ALSO
221448888Scael.Xr mdoc 7 ,
221543435Scael.Xr man 1 ,
221643435Scael.Xr troff 1
221743435Scael.Sh BUGS
221843435ScaelUndesirable hyphenation on the dash of a flag
221943435Scaelargument is not yet resolved, and causes
222043435Scaeloccasional mishaps in the DESCRIPTION section.
222148888Scael(line break on the hyphen).
222243435Scael.Pp
222343435ScaelPredefined strings are not declared in documentation.
222443435Scael.Pp
222543435ScaelSection 3f has not been added to the header routines.
222643435Scael.Pp
222748888Scael.Ql \&.Nm
222843435Scaelfont should be changed in NAME section.
222943435Scael.Pp
223048888Scael.Ql \&.Fn
223143435Scaelneeds to have a check to prevent splitting up
223243435Scaelif the line length is too short. Right now it
223343435Scaelseparates the last parenthesis, and sometimes
223443435Scaellooks ridiculous if a line is in fill mode.
223543435Scael.Pp
223643435ScaelThe method used to prevent header and footer page
223743435Scaelbreaks (other than the initial header and footer) when using
223843435Scaelnroff seems to be putting out a partially filled line
223943435Scaelat the bottom of the page leaving an unsightly blank space.
224043435Scael.Pp
224148888ScaelThe list and display macros to not do any keeps
224243435Scaeland certainly should be able to.
2243