xref: /csrg-svn/share/man/man7/mdoc.samples.7 (revision 50362)
143435Scael.\" Copyright (c) 1990 The Regents of the University of California.
243435Scael.\" All rights reserved.
343435Scael.\"
448889Scael.\" %sccs.include.redist.roff%
543435Scael.\"
6*50362Scael.\"     @(#)mdoc.samples.7	5.6 (Berkeley) 07/01/91
743435Scael.\"
843435Scael.\"	This sampler invokes every macro in the package several
943435Scael.\" 	times and is garanteed to give a worst case performance
1048888Scael.\"	for an already extremely slow package.
1143435Scael.Dd
1243435Scael.Os BSD 4.4
1343435Scael.Dt MDOC.SAMPLES 7
1443435Scael.Sh NAME
1543435Scael.Nm mdoc.sample
1648888Scael.Nd writing manual pages with
1743435Scael.Nm -mdoc
1843435Scaelmacro package
1943435Scael.Sh SYNOPSIS
2043435Scael.Nm man mdoc.sample
2143435Scael.Sh DESCRIPTION
2248888ScaelA tutorial sampler for writing
2348888Scael.Bx
2448888Scaelmanual pages with the
2543435Scael.Nm \-mdoc
26*50362Scaelmacro package, a
27*50362Scael.Em content Ns \-based
28*50362Scaelformatting
2948888Scaelpackage for
3048888Scael.Xr troff 1 .
3148888ScaelIts predecessor, the
3248888Scael.Xr \-man 7
3348888Scaelpackage,
3448888Scaeladdressed page structure leaving the
3548888Scaelmanipulation of fonts and other
3648888Scaeltypesetting details to the individual author.
3748888ScaelThe
3848888Scael.Nm \-mdoc
3948888Scaelpackage
4048888Scaelallows the author to ignore font considerations by
4148888Scaelusing macros to label
4248888Scaelpieces of text according to content.
4348888ScaelIn the context of manual pages, examples of content
4448888Scaelare a command name, a file pathname or a cross
4548888Scaelreference to another manual page; these
4648888Scaelitems have value
4748888Scaelfor both the author and the future user of the manual page.
4848888ScaelIt is hoped the consistency gained
4948888Scaelacross the manual set will provide easier
5048888Scaeltranslation to future documentation tools.
5148888Scael.Pp
5248888ScaelThrough out the
5348888Scael.Ux
5448888Scaelmanual pages, a manual entry
5548888Scaelis simply referred
5648888Scaelto as a man page, regardless of actual length and without
5748888Scaelsexist intention.
5843435Scael.Sh TROFF IDIOSYNCRASIES
5948888ScaelThe
6048888Scael.Nm \-mdoc
6148888Scaelpackage attempts to simplify the process of writing a man page.
6248888ScaelTheoretically, one should not have to learn the dirty details of
6343435Scael.Xr troff 1
6448888Scaelto use
6548888Scael.Nm \-mdoc ;
6648888Scaelhowever, there are a few
6743435Scaellimitations which are unavoidable and best gotten out
6848888Scaelof the way. And, too, be forewarned, this package is
6948888Scael.Em not
7048888Scaelfast.
7143435Scael.Ss Macro Usage
7243435ScaelAs in
7343435Scael.Xr troff 1 ,
7448888Scaela macro is called by placing a
7548888Scael.Ql \&\.
7643435Scael(dot character)
7743435Scaelat the beginning of
7843435Scaela line followed by the two character name for the macro.
7948888ScaelArguments may follow the macro separated by spaces.
8043435ScaelIt is the dot character at the beginning of the line which causes
8143435Scael.Xr troff 1
8248888Scaelto interpret the next two characters as a macro name.
8343435ScaelTo place a
8448888Scael.Ql \&\.
8543435Scael(dot character)
8643435Scaelat the beginning of a line in some context other than
8748888Scaela macro macro, precede the
8848888Scael.Ql \&\.
8943435Scael(dot) with a
9048888Scael.Ql \e& .
9148888Scael.Pp
9248888ScaelIn general,
9348888Scael.Xr troff 1
9448888Scaelmacros accept up to nine arguments, any
9548888Scaelextra arguments are ignored.
9648888ScaelMost macros in
9748888Scael.Nm \-mdoc
9848888Scaelaccept nine arguments and,
9948888Scaelin limited cases, arguments may be continued or extended
10048888Scaelon the
10148888Scaelnext line (See
10248888Scael.Sx Extensions
10348888Scael\-
10448888Scaelmacro
10548888Scael.Ql \&.Xo
10648888Scaeland
10748888Scael.Ql \&.Xc ) .
10848888ScaelA few macros handle quoted aguments (see
10948888Scael.Sx Passing Space Characters in an Argument
11048888Scaelbelow).
11148888ScaelMany
11248888Scael.Nm \-mdoc
11348888Scaelmacros may be given the
11443435Scaelname of another macro as an argument. In this case
11543435Scaelthe argument, although the name of a macro,
11643435Scaelis not preceded by a
11748888Scael.Ql \&\.
11843435Scael(dot),
11948888Scaeland is
12048888Scael.Em called
12148888Scaelwhen the argument is processed.
12248888ScaelIt is in this manner that some macros are nested; for
12348888Scaelexample
12448888Scaelthe option macro,
12548888Scael.Ql \&.Op ,
12648888Scaelmay
12743435Scael.Em call
12848888Scaelthe flag and argument macros,
12948888Scael.Ql \&.Fl
13048888Scaeland
13148888Scael.Ql \&.Ar ,
13248888Scaelto specify an optional flag with an argument:
13348888Scael.nr D 1
13448888Scael.Bl -tag -width "\&.Op \&Fl s \&Ar bytes" -offset indent
13548888Scael.It Op Fl s Ar bytes
13643435Scaelis produced by
13748888Scael.Li \&.Op \&Fl s \&Ar bytes
13848888Scael.El
13943435Scael.Pp
14048888ScaelTo prevent a two character
14148888Scaelstring from being interpreted as a macro name, precede
14248888Scaelthe string with the
14348888Scaelescape sequence
14448888Scael.Ql \e& :
14548888Scael.Bl -tag -width "[\&Fl s \&Ar bytes]" -offset indent
14648888Scael.It Op \&Fl s \&Ar bytes
14748888Scaelis produced by
14848888Scael.Li \&.Op \e&Fl s \e&Ar bytes
14948888Scael.El
15043435Scael.Pp
15148888Scael.nr D 0
15248888ScaelHere the strings
15348888Scael.Ql \&Fl
15448888Scaeland
15548888Scael.Ql \&Ar
15648888Scaelwere not interpreted as macros.
15748888ScaelDetails on callable macros are presented in the
15848888Scaelsections
15948888Scael.Sx CONTENT MACROS
16048888Scaeland
16148888Scael.Sx PAGE LAYOUT MACROS.
16248888Scael.Ss Passing Space Characters in an Argument
16348888ScaelSometimes it is desirable to give as one argument a string
16448888Scaelcontaining one or more blank space characters. This may be necessary
16548888Scaelto defeat the nine argument limit or to specify arguments to macros
16648888Scaelwhich expect particular arrangement of items in the argument list.
16748888ScaelFor example,
16848888Scaelthe function macro
16948888Scael.Ql \&.Fn
17048888Scaelexpects the first argument to be the name of a function and any
17148888Scaelremaining arguments to be function parameters. As
17248888Scael.Tn "ANSI C"
17348888Scaelstipulates the declaration of function parameters in the
17448888Scaelparenthesized parameter list, each parameter is guaranteed
17548888Scaelto be at minimum a two word string. For example,
17648888Scael.Fa int foo .
17748888ScaelThere are two possible ways to pass an argument which contains
17848888Scaelan imbedded space. Unfortunately, the most convient way
17948888Scaelof passing such a space between quotes was too expensive to implement for
18048888Scaelall the macros. It is however, implemented for the following macros which need
18148888Scaelit the most:
18243435Scael.Pp
18348888Scael.Bl -tag -width 4n -offset indent -compact
18448888Scael.It Li \&Cd
18548888ScaelConfiguration declaration (section 4 SYNOPSIS)
18648888Scael.It Li \&Bl
18748888ScaelBegin list (for the width specifier).
18848888Scael.It Li \&Em
18948888ScaelEmphasized text.
19048888Scael.It Li \&Fn
19148888ScaelFunctions (sections two and four).
19248888Scael.It Li \&It
19348888ScaelList items.
19448888Scael.It Li \&Li
19548888ScaelLiteral text.
19648888Scael.It Li \&Sy
19748888ScaelSymbolic text.
19848888Scael.It Li \&%B
19948888ScaelBook titles.
20048888Scael.It Li \&%J
20148888ScaelJournal names.
20248888Scael.It Li \&%O
20348888ScaelOptional notes for a reference.
20448888Scael.It Li \&%R
20548888ScaelReport title (in a reference).
20648888Scael.It Li \&%T
20748888ScaelTitle of article in a book or journal.
20848888Scael.El
20948888Scael.Pp
21048888ScaelOne way of passing a string
21148888Scaelcontaining blank spaces is to use the hard or unpaddable space character
21248888Scael.Ql \e\  ,
21348888Scaelthat is, a blank space preceeded by the escape character
21448888Scael.Ql \e .
21548888ScaelThis method may be used with any macro but has the side effect
21648888Scaelof interfering with the adjustment of text
21748888Scaelover the length of a line.
21848888Scael.Xr Troff
21948888Scaelsees the hard space as if it were any other printable character and
22048888Scaelcannot split the string into blank or newline separated pieces as one
22148888Scaelwould expect. The method is useful for strings which are not expected
22248888Scaelto overlap a line boundary. For example:
22348888Scael.Bl -tag -width "fetch(char *str)" -offset indent
22448888Scael.It Fn fetch char\ *str
22543435Scaelis created by
22648888Scael.Ql \&.Fn fetch char\e *str
22748888Scael.It Fn fetch "char *str"
22848888Scaelcan also be created by
22948888Scael.Ql \&.Fn fetch "\\*q*char *str\\*q"
23048888Scael.El
23148888Scael.Pp
23248888ScaelIf the
23348888Scael.Ql \e
23448888Scaelor quotes
23548888Scaelwere omitted,
23648888Scael.Ql \&.Fn
23748888Scaelwould see three arguments and
23848888Scaelthe result would be:
23948888Scael.Pp
24048888Scael.Dl Fn fetch char *str
24148888Scael.Pp
242*50362ScaelFor an example of what happens when the parameter list overlaps
243*50362Scaela newline boundary, see the
244*50362Scael.Sx BUGS
245*50362Scaelsection.
246*50362Scael.\" Note what happens if the parameter list overlaps a newline
247*50362Scael.\" boundary. For example, the next two examples are repeated several times
248*50362Scael.\" to make sure a line boundary is crossed:
249*50362Scael.\" .Bd -literal
250*50362Scael.\" \&.Fn struct\e\ dictionarytable\e\ *dictionarylookup struct\e\ dictionarytable\e\ *tab[]
251*50362Scael.\" .Ed
252*50362Scael.\" .Pp
253*50362Scael.\" produces, nudge nudge,
254*50362Scael.\" .Fn struct\ dictionarytable\ *dictionarylookup char\ *h struct\ dictionarytable\ *tab[] ,
255*50362Scael.\" .Fn struct\ dictionarytable\ *dictionarylookup char\ *h struct\ dictionarytable\ *tab[] ,
256*50362Scael.\" nudge
257*50362Scael.\" .Fn struct\ dictionarytable\ *dictionarylookup char\ *h struct\ dictionarytable\ *tab[] .
258*50362Scael.\" .Pp
259*50362Scael.\" If double quotes are used, for example:
260*50362Scael.\" .Bd -literal
261*50362Scael.\" \&.Fn \*qstruct dictionarytable *dictionarylookup\*q \*qchar *h\*q \*qstruct dictionarytable *tab[]\*q
262*50362Scael.\" .Ed
263*50362Scael.\" .Pp
264*50362Scael.\" produces, nudge nudge,
265*50362Scael.\" .Fn "struct dictionarytable *dictionarylookup" "char *h" "struct dictionarytable *tab[]" ,
266*50362Scael.\" nudge
267*50362Scael.\" .Fn "struct dictionarytable *dictionarylookup" "char *h" "struct dictionarytable *tab[]" ,
268*50362Scael.\" nudge
269*50362Scael.\" .Fn "struct dictionarytable *dictionarylookup" "char *h" "struct dictionarytable *tab[]" .
270*50362Scael.\" .Pp
271*50362Scael.\" Not a pretty sight...
272*50362Scael.\" In a paragraph, a long parameter containing unpaddable spaces as
273*50362Scael.\" in the former example will cause
274*50362Scael.\" .Xr troff
275*50362Scael.\" to break the line and spread
276*50362Scael.\" the remaining words out.  The latter example will adjust nicely to
277*50362Scael.\" justified margins, but may break in between an argument and its
278*50362Scael.\" declaration. In
279*50362Scael.\" .Xr nroff
280*50362Scael.\" the right margin adjustment is normally ragged and the problem is
281*50362Scael.\" not as severe.
28248888Scael.Ss Trailing Blank Space Characters
28348888Scael.Xr Troff
28448888Scaelcan be confused by blank space characters at the end of a line. It
28548888Scaelis wise preventative measure to globally remove all blank spaces
28648888Scaelfrom <blank-space><end-of-line> character sequences. Should the need
28748888Scaelarise to force a blank character at the end of a line,
28848888Scaelit may be forced with an unpaddable space and the
28948888Scael.Ql \e&
29048888Scaelescape character.
29148888ScaelFor example,
29248888Scael.Ql string\e\ \e& .
29343435Scael.Ss Escaping Special Characters
29443435ScaelSpecial characters
29543435Scaellike the newline character
29648888Scael.Ql \en ,
29743435Scaelare handled by replacing the
29848888Scael.Ql \e
29943435Scaelwith
30048888Scael.Ql \ee
30143435Scael(e.g.
30248888Scael.Ql \een )
30343435Scaelto preserve
30443435Scaelthe backslash.
30548888Scael.Sh THE ANATOMY OF A MAN PAGE (Getting Started)
30648888ScaelThere are three basic groups of macros: specific header macros
30748888Scaelcalled only once at the very beginning of
30848888Scaeleach manual page, page layout or structure macros
30948888Scaelwhich may be called many times, and content macros which also
31048888Scaelmay be called many times.
31148888ScaelThe body of a man page is easily constructed from a basic
31248888Scaeltemplate found in the file:
31348888Scael.Bd -literal -offset indent
31448888Scael\&.\e" /usr/share/misc/man.tempate :
31548888Scael\&.\e" The following six lines are required.
31648888Scael\&.Dt DOCUMENT_TITLE [section number] [volume]
31748888Scael\&.Os OPERATING_SYSTEM [version/release]
31848888Scael\&.Dd Month day, year
31948888Scael\&.Sh NAME
32048888Scael\&.Sh SYNOPSIS
32148888Scael\&.Sh DESCRIPTION
32248888Scael\&.\e" The following requests should be uncommented and
32348888Scael\&.\e" used where appropriate.  This next request is
32448888Scael\&.\e" for sections 2 and 3 function return values only.
32548888Scael\&.\e" .Sh RETURN VALUES
32648888Scael\&.\e" This next request is for sections 1, 6, 7 & 8 only
32748888Scael\&.\e" .Sh ENVIRONMENT
32848888Scael\&.\e" .Sh FILES
32948888Scael\&.\e" .Sh EXAMPLES
33048888Scael\&.\e" This next request is for sections 1, 6, 7 & 8 only
33148888Scael\&.\e"     (command return values (to shell) and
33248888Scael\&.\e"	  fprintf/stderr type diagnostics)
33348888Scael\&.\e" .Sh DIAGNOSTICS
33448888Scael\&.\e" The next request is for sections 2 and 3 error
33548888Scael\&.\e" and signal handling only.
33648888Scael\&.\e" .Sh ERRORS
33748888Scael\&.\e" .Sh SEE ALSO
33848888Scael\&.\e" .Sh STANDARDS
33948888Scael\&.\e" .Sh HISTORY
34048888Scael\&.\e" .Sh AUTHORS
34148888Scael\&.\e" .Sh BUGS
34248888Scael.Ed
34348888Scael.Pp
34448888ScaelThe first items in the template are the macros
34548888Scael.Pq Li \&.Dt , \&.Dd , \&.Os ;
34648888Scaelthe document or man page title
34748888Scael.Pq Em in upper case ,
34848888Scaelthe section of the manual the page
34948888Scaelbelongs to, the (document) date,
35048888Scaeland the operating system the man page is derived
35148888Scaelfrom. These macros identify the page,
35248888Scaeland are discussed below in
35348888Scael.Sx TITLE MACROS .
35448888Scael.Pp
35548888ScaelThe remaining items in the template are section headers
35648888Scael.Pq Li \&.Sh ;
35748888Scaelof which NAME, SYNOPSIS and DESCRIPTION
35848888Scaelare mandatory. The
35948888Scaelheaders are
36048888Scaeldiscussed in
36148888Scael.Sx PAGE LAYOUT MACROS,
36248888Scaelafter
36348888Scaelpresentation of
36448888Scael.Sx CONTENT MACROS .
36548888ScaelSeveral content macros are used to demonstrate page layout macros;
36648888Scaelreading about content macros before page layout macros is
36748888Scaelrecommended.
36848888Scael.Sh TITLE MACROS
36943435ScaelThree header macros designate the document title or manual page title,
37043435Scaelthe operating system,
37148888Scaeland the date of authorship.
37243435ScaelThese macros are one called once at the very beginning of the document
37343435Scaeland are used to construct the headers and footers only.
37448888Scael.Bl -tag -width 6n
37548888Scael.It Li \&.Dt DOCUMENT_TITLE section# [volume]
37643435ScaelThe document title is the
37743435Scaelsubject of the man page and must be in CAPITALS due to troff
37843435Scaellimitations.
37948888ScaelThe section number may be 1,\ ...,\ 8,
38043435Scaeland if it is specified,
38143435Scaelthe volume title may be omitted.
38243435ScaelA volume title may be arbitrary or one of the following:
38343435Scael.\" .Cl
38443435Scael.\" USD	UNIX User's Supplementary Documents
38543435Scael.\" .Cl
38643435Scael.\" PS1	UNIX Programmers's Supplementary Documents
38748888Scael.Pp
38848888Scael.Bl -column SMM -offset indent -compact
38948888Scael.It AMD	UNIX Ancestral Manual Documents
39048888Scael.It SMM	UNIX System Manager's Manual
39148888Scael.It URM	UNIX Reference Manual
39248888Scael.It PRM	UNIX Programmers's Manual
39348888Scael.El
39448888Scael.Pp
39543435Scael.\" .Cl
39643435Scael.\" MMI	UNIX Manual Master Index
39743435Scael.\" .Cl
39843435Scael.\" CON	UNIX Contributed Software Manual
39943435Scael.\" .Cl
40043435Scael.\" LOC	UNIX Local Manual
40148888Scael.It Li \&.Os operating_system release#
40243435ScaelThe name of the operating system
40343435Scaelshould be the common acronym, e.g. BSD
40443435Scaelor ATT.  The release should be the standard release
40548888Scaelnomenclature for the system specified, e.g. 4.3, 4.3+Tahoe, V.3,
40643435ScaelV.4. Unrecognized arguments are displayed as given in the page footer.
40743435ScaelFor instance, for the footer on this page, the 4.4 Berkeley Distribution
40843435Scaelwas produced by:
40943435Scael.Pp
41048888Scael.Dl \&.Os BSD 4.4
41148888Scael.It Li \&.Dd month day, year
41243435ScaelThe date should be written formally:
41343435Scael.Pp
41443435Scael.Dl January 25, 1989
41548888Scael.El
41648888Scael.Sh CONTENT MACROS
41748888Scael.Ss What's in a name...
41848888ScaelContent macro names are derived from the day to day
41948888Scaelinformal language used to describe commands, subroutines and related
42048888Scaelfiles. Slightly
42148888Scaeldifferent variations of this language are used to describe
42248888Scaelthe three different aspects of writing a man page.
42348888ScaelFirst, there is the description of
42448888Scael.Nm \-mdoc
42548888Scaelmacro request usage.
42648888ScaelSecond is the description of a
42748888Scael.Ux
42848888Scaelcommand
42948888Scael.Em with
43048888Scael.Nm \-mdoc
43148888Scaelmacros and third,
43248888Scaelthe
43348888Scaeldescription a command to a user in the verbal sense;
43448888Scaelthat is, discussion of a command in the text of a man page.
43548888Scael.Pp
43648888ScaelIn the first case,
43748888Scael.Xr troff 1
43848888Scaelmacros are themselves a type of command;
43948888Scaelthe general syntax for a troff command is:
44048888Scael.Bd -filled -offset indent
44148888Scael\&.Va argument1 argument2 ... argument9
44248888Scael.Ed
44348888Scael.Pp
44448888ScaelThe
44548888Scael.Ql \&.Va
44648888Scaelis a macro command or request, and anything following it is an argument to
44748888Scaelbe processed.
44848888ScaelIn the second case,
44948888Scaelthe description of a
45048888Scael.Ux
45148888Scaelcommand using the content macros is a
45248888Scaelbit more involved;
45348888Scaela typical SYNOPSIS command line might be displayed as:
45448888Scael.Pp
45548888Scael.Bd -filled -offset indent
45648888Scael.Nm filter
45748888Scael.Op Fl flag
45848888Scael.Ar infile outfile
45948888Scael.Ed
46048888Scael.Pp
46148888ScaelHere,
46248888Scael.Nm filter
46348888Scaelis the command name and the
46448888Scaelbracketed string
46548888Scael.Fl flag
46648888Scaelis a
46748888Scael.Em flag
46848888Scaelargument designated as optional by the option brackets.
46948888ScaelIn
47048888Scael.Nm \-mdoc
47148888Scaelterms,
47248888Scael.Ar infile
47343435Scaeland
47448888Scael.Ar outfile
47548888Scaelare
47648888Scaelcalled
47748888Scael.Em arguments .
47848888ScaelThe macros which formatted the above example:
47943435Scael.Pp
480*50362Scael.Bd -literal -offset indent
481*50362Scael\&.Nm filter
482*50362Scael\&.Op \&Fl flag
483*50362Scael\&.Ar infile outfile
48448888Scael.Ed
48548888Scael.Pp
48648888ScaelIn the third case, discussion of commands and command syntax
48748888Scaelincludes both examples above, but may add more detail. The
48848888Scaelarguments
48948888Scael.Ar infile
49048888Scaeland
49148888Scael.Ar outfile
49248888Scaelfrom the example above might be refered to as
49348888Scael.Em operands
49448888Scaelor
49548888Scael.Em file arguments .
49648888ScaelSome command line argument lists are quite long:
49748888Scael.\" .Bl -tag -width make -offset indent
49848888Scael.Bl -tag -width make -offset indent
49948888Scael.It Nm make
50048888Scael.Op Fl eiknqrstv
50148888Scael.Op Fl D Ar variable
50248888Scael.Op Fl d Ar flags
50348888Scael.Op Fl f Ar makefile
50448888Scael.Op Fl I Ar directory
50548888Scael.Op Fl j Ar max_jobs
50648888Scael.Op Ar variable=value
50748888Scael.br
50848888Scael.Op Ar "target\ ..."
50948888Scael.El
51048888Scael.Pp
51148888ScaelHere one might talk about the command
51248888Scael.Nm make
51348888Scaeland qualify the argument
51448888Scael.Ar makefile ,
51548888Scaelas an argument to the flag,
51648888Scael.Fl f ,
51748888Scaelor discuss the optional
51848888Scaelfile
51948888Scaeloperand
52048888Scael.Ar target .
52148888ScaelIn the verbal context, such detail can prevent confusion,
52248888Scaelhowever the
52348888Scael.Nm \-mdoc
52448888Scaelpackage
52548888Scaeldoes not have a macro for an argument
52648888Scael.Em to
52748888Scaela flag.
52848888ScaelInstead the
52948888Scael.Ql \&Ar
53048888Scaelargument macro is used for an operand or file argument like
53148888Scael.Ar target
53248888Scaelas well as an argument to a flag like
53348888Scael.Ar variable :
53448888Scael.Bd -literal -offset indent
53548888Scael\&.Nm make
53648888Scael\&.Op Fl eiknqrstv
53748888Scael\&.Op Fl D Ar variable
53848888Scael\&.Op Fl d Ar flags
53948888Scael\&.Op Fl f Ar makefile
54048888Scael\&.Op Fl I Ar directory
54148888Scael\&.Op Fl j Ar max_jobs
54248888Scael\&.Op Ar variable=value
54348888Scael\&.Op Ar target ...
54448888Scael.Ed
54548888Scael.Ss General Syntax
54648888ScaelAll content macros share a similar
54748888Scaelsyntax with a few minor deviations:
54848888Scael.Ql \&.Ar ,
54948888Scael.Ql \&.Fl ,
55048888Scael.Ql \&.Nm ,
55148888Scaeland
55248888Scael.Ql \&.Pa
55348888Scaeldiffer only when called without arguments;
55448888Scael.Ql \&.Fn
55548888Scaeland
55648888Scael.Ql \&.Xr
55748888Scaelimpose an order on their argument lists
55848888Scaeland the
55948888Scael.Em enclosure
56048888Scaeland
56148888Scael.Em quoting
56248888Scaelmacros
56348888Scaelhave nesting limitations. All content macros
56448888Scaelare capable of handling punctuation.
56543435ScaelAny argument which may be tested for punctuation
56643435Scaeland contains a member of the mathematical, logical or
56748888Scaelquotation set:
56848888Scael.Bd -literal -offset indent -compact
56943435Scael{+,\-,/,*,%,<,>,<=,>=,=,==,&,`,',"}
57048888Scael.Ed
57143435Scaelshould have
57248888Scaelthe character escaped with
57348888Scael.Ql \e& .
57448888ScaelTypical syntax is shown in the first content macro displayed
57548888Scaelbelow,
57648888Scael.Ql \&.Ad ,
57748888Scaeland the syntax for enclosure/quoting macros is shown in
57848888Scael.Sx Enclosure and Quoting Macros .
57948888Scael.Ss Address Macro
58048888ScaelThe address macro constructs an address
58143435Scaelof the form addr1[,addr2[,addr3]].
58243435Scael.Pp
58348888Scael.Dl Usage: .Ad address ... \*(Pu
58448888Scael.Bl -tag -width ".Ad f1 , f2 , f3 :" -compact -offset 14n
58548888Scael.It Li \&.Ad addr1
58643435Scael.Ad addr1
58748888Scael.It Li \&.Ad addr1\ .
58843435Scael.Ad addr1 .
58948888Scael.It Li \&.Ad addr1\ , file2
59043435Scael.Ad addr1 , file2
59148888Scael.It Li \&.Ad f1\ , f2\ , f3\ :
59243435Scael.Ad f1 , f2 , f3 :
59348888Scael.It Li \&.Ad addr\ )\ )\ ,
59443435Scael.Ad addr ) ) ,
59548888Scael.El
59648888Scael.Pp
59743435ScaelIt is an error to call
59843435Scael.Li \&.Ad
59943435Scaelwithout arguments.
60048888Scael.Li \&.Ad
60148888Scaelis callable by other macros and may call other macros.
60248888Scael.Ss Argument Macro
60343435ScaelThe
60443435Scael.Li \&.Ar
60548888Scaelargument macro may be used whenever
60643435Scaela command line argument is referenced.
60743435Scael.Pp
60843435Scael.Dl Usage: .Ar argument ... \*(Pu
60948888Scael.Bl -tag -width ".Ar file1 file2" -compact -offset 15n
61048888Scael.It Li \&.Ar
61143435Scael.Ar
61248888Scael.It Li \&.Ar file1
61343435Scael.Ar file1
61448888Scael.It Li \&.Ar file1\ .
61543435Scael.Ar file1 .
61648888Scael.It Li \&.Ar file1 file2
61743435Scael.Ar file1 file2
61848888Scael.It Li \&.Ar f1 f2 f3\ :
61943435Scael.Ar f1 f2 f3 :
62048888Scael.It Li \&.Ar file\ )\ )\ ,
62143435Scael.Ar file ) ) ,
62248888Scael.El
62343435Scael.Pp
62443435ScaelIf
62543435Scael.Li \&.Ar
62648888Scaelis called without arguments
62748888Scael.Ql Ar
62843435Scaelis assumed. The
62943435Scael.Li \&.Ar
63048888Scaelmacro may call other macros, and may be
63148888Scaelcalled by other macros.
63248888Scael.Ss Angle Bracket Quote/Enclosure
63348888ScaelEncloses a string or strings in between angle brackets. The macro
63448888Scael.Ql \&.Aq
63548888Scaelencloses the remaining arguments on the macro command line, and the
63648888Scael.Ql \&.Ao
63748888Scael(angle open) and
63848888Scael.Ql \&.Ac
63948888Scael(angle close) macros may be used across one or more lines.
64048888Scael.Pp
64148888Scael.Dl Usage: .Aq string ... \*(Pu
64248888Scael.Bl -tag -width ".Aq Pa ctype.h ) ," -compact -offset 14n
64348888Scael.It Li \&.Aq
64448888Scael.Aq
64548888Scael.It Li \&.Aq string.
64648888Scael.Aq string.
64748888Scael.It Li \&.Aq string\ .
64848888Scael.Aq string .
64948888Scael.It Li \&.Aq stdio.h
65048888Scael.Aq stdio.h
65148888Scael.It Li \&.Aq \&Ar ctype.h\ )\ ,
65248888Scael.Aq Ar ctype.h ) ,
65348888Scael.El
65448888Scael.Pp
65548888ScaelSee
65648888Scael.Sx Enclosure Macros
65748888Scaelfor discussion and
65848888Scael.Sx Options
65948888Scaelfor examples of the open and close
66048888Scaelmacros
66148888Scael.Ql \&.Ac
66248888Scaeland
66348888Scael.Ql \&.Ao .
66448888Scael.Ql \&.Aq
66548888Scaelis callable by other macros and may call other macros.
66648888Scael.Ss Bracket Quotes/Enclosure
66748888ScaelBracket quotes should be used when the string being bracketed is
66848888Scael.Em not
66948888Scaelan option string.  The brackets for an option may be different
67048888Scaelthan the default brackets. The macro
67148888Scael.Ql \&.Bq
67248888Scaelencloses the remaining arguments on a macro command line and the
67348888Scaelmacros
67448888Scael.Ql \&.Bo
67548888Scaeland
67648888Scael.Ql \&.Bc
67748888Scaelmay be used across one or more lines.
67843435Scael.Pp
67948888Scael.Dl Usage: .Bq string ... \*(Pu
68048888Scael.Pp
68148888ScaelThe
68248888Scael.Li \&.Bq
68348888Scaelmacro exists for statements which use other macros:
68448888Scael.Bq Em Greek , French .
68548888ScaelThis was done with:
68648888Scael.Pp
68748888Scael.Dl Li \&.Bq \&Em Greek \&, French \&.
68848888Scael.Pp
68948888ScaelIt also could have been done using the prefix macro:
69048888Scael.Pp
69148888Scael.Dl Li ".Pf [ Em Greek , French ] ."
69248888Scael.Pp
69348888ScaelSee
69448888Scael.Sx Enclosure Macros
69548888Scaelfor discussion and
69648888Scael.Sx Options
69748888Scaelfor examples of the open and close
69848888Scaelmacros
69948888Scael.Ql \&.Bc
70048888Scaeland
70148888Scael.Ql \&.Bo .
70248888ScaelThe
70348888Scael.Ql \&.Bq
70448888Scaelmacro
70548888Scaelis callable and may call other macros.
70648888Scael.Ss Configuration Declaration (section four only)
70748888ScaelThe
70848888Scael.Ql \&.Cd
70948888Scaelmacro is used to demonstrate a
71048888Scael.Xr config 8
71148888Scaeldeclaration for a device interface in a section four manual.
71248888ScaelThis macro accepts quoted arguments (double quotes only).
71348888Scael.Pp
71448888Scael.Bl -tag -width "device le0 at scode?" -offset indent
71548888Scael.It Cd "device le0 at scode?"
71648888Scaelproduced by:
71748888Scael.Ql ".Cd device le0 at scode?" .
71848888Scael.El
71948888Scael.Ss Command Modifier
72048888ScaelThe command modifier is identical to the
72148888Scael.Ql \&.Fl
72248888Scael(flag) command with the exception
72348888Scaelthe
72448888Scael.Ql \&.Cm
72548888Scaelmacro does not assert a dash
72648888Scaelin front of every argument. Traditionally flags are marked by the
72748888Scaelpreceding dash, some commands or subsets of commands do not use them.
72848888ScaelCommand modifiers may also be specified in conjunction with interactive
72948888Scaelcommands such as editor commands.
73048888ScaelSee
73148888Scael.Sx Flags .
73248888Scael.Ss Double Quote macro/Enclosure
73348888ScaelThe
73448888Scael.Ql \&.Dq
73548888Scaeldouble quote encloses
73648888Scaelany remaining strings on the command line with double quotes.
73748888ScaelPunctuation is
73848888Scaelplaced after the end quote.
73948888ScaelThe macros
74048888Scael.Ql \&.Do
74148888Scaeland
74248888Scael.Ql \&.Dc
74348888Scaelmay be used across one or more lines.
74448888Scael.Pp
74543435Scael.Dl Usage: .Dq string ... \*(Pu
74648888Scael.Bl -tag -width ".Dq Ar patternx ) ) ," -compact -offset 14n
74748888Scael.It Li \&.Dq
74843435Scael.Dq
74948888Scael.It Li ".Dq string."
75048888Scael.Dq string.
75148888Scael.It Li ".Dq string abc ."
75248888Scael.Dq string abc .
75348888Scael.It Li ".Dq \'^[A-Z]\'"
75448888Scael.Dq \'^[A-Z]\'
75548888Scael.It Li \&.Dq \&Ar pattern\ )\ )\ ,
75643435Scael.Dq Ar pattern ) ) ,
75748888Scael.El
75843435Scael.Pp
75943435ScaelIf
76048888Scael.Ql \&.Dq
76143435Scaelis called with no arguments
76243435Scael.Dq
76343435Scaelis assumed. The
76448888Scael.Ql \&.Dq
76548888Scaelmacro may call or be called by
76648888Scaelother macros.
76748888ScaelSee
76848888Scael.Sx Enclosure Macros
76948888Scaelfor discussion of
77048888Scael.Ql \&.Dc
77143435Scaeland
77248888Scael.Ql \&.Do
77348888Scaelmacro types.
77448888Scael.Ss Defined Variables
77548888ScaelA variable which is defined in an include file is specified
77648888Scaelby the macro
77748888Scael.Ql \&.Dv .
77843435Scael.Pp
77948888Scael.Dl Usage: .Dv defined_variable ... \*(Pu
78048888Scael.Bl -tag -width ".Dv MAXHOSTNAMELEN" -compact -offset 14n
78148888Scael.It Li ".Dv MAXHOSTNAMELEN"
78248888Scael.Dv MAXHOSTNAMELEN
78348888Scael.It Li ".Dv TIOCGPGRP )"
78448888Scael.Dv TIOCGPGRP )
78548888Scael.El
78648888Scael.Pp
78748888ScaelIt is an error to call
78848888Scael.Ql \&.Dv
78948888Scaelwithout arguments.
79048888Scael.Ql \&.Dv
79148888Scaelmay call other macros and
79248888Scaelmay be called by other macros.
79348888Scael.Ss Emphasis Macro
79448888ScaelText may be stressed or emphasized with the
79548888Scael.Ql \&.Em
79648888Scaelmacro.  The usual font for emphasis is italic.
79748888Scael.Pp
79843435Scael.Dl Usage: .Em argument ... \*(Pu
79948888Scael.Bl -tag -width ".Em vide infra ) ) ," -compact -offset 14n
80048888Scael.It Li ".Em does not"
80143435Scael.Em does not
80248888Scael.It Li ".Em exceed 1024 ."
80343435Scael.Em exceed 1024 .
80448888Scael.It Li ".Em vide infra ) ) ,"
80543435Scael.Em vide infra ) ) ,
80648888Scael.El
80743435Scael.Pp
80848888ScaelThe emphasis can be forced across several lines of text by using
80948888Scaelthe
81048888Scael.Ql \&.Bf
81148888Scaelmacro discussed in
81248888Scael.Sx Modes
81348888Scaelunder
81448888Scael.Sx PAGE LAYOUT .
81548888Scael.\" .Pp
81648888Scael.\" .Em
81748888Scael.\" I'm certain the reason so many people desire an MBA from Harvard
81848888Scael.\" is because they want to be successful philanthropists.
81948888Scael.\" .Em
82048888Scael.Pp
82148888ScaelThe
82248888Scael.Ql \&.Em
82348888Scaelmacro
82448888Scaelis callable and may call other macros.
82543435ScaelIt is an error to call
82648888Scael.Ql \&.Em
82743435Scaelwithout arguments.
82848888Scael.Ss Enclosure and Quoting Macros
82948888ScaelThe concept of enclosure is similar to quoting.
83048888ScaelThe object is to enclose a string or more between
83148888Scaela pair of characters like quotes or parentheses.
83248888ScaelThe terms quoting and enclosure are used
83348888Scaelinterchangeably throughout this document.  Many of the
83448888Scaelone line enclosure macros end
83548888Scaelend in small letter
83648888Scael.Ql q
83748888Scaelto give a hint of quoting, but there are a few exceptions
83848888Scael(the macros
83948888Scael.Ql \&.En ,
84048888Scael.Ql \&.Fn
84148888Scaeland
84248888Scael.Ql \&.Op
84348888Scaelare also enclosure macros).
84448888ScaelFor each enclosure macro
84548888Scaelthere is also a pair of open and close macros which end
84648888Scaelin small letters
84748888Scael.Ql o
84848888Scaeland
84948888Scael.Ql c
85048888Scaelrespectively. These can be used across one or more lines of text
85148888Scaeland while they cannot be nested, the one line quote macros
85248888Scaelcan be used inside
85348888Scaelof them.
85448888ScaelFor a good example of one these macros, see
85548888Scael.Sx Options .
85648888Scael.Pp
85748888Scael.Bd -filled -offset indent
85848888Scael.Bl -column "quote" "close" "open" "Enclose Stringx(in XX)" XXstringXX
85948888Scael.Em " quote	 close	 open	function	result"
86048888Scael\&.Aq,	.Ac,	.Ao	Angle Bracket Enclosure	<string>
86148888Scael\&.Bq,	.Bc,	.Bo	Bracket Enclosure	[string]
86248888Scael\&.Dq,	.Dc,	.Do	Double Quote	``string''
86348888Scael	.Ec,	.Eo	Enclose String (in XX)	XXstringXX
86448888Scael\&.Fn,	.Fc,	.Fo	Function Enclosure	function(string)
86548888Scael\&.Op,	.Oc,	.Oo	Option Enclosure	[string]
86648888Scael\&.Pq,	.Pc,	.Po	Parenthesis Enclosure	(string)
86748888Scael\&.Qq,	.Qc,	.Qo	Straight Double Quote	"string"
86848888Scael\&.Sq,	.Sc,	.So	Single Quote	`string'
86948888Scael\&	.Xc,	.Xo	Extend Argument	\ \-\-
87048888Scael.El
87148888Scael.Ed
87248888Scael.Pp
87348888ScaelThe macros
87448888Scael.Ql \&.Eo
87548888Scaeland
87648888Scael.Ql \&.Ec
87748888Scaelallow a user to specify an open and close with the first argument as the
87848888Scaelopening or closing string respectively.
87948888Scael.Ss Errno's (Section two only)
88043435ScaelThe
88148888Scael.Ql \&.Er
88248888Scaelerrno macro specifies the error return value
88348888Scaelfor section two library routines. The second example
88443435Scaelbelow shows
88548888Scael.Ql \&.Er
88643435Scaelused with the
88748888Scael.Ql \&.Bq
88848888Scaelmacro, as it would be used in
88948888Scaela section two manual page.
89043435Scael.Pp
89143435Scael.Dl Usage: .Er ERRNOTYPE ... \*(Pu
89248888Scael.Bl -tag -width ".Bq Er ENOTDIR" -compact -offset 14n
89348888Scael.It Li \&.Er ENOENT
89443435Scael.Er ENOENT
89548888Scael.It Li \&.Er ENOENT\ )\ ;
89648888Scael.Er ENOENT ) ;
89748888Scael.It Li \&.Bq \&Er ENOTDIR
89848888Scael.Bq Er ENOTDIR
89948888Scael.El
90043435Scael.Pp
90143435ScaelIt is an error to call
90248888Scael.Ql \&.Er
90343435Scaelwithout arguments.
90448888ScaelThe
90548888Scael.Ql \&.Er
90648888Scaelmacro
90748888Scaelis callable and may call other macros.
90843435Scael.Ss Environment Variables
90943435ScaelThe
91048888Scael.Ql \&.Ev
91148888Scaelmacro specifies a environment variable.
91243435Scael.Pp
91343435Scael.Dl Usage: .Ev argument ... \*(Pu
91448888Scael.Bl -tag -width ".Ev PRINTER ) ) ," -compact -offset 14n
91548888Scael.It Li \&.Ev DISPLAY
91643435Scael.Ev  DISPLAY
91748888Scael.It Li \&.Ev PATH\ .
91843435Scael.Ev PATH .
91948888Scael.It Li \&.Ev PRINTER\ )\ )\ ,
92043435Scael.Ev PRINTER ) ) ,
92148888Scael.El
92243435Scael.Pp
92343435ScaelIt is an error to call
92448888Scael.Ql \&.Ev
92543435Scaelwithout arguments.
92648888ScaelThe
92748888Scael.Ql \&.Ev
92848888Scaelmacro
92948888Scaelis callable by other macros and may call other macros.
93048888Scael.Ss Function Argument
93148888ScaelThe
93248888Scael.Ql \&.Fa
93348888Scaelmacro is used to refer to function arguments (parameters)
93448888Scaeloutside of the SYNOPSIS section of the manual or inside
93548888Scaelthe SYNOPSIS section should a parameter list be too
93648888Scaellong for the
93748888Scael.Ql \&.Fn
93848888Scaelmacro and the enclosure macros
93948888Scael.Ql \&.Fo
94048888Scaeland
94148888Scael.Ql \&.Fc
94248888Scaelmust be used.
94348888Scael.Ql \&.Fa
94448888Scaelmay also be used to refer to structure members.
94548888Scael.Pp
94648888Scael.Dl Usage: .Fa function_argument ... \*(Pu
94748888Scael.Bl -tag -width ".Fa d_namlen\ )\ )\ ," -compact -offset 14n
94848888Scael.It Li \&.Fa d_namlen\ )\ )\ ,
94948888Scael.Fa d_namlen ) ) ,
95048888Scael.It Li \&.Fa iov_len
95148888Scael.Fa iov_len
95248888Scael.El
95348888Scael.Pp
95448888ScaelIt is an error to call
95548888Scael.Ql \&.Fa
95648888Scaelwithout arguments.
95748888Scael.Ql \&.Fa
95848888Scaelis callable by other macros and may call other macros.
95948888Scael.Ss Function Declaration
96048888ScaelThe
96148888Scael.Ql \&.Fd
96248888Scaelmacro is used in the SYNOPSIS section with section two or three
96348888Scaelfunctions. The
96448888Scael.Ql \&.Fd
96548888Scaelmacro does not call other macros and is not callable by other
96648888Scaelmacros.
96748888Scael.Pp
96848888Scael.Dl Usage: .Fd include_file (or defined variable)
96948888Scael.Pp
97048888ScaelIn the SYNOPSIS section a
97148888Scael.Ql \&.Fd
97248888Scaelrequest causes a line break if a function has already been presented
97348888Scaeland a break has not occurred. This leaves a nice vertical space
97448888Scaelin between the previous function call and the declaration for the
97548888Scaelnext function.
97643435Scael.Ss Flags
97743435ScaelThe
97848888Scael.Ql \&.Fl
97948888Scaelmacro handles command line flags. It prepends
98043435Scaela dash,
98148888Scael.Ql \- ,
98243435Scaelto the flag. For interactive command flags, which
98343435Scaelare not prepended with a dash, the
98448888Scael.Ql \&.Cm
98548888Scael(command modifier)
98648888Scaelmacro is identical, but with out the dash.
98743435Scael.Pp
98843435Scael.Dl Usage: .Fl argument ... \*(Pu
98948888Scael.Bl -tag -width ".Fl \-s \-t \-v" -compact -offset 14n
99048888Scael.It Li \&.Fl
99143435Scael.Fl
99248888Scael.It Li \&.Fl cfv
99343435Scael.Fl cfv
99448888Scael.It Li \&.Fl cfv\ .
99543435Scael.Fl cfv .
99648888Scael.It Li \&.Fl s v t
99743435Scael.Fl s v t
99848888Scael.It Li \&.Fl -\ ,
99943435Scael.Fl - ,
100048888Scael.It Li \&.Fl xyz\ )\ ,
100143435Scael.Fl xyz ) ,
100248888Scael.El
100343435Scael.Pp
100443435ScaelThe
100548888Scael.Ql \&.Fl
100648888Scaelmacro without any arguments results
100748888Scaelin a dash representing stdin/stdout.
100843435ScaelNote that giving
100948888Scael.Ql \&.Fl
101043435Scaela single dash, will result in two dashes.
101148888ScaelThe
101248888Scael.Ql \&.Fl
101348888Scaelmacro
101448888Scaelis callable and may call other macros.
101543435Scael.Ss Functions (library routines)
101648888ScaelThe .Fn macro is modeled on ANSI C conventions.
101748888Scael.Bd -literal
101848888ScaelUsage: .Fn [type] function [[type] params ... \*(Pu]
101948888Scael.Ed
1020*50362Scael.Bl -tag -width ".Fn .int align. .const * char *sptrsxx" -compact
102148888Scael.It Li "\&.Fn getchar"
102243435Scael.Fn getchar
102348888Scael.It Li "\&.Fn strlen ) ,"
102443435Scael.Fn strlen ) ,
102548888Scael.It Li \&.Fn "\\*qint align\\*q" "\\*qconst * char *sptrs\\*q" ,
102648888Scael.Fn "int align" "const * char *sptrs" ,
102748888Scael.El
102843435Scael.Pp
102943435ScaelIt is an error to call
103048888Scael.Ql \&.Fn
103143435Scaelwithout any arguments.
103248888ScaelThe
103348888Scael.Ql \&.Fn
103448888Scaelmacro
103548888Scaelis callable by other macros and may call other macros, but
103648888Scaelnote that any call to another macro signals the end of
103748888Scaelthe
103848888Scael.Ql \&.Fn
103948888Scaelcall (it will close-paren at that point).
104048888Scael.Pp
104148888ScaelIn the SYNOPSIS section, the function will always begin at
104248888Scaelthe beginning of line. If there is more than one function
104348888Scaelpresented in the SYNOPSIS section and a function type has not been
104448888Scaelgiven, a line break will occur, leaving a nice vertical space
104548888Scaelbetween the current function name and the one prior.
104643435ScaelAt the moment,
104748888Scael.Ql \&.Fn
104843435Scaeldoes not check its word boundaries
104948888Scaelagainst troff line lengths and may split across a newline
105048888Scaelungracefully. This will be fixed in the near future.
105148888Scael.Ss Function Type
105248888ScaelThis macro is intended for the SYNOPSIS section. It may be used
105348888Scaelanywhere else in the manpage without problems, but its main purpose
105448888Scaelis to present the function type in kernel normal form for the SYNOPSIS
105548888Scaelof sections two and three
105648888Scael(it causes a page break allowing the function name to appear
105748888Scaelon the next line).
105848888Scael.Pp
105948888Scael.Dl Usage: .Ft type ... \*(Pu
106048888Scael.Pp
106148888Scael.Bl -tag -width "\&.Ft struct stat" -offset 14n -compact
106248888Scael.It Li \&.Ft struct stat
106348888Scael.Ft struct stat
106448888Scael.El
106548888Scael.Pp
106643435ScaelThe
106748888Scael.Ql \&.Ft
106848888Scaelrequest is not callable by other macros.
106948888Scael.Ss Interactive Commands
107048888ScaelThe
107148888Scael.Ql \&.Ic
107248888Scaelmacro designates an interactive or internal command.
107348888Scael.Pp
107448888Scael.Dl Usage: .Li argument ... \*(Pu
107548888Scael.Bl -tag -width ".Ic setenv , unsetenv" -compact -offset 14n
107648888Scael.It Li \&.Ic :wq
107748888Scael.Ic :wq
107848888Scael.It Li \&.Ic do while {...}
107948888Scael.Ic do while {...}
108048888Scael.It Li \&.Ic setenv\ , unsetenv
108148888Scael.Ic setenv , unsetenv
108248888Scael.El
108348888Scael.Pp
108448888ScaelIt is an error to call
108548888Scael.Ql \&.Ic
108648888Scaelwithout arguments.
108748888ScaelThe
108848888Scael.Ql \&.Ic
108948888Scaelmacro may call other macros and is callable.
109043435Scael.Ss Literals
109143435ScaelThe
109248888Scael.Ql \&.Li
109348888Scaelliteral macro may be used for special characters,
109443435Scaelvariable constants, anything which should be displayed as it
109543435Scaelwould be typed.
109643435Scael.Pp
109743435Scael.Dl Usage: .Li argument ... \*(Pu
109848888Scael.Bl -tag -width ".Li cntrl-D ) ,"  -compact -offset 14n
109948888Scael.It Li \&.Li \een
110043435Scael.Li \en
110148888Scael.It Li \&.Li M1 M2 M3\ ;
110243435Scael.Li M1 M2 M3 ;
110348888Scael.It Li \&.Li cntrl-D\ )\ ,
110443435Scael.Li cntrl-D ) ,
110548888Scael.It Li \&.Li 1024\ ...
110643435Scael.Li 1024 ...
110748888Scael.El
110843435Scael.Pp
110943435ScaelThe
111048888Scael.Ql \&.Li
111148888Scaelmacro
111248888Scaelis callable by other macros and may call other macros.
111348888Scael.Ss Name Macro
111448888ScaelThe
111548888Scael.Ql \&.Nm
111648888Scaelmacro is used for the document title or subject name.
111748888ScaelIt has the peculiarity of remembering the first
111843435Scaelargument it was called with, which should
111943435Scaelalways be the subject name of the page.  When called without
112043435Scaelarguments,
112148888Scael.Ql \&.Nm
112243435Scaelregurgitates this initial name for the sole purpose
112343435Scaelof making less work for the author.
112448888ScaelNote:
112548888Scaela section two
112643435Scaelor three document function name is addressed with the
112748888Scael.Ql \&.Nm
112848888Scaelin the NAME section, and with
112948888Scael.Ql \&.Fn
113048888Scaelin the SYNOPSIS
113148888Scaeland remaining sections.
113243435ScaelFor interactive commands, such as the
113348888Scael.Ql while
113443435Scaelcommand keyword in
113543435Scael.Xr csh 1 ,
113643435Scaelthe
113748888Scael.Ql \&.Ic
113848888Scaelmacro should be used.
113943435ScaelWhile the
114048888Scael.Ql \&.Ic
114143435Scaelis nearly identical
114243435Scaelto
114348888Scael.Ql \&.Nm ,
114443435Scaelit can not recall the first argument it was invoked with.
114543435Scael.Pp
114643435Scael.Dl Usage: .Nm argument ... \*(Pu
114748888Scael.Bl -tag -width ".Nm mdoc.sample" -compact -offset 14n
114848888Scael.It Li \&.Nm mdoc.sample
114943435Scael.Nm  mdoc.sample
115048888Scael.It Li \&.Nm \-mdoc
115143435Scael.Nm \-mdoc .
115248888Scael.It Li \&.Nm foo\ )\ )\ ,
115343435Scael.Nm foo ) ) ,
115448888Scael.It Li \&.Nm
115543435Scael.Nm
115648888Scael.El
115743435Scael.Pp
115843435ScaelThe
115948888Scael.Ql \&.Nm
116048888Scaelmacro
116148888Scaelis callable by other macros and may call other macros.
116248888Scael.Ss No\-Op or Normal Text Macro
116348888ScaelThe macro
116448888Scael.Li \&.No
116548888Scaelis
116648888Scaela hack for words in a macro command line which should
116748888Scael.Em not
116848888Scaelbe formatted and follows the conventional syntax
116948888Scaelfor content macros.
117048888Scael.Ss No Space Macro
117148888ScaelThe
117248888Scael.Ql \&.Ns
117348888Scaelmacro eliminates unwanted spaces in between macro requests.
117448888ScaelIt is useful for old style argument lists where there is no space
117548888Scaelbetween the flag and argument:
117648888Scael.Bl -tag -width ".Op Fl I Ns Ar directory" -offset indent
117748888Scael.It Li ".Op Fl I Ns Ar directory"
117848888Scaelproduces
117948888Scael.Op Fl I Ns Ar directory
118048888Scael.El
118148888Scael.Pp
118248888ScaelNote: the
118348888Scael.Ql \&.Ns
118448888Scaelmacro always invokes the
118548888Scael.Ql \&.No
118648888Scaelmacro after eliminating the space unless another macro name
118748888Scaelfollows it.
118848888ScaelThe macro
118948888Scael.Ql \&.Ns
119048888Scaelis callable and may call other macros.
119148888Scael.Ss Options
119248888ScaelThe
119348888Scael.Ql \&.Op
119448888Scaelmacro
119548888Scaelplaces option brackets around the any remaining arguments on the command
119648888Scaelline, and places any
119748888Scaeltrailing punctuation outside the brackets. The macros
119848888Scael.Ql \&.Oc
119948888Scaeland
120048888Scael.Ql \&.Oo
120148888Scaelmay be used across one or more lines.
120248888Scael.Pp
120348888Scael.Dl Usage: .Op options ... \*(Pu
120448888Scael.Bl -tag -width ".Op Fl c Ar objfil Op Ar corfil ," -compact -offset indent
120548888Scael.It Li \&.Op
120648888Scael.Op
120748888Scael.It Li ".Op Fl k"
120848888Scael.Op Fl k
120948888Scael.It Li ".Op Fl k ) ."
121048888Scael.Op Fl k ) .
121148888Scael.It Li ".Op Fl k Ar kookfile"
121248888Scael.Op Fl k Ar kookfile
121348888Scael.It Li ".Op Fl k Ar kookfile ,"
121448888Scael.Op Fl k Ar kookfile ,
121548888Scael.It Li ".Op Ar objfil Op Ar corfil"
121648888Scael.Op Ar objfil Op Ar corfil
121748888Scael.It Li ".Op Fl c Ar objfil Op Ar corfil ,"
121848888Scael.Op Fl c Ar objfil Op Ar corfil ,
121948888Scael.It Li \&.Op word1 word2
122048888Scael.Op word1 word2
122148888Scael.El
122248888Scael.Pp
122348888ScaelThe
122448888Scael.Ql \&.Oc
122548888Scaeland
122648888Scael.Ql \&.Oo
122748888Scaelmacros:
122848888Scael.Bd -literal -offset indent
122948888Scael\&.Oo
123048888Scael\&.Op \&Fl k \&Ar kilobytes
123148888Scael\&.Op \&Fl i \&Ar interval
123248888Scael\&.Op \&Fl c \&Ar count
123348888Scael\&.Oc
123448888Scael.Ed
123548888Scael.Pp
123648888ScaelProduce:
123748888Scael.Oo
123848888Scael.Op Fl k Ar kilobytes
123948888Scael.Op Fl i Ar interval
124048888Scael.Op Fl c Ar count
124148888Scael.Oc
124248888Scael.Pp
124348888ScaelThe macros
124448888Scael.Ql \&.Op ,
124548888Scael.Ql \&.Oc
124648888Scaeland
124748888Scael.Ql \&.Oo
124848888Scaelare callable and may call other macros.
124948888Scael.Ss Parenthesis Quote/Enclosure
125048888ScaelMacros
125148888Scael.Li \&.Pq , \&.Pc
125248888Scaeland
125348888Scael.Li \&.Po
125448888Scaelfollow the conventions for a typical quoting macros,
125548888Scaelsee
125648888Scael.Sx Enclosure Macros
125748888Scaeland
125848888Scael.Sx Options
125948888Scaelabove.
126043435Scael.Ss Pathnames
126143435ScaelThe
126248888Scael.Ql \&.Pa
126348888Scaelmacro formats path or file names.
126443435Scael.Pp
126543435Scael.Dl Usage: .Pa pathname \*(Pu
126648888Scael.Bl -tag -width ".Pa /tmp/fooXXXXX ) ." -compact -offset 14n
126748888Scael.It Li \&.Pa /usr/share
126843435Scael.Pa /usr/share
126948888Scael.It Li \&.Pa /tmp/fooXXXXX\ )\ .
127043435Scael.Pa /tmp/fooXXXXX ) .
127148888Scael.El
127243435Scael.Pp
127348888ScaelThe
127448888Scael.Ql \&.Pa
127548888Scaelmacro
127648888Scaelis callable by other macros and may call other macros.
127748888Scael.Ss Single Quotes/Enclosure
127848888ScaelSee
127948888Scael.Sx Enclosure Macros .
128048888ScaelSee
128148888Scael.Sx Double Quote/Enclosure
128248888Scaelabove.
128348888ScaelThe single quoting macro
128448888Scael.Ql \&.Sq
128548888Scaelworks in the identical manner as
128648888Scael.Ql \&.Dq.
128748888Scael.Ss Prefix Macro
128848888ScaelThe
1289*50362Scael.Ql \&.Pf
1290*50362Scaelmacro
1291*50362Scaelis a short cut for combining
129248888Scaeltwo strings together, the first of which is
1293*50362Scaelin the default font, and the second a content
129448888Scaelspecified string.
129548888Scael.Pp
129648888Scael.Bl -tag -width ".Pf ( Fa name2 " -offset 14n -compact
129748888Scael.It Li ".Pf ( Fa name2"
129848888Scaelbecomes
129948888Scael.Pf ( Fa name2
130048888Scael.El
130148888Scael.Pp
130248888ScaelThe
130348888Scael.Ql \&.Pf
130448888Scaelmacro is not callable, but may call other macros.  The
130548888Scael.Ql \&.Ns
130648888Scaelmacro performs the analogus suffix function.
130748888Scael.Ss Section Cross References
130848888ScaelThe
130948888Scael.Ql \&.Sx
131048888Scaelmacro designates a reference to a section header
131148888Scaelwithin the same document. It is callable by other macros and may
131248888Scaelcall other macros.
131348888Scael.Pp
131448888Scael.Bl -tag -width "Li \&.Sx FILES" -offset 14n
131548888Scael.It Li \&.Sx FILES
131648888Scael.Sx FILES
131748888Scael.El
131848888Scael.Ss References and Citations
131948888ScaelThe following macros make a modest attempt to handle references.
132048888ScaelAt best, the macros make it convientent to manually drop in a subset of
132148888Scaelrefer style references.
132248888Scael.Pp
132348888Scael.Bl -tag -width 6n -offset indent -compact
132448888Scael.It Li ".Rs"
132548888ScaelReference Start. Causes a line break and begins collection
132648888Scaelof reference information until the
132748888Scaelreference end macro is read.
132848888Scael.It Li ".Re"
132948888ScaelReference End. The reference is printed.
133048888Scael.It Li ".%A"
133148888ScaelReference author name, one name per invocation.
133248888Scael.It Li ".%B"
133348888ScaelBook title.
133448888Scael.It Li ".%J"
133548888ScaelJournal title.
133648888Scael.It Li ".%N"
133748888ScaelIssue number.
133848888Scael.It Li ".%O"
133948888ScaelOptional information.
134048888Scael.It Li ".%R"
134148888ScaelReport name.
134248888Scael.It Li ".%T"
134348888ScaelTitle of article.
134448888Scael.It Li ".%V"
134548888ScaelVolume(s).
134648888Scael.El
134748888Scael.Pp
134848888ScaelThe macros begining with
134948888Scael.Ql %
135048888Scaelare not callable, but may call only the trade name macro which
135148888Scaelreturns to its caller. The purpose is to allow trade names
135248888Scaelto be pretty printed in troff/ditroff output. WARNING: this
135348888Scaelhas very few trade names defined at the moment and will print unknown
135448888Scaeltrade names in the default font.
135543435Scael.Ss Symbolic
135648888ScaelThe symbolic emphasis macro is generally a boldface macro in
135748888Scaeleither the symbolic sense or the traditional English usage.
135843435Scael.Pp
135943435Scael.Dl Usage: .Sy symbol ... \*(Pu
136048888Scael.Bl -tag -width ".Sy Important Notice" -compact -offset 14n
136148888Scael.It Li \&.Sy Important Notice
136248888Scael.Sy Important Notice
136348888Scael.El
136443435Scael.Pp
136543435ScaelThe
136648888Scael.Ql \&.Sy
136748888Scaelmacro
136848888Scaelis callable by other macros and may call other macros, except
136948888Scaelin the second form.  Arguments to
137048888Scael.Ql \&.Sy
137148888Scaelmay be quoted.
137243435Scael.Ss Variables
137343435ScaelGeneric variable reference:
137443435Scael.Pp
137543435Scael.Dl Usage: .Va variable ... \*(Pu
137648888Scael.Bl -tag -width ".Va char s ] ) ) ," -compact -offset 14n
137748888Scael.It Li \&.Va count
137843435Scael.Va count
137948888Scael.It Li \&.Va settimer ,
138043435Scael.Va settimer ,
138148888Scael.It Li \&.Va int\ *prt\ )\ :
138243435Scael.Va int\ *prt ) :
138348888Scael.It Li \&.Va char\ s\ ]\ )\ )\ ,
138443435Scael.Va char\ s ] ) ) ,
138548888Scael.El
138643435Scael.Pp
138748888ScaelIt is an error to call
138848888Scael.Ql \&.Va
138948888Scaelwithout any arguments.
139048888ScaelThe
139148888Scael.Ql \&.Va
139248888Scaelmacro
139348888Scaelis callable by other macros and may call other macros.
139443435Scael.Ss Cross References
139543435ScaelThe
139648888Scael.Ql \&.Xr
139748888Scaelmacro expects the first argument to be
139843435Scaela manual page name, and the second argument, if it exists,
139943435Scaelto be either a section page number or punctuation.  Any
140043435Scaelremaining arguments are assumed to be punctuation.
140143435Scael.Pp
140243435Scael.Dl Usage: .Xr manpage [1,...,8] \*(Pu
140348888Scael.Bl -tag -width ".Xr mdoc 7 ) ) ," -compact -offset 14n
140448888Scael.It Li \&.Xr mdoc
140543435Scael.Xr mdoc
140648888Scael.It Li \&.Xr mdoc\ ,
140743435Scael.Xr mdoc ,
140848888Scael.It Li \&.Xr mdoc 7
140943435Scael.Xr mdoc 7
141048888Scael.It Li \&.Xr mdoc 7\ )\ )\ ,
141143435Scael.Xr mdoc 7 ) ) ,
141248888Scael.El
141343435Scael.Pp
141443435ScaelThe
141548888Scael.Ql \&.Xr
141648888Scaelmacro
141748888Scaelis callable by other macros and may call other macros.
141843435ScaelIt is an error to call
141948888Scael.Ql \&.Xr
142043435Scaelwithout
142143435Scaelany arguments.
142248888Scael.Ss Extended  Arguments
142348888ScaelThe
142448888Scael.Li \&.Xo
142548888Scaeland
142648888Scael.Li \&.Xc
142748888Scaelmaxros allow one to extend an argument list
142848888Scaelon a macro boundary.  Argument lists cannot
142948888Scaelbe extended within a macro
143048888Scaelwhich expects all of its arguments on one line such
143148888Scaelas
143248888Scael.Ql \&.Op .
143343435Scael.\" ---
143443435Scael.Sh PAGE LAYOUT MACROS
143543435Scael.Ss Section Headers
143648888ScaelThe first three
143748888Scael.Ql \&.Sh
143848888Scaelsection header macros
143948888Scaellist below are required in every
144048888Scaelman page. The remaining section headers
144148888Scaelare recommended at the disgression of the author
144248888Scaelwriting the manual page. The
144348888Scael.Ql \&.Sh
144448888Scaelmacro can take up to nine arguments. It may call
144548888Scaelother macros, but it may not be called by other macros.
144648888Scael.Bl -tag -width ".Sh SYNOPSIS"
144748888Scael.It \&.Sh NAME
144843435ScaelThe
144948888Scael.Ql \&.Sh NAME
145048888Scaelmacro is mandatory. If not specified,
145143435Scaelthe headers, footers and page layout defaults
145243435Scaelwill not be set and things will be rather unpleasant.
145343435ScaelThe NAME section consists of at least three items.
145443435ScaelThe first is the
145548888Scael.Ql \&.Nm
145648888Scaelname macro naming the subject of the man page.
145748888ScaelThe second is the Name Description macro,
145848888Scael.Ql \&.Nd ,
145943435Scaelwhich separates the subject
146043435Scaelname from the third item, which is the description. The
146143435Scaeldescription should be the most terse and lucid possible,
146243435Scaelas the space available is small.
146348888Scael.It \&.Sh SYNOPSIS
146443435ScaelThe SYNOPSIS section describes the typical usage of the
146548888Scaelsubject of a man page. The  macros required
146643435Scaelare either
146748888Scael.Ql ".Nm" ,
146848888Scael.Ql ".Cd" ,
146943435Scaelor
147048888Scael.Ql ".Fn"
147148888Scael(and possibly
147248888Scael.Ql ".Fd" ,
147348888Scael.Ql ".Ft"
147448888Scaelmacros).
147543435ScaelThe function name
147648888Scaelmacro
147748888Scael.Ql ".Fn"
147843435Scaelis required
147943435Scaelfor manual page sections 2 and 3, the command and general
148048888Scaelname macro
148148888Scael.Ql \&.Nm
148248888Scaelis required for sections 1, 5, 6, 7, 8.
148348888ScaelSection 4 manuals require a
148448888Scael.Ql ".Nm" , ".Fd"
148548888Scaelor a
148648888Scael.Ql ".Cd"
148748888Scaelconfiguration device usage macro.
148848888ScaelSeveral other macros may be necessary to produce
148943435Scaelthe synopsis line as shown below:
149043435Scael.Pp
149148888Scael.Bd -filled -offset indent
149243435Scael.Nm cat
149343435Scael.Op Fl benstuv
149443435Scael.Op Fl
149543435Scael.Ar
149648888Scael.Ed
149743435Scael.Pp
149848888ScaelThe following macros were used:
149943435Scael.Pp
150043435Scael.Dl \&.Nm cat
150148888Scael.Dl \&.Op \&Fl benstuv
150248888Scael.Dl \&.Op \&Fl
150343435Scael.Dl \&.Ar
150448888Scael.It \&.Sh DESCRIPTION
150543435ScaelIn most cases the first text in the DESCRIPTION section
150643435Scaelis a brief paragraph on the command, function or file,
150743435Scaelfollowed by a lexical list of options and respective
150843435Scaelexplanations. To create such a list, the
150948888Scael.Ql \&.Bl
151048888Scaelbegin-list,
151148888Scael.Ql \&.It
151248888Scaellist-item and
151348888Scael.Ql \&.El
151448888Scaelend-list
151548888Scaelmacros are used (see
151648888Scael.Sx Lists and Columns
151748888Scaelbelow).
151848888Scael.El
151943435Scael.Pp
152043435ScaelThe following
152148888Scael.Ql \&.Sh
152243435Scaelsection headers are part of the
152343435Scaelpreferred manual page layout and must be used appropriately
152443435Scaelto maintain consistency. They are listed in the order
152543435Scaelin which they would be used.
152648888Scael.Bl -tag -width SYNOPSIS
152748888Scael.It \&.Sh ENVIRONMENT
152843435ScaelThe ENVIRONMENT section should reveal any related
152943435Scaelenvironment
153043435Scaelvariables and clues to their behaviour and/or usage.
153148888Scael.It \&.Sh EXAMPLES
153243435ScaelThere are several ways to create examples. See
153343435Scaelthe EXAMPLES section below
153443435Scaelfor details.
153548888Scael.It \&.Sh FILES
153643435ScaelFiles which are used or created by the man page subject
153743435Scaelshould be listed via the
153848888Scael.Ql \&.Pa
153948888Scaelmacro in the FILES section.
154048888Scael.It \&.Sh SEE ALSO
154143435ScaelReferences to other material on the man page topic and
154243435Scaelcross references to other relevant man pages should
154343435Scaelbe placed in the SEE ALSO section.  Cross references
154443435Scaelare specified using the
154548888Scael.Ql \&.Xr
154648888Scaelmacro.  At this time
154743435Scael.Xr refer 1
154843435Scaelstyle references are not accommodated.
154948888Scael.It \&.Sh STANDARDS
155043435ScaelIf the command, library function or file adheres to a
155143435Scaelspecific implementation such as POSIX 1003.1 or
155243435ScaelANSI C X3.159-1989 this should be noted here.  If the
155343435Scaelcommand does not adhere to any standard, its history
155443435Scaelshould be noted in the HISTORY section.
155548888Scael.It \&.Sh HISTORY
155643435ScaelAny command which does not adhere to any specific standards
155743435Scaelshould be outlined historically in this section.
155848888Scael.It \&.Sh AUTHORS
155943435ScaelCredits, if need be, should be placed here.
156048888Scael.It \&.Sh DIAGNOSTICS
156143435ScaelDiagnostics from a command should be placed in this section.
156248888Scael.It \&.Sh ERRORS
156343435ScaelSpecific error handling, especially from library functions
156443435Scael(man page sections 2 and 3) should go here.  The
156548888Scael.Ql \&.Er
156648888Scaelmacro is used to specify an errno.
156748888Scael.It \&.Sh BUGS
156843435ScaelBlatant problems with the topic go here...
156948888Scael.El
157043435Scael.Pp
157148888ScaelUser specified
157248888Scael.Ql \&.Sh
157348888Scaelsections may be added,
157448888Scaelfor example, this section was set with:
157548888Scael.Bd -literal -offset 14n
157648888Scael\&.Sh PAGE LAYOUT MACROS
157748888Scael.Ed
157843435Scael.Ss Paragraphs and Line Spacing.
157948888Scael.Bl -tag -width 6n
158048888Scael.It \&.Pp
158143435ScaelThe \&.Pp paragraph command may
158243435Scaelbe used to specify a line space where necessary.
158348888ScaelThe macro is not necessary after a
158448888Scael.Ql \&.Sh
158543435Scaelor
158648888Scael.Ql \&.Ss
158748888Scaelmacro or before
158843435Scaela
158948888Scael.Ql \&.Bl
159048888Scaelmacro.
159148888Scael(The
159248888Scael.Ql \&.Bl
159348888Scaelmacro asserts a vertical distance unless the -compact flag is given).
159448888Scael.El
159548888Scael.\" .Pp
159648888Scael.\" .Ds I
159748888Scael.\" .Cw (ax+bx+c) \ is\ produced\ by\ \&
159848888Scael.\" .\".Cw (ax+bx+c) \&.Va_by_) \&_and_\& \&[?/]m_b1_e1_f1[?/]\&
159948888Scael.\" .Cl Cx \t\t
160048888Scael.\" .Li \&.Cx\ (
160148888Scael.\" .Cx
160248888Scael.\" .Cl Cx \t\t
160348888Scael.\" .Li \&.Va ax
160448888Scael.\" .Cx
160548888Scael.\" .Cl Cx \t\t
160648888Scael.\" .Li \&.Sy \+
160748888Scael.\" .Cx
160848888Scael.\" .Cl Cx \&(\&
160948888Scael.\" .Va ax
161048888Scael.\" .Cx +
161148888Scael.\" .Va by
161248888Scael.\" .Cx +
161348888Scael.\" .Va c )
161448888Scael.\" .Cx \t
161548888Scael.\" .Em is produced by
161648888Scael.\" .Cx \t
161748888Scael.\" .Li \&.Va by
161848888Scael.\" .Cx
161948888Scael.\" .Cl Cx \t\t
162048888Scael.\" .Li \&.Sy \+
162148888Scael.\" .Cx
162248888Scael.\" .Cl Cx \t\t
162348888Scael.\" .Li \&.Va c )
162448888Scael.\" .Cx
162548888Scael.\" .Cl Cx \t\t
162648888Scael.\" .Li \&.Cx
162748888Scael.\" .Cx
162848888Scael.\" .Cw
162948888Scael.\" .De
163048888Scael.\" .Pp
163148888Scael.\" This example shows the same equation in a different format. The spaces
163248888Scael.\" around the
163348888Scael.\" .Li \&+
163448888Scael.\" signs were forced with
163548888Scael.\" .Li \e :
163648888Scael.\" .Pp
163748888Scael.\" .Ds I
163848888Scael.\" .Cw (ax\ +\ bx\ +\ c) \ is\ produced\ by\ \&
163948888Scael.\" .\".Cw (ax+bx+c) \&.Va_by_) \&_and_\& \&[?/]m_b1_e1_f1[?/]\&
164048888Scael.\" .Cl Cx \t\t
164148888Scael.\" .Li \&.Cx\ (
164248888Scael.\" .Cx
164348888Scael.\" .Cl Cx \t\t
164448888Scael.\" .Li \&.Va a
164548888Scael.\" .Cx
164648888Scael.\" .Cl Cx \t\t
164748888Scael.\" .Li \&.Sy x
164848888Scael.\" .Cx
164948888Scael.\" .Cl Cx \t\t
165048888Scael.\" .Li \&.Cx \e\ +\e\ \e&
165148888Scael.\" .Cx
165248888Scael.\" .Cl Cx \&(\&
165348888Scael.\" .Va a
165448888Scael.\" .Sy x
165548888Scael.\" .Cx \ +\ \&
165648888Scael.\" .Va b
165748888Scael.\" .Sy y
165848888Scael.\" .Cx \ +\ \&
165948888Scael.\" .Va c )
166048888Scael.\" .Cx \t
166148888Scael.\" .Em is produced by
166248888Scael.\" .Cl Cx \t\t
166348888Scael.\" .Li \&.Va b
166448888Scael.\" .Cx
166548888Scael.\" .Cl Cx \t\t
166648888Scael.\" .Li \&.Sy y
166748888Scael.\" .Cx
166848888Scael.\" .Cl Cx \t\t
166948888Scael.\" .Li \&.Cx \e\ +\e\ \e&
167048888Scael.\" .Cx
167148888Scael.\" .Cl Cx \t\t
167248888Scael.\" .Li \&.Va c )
167348888Scael.\" .Cx
167448888Scael.\" .Cl Cx \t\t
167548888Scael.\" .Li \&.Cx
167648888Scael.\" .Cx
167748888Scael.\" .Cw
167848888Scael.\" .De
167948888Scael.\" .Pp
168048888Scael.\" The incantation below was
168148888Scael.\" lifted from the
168248888Scael.\" .Xr adb 1
168348888Scael.\" manual page:
168448888Scael.\" .Pp
168548888Scael.\" .Ds I
168648888Scael.\" .Cw \&[?/]m_b1_e1_f1[?/]\& is\ produced\ by
168748888Scael.\" .Cl Cx \t\t
168848888Scael.\" .Li \&.Cx Op Sy ?/
168948888Scael.\" .Cx
169048888Scael.\" .Cl Cx \t\t
169148888Scael.\" .Li \&.Nm m
169248888Scael.\" .Cx
169348888Scael.\" .Cl Cx Op Sy ?/
169448888Scael.\" .Nm m
169548888Scael.\" .Ad \ b1 e1 f1
169648888Scael.\" .Op Sy ?/
169748888Scael.\" .Cx \t
169848888Scael.\" .Em is produced by
169948888Scael.\" .Cx \t
170048888Scael.\" .Li \&.Ar \e\ b1 e1 f1
170148888Scael.\" .Cx
170248888Scael.\" .Cl Cx \t\t
170348888Scael.\" .Li \&.Op Sy ?/
170448888Scael.\" .Cx
170548888Scael.\" .Cl Cx \t\t
170648888Scael.\" .Li \&.Cx
170748888Scael.\" .Cx
170848888Scael.\" .Cw
170948888Scael.\" .De
171048888Scael.\" .Pp
171148888Scael.Ss Examples and Displays
171248888ScaelThere are five types of displays, a quickie one line indented display
171348888Scael.Ql \&.D1 ,
171448888Scaela quickie one line literal display
171548888Scael.Ql \&.Dl ,
171648888Scaela block literal, block filled and block ragged which use
171748888Scaelthe
171848888Scael.Ql \&.Bd
171948888Scaelbegin-display
172048888Scaeland
172148888Scael.Ql \&.Ed
172248888Scaelend-display macros.
172343435Scael.Pp
172448888Scael.Bl -tag -width \&.D1
172548888Scael.It Li \&.D1
172648888Scael(D-one) Display one line of indented text.
172748888ScaelArguments are checked to see if they are callable.
172848888Scael.Bd -ragged -offset indent
172948888Scael.Li \&.D1 \&Fl ldghfstru
173048888Scael.Ed
173143435Scael.Pp
173248888Scaelproduces:
173343435Scael.Pp
173448888Scael.Dl Fl ldghfstru
173548888Scael.It Li \&.Dl
173648888Scael(D-ell)
173748888ScaelDisplay one line of indented
173848888Scael.Em literal
173948888Scaeltext.  The
174048888Scael.Ql \&.Dl
174148888Scaelexample macro has been used throughout this
174248888Scaelfile.  It allows
174348888Scaelthe indent (display) of one line of text.
174448888ScaelIts default font is set to
174548888Scaelconstant width (literal) however
174648888Scael.Ql \&.Dl
174748888Scaeldoes check arguments to see it they are callable.
174848888ScaelMacros called from
174943435Scael.Li \&.Dl
175048888Scaelshould be content macros; calling macros from
175148888Scaelthe page layout section
175248888Scaelis redundant and may cause unpredictable errors.
175348888Scael.Bd -ragged -offset indent
175443435Scael.Li \&.Dl % ls -ldg /usr/local/bin
175548888Scael.Ed
175643435Scael.Pp
175743435Scaelproduces:
175848888Scael.Pp
175943435Scael.Dl % ls -ldg /usr/local/bin
176048888Scael.It Li \&.Bd
176148888ScaelBegin-display. The
176248888Scael.Ql \&.Bd
176348888Scaeldisplay must be ended with the
176448888Scael.Ql \&.Ed
176548888Scaelmacro. Displays may be nested within displays and
176648888Scaellists.
176748888Scael.Ql \&.Bd
176848888Scaelhas the following syntax:
176943435Scael.Pp
177048888Scael.Dl ".Bd display-type [offset offset_value]"
177143435Scael.Pp
177248888ScaelThe display-type must be one of the following four types and
177348888Scaelmay have an offset specifier for indentation:
177448888Scael.Ql \&.Bd .
177543435Scael.Pp
177648888Scael.Bl -tag -width "literalxx" -compact
177748888Scael.It Fl ragged
177843435ScaelDisplay a block of text as typed,
177948888Scaelright (and left) margin edges are left ragged.
178048888Scael.It Fl filled
178148888ScaelDisplay a filled (formatted) block.
178248888ScaelThe block of text is formatted (the edges are filled \-
178348888Scaelnot left ragged).
178448888Scael.It Fl literal
178548888ScaelDisplay a literal block, useful for source code or
178648888Scaelsimple tabbed or spaced text.
178748888Scael.It Fl file Ar file_name
178848888ScaelThe file name following the
178948888Scael.Fl file
179048888Scaelflag is read and displayed. Literal mode is
179148888Scaelasserted and tabs are set at 8 constant width character
179248888Scaelintervals, however any
179348888Scael.Xr troff/ Ns Nm \-mdoc
179448888Scaelcommands in file will be processed.
179548888Scael.It Fl offset Ar string
179648888ScaelIf
179748888Scael.Fl offset
179848888Scaelis specified with one of the following strings, the string
179948888Scaelis interpreted to indicate the level of indentation for the
180048888Scaelforthcoming block of text:
180148888Scael.Pp
180248888Scael.Bl -tag -width "indent" -compact
180348888Scael.It Ar left
180443435ScaelAlign block on the current left margin,
180543435Scaelthis is the default mode of
180648888Scael.Ql \&.Bd .
180748888Scael.It Ar center
180843435ScaelSupposedly center the block. At this time
180943435Scaelunfortunately, the block merely gets
181043435Scaelleft aligned about an imaginary center margin.
181148888Scael.It Ar indent
181248888ScaelIndents by one default indent value or tab. The default
181348888Scaelindent value is also used for the
181448888Scael.Ql \&.D1
181548888Scaeldisplay so one can be garanteed of the two types of displays
181648888Scaellining up. This indent is nornally set to 6n or about two
181748888Scaelthirds of an inch (six constant width characters).
181848888Scael.It Ar indent-two
181948888ScaelIndents two times the default indent value.
182048888Scael.It Ar right
182148888ScaelThis
182248888Scael.Em left
182348888Scaelaligns the block about two inches from
182448888Scaelthe right side of the page. This macro also needs
182548888Scaelwork and perhaps may never be right in
182648888Scael.Xr troff .
182748888Scael.El
182848888Scael.El
182948888Scael.It ".Ed"
183048888ScaelEnd-display.
183148888Scael.El
183248888Scael.Ss Tagged Lists and Columns
183348888ScaelThere are several types of lists which may be initiated with the
183448888Scael.Ql ".Bl"
183548888Scaelbegin-list macro.  Items within the list
183648888Scaelare specified with the
183748888Scael.Ql ".It"
183848888Scaelitem macro and
183948888Scaeleach list must end with the
184048888Scael.Ql ".El"
184148888Scaelmacro. Lists may be nested within themselves and within displays.
184248888ScaelColumns may be used inside of lists, but lists are unproven
184348888Scaelinside of columns.
184443435Scael.Pp
184548888ScaelIn addition, several list attributes may be specified such as
184648888Scaelthe width of a tag, the list offset, and compactness specified
184748888Scael(blank lines between items allowed or disallowed).
184848888ScaelThe following list types are accepted by
184948888Scael.Ql ".Bl":
185043435Scael.Pp
185148888Scael.Bl -ohang -compact
185248888Scael.It Fl bullet
185348888Scael.It Fl item
185448888Scael.It Fl enum
185548888ScaelThese three are the simplest types of lists. Once the
185648888Scael.Ql ".Bl"
185748888Scaelmacro has been given, items in the list are merely
185848888Scaelindicated by a line consisting solely of the
185948888Scael.Ql ".It"
186048888Scaelmacro. For example, the source text for a simple enumerated list
186148888Scaelwould look like:
186248888Scael.Bd -literal -offset indent-two
186348888Scael\&.Bl -enum -compact
186448888Scael\&.It
186548888Scael\&Item one goes here.
186648888Scael\&.It
186748888Scael\&And item two here.
186848888Scael\&.It
186948888Scael\&Lastly item three goes here.
187048888Scael\&.El
187148888Scael.Ed
187243435Scael.Pp
187348888ScaelThe results:
187443435Scael.Pp
187548888Scael.Bl -enum -offset indent-two -compact
187648888Scael.It
187748888ScaelItem one goes here.
187848888Scael.It
187948888ScaelAnd item two here.
188048888Scael.It
188148888ScaelLastly item three goes here.
188248888Scael.El
188343435Scael.Pp
188448888ScaelA simple bullet list construction:
188548888Scael.Bd -literal -offset indent-two
188648888Scael\&.Bl -bullet -compact
188748888Scael\&.It
188848888Scael\&Bullet one goes here.
188948888Scael\&.It
189048888Scael\&Bullet two here.
189148888Scael\&.El
189248888Scael.Ed
189343435Scael.Pp
189448888ScaelProduces:
189548888Scael.Bl -bullet -offset indent-two -compact
189648888Scael.It
189748888ScaelBullet one goes here.
189848888Scael.It
189948888ScaelBullet two here.
190048888Scael.El
190143435Scael.Pp
190248888Scael.It Fl tag
190348888Scael.It Fl diag
190448888Scael.It Fl hang
190548888Scael.It Fl ohang
190648888Scael.It Fl inset
190748888ScaelThese list-types collect arguments specified with the
190848888Scael.Ql \&.It
190948888Scaelmacro and create a label which may be
191048888Scael.Em inset
191148888Scaelinto the forth coming text,
191248888Scael.Em hanged
191348888Scael(exdented) from the forth coming text,
191448888Scael.Em overhanged
191548888Scaelset above the forth coming paragraph or
191648888Scael.Em tagged
191748888Scael(exdented and offset). This
191848888Scaellist was constructed with the
191948888Scael.Ql Fl ohang
192048888Scaellist-type.  The
192148888Scael.Ql \&.It
192248888Scaelmacro may call any callable macros for the inset, hang
192348888Scaeland tag list-types, but will not call macros for the
192448888Scaeldiag type.
192548888ScaelHere is an example of inset labels:
192648888Scael.Bl -inset -offset indent
192748888Scael.It Em Tag
192848888ScaelThe tagged list (also called a tagged paragraph) is the
192948888Scaelmost common type of list used in the Berkeley manuals.
193048888Scael.It Em Diag
193148888ScaelDiag lists create section four diagnostic lists
193248888Scaeland are similar to inset lists except callable
193348888Scaelmacros are ignored.
193448888Scael.It Em Hang
193548888ScaelHanged labels are a matter of taste.
193648888Scael.It Em Ohang
193748888ScaelOver hanging labels are nice when space is constrained.
193848888Scael.It Em Inset
193948888ScaelInset labels are useful for controlling blocks of
194048888Scaelparagraphs and are valuable for converting
194148888Scael.Nm \-mdoc
194248888Scaelmanuals to other formats.
194348888Scael.El
194443435Scael.Pp
194548888ScaelHere is the source text which produced the above example:
194648888Scael.Bd -literal -offset indent
194748888Scael\&.Bl -inset -offset indent
194848888Scael\&.It Em Tag
194948888Scael\&The tagged list (also called a tagged paragraph) is the
195048888Scael\&most common type of list used in the Berkeley manuals.
195148888Scael\&.It Em Diag
195248888Scael\&Diag lists create section four diagnostic lists
195348888Scael\&and are similar to inset lists except callable
195448888Scael\&macros are ignored.
195548888Scael\&.It Em Hang
195648888Scael\&Hanged labels are a matter of taste.
195748888Scael\&.It Em Ohang
195848888Scael\&Over hanging labels are nice when space is constrained.
195948888Scael\&.It Em Inset
196048888Scael\&Inset labels are useful for controlling blocks of
196148888Scael\&paragraphs and are valuable for converting
196248888Scael\&.Nm \-mdoc
196348888Scael\&manuals to other formats.
196448888Scael\&.El
196548888Scael.Ed
196643435Scael.Pp
196748888ScaelHere is a hanged list with just one item:
196848888Scael.Bl -hang -offset indent
196948888Scael.It Em Hanged
197048888Scaellabels appear similar to tagged lists when the
197148888Scaellabel is smaller than the label width.
197248888Scael.It Em Longer hanged list labels
197348888Scaelblend in to the paragraph unlike
197448888Scaeltagged paragraph labels.
197548888Scael.El
197643435Scael.Pp
197748888ScaelAnd the unfomatted text which created it:
197848888Scael.Bd -literal -offset indent
197948888Scael\&.Bl -hang -offset indent
198048888Scael\&.It Em Hanged
198148888Scael\&labels appear similar to tagged lists when the
198248888Scael\&label is smaller than the label width.
198348888Scael\&.It Em Longer hanged list labels
198448888Scael\&blend in to the paragraph unlike
198548888Scael\&tagged paragraph labels.
198648888Scael\&.El
198748888Scael.Ed
198848888Scael.Pp
198948888ScaelThe tagged list which follows uses an optional width specifier to controll
199048888Scaelthe width of the tag.
199148888Scael.Pp
199248888Scael.Bl -tag -width "PAGEIN 10" -compact -offset indent
199348888Scael.It SL 10
199443435Scaelsleep time of the process (seconds blocked)
199548888Scael.It PAGEIN 10
199648888Scaelnumber of disk i/o's resulting from references
199748888Scaelby the process to pages not loaded in core.
199848888Scael.It UID 10
199943435Scaelnumerical user-id of process owner
200048888Scael.It PPID 10
200148888Scaelnumerical id of parent of process process priority
200248888Scael(non-positive when in non-interruptible wait)
200348888Scael.El
200443435Scael.Pp
200543435ScaelThe raw text:
200648888Scael.Bd -literal -offset indent
200748888Scael\&.Bl -tag -width "PAGEIN 10" -compact -offset indent
200848888Scael\&.It SL 10
200948888Scael\&sleep time of the process (seconds blocked)
201048888Scael\&.It PAGEIN 10
201148888Scael\&number of disk i/o's resulting from references
201248888Scael\&by the process to pages not loaded in core.
201348888Scael\&.It UID 10
201448888Scael\&numerical user-id of process owner
201548888Scael\&.It PPID 10
201648888Scael\&numerical id of parent of process process priority
201748888Scael\&(non-positive when in non-interruptible wait)
201848888Scael\&.El
201948888Scael.Ed
202043435Scael.Pp
202148888ScaelAcceptable width specifiers:
202248888Scael.Bl -tag -width Ar -offset indent
202348888Scael.It Fl width Ar "\&Fl"
202448888Scaelsets the width to the default width for a flag. All callable
202548888Scaelmacros have a default width value. The
202648888Scael.Ql \&.Fl ,
202748888Scaelvalue is presently
202848888Scaelset to ten constant width characters or about five sixth of
202948888Scaelan inch.
203048888Scael.It Fl width Ar "24n"
203148888Scaelsets the width to 24 constant width characters or about two
203248888Scaelinches.  The
203348888Scael.Ql n
203448888Scaelis absolutely necessary for the scaling to work correctly.
203548888Scael.It Fl width Ar "ENAMETOOLONG"
203648888Scaelsets width to the constant width length of the
203748888Scaelstring given.
203848888Scael.It Fl width  Ar "\\*qint mkfifo\\*q"
203948888Scaelagain, the width is set to the constant width of the string
204048888Scaelgiven.
204148888Scael.El
204243435Scael.Pp
204348888ScaelIf a width is not specified for the tag list type, the first
204448888Scaeltime
204548888Scael.Ql \&.It
204648888Scaelis invoked, an attempt is made to determine an appropriate
204748888Scaelwidth.  If the first argument to
204848888Scael.Ql ".It"
204948888Scaelis a callable macro, the default width for that macro will be used
205048888Scaelas if the macro name had been supplied as the width.  However,
205148888Scaelif another item in the list is given with a different callable
205248888Scaelmacro name, a new and nested list is assumed. Here is an involved
205348888Scaelexample of a self nesting list:
205448888Scael.Sh DIAGNOSTICS
205548888ScaelThe debugging facilities for
205648888Scael.Nm \-mdoc
205748888Scaelare limited, but can help detect subtle errors such
205848888Scaelas the collision of an argument name with an internal
205948888Scaelregister or macro name. (A what?)
206048888ScaelA register is an arithmetic storage class for
206148888Scael.Xr troff
206248888Scaelwith a one or two character name.
206348888ScaelAll registers internal to
206448888Scael.Nm \-mdoc
206548888Scaelfor
206648888Scael.Xr troff
206748888Scaeland
206848888Scael.Xr ditroff
206948888Scaelare two characters and
207048888Scaelof the form <uppercase><lowercase> such as
207148888Scael.Ql \&Ar ,
207248888Scael<lowercase><uppercase> as
207348888Scael.Ql \&aR
207443435Scaelor
207548888Scael<upper or lower letter><digit> as
207648888Scael.Ql \&C\&1 .
207748888ScaelAnd adding to the muddle,
207848888Scael.Xr troff
207948888Scaelhas its own internal registers all of which are either
208048888Scaeltwo lowercase characters or a dot plus a letter or meta-character
208148888Scaelcharacter.
208248888ScaelIn one of the introduction examples, it was shown how to
208348888Scaelprevent the interpretation of a macro name with the escape sequence
208448888Scael.Ql \e& .
208548888ScaelThis is sufficient for the internal register names also.
208643435Scael.Pp
208748888Scael.\" Every callable macro name has a corresponding register
208848888Scael.\" of the same name (<Uppercase><lowercase>).
208948888Scael.\" There are also specific registers which have
209048888Scael.\" been used for stacks and arrays and are listed in the
209148888Scael.\" .Sx Appendix .
209248888Scael.\" .Bd -ragged -offset 4n
209348888Scael.\" [A-Z][a-z]	registers corresponding to macro names (example ``Ar'')
209448888Scael.\" [a-z][A-Z]	registers corresponding to macro names (example ``aR'')
209548888Scael.\" C[0-9]		argument types (example C1)
209648888Scael.\" O[0-9]		offset stack (displays)
209748888Scael.\" h[0-9]		horizontal spacing stack (lists)
209848888Scael.\" o[0-9]		offset (stack) (lists)
209948888Scael.\" t[0-9]		tag stack (lists)
210048888Scael.\" v[0-9]		vertical spacing stack (lists)
210148888Scael.\" w[0-9]		width tag/label stack
210248888Scael.\" .Ed
210348888Scael.\" .Pp
210448888ScaelIf a non-escaped register name is given in the argument list of a request
210548888Scaelunpredictable behaviour will occur. In general, anytime huge portions
210648888Scaelof text do not appear where expected in the output, or small strings
210748888Scaelsuch as list tags disappear, chances are there is a misunderstanding
210848888Scaelabout an argument type in the argument list.
210948888ScaelYour mother never intended for you to remember this evil stuff - so here
211048888Scaelis a way to find out whether or not your arguments are valid: The
211148888Scael.Ql \&.Db
211248888Scael(debug)
211348888Scaelmacro displays the interpretation of the argument list for most
211448888Scaelmacros.  Macros such as the
211548888Scael.Ql \&.Pp
211648888Scael(paragraph)
211748888Scaelmacro do not contain debugging information. All of the callable macros do,
211848888Scaeland it is strongly advised whenever in doubt,
211948888Scaelturn on the
212048888Scael.Ql \&.Db
212148888Scaelmacro.
212243435Scael.Pp
212348888Scael.Dl Usage: \&.Db [on | off]
212443435Scael.Pp
212548888ScaelAn example of a portion of text with
212648888Scaelthe debug macro placed above and below an
212748888Scaelartificially created problem (a flag argument
212848888Scael.Ql \&aC
212948888Scaelwhich should be
213048888Scael.Ql \e&aC
213148888Scaelin order to work):
213248888Scael.Bd -literal -offset indent
213348888Scael\&.Db on
213448888Scael\&.Op Fl aC Ar file )
213548888Scael\&.Db off
213648888Scael.Ed
213743435Scael.Pp
213848888ScaelThe resulting output:
213948888Scael.Bd -literal -offset indent
214048888ScaelDEBUGGING ON
214148888ScaelDEBUG(argv) MACRO: `.Op'  Line #: 2
214248888Scael	Argc: 1  Argv: `Fl'  Length: 2
214348888Scael	Space: `'  Class: Executable
214448888Scael	Argc: 2  Argv: `aC'  Length: 2
214548888Scael	Space: `'  Class: Executable
214648888Scael	Argc: 3  Argv: `Ar'  Length: 2
214748888Scael	Space: `'  Class: Executable
214848888Scael	Argc: 4  Argv: `file'  Length: 4
214948888Scael	Space: ` '  Class: String
215048888Scael	Argc: 5  Argv: `)'  Length: 1
215148888Scael	Space: ` '  Class: Closing Punctuation or suffix
215248888Scael	MACRO REQUEST: .Op Fl aC Ar file )
215348888ScaelDEBUGGING OFF
215448888Scael.Ed
215543435Scael.Pp
215648888ScaelThe first line of information tells the name of the calling
215748888Scaelmacro, here
215848888Scael.Ql \&.Op ,
215948888Scaeland the line number it appears on. If one or more files are involved
216048888Scael(especially if text from another file is included) the line number
216148888Scaelmay be bogus.  If there is only one file, it should be accurate.
216248888ScaelThe second line gives the argument count, the argument
216348888Scael.Pq Ql \&Fl
216448888Scaeland its length. If the length of an argument is two characters, the
216548888Scaelargument is tested to see if it is executable (unfortunately, any
216648888Scaelregister which contains a non-zero value appears executable).
216748888ScaelThe third line gives the space allotted for a class, and the
216848888Scaelclass type. The problem here is the argument aC should not be
216948888Scaelexecutable. The four types of classes are string, executable, closing
217048888Scaelpunctuation and opening punctuation.  The last line shows the entire
217148888Scaelargument list as it was read. In this next example, the offending
217248888Scael.Ql \&aC
217348888Scaelis escaped:
217448888Scael.Bd -literal -offset indent
217548888Scael\&.Db on
217648888Scael\&.Em An escaped \e&aC
217748888Scael\&.Db off
217848888Scael.Ed
217948888Scael.Bd -literal -offset indent
218048888ScaelDEBUGGING ON
218148888ScaelDEBUG(fargv) MACRO: `.Em'  Line #: 2
218248888Scael	Argc: 1  Argv: `An'  Length: 2
218348888Scael	Space: ` '  Class: String
218448888Scael	Argc: 2  Argv: `escaped'  Length: 7
218548888Scael	Space: ` '  Class: String
218648888Scael	Argc: 3  Argv: `aC'  Length: 2
218748888Scael	Space: ` '  Class: String
218848888Scael	MACRO REQUEST: .Em An escaped &aC
218948888ScaelDEBUGGING OFF
219048888Scael.Ed
219143435Scael.Pp
219248888ScaelThe argument
219348888Scael.Ql \e&aC
219448888Scaelshows up with the same length of 2 as the
219548888Scael.Ql \e&
219648888Scaelsequence produces a zero width, but a register
219748888Scaelnamed
219848888Scael.Ql \e&aC
219948888Scaelwas not found and the type classified as string.
220048888Scael.Pp
220148888ScaelOther diagnostics consist of usage statements and are self explanatory.
220243435Scael.Sh FILES
220348888Scael.Bl -tag -width /usr/share/man0/template.doc -compact
220448888Scael.It Pa /usr/share/tmac/tmac.doc
220543435Scaelmanual macro package
220648888Scael.It Pa /usr/share/man0/template.doc
220743435Scaeltemplate for writing a man page
220848888Scael.El
220943435Scael.Sh HISTORY
221043435Scael4.4 BSD
221143435Scael.Sh SEE ALSO
221248888Scael.Xr mdoc 7 ,
221343435Scael.Xr man 1 ,
221443435Scael.Xr troff 1
221543435Scael.Sh BUGS
221643435ScaelUndesirable hyphenation on the dash of a flag
221743435Scaelargument is not yet resolved, and causes
221843435Scaeloccasional mishaps in the DESCRIPTION section.
221948888Scael(line break on the hyphen).
222043435Scael.Pp
222143435ScaelPredefined strings are not declared in documentation.
222243435Scael.Pp
222343435ScaelSection 3f has not been added to the header routines.
222443435Scael.Pp
222548888Scael.Ql \&.Nm
222643435Scaelfont should be changed in NAME section.
222743435Scael.Pp
222848888Scael.Ql \&.Fn
222943435Scaelneeds to have a check to prevent splitting up
223043435Scaelif the line length is too short. Right now it
223143435Scaelseparates the last parenthesis, and sometimes
223243435Scaellooks ridiculous if a line is in fill mode.
223343435Scael.Pp
223443435ScaelThe method used to prevent header and footer page
223543435Scaelbreaks (other than the initial header and footer) when using
223643435Scaelnroff seems to be putting out a partially filled line
223743435Scaelat the bottom of the page leaving an unsightly blank space.
223843435Scael.Pp
223948888ScaelThe list and display macros to not do any keeps
224043435Scaeland certainly should be able to.
2241