internal update
[s-roff.git] / tmac / groff_mdoc.reference.man
blobe84991480a0712c345e0a15f893a97b069116017
1 .\" groff_mdoc.reference.man
2 .\"
3 .\"   A complete reference for mdocNG (not finished yet)
4 .\"
5 .\" Based on NetBSD's mdoc.samples.7, version 1.21.
6 .\"
7 .\"
8 .\"   Warning: You can't format this file with the old mdoc macros!
9 .\"
10 .\"
11 .\" Copyright (c) 1990, 1993
12 .\"     The Regents of the University of California.  All rights reserved.
13 .\"
14 .\" Redistribution and use in source and binary forms, with or without
15 .\" modification, are permitted provided that the following conditions
16 .\" are met:
17 .\" 1. Redistributions of source code must retain the above copyright
18 .\"    notice, this list of conditions and the following disclaimer.
19 .\" 2. Redistributions in binary form must reproduce the above copyright
20 .\"    notice, this list of conditions and the following disclaimer in the
21 .\"    documentation and/or other materials provided with the distribution.
22 .\" 3. All advertising materials mentioning features or use of this software
23 .\"    must display the following acknowledgement:
24 .\"      This product includes software developed by the University of
25 .\"      California, Berkeley and its contributors.
26 .\" 4. Neither the name of the University nor the names of its contributors
27 .\"    may be used to endorse or promote products derived from this software
28 .\"    without specific prior written permission.
29 .\"
30 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
31 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
32 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
33 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
34 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
35 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
36 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
37 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
38 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
39 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
40 .\" SUCH DAMAGE.
41 .\"
42 .\"     @(#)mdoc.samples.7 8.2 (Berkeley) 12/30/93
43 .\"
44 .\" This reference invokes every macro in the package several
45 .\" times and is guaranteed to give a worst case performance
46 .\" for an already extremely slow package.
47 .\"
49 .ds doc-punct-chars \f[R]{.\ ,\ :\ ;\ (\ )\ [\ ]}
52 .Dd January 1, 2001
53 .Os
54 .Dt MDOC.REFERENCE 7
57 .Sh NAME
59 .Nm mdoc.reference
60 .Nd reference for groff's mdoc implementation
63 .Sh SYNOPSIS
65 .Nm man mdoc.reference
68 .Sh DESCRIPTION
70 A complete reference for writing
71 .Ux
72 manual pages with the
73 .Nm \-mdoc
74 macro package; a
75 .Em content Ns -based
76 and
77 .Em domain Ns -based
78 formatting package for
79 .Tn GNU
80 .Xr troff 1 .
81 Its predecessor, the
82 .Xr \-man 7
83 package, addressed page layout leaving the manipulation of fonts and other
84 typesetting details to the individual author.
86 .Nm \-mdoc ,
87 page layout macros make up the
88 .Em "page structure domain"
89 which consists of macros for titles, section headers, displays and lists
90 \- essentially items which affect the physical position of text on a
91 formatted page.
92 In addition to the page structure domain, there are two more domains, the
93 .Em manual
94 domain and the
95 .Em general
96 text domain.
97 The general text domain is defined as macros which perform tasks such as
98 quoting or emphasizing pieces of text.
99 The manual domain is defined as macros that are a subset of the day to day
100 informal language used to describe commands, routines and related to
102 files.
103 Macros in the manual domain handle command names, command line arguments and
104 options, function names, function parameters, pathnames, variables, cross
105 references to other manual pages, and so on.
106 These domain items have value for both the author and the future user of the
107 manual page.
108 It is hoped the consistency gained across the manual set will provide easier
109 translation to future documentation tools.
111 Throughout the
113 manual pages, a manual entry is simply referred to as a man page, regardless
114 of actual length and without sexist intention.
117 .Sh GETTING STARTED
119 The material presented in the remainder of this document is outlined
120 as follows:
122 .Bl -enum -width 3n -offset indent
123 .  It
124 .  Tn "TROFF IDIOSYNCRASIES"
126 .  Bl -tag -width 2n -compact
127 .    It "Macro Usage"
128 .    It "Passing Space Characters in an Argument"
129 .    It "Trailing Blank Space Characters"
130 .    It "Escaping Special Characters"
131 .    It "Other Possible Pitfalls"
132 .  El
134 .  It
135 .  Tn "THE ANATOMY OF A MAN PAGE"
137 .  Bl -tag -width 2n -compact
138 .    It "A Manual Page Template"
139 .  El
141 .  It
142 .  Tn "CONVENTIONS"
144 .  It
145 .  Tn "TITLE MACROS"
147 .  It
148 .  Tn "INTRODUCTION OF MANUAL AND GENERAL TEXT DOMAINS"
150 .  Bl -tag -width 2n -compact
151 .    It "What's in a Name" Ns Ld
152 .    It "General Syntax"
153 .  El
155 .  It
156 .  Tn "MANUAL DOMAIN"
158 .  Bl -tag -width 2n -compact
159 .    It "Addresses"
160 .    It "Arguments"
161 .    It "Configuration Declarations (Section Four Only)"
162 .    It "Command Modifiers"
163 .    It "Defined Variables"
164 .    It "Errno's (Section Two Only)"
165 .    It "Environment Variables"
166 .    It "Function Arguments"
167 .    It "Function Declarations"
168 .    It "Flags"
169 .    It "Functions (Library Routines)"
170 .    It "Function Types"
171 .    \" .It "Header File (including source code)"
172 .    It "Interactive Commands"
173 .    It "Literals"
174 .    It "Names"
175 .    It "Options"
176 .    It "Pathnames"
177 .    It "Variables"
178 .    It "Cross References"
179 .  El
181 .  It
182 .  Tn "GENERAL TEXT DOMAIN"
184 .  Bl -tag -width 2n -compact
185 .    It "AT&T Macro"
186 .    It "BSD Macros"
187 .    It "UNIX Macro"
188 .    It "Emphasis Macro"
189 .    It "Enclosure/Quoting Macros"
191 .    Bl -tag -width 2n -compact
192 .      It "Angle Bracket Quote/Enclosure"
193 .      It "Bracket Quotes/Enclosure"
194 .      It "Double Quote macro/Enclosure"
195 .      It "Parenthesis Quote/Enclosure"
196 .      It "Single Quotes/Enclosure"
197 .      It "Prefix Macro"
198 .    El
200 .    It "Extended Arguments"
201 .    It "No\-Op or Normal Text Macro"
202 .    It "No\-Space Macro"
203 .    It "Section Cross References"
204 .    It "Symbolic Macro"
205 .    It "References and Citations"
206 .    It "Trade Names (Acronyms and Type Names)"
207 .  El
209 .  It
210 .  Tn "PAGE STRUCTURE DOMAIN"
212 .  Bl -tag -width 2n -compact
213 .    It "Section Headers"
214 .    It "Paragraphs and Line Spacing"
215 .    It "Keeps"
216 .    It "Displays"
217 .    It "Lists and Columns"
218 .  El
220 .  It
221 .  Tn "PREDEFINED STRINGS"
223 .  It
224 .  Tn "DIAGNOSTICS"
226 .  It
227 .  Tn "FORMATTING WITH GROFF, TROFF, AND NROFF"
229 .  It
230 .  Tn "BUGS"
233 .\" XXX
234 .ne 7
237 .Sh TROFF IDIOSYNCRASIES
240 .Nm \-mdoc
241 package attempts to simplify the process of writing a man page.
242 Theoretically, one should not have to learn the dirty details of
243 .Tn GNU
244 .Xr troff 1
245 to use
246 .Nm \-mdoc ;
247 however, there are a few limitations which are unavoidable and best gotten
248 out of the way.
249 And, too, be forewarned, this package is
250 .Em not
251 fast.
253 .Ss Macro Usage
255 As in
256 .Tn GNU
257 .Xr troff 1 ,
258 a macro is called by placing a
259 .Ql .\&
260 (dot character) at the beginning of a line followed by the two-character
261 (or three-character) name for the macro.
262 There can be space characters between the dot and the macro name (but
263 .Em no
264 tabs).
265 Arguments may follow the macro separated by spaces (again, no tabs).
266 It is the dot character at the beginning of the line which causes
267 .Tn GNU
268 .Xr troff 1
269 to interpret the next two (or more) characters as a macro name.
270 A single starting dot followed by nothing is ignored.
271 To place a
272 .Ql .\&
273 (dot character) at the beginning of an input line in some context other than
274 a macro invocation, precede the
275 .Ql .\&
276 (dot) with the
277 .Ql \e&
278 escape sequence.
280 .Ql \e&
281 translates literally to a zero-width space, and is never displayed in
282 the output.
284 In general,
285 .Tn GNU
286 .Xr troff 1
287 macros accept an unlimited number of arguments (contrary to other versions
288 of troff which can't handle more than nine arguments).
289 In limited cases, arguments may be continued or extended on the next
290 line (See
291 .Sx Extended Arguments
292 below).
293 Almost all macros handle quoted arguments (see
294 .Sx Passing Space Characters in an Argument
295 below).
297 Most of the
298 .Nm \-mdoc
299 general text domain and manual domain macros are special in that their
300 argument lists are
301 .Em parsed
302 for callable macro names.
303 This means an argument on the argument list which matches a general text or
304 manual domain macro name and is determined to be callable will be executed
305 or called when it is processed.
306 In this case the argument, although the name of a macro, is not preceded by
308 .Ql .\&
309 (dot).
310 It is in this manner that many macros are nested; for example the
311 option macro,
312 .Ql .Op ,
314 .Em call
315 the flag and argument macros,
316 .Ql \&Fl
318 .Ql \&Ar ,
319 to specify an optional flag with an argument:
321 .Bl -tag -xwidth ".Op Fl s Ar bytes" -offset indent
322 .It Op Fl s Ar bytes
323 is produced by
324 .Ql Li ".Op Fl s Ar bytes"
328 To prevent a string from being interpreted as a macro name, precede the
329 string with the escape sequence
330 .Ql \e& :
332 .Bl -tag -xwidth ".Op \&Fl s \&Ar bytes" -offset indent
333 .It Op \&Fl s \&Ar bytes
334 is produced by
335 .Ql Li ".Op \e&Fl s \e&Ar bytes"
339 Here the strings
340 .Ql \&Fl
342 .Ql \&Ar
343 are not interpreted as macros.
344 Macros whose argument lists are parsed for callable arguments are referred
345 to as
346 .Em parsed
347 and macros which may be called from an argument list are referred to as
348 .Em callable
349 throughout this document and in the companion quick-reference manual
350 .Xr groff_mdoc 7 .
351 This is a technical
352 .Em faux pas
353 as almost all of the macros in
354 .Nm \-mdoc
355 are parsed, but as it was cumbersome to constantly refer to macros as
356 being callable and being able to call other macros, the term parsed
357 has been used.
359 .Ss Passing Space Characters in an Argument
361 Sometimes it is desirable to give as an argument a string containing one or
362 more blank space characters.
363 This may be necessary to specify arguments to macros which expect particular
364 arrangement of items in the argument list.  Additionally, it makes
365 .Nm \-mdoc
366 working faster.
367 For example, the function macro
368 .Ql .Fn
369 expects the first argument to be the name of a function and any remaining
370 arguments to be function parameters.
372 .Tn ANSI\~C
373 stipulates the declaration of function parameters in the parenthesized
374 parameter list, each parameter is guaranteed to be at minimum a two word
375 string.
376 For example,
377 .Fa int foo .
379 There are two possible ways to pass an argument which contains
380 an embedded space.
381 One way of passing a string containing blank spaces is to use the hard or
382 unpaddable space character
383 .Ql \e\  ,
384 that is, a blank space preceded by the escape character
385 .Ql \e .
386 This method may be used with any macro but has the side effect of
387 interfering with the adjustment of text over the length of a line.
388 .Xr Troff
389 sees the hard space as if it were any other printable character and cannot
390 split the string into blank or newline separated pieces as one would expect.
391 This method is useful for strings which are not expected to overlap a line
392 boundary.
393 An alternative is to use
394 .Ql \e~ ,
395 a paddable (i.e.\& stretchable), unbreakable space (this is a
396 .Tn GNU
397 .Xr troff 1
398 extension).
399 The second method is to enclose the string with double quotes.
401 For example:
403 .Bl -tag -xwidth ".Fn fetch char\ *str" -offset indent
404 .It Fn fetch char\ *str
405 is created by
406 .Ql .Fn fetch char\e *str
407 .It Fn fetch "char *str"
408 can also be created by
409 .Ql .Fn fetch "\\*[q]char *str\\*[q]"
413 If the
414 .Ql \e
415 before the space resp.\& the double quotes were omitted,
416 .Ql .Fn
417 would see three arguments, and the result would be:
419 .Dl Fn fetch char *str
421 For an example of what happens when the parameter list overlaps a newline
422 boundary, see the
423 .Sx BUGS
424 section.
426 .Ss Trailing Blank Space Characters
428 .Xr Troff
429 can be confused by blank space characters at the end of a line.
430 It is a wise preventive measure to globally remove all blank spaces
431 from
432 .Ao blank-space Ac Ns Ao end-of-line Ac
433 character sequences.
434 Should the need arise to force a blank character at the end of a line, it
435 may be forced with an unpaddable space and the
436 .Ql \e&
437 escape character.
438 For example,
439 .Ql string\e\ \e& .
441 .Ss Escaping Special Characters
443 Special characters like the newline character
444 .Ql \en
445 are handled by replacing the
446 .Ql \e
447 with
448 .Ql \ee
449 (e.g.\&
450 .Ql \een )
451 to preserve the backslash.
453 .Ss Other Possible Pitfalls
455 A warning is emitted when an empty input line is found outside of displays
456 (see below).
458 .Ql .sp
459 instead.
460 (Well, it is even better to use
461 .Nm \-mdoc
462 macros to avoid the usage of low-level commands).
464 Leading spaces will cause a break and are output directly.
465 Avoid this behaviour if possible.
466 Similarly, don't use more than one space character between words in an
467 ordinary text line; contrary to other text formatters, they are
468 .Em not
469 replaced with a single space.
471 You can't pass
472 .Ql \*[q]
473 directly as an argument.
475 .Ql \e*[q]
477 .Ql \e*q )
478 instead.
480 By default,
481 .Xr troff 1
482 inserts two space characters after a punctuation mark closing a sentence
483 (characters like
484 .Ql \&)
486 .Ql \&'
487 are treated transparently, not influencing the sentence-ending behaviour).
488 To change this, insert
489 .Ql \e&
490 before or after the dot:
492 .Bd -literal -offset indent -compact
494 \&.Ql .
495 character.
496 \&.Pp
498 \&.Ql \e&.
499 character.
500 \&.Pp
501 \&.No test .
502 test
503 \&.Pp
504 \&.No test.
505 test
509 gives
511 .Bd -filled -offset indent
513 .Ql .
514 character
517 .Ql \&.
518 character.
520 .No test .
521 test
523 .No test.
524 test
528 As can be seen in the first and third line,
529 .Nm \-mdoc
530 handles punctuation characters specially in macro arguments.
531 This will be explained in section
532 .Sx General Syntax
533 below.
534 In the same way, you have to protect trailing full stops of abbreviations
535 with a trailing zero-width space:
536 .Ql e.g.\e& .
538 A comment in the source file of a man page can be either started with
539 .Ql .\e"
540 on a single line,
541 .Ql \e"
542 after some input, or
543 .Ql \e#
544 anywhere (the latter is a
545 .Tn GNU
546 .Xr troff 1
547 extension); the rest of such a line is ignored.
550 .Sh THE ANATOMY OF A MAN PAGE
552 The body of a man page is easily constructed from a basic template:
554 .Bd -literal -offset indent
555 \&.\e" /usr/share/misc/mdoc.template:
556 \&.\e" The following requests are required for all man pages.
558 \&.Dd Month day, year
559 \&.Os OPERATING_SYSTEM [version/release]
560 \&.Dt DOCUMENT_TITLE [section number] [volume]
561 \&.Sh NAME
562 \&.Nm name
563 \&.Nd one line description of name
564 \&.Sh SYNOPSIS
565 \&.Sh DESCRIPTION
567 \&.\e" The following requests should be uncommented and
568 \&.\e" used where appropriate.
569 \&.\e" .Sh IMPLEMENTATION NOTES
570 \&.\e" This next request is for sections 2, 3 and 9 function
571 \&.\e" return values only.
572 \&.\e" .Sh RETURN VALUES
574 \&.\e" This next request is for sections 1, 6, 7, 8 & 9 only
575 \&.\e" .Sh ENVIRONMENT
576 \&.\e" .Sh FILES
577 \&.\e" .Sh EXAMPLES
579 \&.\e" This next request is for sections 1, 6, 7, 8 & 9 only
580 \&.\e"     (command return values (to shell) and
581 \&.\e"    fprintf/stderr type diagnostics)
582 \&.\e" .Sh DIAGNOSTICS
584 \&.\e" The next request is for sections 2, 3 & 9 error
585 \&.\e" and signal handling only.
586 \&.\e" .Sh ERRORS
587 \&.\e" .Sh SEE ALSO
588 \&.\e" .Sh STANDARDS
589 \&.\e" .Sh HISTORY
590 \&.\e" .Sh AUTHORS
591 \&.\e" .Sh BUGS
595 The first items in the template are the macros
596 .Ql .Dd ,
597 .Ql .Os ,
599 .Ql .Dt ;
600 the document date, the operating system the man page or subject source is
601 developed or modified for, and the man page title (in
602 .Em upper case )
603 along with the section of the manual the page belongs in.
604 These macros identify the page and are discussed below in
605 .Sx TITLE MACROS .
607 The remaining items in the template are section headers
608 .Pf ( Li .Sh ) ;
609 of which
610 .Sx NAME ,
611 .Sx SYNOPSIS ,
613 .Sx DESCRIPTION
614 are mandatory.
615 The headers are discussed in
616 .Sx PAGE STRUCTURE DOMAIN ,
617 after presentation of
618 .Sx MANUAL DOMAIN .
619 Several content macros are used to demonstrate page layout macros; reading
620 about content macros before page layout macros is recommended.
623 .Sh CONVENTIONS
625 In the description of all macros below, optional arguments are put into
626 brackets.
627 An ellipsis
628 .Pf ( Ql Ld )
629 represents zero or more additional arguments.
630 Alternative values for a parameter are separated with
631 .Ql | .
632 If there are alternative values for a mandatory parameter, braces are used
633 (together with
634 .Ql | )
635 to enclose the value set.
636 Meta-variables are specified within angles.
638 Example:
640 .Bl -tag -width 6n -offset indent
641 .It Li .Xx Xo
642 .Aq foo 
643 .Brq bar1 | bar2
644 .Op \-test1 Op \-test2 | \-test3
650 Except stated explicitly, all macros are parsed and callable.
653 .Sh TITLE MACROS
655 The title macros are part of the page structure domain but are presented
656 first and separately for someone who wishes to start writing a man page
657 yesterday.
658 Three header macros designate the document title or manual page title, the
659 operating system, and the date of authorship.
660 These macros are called once at the very beginning of the document and are
661 used to construct headers and footers only.
663 .Bl -tag -width 6n
664 .It Li .Dt Xo
665 .Op Aq document title
666 .Op Aq section number
667 .Op Aq volume
669 The document title is the subject of the man page and must be in
670 .Tn CAPITALS
671 due to troff limitations.
672 If omitted,
673 .Ql Tn UNTITLED
674 is used.
675 The section number may be a number in the range
676 .No 1,\~ Ns Ld Ns ,\~9
678 .Ql unass ,
679 .Ql draft ,
681 .Ql paper .
682 If it is specified, and no volume name is given, a default volume name is
683 used.
684 A volume name may be arbitrary or one of the following:
687 .Bl -column LOCAL -offset indent -compact
688 .It Li USD   Ta "\*[volume-ds-USD]"
689 .It Li PS1   Ta "\*[volume-ds-PS1]"
690 .It Li AMD   Ta "\*[volume-ds-AMD]"
691 .It Li SMM   Ta "\*[volume-ds-SMM]"
692 .It Li URM   Ta "\*[volume-ds-URM]"
693 .It Li PRM   Ta "\*[volume-ds-PRM]"
694 .It Li KM    Ta "\*[volume-ds-KM]"
695 .It Li IND   Ta "\*[volume-ds-IND]"
696 .It Li LOCAL Ta "\*[volume-ds-LOCAL]"
697 .It Li CON   Ta "\*[volume-ds-CON]"
701 For compatibility,
702 .Ql MMI
703 can be used for
704 .Ql IND ,
706 .Ql LOC
708 .Ql LOCAL .
709 Values from the previous table will specify a new volume name.
710 If the third parameter is a keyword designating a computer architecture,
711 its value is appended to the volume name as specified by the second
712 parameter.  By default, the following architecture keywords are defined:
714 \# we use `No' to avoid hyphenation
715 .Bd -ragged -offset indent
716 .No alpha , amiga , arc , arm26 , arm32 , atari , bebox , cobalt , evbsh3 ,
717 .No hp300 , hpcmips , i386 , luna68k , m68k , mac68k , macppc , mips ,
718 .No mmeye , mvme68k , news68k , newsmips , next68k , ofppc , pc532 , pmax ,
719 .No powerpc , prep , sgimips , sh3 , sparc , sparc64 , sun3 , tahoe , vax ,
720 .No x68k
724 In the following examples, the left (which is identical to the right) and
725 the middle part of the manual page header strings are shown.
727 .Bd -ragged
728 .Bl -tag -xwidth ".Li .Dt\ FOO\ 2\ mac68k" -compact -offset indent
729 .It Li ".Dt FOO 7"
730 .Ql FOO(7)
731 .Ql System Reference Manual
732 .It Li ".Dt FOO 2 mac68k"
733 .Ql FOO(2)
734 .Ql System Programmer's Manual (mac68k Architecture)
735 .It Li ".Dt FOO \*[q]\*[q] bar"
736 .Ql FOO
737 .Ql bar
742 Local, OS-specific additions might be found in the file
743 .Pa mdoc.local ;
744 look for strings named
745 .Ql volume-ds-XXX
746 (for the former type) and
747 .Ql volume-as-XXX
748 (for the latter type);
749 .Ql XXX
750 then denotes the keyword to be used with the
751 .Ql .Dt
752 macro.
754 This macro is neither callable nor parsable.
756 .It Li .Os Xo
757 .Op Aq operating system
758 .Op Aq release
760 If the first parameter is empty,
761 .Ql Tn BSD
762 is used as the default operating system.
763 This may be overridden in the local configuration file.
764 In general, the name of the operating system should be the common acronym,
765 e.g.\&
766 .Tn BSD
768 .Tn ATT .
769 The release should be the standard release nomenclature for the system
770 specified.
771 In the following table, the possible second arguments for some predefined
772 operating systems are listed.
773 Similar to
774 .Ql .Dt ,
775 local additions might be defined in
776 .Pa mdoc.local ;
777 look for strings named
778 .Ql operating-system-XXX-YYY ,
779 where
780 .Ql XXX
781 is the acronym for the operating system and
782 .Ql YYY
783 the release ID.
785 .Bd -ragged -compact
786 .Bl -tag -xwidth ".No FreeBSD" -offset indent
787 .It ATT
788 7th, 7, III, 3, V, V.2, V.3, V.4
789 .It BSD
790 3, 4, 4.1, 4.2, 4.3, 4.3t, 4.3T, 4.3r, 4.3R, 4.4
791 .It NetBSD
792 0.8, 0.8a, 0.9, 0.9a, 1.0, 1.0a, 1.1, 1.2, 1.2a, 1.2b, 1.2c, 1.2d, 1.2e,
793 1.3, 1.3a, 1.4, 1.5
794 .It FreeBSD
795 1.0, 1.1, 1.1.5, 1.1.5.1, 2.0, 2.0.5, 2.1, 2.1.5, 2.1.6, 2.1.7, 2.2, 2.2.1,
796 2.2.2, 2.2.5, 2.2.6, 2.2.7, 2.2.8, 3.0, 3.1, 3.2, 3.3, 3.4, 3.5, 4.0, 4.1,
797 4.2, 5.0
803 .Tn ATT ,
804 an unknown second parameter will be replaced with the string
805 .Tn UNIX ;
806 for the other predefined acronyms it will be ignored and a warning message
807 emitted.
808 Unrecognized arguments are displayed as given in the page footer.
809 For instance, a typical footer might be:
811 .Dl .Os BSD 4.3
813 giving
814 .Ql 4.3\~Berkeley Distribution ,
815 or for a locally produced set
817 .Dl .Os CS Department
819 which will produce
820 .Ql CS Department .
822 If the
823 .Ql .Os
824 macro is not present, the bottom left corner of the manual page will be
825 ugly.
827 This macro is neither callable nor parsable.
829 .It Li .Dd Oo
830 .Aq month
831 .Aq day ,
832 .Aq year
835 .Ql Dd
836 has no arguments,
837 .Ql Epoch
838 is used for the date string.
839 If it has exactly three arguments, they are concatenated, separated with
840 unbreakable space:
842 .Dl .Dd January 25, 2001
844 Otherwise, the current date is used, ignoring the parameters.
846 This macro is neither callable nor parsable.
850 .Sh INTRODUCTION OF MANUAL AND GENERAL TEXT DOMAINS
852 .Ss What's in a name Ns Ld
854 The manual domain macro names are derived from the day to day informal
855 language used to describe commands, subroutines and related files.
856 Slightly different variations of this language are used to describe the
857 three different aspects of writing a man page.
858 First, there is the description of
859 .Nm \-mdoc
860 macro request usage.
861 Second is the description of a
863 command
864 .Em with
865 .Nm \-mdoc
866 macros, and third, the description of a command to a user in the verbal
867 sense; that is, discussion of a command in the text of a man page.
869 In the first case,
870 .Xr troff 1
871 macros are themselves a type of command; the general syntax for a troff
872 command is:
874 .Bd -filled -offset indent
875 .Li ".Xx argument1 argument2" Ld
879 .Ql .Xx
880 is a macro command or request, and anything following it are arguments to
881 be processed.
882 In the second case, the description of a
884 command using the content macros is a bit more involved; a typical
885 .Sx SYNOPSIS
886 command line might be displayed as:
888 .Bd -filled -offset indent
889 .Nm filter
890 .Op Fl flag
891 .Ao Ar infile Ac Ao Ar outfile Ac
895 Here,
896 .Nm filter
897 is the command name and the
898 bracketed string
899 .Fl flag
900 is a
901 .Em flag
902 argument designated as optional by the option brackets.
904 .Nm \-mdoc
905 terms,
906 .Ao Ar infile Ac
908 .Ao Ar outfile Ac
909 are called
910 .Em meta arguments ;
911 in this example, the user has to replace the meta expressions given in angle
912 brackets with real file names.
913 Note that in this document meta arguments are used to describe
914 .Nm \-mdoc
915 commands; in most man pages, meta variables are not specifically written
916 with angle brackets.
917 The macros which formatted the above example:
919 .Bd -literal -offset indent
920 \&.Nm filter
921 \&.Op Fl flag
922 \&.Ao Ar infile Ac Ao Ar outfile Ac
926 In the third case, discussion of commands and command syntax includes both
927 examples above, but may add more detail.
928 The arguments
929 .Ao Ar infile Ac
931 .Ao Ar outfile Ac
932 from the example above might be referred to as
933 .Em operands
935 .Em file arguments .
936 Some command line argument lists are quite long:
938 .Bd -ragged
939 .Bl -tag -xwidth ".Nm make" -offset indent -compact
940 .It Nm make
941 .Op Fl eiknqrstv
942 .Op Fl D Ar variable
943 .Op Fl d Ar flags
944 .Op Fl f Ar makefile
945 .Op Fl I Ar directory
946 .Op Fl j Ar max_jobs
947 .Op Ar variable=value
949 .Op Ar target Ld
955 Here one might talk about the command
956 .Nm make
957 and qualify the argument,
958 .Ar makefile ,
959 as an argument to the flag,
960 .Fl f ,
961 or discuss the optional file operand
962 .Ar target .
963 In the verbal context, such detail can prevent confusion, however the
964 .Nm \-mdoc
965 package does not have a macro for an argument
966 .Em to
967 a flag.
968 Instead the
969 .Ql \&Ar
970 argument macro is used for an operand or file argument like
971 .Ar target
972 as well as an argument to a flag like
973 .Ar variable .
974 The make command line was produced from:
976 .Bd -literal -offset indent
977 \&.Nm make
978 \&.Op Fl eiknqrstv
979 \&.Op Fl D Ar variable
980 \&.Op Fl d Ar flags
981 \&.Op Fl f Ar makefile
982 \&.Op Fl I Ar directory
983 \&.Op Fl j Ar max_jobs
984 \&.Op Ar variable=value
985 \&.Bk
986 \&.Op Ar target Ld
987 \&.Ek
992 .Ql .Bk
994 .Ql .Ek
995 macros are explained in
996 .Sx Keeps .
998 .Ss General Syntax
1000 The manual domain and general text domain macros share a similar syntax with
1001 a few minor deviations; most notably,
1002 .Ql .Ar ,
1003 .Ql .Fl ,
1004 .Ql .Nm ,
1006 .Ql .Pa
1007 differ only when called without arguments; and
1008 .Ql .Fn
1010 .Ql .Xr
1011 impose an order on their argument lists.
1012 All content macros are capable of recognizing and properly handling
1013 punctuation, provided each punctuation character is separated by a leading
1014 space.
1015 If a request is given:
1017 .Dl \&.Ar sptr, ptr),
1019 The result is:
1021 .Dl Ar sptr, ptr),
1023 The punctuation is not recognized and all is output in the
1024 font used by
1025 .Ql .Ar .
1026 If the punctuation is separated by a leading white space:
1028 .Dl \&.Ar "sptr , ptr ) ,"
1030 The result is:
1032 .Dl Ar sptr , ptr ) ,
1034 The punctuation is now recognized and output in the default font
1035 distinguishing it from the argument strings.
1036 To remove the special meaning from a punctuation character escape it with
1037 .Ql \e& .
1039 .Xr Troff
1040 is limited as a macro language, and has difficulty when presented with a
1041 string containing a member of the mathematical, logical or quotation set:
1043 .Bd -literal -offset indent-two
1044 {+,\-,/,*,%,<,>,<=,>=,=,==,&,`,',"}
1048 The problem is that
1049 .Xr troff
1050 may assume it is supposed to actually perform the operation or evaluation
1051 suggested by the characters.
1052 To prevent the accidental evaluation of these characters, escape them with
1053 .Ql \e& .
1054 Typical syntax is shown in the first content macro displayed below,
1055 .Ql \&.Ad .
1057 .Ss Address Macro
1059 The address macro identifies an address construct.
1061 .Dl Usage: .Ad Ao address Ac Ld
1063 .Bl -tag -xwidth ".Li .Ad\ f1\ ,\ f2\ ,\ f3\ :" -compact -offset 15n
1064 .It Li ".Ad addr1"
1065 .Ad addr1
1066 .It Li ".Ad addr1 ."
1067 .Ad addr1 .
1068 .It Li ".Ad addr1 , file2"
1069 .Ad addr1 , file2
1070 .It Li ".Ad f1 , f2 , f3 :"
1071 .Ad f1 , f2 , f3 :
1072 .It Li ".Ad addr ) ) ,"
1073 .Ad addr ) ) ,
1077 .Ss Argument Macro
1080 .Li .Ar
1081 argument macro may be used whenever an argument is referenced.
1083 .Dl Usage: .Ar Oo Ao argument Ac Oc Ld
1085 .Bl -tag -xwidth ".Li .Ar\ file1\ file2" -compact -offset 15n
1086 .It Li .Ar
1088 .It Li ".Ar file1"
1089 .Ar file1
1090 .It Li ".Ar file1 ."
1091 .Ar file1 .
1092 .It Li ".Ar file1 file2"
1093 .Ar file1 file2
1094 .It Li ".Ar f1 f2 f3 :"
1095 .Ar f1 f2 f3 :
1096 .It Li ".Ar file ) ) ,"
1097 .Ar file ) ) ,
1101 .Ss Configuration Declaration (Section Four Only)
1104 .Ql .Cd
1105 macro is used to demonstrate a
1106 .Xr config 8
1107 declaration for a device interface in a section four manual.
1109 .Dl Usage: .Cd Ao argument Ac Ld
1111 .Bl -tag -xwidth ".Li .Cd\ Xdevice\ le0\ at\ scode?X" -offset 15n
1112 .It Li ".Cd \*[q]device le0 at scode?\*[q]"
1113 \# since .Cd causes a break we use .Nm
1114 .Nm "device le0 at scode?"
1118 .Ss Command Modifier
1120 The command modifier is identical to the
1121 .Ql .Fl
1122 (flag) command with the exception
1124 .Ql .Cm
1125 macro does not assert a dash in front of every argument.
1126 Traditionally flags are marked by the preceding dash, however, some commands
1127 or subsets of commands do not use them.
1128 Command modifiers may also be specified in conjunction with interactive
1129 commands such as editor commands.
1131 .Sx Flags .
1133 .Ss Defined Variables
1135 A variable which is defined in an include file is specified by the macro
1136 .Ql .Dv .
1138 .Dl Usage: .Dv Ao defined variable Ac Ld
1140 .Bl -tag -xwidth ".Li .Dv\ MAXHOSTNAMELEN" -compact -offset 15n
1141 .It Li ".Dv MAXHOSTNAMELEN"
1142 .Dv MAXHOSTNAMELEN
1143 .It Li ".Dv TIOCGPGRP )"
1144 .Dv TIOCGPGRP )
1148 .Ss Errno's (Section Two Only)
1151 .Ql .Er
1152 errno macro specifies the error return value for section two library
1153 routines.
1154 The second example below shows
1155 .Ql .Er
1156 used with the
1157 .Ql .Bq
1158 general text domain macro, as it would be used in a section two manual page.
1160 .Dl Usage: .Er Ao errno type Ac Ld
1162 .Bl -tag -xwidth ".Li .Bq\ Er\ ENOTDIR" -compact -offset 15n
1163 .It Li ".Er ENOENT"
1164 .Er ENOENT
1165 .It Li ".Er ENOENT ) ;"
1166 .Er ENOENT ) ;
1167 .It Li ".Bq Er ENOTDIR"
1168 .Bq Er ENOTDIR
1172 .Ss Environment Variables
1175 .Ql .Ev
1176 macro specifies an environment variable.
1178 .Dl Usage: .Ev Ao argument Ac Ld
1180 .Bl -tag -xwidth ".Li .Ev\ PRINTER\ )\ )\ ," -compact -offset 15n
1181 .It Li ".Ev DISPLAY"
1182 .Ev DISPLAY
1183 .It Li ".Ev PATH ."
1184 .Ev PATH .
1185 .It Li ".Ev PRINTER ) ) ,"
1186 .Ev PRINTER ) ) ,
1190 .Ss Function Argument
1193 .Ql .Fa
1194 macro is used to refer to function arguments (parameters) outside of the
1195 .Sx SYNOPSIS
1196 section of the manual or inside the
1197 .Sx SYNOPSIS
1198 section if the enclosure macros
1199 .Ql .Fo
1201 .Ql .Fc
1202 instead of
1203 .Ql .Fn
1204 are used.
1205 .Ql .Fa
1206 may also be used to refer to structure members.
1208 .Dl Usage: .Fa Ao function argument Ac Ld
1210 .Bl -tag -xwidth ".Li .Fa\ d_namlen\ )\ )\ ," -compact -offset 15n
1211 .It Li ".Fa d_namlen ) ) ,"
1212 .Fa d_namlen ) ) ,
1213 .It Li ".Fa iov_len"
1214 .Fa iov_len
1218 .Ss Function Declaration
1221 .Ql .Fd
1222 macro is used in the
1223 .Sx SYNOPSIS
1224 section with section two or three functions.
1225 It is neither parsable nor callable.
1227 .Dl Usage: .Fd Ao argument Ac Ld
1229 .Bl -tag -xwidth ".Li .Fd\ X#include\ <sys/types.h>X" -compact -offset 15n
1230 .It Li ".Fd \*[q]#include <sys/types.h>\*[q]"
1231 .Fd "#include <sys/types.h>"
1234 In the
1235 .Sx SYNOPSIS
1236 section a
1237 .Ql .Fd
1238 request causes a line break if a function has already been presented and a
1239 break has not occurred.
1240 This leaves a nice vertical space in between the previous function call and
1241 the declaration for the next function.
1243 .Ss Flags
1246 .Ql .Fl
1247 macro handles command line flags.
1248 It prepends a dash,
1249 .Ql \- ,
1250 to the flag.
1251 For interactive command flags, which are not prepended with a dash, the
1252 .Ql .Cm
1253 (command modifier)
1254 macro is identical, but without the dash.
1256 .Dl Usage: .Fl Ao argument Ac Ld
1258 .Bl -tag -xwidth ".Li .Fl\ xyz\ )\ ," -compact -offset 15n
1259 .It Li .Fl
1261 .It Li ".Fl cfv"
1262 .Fl cfv
1263 .It Li ".Fl cfv ."
1264 .Fl cfv .
1265 .It Li ".Cm cfv ."
1266 .Cm cfv .
1267 .It Li ".Fl s v t"
1268 .Fl s v t
1269 .It Li ".Fl \- ,"
1270 .Fl \- ,
1271 .It Li ".Fl xyz ) ,"
1272 .Fl xyz ) ,
1273 .It Li ".Fl |"
1274 .Fl |
1278 .Ql .Fl
1279 macro without any arguments results in a dash representing stdin/stdout.
1280 Note that giving
1281 .Ql .Fl
1282 a single dash will result in two dashes.
1284 .Ss Functions (Library Routines)
1286 The 
1287 .Ql .Fn
1288 macro is modeled on ANSI C conventions.
1290 .Dl Usage: .Fn Ao function Ac Oo Ao parameter Ac Oc Ld
1292 .Bl -tag -xwidth ".Li .Fn\ Xint\ alignX\ Xchar\ *ptrX\ ," -compact -offset 15n
1293 .It Li ".Fn getchar"
1294 .Fn getchar
1295 .It Li ".Fn strlen ) ,"
1296 .Fn strlen ) ,
1297 .It Li ".Fn \*[q]int align\*[q] \*[q]char *ptr\*[q] ,"
1298 .Fn "int align" "char *ptr" ,
1301 Note that any call to another macro signals the end of the
1302 .Ql .Fn
1303 call (it will insert a closing parenthesis at that point).
1305 For functions with many parameters (which is rare), the macros
1306 .Ql .Fo
1307 (function open)
1309 .Ql .Fc
1310 (function close)
1311 may be used with
1312 .Ql .Fa
1313 (function argument).
1315 Example:
1317 .Bd -literal -offset indent
1318 \&.Fo "int res_mkquery"
1319 \&.Fa "int op"
1320 \&.Fa "char *dname"
1321 \&.Fa "int class"
1322 \&.Fa "int type"
1323 \&.Fa "char *data"
1324 \&.Fa "int datalen"
1325 \&.Fa "struct rrec *newrr"
1326 \&.Fa "char *buf"
1327 \&.Fa "int buflen"
1328 \&.Fc
1332 Produces:
1334 .Bd -ragged -offset indent
1335 .Fo "int res_mkquery"
1336 .Fa "int op"
1337 .Fa "char *dname"
1338 .Fa "int class"
1339 .Fa "int type"
1340 .Fa "char *data"
1341 .Fa "int datalen"
1342 .Fa "struct rrec *newrr"
1343 .Fa "char *buf"
1344 .Fa "int buflen"
1349 In the
1350 .Sx SYNOPSIS
1351 section, the function will always begin at the beginning of line.
1352 If there is more than one function presented in the
1353 .Sx SYNOPSIS
1354 section and a function type has not been given, a line break will occur,
1355 leaving a nice vertical space between the current function name and the one
1356 prior.
1358 .Ss Function Type
1360 This macro is intended for the
1361 .Sx SYNOPSIS
1362 section.
1363 It may be used anywhere else in the man page without problems, but its main
1364 purpose is to present the function type in kernel normal form for the
1365 .Sx SYNOPSIS
1366 of sections two and three (it causes a page break, allowing the function
1367 name to appear on the next line).
1369 .Dl Usage: .Ft Ao type Ac Ld
1371 .Bl -tag -xwidth ".Li .Ft\ struct\ stat" -compact -offset 15n
1372 .It Li ".Ft struct stat"
1373 .Ft struct stat
1376 .Ss Interactive Commands
1379 .Ql .Ic
1380 macro designates an interactive or internal command.
1382 .Dl Usage: .Ic Ao argument Ac Ld
1384 .Bl -tag -xwidth ".Li .Ic\ setenv\ ,\ unsetenv" -compact -offset 15n
1385 .It Li ".Ic :wq"
1386 .Ic :wq
1387 .It Li ".Ic \*[q]do while {...}\*[q]"
1388 .Ic "do while {...}"
1389 .It Li ".Ic setenv , unsetenv"
1390 .Ic setenv , unsetenv
1393 .Ss Literals
1396 .Ql .Li
1397 literal macro may be used for special characters, variable constants, etc.\&
1398 -- anything which should be displayed as it would be typed.
1400 .Dl Usage: .Li Ao argument Ac Ld
1402 .Bl -tag -xwidth ".Li .Li\ cntrl-D\ )\ ,"  -compact -offset 15n
1403 .It Li ".Li \een"
1404 .Li \en
1405 .It Li ".Li M1 M2 M3 ;"
1406 .Li M1 M2 M3 ;
1407 .It Li ".Li cntrl-D ) ,"
1408 .Li cntrl-D ) ,
1409 .It Li ".Li 1024 Ld"
1410 .Li 1024 Ld
1413 .Ss Names
1416 .Ql .Nm
1417 macro is used for the document title or subject name.
1418 It has the peculiarity of remembering the first argument it was called with,
1419 which should always be the subject name of the page.
1420 When called without arguments,
1421 .Ql .Nm
1422 regurgitates this initial name for the sole purpose of making less work for
1423 the author.
1424 Note: A section two or three document function name is addressed with the
1425 .Ql .Nm
1426 in the
1427 .Sx NAME
1428 section, and with
1429 .Ql .Fn
1430 in the
1431 .Sx SYNOPSIS
1432 and remaining sections.
1433 For interactive commands, such as the
1434 .Ql while
1435 command keyword in
1436 .Xr csh 1 ,
1438 .Ql .Ic
1439 macro should be used.
1440 While
1441 .Ql .Ic
1442 is nearly identical
1444 .Ql .Nm ,
1445 it can not recall the first argument it was invoked with.
1447 .Dl Usage: .Nm Oo Ao argument Ac Oc Ld
1449 .Bl -tag -xwidth ".Li .Nm\ mdoc.reference" -compact -offset 15n
1450 .It Li ".Nm mdoc.reference"
1451 .Nm mdoc.reference
1452 .It Li ".Nm \e-mdoc"
1453 .Nm \-mdoc
1454 .It Li ".Nm foo ) ) ,"
1455 .Nm foo ) ) ,
1456 .It Li ".Nm :"
1457 .Nm :
1460 .Ss Options
1463 .Ql .Op
1464 macro places option brackets around the any remaining arguments on the
1465 command line, and places any trailing punctuation outside the brackets.
1466 The macros
1467 .Ql .Oc
1469 .Ql .Oo
1470 (which produce an opening resp.\& a closing option bracket) may be used
1471 across one or more lines or to specify the exact position of the closing
1472 parenthesis.
1474 .Dl Usage: .Op Oo Ao option Ac Oc Ld
1476 .Bl -tag -xwidth ".Li .Op\ Fl\ c\ Ar\ objfil\ Op\ Ar\ corfil\ ," -compact -offset 15n
1477 .It Li .Op
1479 .It Li ".Op Fl k"
1480 .Op Fl k
1481 .It Li ".Op Fl k ) ."
1482 .Op Fl k ) .
1483 .It Li ".Op Fl k Ar kookfile"
1484 .Op Fl k Ar kookfile
1485 .It Li ".Op Fl k Ar kookfile ,"
1486 .Op Fl k Ar kookfile ,
1487 .It Li ".Op Ar objfil Op Ar corfil"
1488 .Op Ar objfil Op Ar corfil
1489 .It Li ".Op Fl c Ar objfil Op Ar corfil ,"
1490 .Op Fl c Ar objfil Op Ar corfil ,
1491 .It Li ".Op word1 word2"
1492 .Op word1 word2
1493 .It Li ".Li .Op Oo Ao option Ac Oc Ld"
1494 .Li .Op Oo Ao options Ac Oc Ld
1497 Here a typical example of the
1498 .Ql .Oc
1500 .Ql .Oo
1501 macros:
1503 .Bd -literal -offset indent
1504 \&.Oo
1505 \&.Op Fl k Ar kilobytes
1506 \&.Op Fl i Ar interval
1507 \&.Op Fl c Ar count
1508 \&.Oc
1512 Produces:
1514 .Bd -filled -offset indent
1516 .Op Fl k Ar kilobytes
1517 .Op Fl i Ar interval
1518 .Op Fl c Ar count
1522 .Ss Pathnames
1525 .Ql .Pa
1526 macro formats path or file names.
1528 .Dl Usage: .Pa Oo Ao pathname Ac Oc Ld
1530 .Bl -tag -xwidth ".Li .Pa\ /tmp/fooXXXXX\ )\ ." -compact -offset 15n
1531 .It Li .Pa
1533 .It Li ".Pa /usr/share"
1534 .Pa /usr/share
1535 .It Li ".Pa /tmp/fooXXXXX ) ."
1536 .Pa /tmp/fooXXXXX ) .
1539 .Ss Variables
1541 Generic variable reference.
1543 .Dl Usage: .Va Ao variable Ac Ld
1545 .Bl -tag -xwidth ".Li .Va\ Xchar\ sX\ ]\ )\ )\ ," -compact -offset 15n
1546 .It Li ".Va count"
1547 .Va count
1548 .It Li ".Va settimer ,"
1549 .Va settimer ,
1550 .It Li ".Va \*[q]int *prt\*[q] ) :"
1551 .Va "int *prt" ) :
1552 .It Li ".Va \*[q]char s\*[q] ] ) ) ,"
1553 .Va "char s" ] ) ) ,
1556 .Ss Manual Page Cross References
1559 .Ql .Xr
1560 macro expects the first argument to be a manual page name.
1561 The optional second argument, if a string (defining the manual section), is
1562 put into parentheses.
1564 .Dl Usage: .Xr Ao man page name Ac Oo Ao section Ac Oc Ld
1566 .Bl -tag -xwidth ".Li .Xr\ xinit\ 1x\ ;" -compact -offset 15n
1567 .It Li ".Xr mdoc"
1568 .Xr mdoc
1569 .It Li ".Xr mdoc ,"
1570 .Xr mdoc ,
1571 .It Li ".Xr mdoc 7"
1572 .Xr mdoc 7
1573 .It Li ".Xr xinit 1x ;"
1574 .Xr xinit 1x ;
1578 .Sh GENERAL TEXT DOMAIN
1580 .Ss AT&T Macro
1583 .Dl Usage: .At Oo Ao version Ac Oc Ld
1585 .Bl -tag -xwidth ".Li .At\ v6\ ." -compact -offset 15n
1586 .It Li .At
1588 .It Li ".At v6 ."
1589 .At v6 .
1592 The following values for
1593 .Ao version Ac
1594 are possible:
1596 .Dl 32v, v1, v2, v3, v4, v5, v6, v7, V, V.1, V.2, V.3, V.4
1598 .Ss BSD Macro
1601 .Dl "Usage: .Bx" Bro -alpha | -beta | -devel Brc Ld
1602 .Dl "       .Bx" Oo Ao version Ac Oo Ao release Ac Oc Oc Ld
1604 .Bl -tag -xwidth ".Li .Bx\ -devel" -compact -offset 15n
1605 .It Li .Bx
1607 .It Li ".Bx 4.3 ."
1608 .Bx 4.3 .
1609 .It Li ".Bx \-devel"
1610 .Bx -devel
1613 .Ao version Ac
1614 will be prepended to the string
1615 .Ql Bx .
1616 The following values for
1617 .Ao release Ac
1618 are possible:
1620 .Dl Reno, reno, Tahoe, tahoe, Lite, lite, Lite2, lite2
1622 .Ss NetBSD Macro
1625 .Dl Usage: .Nx Oo Ao version Ac Oc Ld
1627 .Bl -tag -xwidth ".Li .Nx\ 1.4\ ." -compact -offset 15n
1628 .It Li .Nx
1630 .It Li ".Nx 1.4 ."
1631 .Nx 1.4 .
1634 For possible values of
1635 .Ao version Ac
1636 see the description of the
1637 .Ql .Os
1638 request above in section
1639 .Sx "TITLE MACROS" .
1641 .Ss FreeBSD Macro
1644 .Dl Usage: .Fx Oo Ao version Ac Oc Ld
1646 .Bl -tag -xwidth ".Li .Fx\ 2.2\ ." -compact -offset 15n
1647 .It Li .Fx
1649 .It Li ".Fx 2.2 ."
1650 .Fx 2.2 .
1653 For possible values of
1654 .Ao version Ac
1655 see the description of the
1656 .Ql .Os
1657 request above in section
1658 .Sx "TITLE MACROS" .
1660 .Ss UNIX Macro
1663 .Dl Usage: .Ux Ld
1665 .Bl -tag -xwidth ".Li .Ux" -compact -offset 15n
1666 .It Li .Ux
1670 .Ss Emphasis Macro
1672 Text may be stressed or emphasized with the
1673 .Ql .Em
1674 macro.
1675 The usual font for emphasis is italic.
1677 .Dl Usage: .Em Ao argument Ac Ld
1679 .Bl -tag -xwidth ".Li .Em\ vide\ infra\ )\ )\ ," -compact -offset 15n
1680 .It Li ".Em does not"
1681 .Em does not
1682 .It Li ".Em exceed 1024 ."
1683 .Em exceed 1024 .
1684 .It Li ".Em vide infra ) ) ,"
1685 .Em vide infra ) ) ,
1687 .\" XXX
1688 .\" The emphasis can be forced across several lines of text by using
1689 .\" the
1690 .\" .Ql \&.Bf
1691 .\" macro discussed in
1692 .\" .Sx Modes
1693 .\" under
1694 .\" .Sx PAGE STRUCTURE DOMAIN .
1695 .\" .Pp
1696 .\" .Bf -emphasis
1697 .\" We are certain the reason most people desire a Harvard MBA
1698 .\" so they can become to be successful philanthropists.  Only
1699 .\" mathematicians and physicists go to graduate school strictly
1700 .\" to acquire infinite wealthy and fame. Its that inifinity
1701 .\" word that does it to them. Ruins them.
1702 .\" .Ef
1704 .Ss Enclosure and Quoting Macros
1706 The concept of enclosure is similar to quoting.
1707 The object being to enclose one or more strings between a pair of characters
1708 like quotes or parentheses.
1709 The terms quoting and enclosure are used interchangeably throughout this
1710 document.
1711 Most of the one-line enclosure macros end in small letter
1712 .Ql q
1713 to give a hint of quoting, but there are a few irregularities.
1714 For each enclosure macro there is also a pair of open and close macros which
1715 end in small letters
1716 .Ql o
1718 .Ql c
1719 respectively.
1721 .ne 10
1723 .Bd -filled -offset 4n
1724 .Bl -column "quote" "close" "open" "Angle Bracket Enclosure" "`string' or string"
1725 .Em Quote Ta Em Open Ta Em Close Ta Em Function               Ta Em Result
1726 .No .Aq   Ta    .Ao  Ta    .Ac   Ta "Angle Bracket Enclosure" Ta Ao string Ac
1727 .No .Bq   Ta    .Bo  Ta    .Bc   Ta "Bracket Enclosure"       Ta Bo string Bc
1728 .No .Brq  Ta    .Bro Ta    .Brc  Ta "Brace Enclosure"         Ta Bro string Brc
1729 .No .Dq   Ta    .Do  Ta    .Dc   Ta "Double Quote"            Ta Do string Dc
1730 .No       Ta    .Eo  Ta    .Ec   Ta "Enclose String (in XX)"  Ta XXstringXX
1731 .No .Pq   Ta    .Po  Ta    .Pc   Ta "Parenthesis Enclosure"   Ta Po string Pc
1732 .No .Ql   Ta         Ta          Ta "Quoted Literal"          Ta "`string' or string"
1733 .No .Qq   Ta    .Qo  Ta    .Qc   Ta "Straight Double Quote"   Ta Qo string Qc
1734 .No .Sq   Ta    .So  Ta    .Sc   Ta "Single Quote"            Ta So string Sc
1739 .Bl -tag -xwidth ".Li .Ec , .Eo"
1740 .It Li .Ec , .Eo
1741 These macros expect the first argument to be the opening and closing strings
1742 respectively.
1743 .It Li .Ql
1744 The quoted literal macro behaves differently in troff and nroff mode.
1745 If formatted with
1746 .Xr nroff ,
1747 a quoted literal is always quoted.
1748 If formatted with troff, an item is only quoted if the width of the item is
1749 less than three constant width characters.
1750 This is to make short strings more visible where the font change to literal
1751 (constant width) is less noticeable.
1752 .It Li .Pf
1753 The prefix macro suppresses the whitespace between its first and second
1754 argument:
1756 .Bl -tag -xwidth ".Li .Pf\ (\ Fa\ name2" -offset indent
1757 .It Li ".Pf ( Fa name2"
1758 .Pf ( Fa name2
1763 .Ql .Ns
1764 macro (see below) performs the analogous suffix function.
1765 .It Li .Ap
1767 .Ql .Ap
1768 macro inserts an apostrophe and exits any special text modes, continuing in
1769 .Ql .No
1770 mode.
1774 Examples of quoting:
1777 .Bl -tag -xwidth ".Li .Bq\ Em\ Greek\ ,\ French\ ." -compact -offset indent
1778 .It Li .Aq
1780 .It Li ".Aq Ar ctype.h ) ,"
1781 .Aq Ar ctype.h ) ,
1782 .It Li .Bq
1784 .It Li ".Bq Em Greek , French ."
1785 .Bq Em Greek , French .
1786 .It Li .Dq
1788 .It Li ".Dq string abc ."
1789 .Dq string abc .
1790 .It Li ".Dq \'^[A-Z]\'"
1791 .Dq \'^[A-Z]\'
1792 .It Li ".Ql man mdoc"
1793 .Ql man mdoc
1794 .It Li .Qq
1796 .It Li ".Qq string ) ,"
1797 .Qq string ) ,
1798 .It Li ".Qq string Ns ),"
1799 .Qq string Ns ),
1800 .It Li .Sq
1802 .It Li ".Sq string"
1803 .Sq string
1804 .It Li ".Em or Ap ing"
1805 .Em or Ap ing
1809 For a good example of nested enclosure macros, see the
1810 .Ql .Op
1811 option macro.
1812 It was created from the same underlying enclosure macros as those presented
1813 in the list above.
1815 .Ql .Xo
1817 .Ql .Xc
1818 extended argument list macros are discussed below.
1820 .Ss No\-Op or Normal Text Macro
1822 The macro
1823 .Ql .No
1825 can be used in a macro command line for parameters which should
1826 .Em not
1827 be formatted.
1828 Be careful to add
1829 .Ql \e&
1830 to the word
1831 .Ql \&No
1832 if you really want that English word (and not the macro) as a parameter.
1834 .Dl Usage: .No Ao argument Ac Ld
1836 .Bl -tag -xwidth ".Li .No\ test\ Ta\ with\ Ta\ tabs" -compact -offset 15n
1837 .It Li ".No test Ta with Ta tabs"
1838 .No test Ta with Ta tabs
1841 .Ss No\-Space Macro
1844 .Ql .Ns
1845 macro suppresses insertion of a space between the current position and its
1846 first parameter.
1847 For example, it is useful for old style argument lists where there is no
1848 space between the flag and argument:
1850 .Dl "Usage:" Ld Ao argument Ac \&Ns Oo Ao argument Ac Oc Ld
1851 .Dl "      " .Ns Ao argument Ac Ld
1853 .Bl -tag -xwidth ".Li .Op\ Fl\ I\ Ns\ Ar\ directory" -compact -offset 15n
1854 .It Li ".Op Fl I Ns Ar directory"
1855 .Op Fl I Ns Ar directory
1858 Note: The
1859 .Ql .Ns
1860 macro always invokes the
1861 .Ql .No
1862 macro after eliminating the space unless another macro name follows it.
1863 If used as a request (i.e., the second form above in the
1864 .Sq Usage
1865 line,
1866 .Ql .Ns
1867 is identical to
1868 .Ql .No .
1870 .Ss Section Cross References
1873 .Ql .Sx
1874 macro designates a reference to a section header within the same document.
1876 .Dl Usage: .Sx Ao section reference Ac Ld
1878 .Bl -tag -xwidth ".Li .Sx\ FILES" -offset 15n
1879 .It Li ".Sx FILES"
1880 .Sx FILES
1883 .Ss Symbolic
1885 The symbolic emphasis macro is generally a boldface macro in either the
1886 symbolic sense or the traditional English usage.
1888 .Dl Usage: .Sy Ao symbol Ac Ld
1890 .Bl -tag -xwidth ".Li .Sy\ Important\ Notice" -compact -offset 15n
1891 .It Li ".Sy Important Notice"
1892 .Sy Important Notice
1896 .Ss References and Citations
1898 The following macros make a modest attempt to handle references.
1899 At best, the macros make it convenient to manually drop in a subset of
1900 .Em refer
1901 style references.
1903 .Bl -tag -width 6n -offset indent -compact
1904 .It Li .Rs
1905 Reference start (does not take arguments).
1906 Causes a line break in the
1907 .Sx "SEE ALSO"
1908 section and begins collection of reference information until the reference
1909 end macro is read.
1910 .It Li .Re
1911 Reference end (does not take arguments).
1912 The reference is printed.
1913 .It Li .%A
1914 Reference author name; one name per invocation.
1915 .It Li .%B
1916 Book title.
1917 .It Li .%C
1918 City/place (not implemented yet).
1919 .It Li .%D
1920 Date.
1921 .It Li .%I
1922 Issuer/publisher name.
1923 .It Li .%J
1924 Journal name.
1925 .It Li .%N
1926 Issue number.
1927 .It Li .%O
1928 Optional information.
1929 .It Li .%P
1930 Page number.
1931 .It Li .%Q
1932 Corporate or foreign author.
1933 .It Li .%R
1934 Report name.
1935 .It Li .%T
1936 Title of article.
1937 .It Li .%V
1938 Volume.
1941 Macros beginning with
1942 .Ql %
1943 are not callable but accept multiple arguments in the usual way.
1944 Only the
1945 .Ql .Tn
1946 macro is handled properly as a parameter; other macros will cause strange
1947 output.
1948 .Ql .%B
1950 .Ql .%T
1951 can be used outside of the
1952 .Ql .Rs/.Re
1953 environment.
1955 Example:
1957 .Bd -literal -offset indent
1958 \&.Rs
1959 \&.%A "Matthew Bar"
1960 \&.%A "John Foo"
1961 \&.%T "Implementation Notes on foobar(1)"
1962 \&.%R "Technical Report ABC-DE-12-345"
1963 \&.%Q "Drofnats College, Nowhere"
1964 \&.%D "April 1991"
1965 \&.Re
1968 produces
1970 .Bd -ragged -offset indent
1972 .%A "Matthew Bar"
1973 .%A "John Foo"
1974 .%T "Implementation Notes on foobar(1)"
1975 .%R "Technical Report ABC-DE-12-345"
1976 .%Q "Drofnats College, Nowhere"
1977 .%D "April 1991"
1981 .Ss Trade Names (or Acronyms and Type Names)
1983 The trade name macro prints its arguments in a smaller font.
1984 Its intended use is to imitate a small caps fonts for uppercase acronyms.
1986 .Dl Usage: .Tn Ao symbol Ac Ld
1988 .Bl -tag -xwidth ".Li .Tn\ ASCII" -compact -offset 15n
1989 .It Li ".Tn DEC"
1990 .Tn DEC
1991 .It Li ".Tn ASCII"
1992 .Tn ASCII
1996 .Ss Extended Arguments
1999 .Li .Xo
2001 .Li .Xc
2002 macros allow one to extend an argument list on a macro boundary for the
2003 .Ql .It
2004 macro (see below).
2005 Note that
2006 .Li .Xo
2008 .Li .Xc
2009 are implemented similarly to all other macros opening and closing an
2010 enclosure (without inserting characters, of course).
2011 This means that the following is true for those macros also.
2013 Here is an example of
2014 .Ql .Xo
2015 using the space mode macro to turn spacing off:
2017 .Bd -literal -offset indent
2018 \&.Sm off
2019 \&.It Xo Sy I Ar operation
2020 \&.No \een Ar count No \een
2021 \&.Xc
2022 \&.Sm on
2026 produces
2028 .Bd -filled -offset indent
2029 .Bl -tag -compact
2030 .Sm off
2031 .It Xo Sy I Ar operation
2032 .No \en Ar count No \en
2034 .Sm on
2039 Another one:
2041 .Bd -literal -offset indent
2042 \&.Sm off
2043 \&.It Cm S No / Ar old_pattern Xo
2044 \&.No / Ar new_pattern
2045 \&.No / Op Cm g
2046 \&.Xc
2047 \&.Sm on
2051 produces
2052 .Bd -filled -offset indent
2053 .Bl -tag -compact
2054 .Sm off
2055 .It Cm S No \&/ Ar old_pattern Xo
2056 .No \&/ Ar new_pattern
2057 .No \&/ Op Cm g
2059 .Sm on
2064 Another example of
2065 .Ql .Xo
2066 and enclosure macros: Test the value of a variable.
2068 .Bd -literal -offset indent
2069 \&.It Xo
2070 \&.Ic .ifndef
2071 \&.Oo \e&! Oc Ns Ar variable Oo
2072 \&.Ar operator variable Ld
2073 \&.Oc Xc
2077 produces
2079 .Bd -filled -offset indent
2080 .Bl -tag -width flag -compact
2081 .It Xo
2082 .Ic .ifndef
2083 .Oo \&! Oc Ns Ar variable Oo
2084 .Ar operator variable Ld
2085 .Oc Xc
2091 .Sh PAGE STRUCTURE DOMAIN
2093 .Ss Section Headers
2095 The first three
2096 .Ql .Sh
2097 section header macros listed below are required in every man page.
2098 The remaining section headers are recommended at the discretion of the
2099 author writing the manual page.
2101 .Ql .Sh
2102 macro is parsed but not generally callable.
2103 It can be used as an argument in a call to
2104 .Ql .Sh
2105 only; it then reactivates the default font for
2106 .Ql .Sh .
2108 .Bl -tag -xwidth ".Li .Sh\ DESCRIPTION"
2109 .It Li ".Sh NAME"
2111 .Ql Li ".Sh NAME"
2112 macro is mandatory.
2113 If not specified, headers, footers and page layout defaults will not be set
2114 and things will be rather unpleasant.
2116 .Sx NAME
2117 section consists of at least three items.
2118 The first is the
2119 .Ql .Nm
2120 name macro naming the subject of the man page.
2121 The second is the name description macro,
2122 .Ql .Nd ,
2123 which separates the subject name from the third item, which is the
2124 description.
2125 The description should be the most terse and lucid possible, as the space
2126 available is small.
2128 .It Li ".Sh SYNOPSIS"
2130 .Sx SYNOPSIS
2131 section describes the typical usage of the subject of a man page.
2132 The macros required are either
2133 .Ql .Nm ,
2134 .Ql .Cd ,
2136 .Ql .Fn
2137 (and possibly
2138 .Ql .Fo ,
2139 .Ql .Fc ,
2140 .Ql .Fd ,
2142 .Ql .Ft ) .
2143 The function name macro
2144 .Ql .Fn
2145 is required for manual page sections\~2 and\~3; the command and general name
2146 macro
2147 .Ql .Nm
2148 is required for sections 1, 5, 6, 7, and\~8.
2149 Section\~4 manuals require a
2150 .Ql .Nm ,
2151 .Ql .Fd
2152 or a
2153 .Ql .Cd
2154 configuration device usage macro.
2155 Several other macros may be necessary to produce the synopsis line as shown
2156 below:
2158 .Bd -filled -offset indent
2159 .Nm cat
2160 .Op Fl benstuv
2161 .Op Fl
2166 The following macros were used:
2168 .Dl ".Nm cat"
2169 .Dl ".Op Fl benstuv"
2170 .Dl ".Op Fl"
2171 .Dl .Ar
2173 .It Li ".Sh DESCRIPTION"
2174 In most cases the first text in the
2175 .Sx DESCRIPTION
2176 section is a brief paragraph on the command, function or file, followed by a
2177 lexical list of options and respective explanations.
2178 To create such a list, the
2179 .Ql .Bl
2180 (begin list),
2181 .Ql .It
2182 (list item) and
2183 .Ql .El
2184 (end list)
2185 macros are used (see
2186 .Sx Lists and Columns
2187 below).
2191 The following
2192 .Ql .Sh
2193 section headers are part of the preferred manual page layout and must be
2194 used appropriately to maintain consistency.
2195 They are listed in the order in which they would be used.
2197 .Bl -tag -xwidth ".Li .Sh\ ENVIRONMENT"
2198 .It Li ".Sh ENVIRONMENT"
2200 .Sx ENVIRONMENT
2201 section should reveal any related environment variables and clues to their
2202 behavior and/or usage.
2203 .It Li ".Sh EXAMPLES"
2204 There are several ways to create examples.
2205 See the
2206 .Sx EXAMPLES
2207 section below for details.
2208 .It Li ".Sh FILES"
2209 Files which are used or created by the man page subject should be listed via
2211 .Ql .Pa
2212 macro in the
2213 .Sx FILES
2214 section.
2215 .It Li ".Sh SEE ALSO"
2216 References to other material on the man page topic and cross references to
2217 other relevant man pages should be placed in the
2218 .Sx SEE ALSO
2219 section.
2220 Cross references are specified using the
2221 .Ql .Xr
2222 macro.
2223 Currently
2224 .Xr refer 1
2225 style references are not accommodated.
2227 It is recommended that the cross references are sorted on the section
2228 number, and then alphabetically on the names within a section.
2229 .It Li ".Sh STANDARDS"
2230 If the command, library function or file adheres to a specific
2231 implementation such as
2232 .St -p1003.2
2234 .St -ansiC
2235 this should be noted here.
2236 If the command does not adhere to any standard, its history should be noted
2237 in the
2238 .Sx HISTORY
2239 section.
2240 .It Li ".Sh HISTORY"
2241 Any command which does not adhere to any specific standards should be
2242 outlined historically in this section.
2243 .It Li ".Sh AUTHORS"
2244 Credits should be placed here.
2245 .It Li ".Sh DIAGNOSTICS"
2246 Diagnostic messages from a command should be placed in this section.
2247 .It Li ".Sh ERRORS"
2248 Specific error handling, especially from library functions (man page
2249 sections\~2 and\~3) should go here.
2251 .Ql .Er
2252 macro is used to specify an error (errno).
2253 .It Li ".Sh BUGS"
2254 Blatant problems with the topic go here.
2258 User-specified
2259 .Ql .Sh
2260 sections may be added; for example, this section was set with:
2262 .Bd -literal -offset 15n
2263 \&.Sh PAGE LAYOUT MACROS
2266 .Ss Paragraphs and Line Spacing
2268 .Bl -tag -xwidth ".Li .Pp"
2269 .It Li .Pp
2270 The 
2271 .Ql .Pp
2272 paragraph command may be used to specify a line space where necessary.
2273 The macro is not necessary after a
2274 .Ql .Sh
2276 .Ql .Ss
2277 macro or before a
2278 .Ql .Bl
2280 .Ql .Bd
2281 macro (which both assert a vertical distance unless the
2282 .Fl compact
2283 flag is given).
2285 The macro is neither callable nor parsed and doesn't take arguments.
2288 .\" XXX
2290 .\" This worked with version one, need to redo for version three
2291 .\" .Pp
2292 .\" .Ds I
2293 .\" .Cw (ax+bx+c) \ is\ produced\ by\ \&
2294 .\" .\".Cw (ax+bx+c) \&.Va_by_) \&_and_\& \&[?/]m_b1_e1_f1[?/]\&
2295 .\" .Cl Cx \t\t
2296 .\" .Li \&.Cx\ (
2297 .\" .Cx
2298 .\" .Cl Cx \t\t
2299 .\" .Li \&.Va ax
2300 .\" .Cx
2301 .\" .Cl Cx \t\t
2302 .\" .Li \&.Sy \+
2303 .\" .Cx
2304 .\" .Cl Cx \&(\&
2305 .\" .Va ax
2306 .\" .Cx +
2307 .\" .Va by
2308 .\" .Cx +
2309 .\" .Va c )
2310 .\" .Cx \t
2311 .\" .Em is produced by
2312 .\" .Cx \t
2313 .\" .Li \&.Va by
2314 .\" .Cx
2315 .\" .Cl Cx \t\t
2316 .\" .Li \&.Sy \+
2317 .\" .Cx
2318 .\" .Cl Cx \t\t
2319 .\" .Li \&.Va c )
2320 .\" .Cx
2321 .\" .Cl Cx \t\t
2322 .\" .Li \&.Cx
2323 .\" .Cx
2324 .\" .Cw
2325 .\" .De
2326 .\" .Pp
2327 .\" This example shows the same equation in a different format.
2328 .\" The spaces
2329 .\" around the
2330 .\" .Li \&+
2331 .\" signs were forced with
2332 .\" .Li \e :
2333 .\" .Pp
2334 .\" .Ds I
2335 .\" .Cw (ax\ +\ bx\ +\ c) \ is\ produced\ by\ \&
2336 .\" .\".Cw (ax+bx+c) \&.Va_by_) \&_and_\& \&[?/]m_b1_e1_f1[?/]\&
2337 .\" .Cl Cx \t\t
2338 .\" .Li \&.Cx\ (
2339 .\" .Cx
2340 .\" .Cl Cx \t\t
2341 .\" .Li \&.Va a
2342 .\" .Cx
2343 .\" .Cl Cx \t\t
2344 .\" .Li \&.Sy x
2345 .\" .Cx
2346 .\" .Cl Cx \t\t
2347 .\" .Li \&.Cx \e\ +\e\ \e&
2348 .\" .Cx
2349 .\" .Cl Cx \&(\&
2350 .\" .Va a
2351 .\" .Sy x
2352 .\" .Cx \ +\ \&
2353 .\" .Va b
2354 .\" .Sy y
2355 .\" .Cx \ +\ \&
2356 .\" .Va c )
2357 .\" .Cx \t
2358 .\" .Em is produced by
2359 .\" .Cl Cx \t\t
2360 .\" .Li \&.Va b
2361 .\" .Cx
2362 .\" .Cl Cx \t\t
2363 .\" .Li \&.Sy y
2364 .\" .Cx
2365 .\" .Cl Cx \t\t
2366 .\" .Li \&.Cx \e\ +\e\ \e&
2367 .\" .Cx
2368 .\" .Cl Cx \t\t
2369 .\" .Li \&.Va c )
2370 .\" .Cx
2371 .\" .Cl Cx \t\t
2372 .\" .Li \&.Cx
2373 .\" .Cx
2374 .\" .Cw
2375 .\" .De
2376 .\" .Pp
2377 .\" The incantation below was
2378 .\" lifted from the
2379 .\" .Xr adb 1
2380 .\" manual page:
2381 .\" .Pp
2382 .\" .Ds I
2383 .\" .Cw \&[?/]m_b1_e1_f1[?/]\& is\ produced\ by
2384 .\" .Cl Cx \t\t
2385 .\" .Li \&.Cx Op Sy ?/
2386 .\" .Cx
2387 .\" .Cl Cx \t\t
2388 .\" .Li \&.Nm m
2389 .\" .Cx
2390 .\" .Cl Cx Op Sy ?/
2391 .\" .Nm m
2392 .\" .Ad \ b1 e1 f1
2393 .\" .Op Sy ?/
2394 .\" .Cx \t
2395 .\" .Em is produced by
2396 .\" .Cx \t
2397 .\" .Li \&.Ar \e\ b1 e1 f1
2398 .\" .Cx
2399 .\" .Cl Cx \t\t
2400 .\" .Li \&.Op Sy ?/
2401 .\" .Cx
2402 .\" .Cl Cx \t\t
2403 .\" .Li \&.Cx
2404 .\" .Cx
2405 .\" .Cw
2406 .\" .De
2407 .\" .Pp
2409 .Ss Keeps
2411 The only keep that is implemented at this time is for words.
2412 The macros are
2413 .Ql .Bk
2414 (begin keep)
2416 .Ql .Ek
2417 (end keep).
2418 The only option that
2419 .Ql .Bl
2420 accepts currently is
2421 .Fl words
2422 (this is also the default if no option is given) which is useful for
2423 preventing line breaks in the middle of options.
2424 In the example for the make command line arguments (see
2425 .Sx What's in a name ) ,
2426 the keep prevented
2427 .Xr nroff
2428 from placing up the flag and the argument on separate lines.
2430 Both macros are neither callable nor parsed.
2432 More work needs to be done with the keep macros; specifically, a
2433 .Fl line
2434 option should be added.
2436 .Ss Examples and Displays
2438 There are six types of displays.
2440 .Bl -tag -xwidth ".Li .D1"
2441 .It Li .D1
2442 (This is D-one.)
2443 Display one line of indented text.
2444 This macro is parsed but not callable.
2446 .Dl Fl ldghfstru
2448 The above was produced by:
2449 .Li ".Dl Fl ldghfstru" .
2451 .It Li .Dl
2452 (This is D-ell.)
2453 Display one line of indented
2454 .Em literal
2455 text.
2457 .Ql .Dl
2458 example macro has been used throughout this file.
2459 It allows the indentation (display) of one line of text.
2460 Its default font is set to constant width (literal).
2461 .Ql .Dl
2462 is parsed but not callable.
2464 .Dl % ls -ldg /usr/local/bin
2466 The above was produced by:
2467 .Li ".Dl % ls -ldg /usr/local/bin" .
2469 .It Li .Bd
2470 Begin display.
2472 .Ql .Bd
2473 display must be ended with the
2474 .Ql .Ed
2475 macro.
2476 It has the following syntax:
2478 .Bl -tag -xwidth ".Li .Bd" -offset indent
2479 .It Li .Bd Xo
2480 .Bro \-literal | \-filled | \-unfilled | \-ragged | \-centered Brc
2481 .Oo \-offset Ao string Ac Oc Oo \-compact Oc Xc
2485 .Bl -tag -xwidth ".Fl file Ao Ar file name Ac " -compact
2486 .It Fl ragged
2487 Fill, but do not adjust the right margin (only left-justify).
2488 .It Fl centered
2489 Center lines between the current left and right margin.
2490 Note that each single line is centered.
2491 .It Fl unfilled
2492 Do not fill; display a block of text as typed, using line breaks as
2493 specified by the user.
2494 This can produce overlong lines without warning messages.
2495 .It Fl filled
2496 Display a filled block.
2497 The block of text is formatted (i.e., the text is justified on both the left
2498 and right side).
2499 .It Fl literal
2500 Display block with literal font (usually fixed-width).
2501 Useful for source code or simple tabbed or spaced text.
2502 .It Fl file Ao Ar file name Ac
2503 The file name following the
2504 .Fl file
2505 flag is read and displayed.
2506 Literal mode is asserted and tabs are set at 8\~constant width character
2507 intervals.
2508 However, any
2509 .Xr troff/ Ns Nm \-mdoc
2510 commands in the file will be processed.
2511 Currently, this feature is not implemented.
2512 .It Fl offset Ao Ar string Ac
2514 .Fl offset
2515 is specified with one of the following strings, the string is interpreted to
2516 indicate the level of indentation for the forthcoming block of text:
2519 .Bl -tag -xwidth ".Ar indent-two" -compact
2520 .It Ar left
2521 Align block on the current left margin; this is the default mode of
2522 .Ql .Bd .
2523 .It Ar center
2524 Supposedly center the block.
2525 At this time unfortunately, the block merely gets left aligned about an
2526 imaginary center margin.
2527 .It Ar indent
2528 Indent by one default indent value or tab.
2529 The default indent value is also used for the
2530 .Ql .D1
2531 and 
2532 .Ql .Dl
2533 macros, so one is guaranteed the two types of displays will line up.
2534 The indentation value is normally set to\~6n or about two thirds of an inch
2535 (six constant width characters).
2536 .It Ar indent-two
2537 Indent two times the default indent value.
2538 .It Ar right
2539 This
2540 .Em left
2541 aligns the block about two inches from the right side of the page.
2542 This macro needs work and perhaps may never do the right thing within
2543 .Xr troff .
2548 .Ao string Ac
2549 is a valid numeric expression instead
2550 .Pf ( Em with a scale indicator other than
2551 .Sq Em u ) ,
2552 use that value for indentation.
2553 The most useful scale indicators are
2554 .Sq m
2556 .Sq n ,
2557 specifying the so-called
2558 .Em \&Em
2560 .Em "En square" .
2561 This is approximately the width of the letter
2562 .Sq m
2563 resp.\& the letter
2564 .Sq n
2565 of the current font (for nroff output, both scale indicators give the same
2566 values).
2568 .Ao string Ac
2569 isn't a numeric expression, it is tested whether it is an
2570 .Nm \-mdoc
2571 macro name, and the default offset value associated with this macro is used.
2572 Finally, if all tests fail,
2573 the width of
2574 .Ao string Ac
2575 (typeset with a fixed-width font) is taken as the offset.
2576 .It Fl compact
2577 Suppress insertion of vertical space before begin of display.
2580 .It Li .Ed
2581 End display (doesn't take parameters).
2584 .Ss Tagged Lists and Columns
2586 There are several types of lists which may be initiated with the
2587 .Ql .Bl
2588 begin-list macro.
2589 Items within the list are specified with the
2590 .Ql .It
2591 item macro, and each list must end with the
2592 .Ql .El
2593 macro.
2594 Lists may be nested within themselves and within displays.
2595 The use of columns inside of lists or lists inside of columns is unproven.
2597 In addition, several list attributes may be specified such as the width of a
2598 tag, the list offset, and compactness (blank lines between items allowed or
2599 disallowed).
2600 Most of this document has been formatted with a tag style list
2601 .Pf ( Fl tag ) .
2603 It has the following syntax forms:
2605 .Bl -tag -xwidth ".Li .Bl" -offset indent -compact
2606 .It Li .Bl Xo
2607 .Bro \-hang | \-ohang | \-tag | \-diag | \-inset Brc
2608 .Oo \-width Ao string Ac Oc Oo \-xwidth Ao command Ac Oc
2609 .Oo \-offset Ao string Ac Oc Oo \-compact Oc Xc
2610 .It Li .Bl Xo
2611 .No \-column Oo \-offset Ao string Ac Oc
2612 .Ao string1 Ac Ao string2 Ac Ld Xc
2613 .It Li .Bl Xo
2614 .Bro \-item | \-enum Oo \-nested Oc | \-bullet | \-hyphen | \-dash Brc
2615 .Oo \-offset Ao string Ac Oc Oo \-compact Oc Xc
2619 And now a detailed description of the list types.
2622 .Bl -tag -xwidth ".Fl column" -compact
2623 .It Fl bullet
2624 A bullet list.
2626 .Bd -literal -offset indent
2627 \&.Bl -bullet -offset indent -compact
2628 \&.It
2629 Bullet one goes here.
2630 \&.It
2631 Bullet two here.
2632 \&.El
2636 Produces:
2639 .Bl -bullet -offset indent -compact
2641 Bullet one goes here.
2643 Bullet two here.
2647 .It Fl dash No ( or Fl hyphen )
2648 A dash list.
2650 .Bd -literal -offset indent
2651 \&.Bl -dash -offset indent -compact
2652 \&.It
2653 Dash one goes here.
2654 \&.It
2655 Dash two here.
2656 \&.El
2660 Produces:
2663 .Bl -dash -offset indent -compact
2665 Dash one goes here.
2667 Dash two here.
2671 .It Fl enum
2672 An enumerated list.
2674 .Bd -literal -offset indent
2675 \&.Bl -enum -offset indent -compact
2676 \&.It
2677 Item one goes here.
2678 \&.It
2679 And item two here.
2680 \&.El
2684 The result:
2687 .Bl -enum -offset indent -compact
2689 Item one goes here.
2691 And item two here.
2695 If you want to nest enumerated lists, use the
2696 .Fl nested
2697 flag (starting with the second-level list):
2699 .Bd -literal -offset indent
2700 \&.Bl -enum -offset indent -compact
2701 \&.It
2702 Item one goes here
2703 \&.Bl -enum -nested -compact
2704 \&.It
2705 Item two goes here.
2706 \&.It
2707 And item three here.
2708 \&.El
2709 \&.It
2710 And item four here.
2711 \&.El
2715 Result:
2718 .Bl -enum -offset indent -compact
2720 Item one goes here.
2721 .Bl -enum -nested -compact
2723 Item two goes here.
2725 And item three here.
2728 And item four here.
2732 .It Fl item
2733 A list of type
2734 .Fl item
2735 without list markers.
2737 .Bd -literal -offset indent
2738 \&.Bl -item -offset indent
2739 \&.It
2740 Item one goes here.
2741 Item one goes here.
2742 Item one goes here.
2743 \&.It
2744 Item two here.
2745 Item two here.
2746 Item two here.
2747 \&.El
2751 Produces:
2754 .Bl -item -offset indent
2756 Item one goes here.
2757 Item one goes here.
2758 Item one goes here.
2760 Item two here.
2761 Item two here.
2762 Item two here.
2766 .It Fl tag
2767 A list with tags.
2769 .Fl width
2771 .Fl xwidth
2772 to specify the tag width.
2775 .Bl -tag -width "PPID" -compact -offset indent
2776 .It SL
2777 sleep time of the process (seconds blocked)
2778 .It PAGEIN
2779 number of disk
2780 .Tn I/O Ns 's
2781 resulting from references by the process
2782 to pages not loaded in core.
2783 .It UID
2784 numerical user-id of process owner
2785 .It PPID
2786 numerical id of parent of process priority
2787 (non-positive when in non-interruptible wait)
2791 The raw text:
2793 .Bd -literal -offset indent
2794 \&.Bl -tag -width "PPID" -compact -offset indent
2795 \&.It SL
2796 sleep time of the process (seconds blocked)
2797 \&.It PAGEIN
2798 number of disk
2799 \&.Tn I/O Ns 's
2800 resulting from references by the process
2801 to pages not loaded in core.
2802 \&.It UID
2803 numerical user-id of process owner
2804 \&.It PPID
2805 numerical id of parent of process priority
2806 (non-positive when in non-interruptible wait)
2807 \&.El
2811 .It Fl diag
2812 Diag lists create section-four diagnostic lists and are similar to inset
2813 lists except callable macros are ignored.
2814 This list type can't be nested; the flags
2815 .Fl offset
2817 .Fl compact
2818 are ignored
2819 .Pf ( Fl width
2820 resp.\&
2821 .Fl xwidth
2822 are not meaningful in this context).
2824 Example:
2826 .Bd -literal -offset indent
2827 \&.Bl -diag
2828 \&.It You can't use Sy here.
2829 The message says all.
2830 \&.El
2834 produces
2837 .Sy "You can't use Sy here" . "\ " No "The message says all" .
2840 .It Fl hang
2841 A list with hanging tags.
2843 .Bl -hang -offset indent
2844 .It Em Hanged
2845 labels appear similar to tagged lists when the
2846 label is smaller than the label width.
2847 .It Em Longer hanged list labels
2848 blend in to the paragraph unlike
2849 tagged paragraph labels.
2852 And the unformatted text which created it:
2854 .Bd -literal -offset indent
2855 \&.Bl -hang -offset indent
2856 \&.It Em Hanged
2857 labels appear similar to tagged lists when the
2858 label is smaller than the label width.
2859 \&.It Em Longer hanged list labels
2860 blend in to the paragraph unlike
2861 tagged paragraph labels.
2862 \&.El
2866 .It Fl ohang
2867 Lists with overhanging tags don't use indentation for the items; tags are
2868 written to a separate line.
2870 .Bl -ohang -offset indent
2871 .It Sy SL
2872 sleep time of the process (seconds blocked)
2873 .It Sy PAGEIN
2874 number of disk
2875 .Tn I/O Ns 's
2876 resulting from references by the process
2877 to pages not loaded in core.
2878 .It Sy UID
2879 numerical user-id of process owner
2880 .It Sy PPID
2881 numerical id of parent of process priority
2882 (non-positive when in non-interruptible wait)
2886 The raw text:
2888 .Bd -literal -offset indent
2889 \&.Bl -ohang -offset indent
2890 \&.It Sy SL
2891 sleep time of the process (seconds blocked)
2892 \&.It Sy PAGEIN
2893 number of disk
2894 \&.Tn I/O Ns 's
2895 resulting from references by the process
2896 to pages not loaded in core.
2897 \&.It Sy UID
2898 numerical user-id of process owner
2899 \&.It Sy PPID
2900 numerical id of parent of process priority
2901 (non-positive when in non-interruptible wait)
2902 \&.El
2906 .It Fl inset
2907 Here is an example of inset labels:
2908 .Bl -inset -offset indent
2909 .It Em Tag
2910 The tagged list (also called a tagged paragraph)
2911 is the most common type of list used in the
2912 Berkeley manuals.
2913 Use a
2914 .Fl width
2915 attribute as described below.
2916 .It Em Diag
2917 Diag lists create section four diagnostic lists
2918 and are similar to inset lists except callable
2919 macros are ignored.
2920 .It Em Hang
2921 Hanged labels are a matter of taste.
2922 .It Em Ohang
2923 Overhanging labels are nice when space is constrained.
2924 .It Em Inset
2925 Inset labels are useful for controlling blocks of
2926 paragraphs and are valuable for converting
2927 .Nm \-mdoc
2928 manuals to other formats.
2931 Here is the source text which produced the above example:
2933 .Bd -literal -offset indent
2934 \&.Bl -inset -offset indent
2935 \&.It Em Tag
2936 The tagged list (also called a tagged paragraph)
2937 is the most common type of list used in the
2938 Berkeley manuals.
2939 \&.It Em Diag
2940 Diag lists create section four diagnostic lists
2941 and are similar to inset lists except callable
2942 macros are ignored.
2943 \&.It Em Hang
2944 Hanged labels are a matter of taste.
2945 \&.It Em Ohang
2946 Overhanging labels are nice when space is constrained.
2947 \&.It Em Inset
2948 Inset labels are useful for controlling blocks of
2949 paragraphs and are valuable for converting
2950 \&.Nm \-mdoc
2951 manuals to other formats.
2952 \&.El
2956 .It Fl column
2957 This list type generates multiple columns.
2958 The number of columns and the width of each column is determined by the
2959 arguments to the
2960 .Fl column
2961 list.
2962 Each
2963 .Ql .It
2964 argument is parsed to make a row, each column within the row is a separate
2965 argument separated by a tab or the
2966 .Ql .Ta
2967 macro.
2969 The table:
2971 .Bl -column -offset indent String Nroff Troff
2972 .It Sy String Ta Sy Nroff Ta Sy Troff
2973 .It Li <= Ta <= Ta \*(<=
2974 .It Li >= Ta >= Ta \*(>=
2978 was produced by:
2980 .Bd -literal -offset indent
2981 \&.Bl -column -offset indent String Nroff Troff
2982 \&.It Sy String Ta Sy Nroff Ta Sy Troff
2983 \&.It Li <= Ta <= Ta \e*(<=
2984 \&.It Li >= Ta >= Ta \e*(>=
2985 \&.El
2991 \#=====================================================================
2993 Other keywords:
2995 .Bl -tag -xwidth ".Fl width Ar \&Fl" -offset indent
2996 .It Fl width Ar "\&Fl"
2997 sets the width to the default width for a flag.
2998 All callable
2999 macros have a default width value.
3001 .Ql \&.Fl ,
3002 value is presently
3003 set to ten constant width characters or about five sixth of
3004 an inch.
3005 .It Fl width Ar "24n"
3006 sets the width to 24 constant width characters or about two
3007 inches.
3009 .Ql n
3010 is absolutely necessary for the scaling to work correctly.
3011 .It Fl width Ar "ENAMETOOLONG"
3012 sets width to the constant width length of the
3013 string given.
3014 .It Fl width Ar "\\*qint mkfifo\\*q"
3015 again, the width is set to the constant width of the string
3016 given.
3019 If a width is not specified for the tag list type, the first
3020 time
3021 .Ql \&.It
3022 is invoked, an attempt is made to determine an appropriate
3023 width.
3024 If the first argument to
3025 .Ql ".It"
3026 is a callable macro, the default width for that macro will be used
3027 as if the macro name had been supplied as the width.
3028 However,
3029 if another item in the list is given with a different callable
3030 macro name, a new and nested list is assumed.
3031 This effectively
3032 means that
3033 .Fl width
3034 is required for the tag list type.
3036 .Sh PREDEFINED STRINGS
3037 The following strings are predefined as may be used by
3038 preceding with the troff string interpreting sequence
3039 .Ql \&\e*(xx
3040 where
3041 .Em xx
3042 is the name of the defined string or as
3043 .Ql \&\e*x
3044 where
3045 .Em x
3046 is the name of the string.
3047 The interpreting sequence may be used any where in the text.
3049 .Bl -column "String " "Nroff " "Troff " -offset indent
3050 .It Sy "String  Nroff   Troff"
3051 .It Li "<=" Ta \&<\&= Ta \*(<=
3052 .It Li ">=" Ta \&>\&= Ta \*(>=
3053 .It Li "Rq" Ta "''" Ta \*(Rq
3054 .It Li "Lq" Ta "``" Ta \*(Lq
3055 .It Li "ua" Ta ^ Ta \*(ua
3056 .It Li "aa" Ta ' Ta \*(aa
3057 .It Li "ga" Ta \` Ta \*(ga
3058 .\" .It Li "sL" Ta ` Ta \*(sL
3059 .\" .It Li "sR" Ta ' Ta \*(sR
3060 .It Li "q" Ta \&" Ta \*q
3061 .It Li "Pi" Ta pi Ta \*(Pi
3062 .It Li "Ne" Ta != Ta \*(Ne
3063 .It Li "Le" Ta <= Ta \*(Le
3064 .It Li "Ge" Ta >= Ta \*(Ge
3065 .It Li "Lt" Ta < Ta \*(Gt
3066 .It Li "Gt" Ta > Ta \*(Lt
3067 .It Li "Pm" Ta +\- Ta \*(Pm
3068 .It Li "If" Ta infinity Ta \*(If
3069 .It Li "Na" Ta \fINaN\fP Ta \*(Na
3070 .It Li "Ba" Ta \fR\&|\fP Ta \*(Ba
3073 .Sy Note :
3074 The string named
3075 .Ql q
3076 should be written as
3077 .Ql \e*q
3078 since it is only one char.
3079 .Sh DIAGNOSTICS
3080 The debugging facilities for
3081 .Nm \-mdoc
3082 are limited, but can help detect subtle errors such
3083 as the collision of an argument name with an internal
3084 register or macro name.
3085 (A what?)
3086 A register is an arithmetic storage class for
3087 .Xr troff
3088 with a one or two character name.
3089 All registers internal to
3090 .Nm \-mdoc
3092 .Xr troff
3094 .Xr ditroff
3095 are two characters and
3096 of the form <upper_case><lower_case> such as
3097 .Ql \&Ar ,
3098 <lower_case><upper_case> as
3099 .Ql \&aR
3101 <upper or lower letter><digit> as
3102 .Ql \&C\&1 .
3103 And adding to the muddle,
3104 .Xr troff
3105 has its own internal registers all of which are either
3106 two lower case characters or a dot plus a letter or meta-character
3107 character.
3108 In one of the introduction examples, it was shown how to
3109 prevent the interpretation of a macro name with the escape sequence
3110 .Ql \e& .
3111 This is sufficient for the internal register names also.
3113 .\" Every callable macro name has a corresponding register
3114 .\" of the same name (<upper_case><lower_case>).
3115 .\" There are also specific registers which have
3116 .\" been used for stacks and arrays and are listed in the
3117 .\" .Sx Appendix .
3118 .\" .Bd -ragged -offset 4n
3119 .\" [A-Z][a-z]  registers corresponding to macro names (example ``Ar'')
3120 .\" [a-z][A-Z]  registers corresponding to macro names (example ``aR'')
3121 .\" C[0-9]              argument types (example C1)
3122 .\" O[0-9]              offset stack (displays)
3123 .\" h[0-9]              horizontal spacing stack (lists)
3124 .\" o[0-9]              offset (stack) (lists)
3125 .\" t[0-9]              tag stack (lists)
3126 .\" v[0-9]              vertical spacing stack (lists)
3127 .\" w[0-9]              width tag/label stack
3128 .\" .Ed
3129 .\" .Pp
3130 If a non-escaped register name is given in the argument list of a request
3131 unpredictable behavior will occur.
3132 In general, any time huge portions
3133 of text do not appear where expected in the output, or small strings
3134 such as list tags disappear, chances are there is a misunderstanding
3135 about an argument type in the argument list.
3136 Your mother never intended for you to remember this evil stuff -- so here
3137 is a way to find out whether or not your arguments are valid: The
3138 .Ql \&.Db
3139 (debug)
3140 macro displays the interpretation of the argument list for most
3141 macros.
3142 Macros such as the
3143 .Ql \&.Pp
3144 (paragraph)
3145 macro do not contain debugging information.
3146 All of the callable macros do,
3147 and it is strongly advised whenever in doubt,
3148 turn on the
3149 .Ql \&.Db
3150 macro.
3152 .Dl Usage: \&.Db [on | off]
3154 An example of a portion of text with
3155 the debug macro placed above and below an
3156 artificially created problem (a flag argument
3157 .Ql \&aC
3158 which should be
3159 .Ql \e&aC
3160 in order to work):
3162 .Bd -literal -offset indent
3163 \&.Db on
3164 \&.Op Fl aC Ar file )
3165 \&.Db off
3168 The resulting output:
3170 .Bd -literal -offset indent
3171 DEBUGGING ON
3172 DEBUG(argv) MACRO: `.Op'  Line #: 2
3173         Argc: 1  Argv: `Fl'  Length: 2
3174         Space: `'  Class: Executable
3175         Argc: 2  Argv: `aC'  Length: 2
3176         Space: `'  Class: Executable
3177         Argc: 3  Argv: `Ar'  Length: 2
3178         Space: `'  Class: Executable
3179         Argc: 4  Argv: `file'  Length: 4
3180         Space: ` '  Class: String
3181         Argc: 5  Argv: `)'  Length: 1
3182         Space: ` '  Class: Closing Punctuation or suffix
3183         MACRO REQUEST: .Op Fl aC Ar file )
3184 DEBUGGING OFF
3187 The first line of information tells the name of the calling
3188 macro, here
3189 .Ql \&.Op ,
3190 and the line number it appears on.
3191 If one or more files are involved
3192 (especially if text from another file is included) the line number
3193 may be bogus.
3194 If there is only one file, it should be accurate.
3195 The second line gives the argument count, the argument
3196 .Pq Ql \&Fl
3197 and its length.
3198 If the length of an argument is two characters, the
3199 argument is tested to see if it is executable (unfortunately, any
3200 register which contains a non-zero value appears executable).
3201 The third line gives the space allotted for a class, and the
3202 class type.
3203 The problem here is the argument aC should not be
3204 executable.
3205 The four types of classes are string, executable, closing
3206 punctuation and opening punctuation.
3207 The last line shows the entire
3208 argument list as it was read.
3209 In this next example, the offending
3210 .Ql \&aC
3211 is escaped:
3213 .Bd -literal -offset indent
3214 \&.Db on
3215 \&.Em An escaped \e&aC
3216 \&.Db off
3219 .Bd -literal -offset indent
3220 DEBUGGING ON
3221 DEBUG(fargv) MACRO: `.Em'  Line #: 2
3222         Argc: 1  Argv: `An'  Length: 2
3223         Space: ` '  Class: String
3224         Argc: 2  Argv: `escaped'  Length: 7
3225         Space: ` '  Class: String
3226         Argc: 3  Argv: `aC'  Length: 2
3227         Space: ` '  Class: String
3228         MACRO REQUEST: .Em An escaped &aC
3229 DEBUGGING OFF
3232 The argument
3233 .Ql \e&aC
3234 shows up with the same length of 2 as the
3235 .Ql \e&
3236 sequence produces a zero width, but a register
3237 named
3238 .Ql \e&aC
3239 was not found and the type classified as string.
3241 Other diagnostics consist of usage statements and are self explanatory.
3242 .Sh GROFF, TROFF AND NROFF
3244 .Nm \-mdoc
3245 package does not need compatibility mode with
3246 .Xr groff .
3248 The package inhibits page breaks, and the headers and footers
3249 which normally occur at those breaks with
3250 .Xr nroff ,
3251 to make the manual more efficient for viewing on-line.
3252 At the moment,
3253 .Xr groff
3254 with
3255 .Fl T Ns Ar ascii
3256 does eject the imaginary remainder of the page at end of file.
3257 The inhibiting of the page breaks makes
3258 .Xr nroff Ns 'd
3259 files unsuitable for hardcopy.
3260 There is a register named
3261 .Ql \&cR
3262 which can be set to zero in the site dependent style file
3263 .Pa /usr/\:src/\:share/\:tmac/\:doc-nroff
3264 to restore the old style behavior.
3265 .Sh FILES
3266 .Bl -tag -width /usr/share/misc/mdoc.template -compact
3267 .It Pa /usr/share/tmac/tmac.doc
3268 manual macro package
3269 .It Pa /usr/share/misc/mdoc.template
3270 template for writing a man page
3272 .Sh SEE ALSO
3273 .Xr mdoc 7 ,
3274 .Xr man 1 ,
3275 .Xr troff 1
3276 .Sh BUGS
3277 Undesirable hyphenation on the dash of a flag
3278 argument is not yet resolved, and causes
3279 occasional mishaps in the
3280 .Sx DESCRIPTION
3281 section.
3282 (line break on the hyphen).
3284 Predefined strings are not declared in documentation.
3286 Section 3f has not been added to the header routines.
3288 .Ql \&.Nm
3289 font should be changed in
3290 .Sx NAME
3291 section.
3293 .Ql \&.Fn
3294 needs to have a check to prevent splitting up
3295 if the line length is too short.
3296 Occasionally it
3297 separates the last parenthesis, and sometimes
3298 looks ridiculous if a line is in fill mode.
3300 The method used to prevent header and footer page
3301 breaks (other than the initial header and footer) when using
3302 nroff occasionally places an unsightly partially filled line (blank)
3303 at the would be bottom of the page.
3305 If the outer-most list definition doesn't have a
3306 .Fl width
3307 argument, the
3308 .Ql ".It"
3309 elements of inner lists may not work (producing a list where
3310 each successive element
3311 .Sq walks
3312 to the right).
3314 The list and display macros to not do any keeps
3315 and certainly should be able to.
3316 .\" Note what happens if the parameter list overlaps a newline
3317 .\" boundary.
3318 .\" to make sure a line boundary is crossed:
3319 .\" .Bd -literal
3320 .\" \&.Fn struct\e\ dictionarytable\e\ *dictionarylookup struct\e\ dictionarytable\e\ *tab[]
3321 .\" .Ed
3322 .\" .Pp
3323 .\" produces, nudge nudge,
3324 .\" .Fn struct\ dictionarytable\ *dictionarylookup char\ *h struct\ dictionarytable\ *tab[] ,
3325 .\" .Fn struct\ dictionarytable\ *dictionarylookup char\ *h struct\ dictionarytable\ *tab[] ,
3326 .\" nudge
3327 .\" .Fn struct\ dictionarytable\ *dictionarylookup char\ *h struct\ dictionarytable\ *tab[] .
3328 .\" .Pp
3329 .\" If double quotes are used, for example:
3330 .\" .Bd -literal
3331 .\" \&.Fn \*qstruct dictionarytable *dictionarylookup\*q \*qchar *h\*q \*qstruct dictionarytable *tab[]\*q
3332 .\" .Ed
3333 .\" .Pp
3334 .\" produces, nudge nudge,
3335 .\" .Fn "struct dictionarytable *dictionarylookup" "char *h" "struct dictionarytable *tab[]" ,
3336 .\" nudge
3337 .\" .Fn "struct dictionarytable *dictionarylookup" "char *h" "struct dictionarytable *tab[]" ,
3338 .\" nudge
3339 .\" .Fn "struct dictionarytable *dictionarylookup" "char *h" "struct dictionarytable *tab[]" .
3340 .\" .Pp
3341 .\" Not a pretty sight...
3342 .\" In a paragraph, a long parameter containing unpaddable spaces as
3343 .\" in the former example will cause
3344 .\" .Xr troff
3345 .\" to break the line and spread
3346 .\" the remaining words out.
3347 .\" The latter example will adjust nicely to
3348 .\" justified margins, but may break in between an argument and its
3349 .\" declaration.
3350 .\" In
3351 .\" .Xr nroff
3352 .\" the right margin adjustment is normally ragged and the problem is
3353 .\" not as severe.