3 .\" A complete reference of the mdoc macro package for GNU troff.
5 .\" Based on NetBSD's mdoc.samples.7, version 1.21.
8 .\" Warning: You can't format this file with the old mdoc macros!
11 .\" Copyright (c) 1990, 1993
12 .\" The Regents of the University of California. All rights reserved.
14 .\" Redistribution and use in source and binary forms, with or without
15 .\" modification, are permitted provided that the following conditions
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.
23 .\" ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change]
24 .\" 4. Neither the name of the University nor the names of its contributors
25 .\" may be used to endorse or promote products derived from this software
26 .\" without specific prior written permission.
28 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
29 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
30 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
31 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
32 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
33 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
34 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
35 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
36 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
37 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
40 .\" @(#)mdoc.samples.7 8.2 (Berkeley) 12/30/93
42 .\" This reference invokes every macro in the package several
43 .\" times and is guaranteed to give a worst case performance
44 .\" for an already extremely slow package.
55 .Nd reference for groff's mdoc implementation
60 .Nm groff Fl m Ns Cm doc Ar
65 A complete reference for writing
73 formatting package for
78 package, addressed page layout leaving the manipulation of fonts and other
79 typesetting details to the individual author.
82 page layout macros make up the
83 .Em "page structure domain"
84 which consists of macros for titles, section headers, displays and lists
85 \- essentially items which affect the physical position of text on a
87 In addition to the page structure domain, there are two more domains, the
92 The general text domain is defined as macros which perform tasks such as
93 quoting or emphasizing pieces of text.
94 The manual domain is defined as macros that are a subset of the day to day
95 informal language used to describe commands, routines and related
98 Macros in the manual domain handle command names, command line arguments and
99 options, function names, function parameters, pathnames, variables, cross
100 references to other manual pages, and so on.
101 These domain items have value for both the author and the future user of the
103 Hopefully, the consistency gained across the manual set will provide easier
104 translation to future documentation tools.
108 manual pages, a manual entry is simply referred to as a man page, regardless
109 of actual length and without sexist intention.
112 .Sh "GETTING STARTED"
114 The material presented in the remainder of this document is outlined
117 .Bl -enum -width 3n -offset indent
119 . Tn "TROFF IDIOSYNCRASIES"
121 . Bl -tag -width 2n -compact
123 . It "Passing Space Characters in an Argument"
124 . It "Trailing Blank Space Characters"
125 . It "Escaping Special Characters"
126 . It "Other Possible Pitfalls"
130 . Tn "A MANUAL PAGE TEMPLATE"
139 . Tn "INTRODUCTION OF MANUAL AND GENERAL TEXT DOMAINS"
141 . Bl -tag -width 2n -compact
142 . It "What's in a Name" Ns ...
143 . It "General Syntax"
149 . Bl -tag -width 2n -compact
153 . It "Configuration Declarations (Section Four Only)"
154 . It "Command Modifiers"
155 . It "Defined Variables"
157 . It "Environment Variables"
159 . It "Function Declarations"
160 . It "Function Types"
161 . It "Functions (Library Routines)"
162 . It "Function Arguments"
165 . \" .It "Header File (including source code)"
166 . It "Interactive Commands"
173 . It "Variable Types"
175 . It "Manual Page Cross References"
179 . Tn "GENERAL TEXT DOMAIN"
181 . Bl -tag -width 2n -compact
186 . It "DragonFly Macro"
190 . It "Emphasis Macro"
192 . It "Enclosure and Quoting Macros"
193 . It "No-Op or Normal Text Macro"
194 . It "No-Space Macro"
195 . It "Section Cross References"
197 . It "Mathematical Symbols"
198 . It "References and Citations"
199 . It "Trade Names (or Acronyms and Type Names)"
200 . It "Extended Arguments"
204 . Tn "PAGE STRUCTURE DOMAIN"
206 . Bl -tag -width 2n -compact
207 . It "Section Headers"
208 . It "Subsection Headers"
209 . It "Paragraphs and Line Spacing"
211 . It "Examples and Displays"
212 . It "Lists and Columns"
216 . Tn "MISCELLANEOUS MACROS"
219 . Tn "PREDEFINED STRINGS"
225 . Tn "FORMATTING WITH GROFF, TROFF, AND NROFF"
242 .Sh "TROFF IDIOSYNCRASIES"
246 package attempts to simplify the process of writing a man page.
247 Theoretically, one should not have to learn the tricky details of
252 however, there are a few limitations which are unavoidable and best gotten
254 And, too, be forewarned, this package is
263 a macro is called by placing a
265 (dot character) at the beginning of a line followed by the two-character
266 (or three-character) name for the macro.
267 There can be space or tab characters between the dot and the macro name.
268 Arguments may follow the macro separated by spaces (but
271 It is the dot character at the beginning of the line which causes
274 to interpret the next two (or more) characters as a macro name.
275 A single starting dot followed by nothing is ignored.
278 (dot character) at the beginning of an input line in some context other than
279 a macro invocation, precede the
283 escape sequence which translates literally to a zero-width space, and is
284 never displayed in the output.
289 macros accept an unlimited number of arguments (contrary to other versions
290 of troff which can't handle more than nine arguments).
291 In limited cases, arguments may be continued or extended on the next
293 .Sx Extended Arguments
295 Almost all macros handle quoted arguments (see
296 .Sx Passing Space Characters in an Argument
301 general text domain and manual domain macros are special in that their
304 for callable macro names.
305 This means an argument on the argument list which matches a general text or
306 manual domain macro name (and which is defined to be callable) will be
307 executed or called when it is processed.
308 In this case the argument, although the name of a macro, is not preceded by
312 This makes it possible to nest macros; for example the option macro,
316 the flag and argument macros,
320 to specify an optional flag with an argument:
322 .Bl -tag -width ".Op Fl s Ar bytes" -offset indent
325 .Ql ".Op Fl s Ar bytes"
329 To prevent a string from being interpreted as a macro name, precede the
330 string with the escape sequence
333 .Bl -tag -width ".Op \&Fl s \&Ar bytes" -offset indent
334 .It Op \&Fl s \&Ar bytes
336 .Ql ".Op \e&Fl s \e&Ar bytes"
344 are not interpreted as macros.
345 Macros whose argument lists are parsed for callable arguments are referred
348 and macros which may be called from an argument list are referred to as
350 throughout this document.
353 as almost all of the macros in
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
360 In the following, we call an
362 macro which starts a line (with a leading dot) a
364 if this distinction is necessary.
366 .Ss "Passing Space Characters in an Argument"
368 Sometimes it is desirable to give as an argument a string containing one or
369 more blank space characters, say, to specify arguments to commands which
370 expect particular arrangement of items in the argument list.
371 Additionally, it makes
374 For example, the function command
376 expects the first argument to be the name of a function and any remaining
377 arguments to be function parameters.
380 stipulates the declaration of function parameters in the parenthesized
381 parameter list, each parameter is guaranteed to be at minimum a two word
386 There are two possible ways to pass an argument which contains
388 One way of passing a string containing blank spaces is to use the hard or
389 unpaddable space character
391 that is, a blank space preceded by the escape character
393 This method may be used with any macro but has the side effect of
394 interfering with the adjustment of text over the length of a line.
396 sees the hard space as if it were any other printable character and cannot
397 split the string into blank or newline separated pieces as one would expect.
398 This method is useful for strings which are not expected to overlap a line
400 An alternative is to use
402 a paddable (i.e.\& stretchable), unbreakable space (this is a
406 The second method is to enclose the string with double quotes.
410 .Bl -tag -width ".Fn fetch char\ *str" -offset indent
411 .It Fn fetch char\ *str
413 .Ql ".Fn fetch char\e *str"
414 .It Fn fetch "char *str"
415 can also be created by
416 .Ql ".Fn fetch \*[q]char *str\*[q]"
422 before the space in the first example
423 or double quotes in the second example
426 would see three arguments, and the result would be:
428 .Dl Fn fetch char *str
430 .\" For an example of what happens when the parameter list overlaps a newline
431 .\" boundary, see the
435 .Ss "Trailing Blank Space Characters"
438 can be confused by blank space characters at the end of a line.
439 It is a wise preventive measure to globally remove all blank spaces
441 .Ao blank-space Ac Ns Ao end-of-line Ac
443 Should the need arise to use a blank character at the end of a line, it
444 may be forced with an unpaddable space and the
450 .Ss "Escaping Special Characters"
452 Special characters like the newline character
454 are handled by replacing the
460 to preserve the backslash.
462 .Ss "Other Possible Pitfalls"
464 A warning is emitted when an empty input line is found outside of displays
469 (Well, it is even better to use
471 macros to avoid the usage of low-level commands.)
473 Leading spaces will cause a break and are output directly.
474 Avoid this behaviour if possible.
475 Similarly, do not use more than one space character between words in an
476 ordinary text line; contrary to other text formatters, they are
478 replaced with a single space.
482 directly as an argument.
491 inserts two space characters after a punctuation mark closing a sentence;
496 are treated transparently, not influencing the sentence-ending behaviour.
497 To change this, insert
499 before or after the dot:
501 .Bd -literal -offset indent
520 .Bd -filled -offset indent
537 As can be seen in the first and third line,
539 handles punctuation characters specially in macro arguments.
540 This will be explained in section
543 In the same way, you have to protect trailing full stops of abbreviations
544 with a trailing zero-width space:
547 A comment in the source file of a man page can be either started with
553 anywhere (the latter is a
556 extension); the rest of such a line is ignored.
559 .Sh "A MANUAL PAGE TEMPLATE"
561 The body of a man page is easily constructed from a basic template:
563 .Bd -literal -offset indent
564 \&.\e" The following commands are required for all man pages.
565 \&.Dd Month day, year
566 \&.Os [OPERATING_SYSTEM] [version/release]
567 \&.Dt DOCUMENT_TITLE [section number] [architecture/volume]
570 \&.Nd one line description of name
571 \&.\e" This next command is for sections 2 and 3 only.
575 \&.\e" The following commands should be uncommented and
576 \&.\e" used where appropriate.
577 \&.\e" .Sh IMPLEMENTATION NOTES
578 \&.\e" This next command is for sections 2, 3 and 9 function
579 \&.\e" return values only.
580 \&.\e" .Sh RETURN VALUES
581 \&.\e" This next command is for sections 1, 6, 7 and 8 only.
582 \&.\e" .Sh ENVIRONMENT
585 \&.\e" This next command is for sections 1, 6, 7, 8 and 9 only
586 \&.\e" (command return values (to shell) and
587 \&.\e" fprintf/stderr type diagnostics).
588 \&.\e" .Sh DIAGNOSTICS
589 \&.\e" .Sh COMPATIBILITY
590 \&.\e" This next command is for sections 2, 3 and 9 error
591 \&.\e" and signal handling only.
601 The first items in the template are the commands
606 the document date, the operating system the man page or subject source is
607 developed or modified for, and the man page title (in
609 along with the section of the manual the page belongs in.
610 These commands identify the page and are discussed below in
613 The remaining items in the template are section headers
621 The headers are discussed in
622 .Sx "PAGE STRUCTURE DOMAIN" ,
623 after presentation of
624 .Sx "MANUAL DOMAIN" .
625 Several content macros are used to demonstrate page layout macros; reading
626 about content macros before page layout macros is recommended.
631 In the description of all macros below, optional arguments are put into
635 represents zero or more additional arguments.
636 Alternative values for a parameter are separated with
638 If there are alternative values for a mandatory parameter, braces are used
641 to enclose the value set.
642 Meta-variables are specified within angles.
646 .Bl -tag -width 6n -offset indent
650 .Op \-test1 Op \-test2 | \-test3
656 Except stated explicitly, all macros are parsed and callable.
658 Note that a macro takes effect up to the next nested macro.
665 Consequently, a warning message is emitted for most commands if the first
666 argument is a macro itself since it cancels the effect of the calling
668 Another consequence is that quoting macros never insert literal quotes;
671 .Ql ".Ic \*[q]foo <bar>\*[q]" .
673 Most macros have a default width value which can be used to specify a label
683 It is recommended not to use this rather obscure feature to avoid
684 dependencies on local modifications of the
691 The title macros are part of the page structure domain but are presented
692 first and separately for someone who wishes to start writing a man page
694 Three header macros designate the document title or manual page title, the
695 operating system, and the date of authorship.
696 These macros are called once at the very beginning of the document and are
697 used to construct headers and footers only.
701 .Op Aq document title
702 .Op Aq section number
705 The document title is the subject of the man page and must be in
707 due to troff limitations.
711 The section number may be a number in the range
712 .No 1,\~ Ns ... Ns ,\~9
718 If it is specified, and no volume name is given, a default volume name is
723 .Tn \*[operating-system] ,
724 the following sections are defined:
726 .Bl -column LOCAL -offset indent -compact
727 .It Li 1 Ta "\*[volume-operating-system] \*[volume-ds-1]"
728 .It Li 2 Ta "\*[volume-operating-system] \*[volume-ds-2]"
729 .It Li 3 Ta "\*[volume-operating-system] \*[volume-ds-3]"
730 .It Li 4 Ta "\*[volume-operating-system] \*[volume-ds-4]"
731 .It Li 5 Ta "\*[volume-operating-system] \*[volume-ds-5]"
732 .It Li 6 Ta "\*[volume-operating-system] \*[volume-ds-6]"
733 .It Li 7 Ta "\*[volume-operating-system] \*[volume-ds-7]"
734 .It Li 8 Ta "\*[volume-operating-system] \*[volume-ds-8]"
735 .It Li 9 Ta "\*[volume-operating-system] \*[volume-ds-9]"
739 A volume name may be arbitrary or one of the following:
742 .Bl -column LOCAL -offset indent -compact
743 .It Li USD Ta "\*[volume-ds-USD]"
744 .It Li PS1 Ta "\*[volume-ds-PS1]"
745 .It Li AMD Ta "\*[volume-ds-AMD]"
746 .It Li SMM Ta "\*[volume-ds-SMM]"
747 .It Li URM Ta "\*[volume-ds-URM]"
748 .It Li PRM Ta "\*[volume-ds-PRM]"
749 .It Li KM Ta "\*[volume-ds-KM]"
750 .It Li IND Ta "\*[volume-ds-IND]"
751 .It Li LOCAL Ta "\*[volume-ds-LOCAL]"
752 .It Li CON Ta "\*[volume-ds-CON]"
764 Values from the previous table will specify a new volume name.
765 If the third parameter is a keyword designating a computer architecture,
766 its value is prepended to the default volume name as specified by the
768 By default, the following architecture keywords are defined:
770 \# we use `No' to avoid hyphenation
771 .Bd -ragged -offset indent
772 .No alpha , acorn26 , acorn32 , algor , amd64 , amiga , arc , arm26 ,
773 .No arm32 , atari , bebox , cats , cesfic , cobalt , dreamcast , evbarm ,
774 .No evbmips , evbppc , evbsh3 , hp300 , hp700 , hpcmips , i386 , luna68k ,
775 .No m68k , mac68k , macppc , mips , mmeye , mvme68k , mvmeppc , netwinder ,
776 .No news68k , newsmips , next68k , ofppc , pc532 , pmax , pmppc , powerpc ,
777 .No prep , sandpoint , sgimips , sh3 , shark , sparc , sparc64 , sun3 ,
778 .No tahoe , vax , x68k , x86_64
782 If the section number is neither a numeric expression in the range 1 to\~9
783 nor one of the above described keywords, the third parameter is used
784 verbatim as the volume name.
786 In the following examples, the left (which is identical to the right) and
787 the middle part of the manual page header strings are shown.
790 prevents the digit\~7 from being a valid numeric expression.
793 .Bl -tag -width ".Li .Dt\ FOO\ 2\ i386" -compact -offset indent
796 .Ql \*[volume-operating-system] \*[volume-ds-7]
797 .It Li ".Dt FOO 7 bar"
799 .Ql \*[volume-operating-system] \*[volume-ds-7]
800 .It Li ".Dt FOO \e&7 bar"
803 .It Li ".Dt FOO 2 i386"
805 .Ql \*[volume-operating-system]/\*[volume-as-i386] \*[volume-ds-2]
806 .It Li ".Dt FOO \*[q]\*[q] bar"
813 Local, OS-specific additions might be found in the file
815 look for strings named
817 (for the former type) and
819 (for the latter type);
821 then denotes the keyword to be used with the
825 This macro is neither callable nor parsed.
828 .Op Aq operating system
831 If the first parameter is empty,
833 .Sq Tn "\*[operating-system]"
835 This may be overridden in the local configuration file,
837 In general, the name of the operating system should be the common acronym,
842 The release should be the standard release nomenclature for the system
844 In the following table, the possible second arguments for some predefined
845 operating systems are listed.
848 local additions might be defined in
850 look for strings named
851 .Ql operating\-system\-XXX\-YYY ,
854 is the acronym for the operating system and
859 .Bl -tag -width ".No FreeBSD" -offset indent
861 7th, 7, III, 3, V, V.2, V.3, V.4
863 3, 4, 4.1, 4.2, 4.3, 4.3t, 4.3T, 4.3r, 4.3R, 4.4
865 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,
866 1.3, 1.3a, 1.4, 1.4.1, 1.4.2, 1.4.3, 1.5, 1.5.1, 1.5.2, 1.5.3, 1.6, 1.6.1,
867 1.6.2, 1.6.3, 2.0, 2.0.1, 2.0.2, 2.0.3, 2.1, 3.0, 3.0.1, 3.0.2, 3.1, 4.0,
870 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,
871 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,
872 4.1.1, 4.2, 4.3, 4.4, 4.5, 4.6, 4.6.2, 4.7, 4.8, 4.9, 4.10, 4.11, 5.0, 5.1,
873 5.2, 5.2.1, 5.3, 5.4, 5.5, 6.0, 6.1, 6.2, 6.3, 6.4, 7.0, 7.1
875 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.8, 1.8.1, 1.10, 1.12, 1.12.2, 2.0
877 8.0.0, 8.1.0, 8.2.0, 8.3.0, 8.4.0, 8.5.0, 8.6.0, 8.7.0, 8.8.0, 8.9.0,
878 8.10.0, 8.11.0, 9.0.0, 9.1.0, 9.2.0, 9.3.0, 9.4.0, 9.5.0, 9.6.0
885 an unknown second parameter will be replaced with the string
887 for the other predefined acronyms it will be ignored and a warning message
889 Unrecognized arguments are displayed as given in the page footer.
890 For instance, a typical footer might be:
895 .Ql 4.3\~Berkeley Distribution ,
896 or for a locally produced set
898 .Dl .Os CS Department
905 macro is not present, the bottom left corner of the manual page will be
908 This macro is neither callable nor parsed.
919 is used for the date string.
920 If it has exactly three arguments, they are concatenated, separated with
923 .Dl .Dd January 25, 2001
925 The month's name shall not be abbreviated.
927 With any other number of arguments, the current date is used, ignoring
930 This macro is neither callable nor parsed.
934 .Sh "INTRODUCTION OF MANUAL AND GENERAL TEXT DOMAINS"
936 .Ss "What's in a Name" Ns ...
938 The manual domain macro names are derived from the day to day informal
939 language used to describe commands, subroutines and related files.
940 Slightly different variations of this language are used to describe the
941 three different aspects of writing a man page.
942 First, there is the description of
945 Second is the description of a
950 macros, and third, the description of a command to a user in the verbal
951 sense; that is, discussion of a command in the text of a man page.
955 macros are themselves a type of command; the general syntax for a troff
958 .Bd -filled -offset indent
959 .Li ".Xx argument1 argument2" ...
964 is a macro command, and anything following it are arguments to
966 In the second case, the description of a
968 command using the content macros is a bit more involved; a typical
970 command line might be displayed as:
972 .Bd -filled -offset indent
975 .Ao Ar infile Ac Ao Ar outfile Ac
981 is the command name and the
986 argument designated as optional by the option brackets.
995 in this example, the user has to replace the meta expressions given in angle
996 brackets with real file names.
997 Note that in this document meta arguments are used to describe
999 commands; in most man pages, meta variables are not specifically written
1000 with angle brackets.
1001 The macros which formatted the above example:
1003 .Bd -literal -offset indent
1006 \&.Ao Ar infile Ac Ao Ar outfile Ac
1010 In the third case, discussion of commands and command syntax includes both
1011 examples above, but may add more detail.
1016 from the example above might be referred to as
1019 .Em file arguments .
1020 Some command line argument lists are quite long:
1023 .Bl -tag -width ".Nm make" -offset indent -compact
1026 .Op Fl D Ar variable
1028 .Op Fl f Ar makefile
1029 .Op Fl I Ar directory
1030 .Op Fl j Ar max_jobs
1031 .Op Ar variable Ns = Ns Ar value
1039 Here one might talk about the command
1041 and qualify the argument,
1043 as an argument to the flag,
1045 or discuss the optional file operand
1047 In the verbal context, such detail can prevent confusion, however the
1049 package does not have a macro for an argument
1054 argument macro is used for an operand or file argument like
1056 as well as an argument to a flag like
1058 The make command line was produced from:
1060 .Bd -literal -offset indent
1063 \&.Op Fl D Ar variable
1065 \&.Op Fl f Ar makefile
1066 \&.Op Fl I Ar directory
1067 \&.Op Fl j Ar max_jobs
1068 \&.Op Ar variable Ns = Ns Ar value
1079 macros are explained in
1082 .Ss "General Syntax"
1084 The manual domain and general text domain macros share a similar syntax with
1085 a few minor deviations; most notably,
1091 differ only when called without arguments; and
1095 impose an order on their argument lists.
1096 All content macros are capable of recognizing and properly handling
1097 punctuation, provided each punctuation character is separated by a leading
1099 If a command is given:
1101 .Dl \&.Ar sptr, ptr),
1107 The punctuation is not recognized and all is output in the
1110 If the punctuation is separated by a leading white space:
1112 .Dl \&.Ar "sptr , ptr ) ,"
1116 .Dl Ar sptr , ptr ) ,
1118 The punctuation is now recognized and output in the default font
1119 distinguishing it from the argument strings.
1120 To remove the special meaning from a punctuation character escape it with
1123 The following punctuation characters are recognized by
1126 .Bl -column -offset indent-two XXXXXX XXXXXX XXXXXX XXXXXX
1127 .It Li .\& Ta Li ,\& Ta Li :\& Ta Li ;\& Ta Li (\&
1128 .It Li )\& Ta Li [\& Ta Li ]\& Ta Li ?\& Ta Li !\&
1133 is limited as a macro language, and has difficulty when presented with a
1134 string containing a member of the mathematical, logical or quotation set:
1136 .Bd -literal -offset indent-two
1137 {+,\-,/,*,%,<,>,<=,>=,=,==,&,`,',"}
1143 may assume it is supposed to actually perform the operation or evaluation
1144 suggested by the characters.
1145 To prevent the accidental evaluation of these characters, escape them with
1147 Typical syntax is shown in the first content macro displayed below,
1155 The address macro identifies an address construct.
1157 .Dl Usage: .Ad Ao address Ac ...
1159 .Bl -tag -width ".Li .Ad\ f1\ ,\ f2\ ,\ f3\ :" -compact -offset 15n
1162 .It Li ".Ad addr1 ."
1164 .It Li ".Ad addr1 , file2"
1166 .It Li ".Ad f1 , f2 , f3 :"
1168 .It Li ".Ad addr ) ) ,"
1173 The default width is 12n.
1179 macro is used to specify the name of the author of the item being
1180 documented, or the name of the author of the actual manual page.
1182 .Dl Usage: .An Ao author name Ac ...
1184 .Bl -tag -width ".Li .An\ \*[q]Joe\ Author\*[q]\ )\ )\ ," -offset 15n
1185 .It Li ".An \*[q]Joe Author\*[q]"
1187 .It Li ".An \*[q]Joe Author\*[q] ,"
1189 .It Li ".An \*[q]Joe Author\*[q] Aq nobody@FreeBSD.org"
1190 .An "Joe Author" Aq nobody@FreeBSD.org
1191 .It Li ".An \*[q]Joe Author\*[q] ) ) ,"
1192 .An "Joe Author" ) ) ,
1196 The default width is 12n.
1202 command causes a line break allowing each new name to appear on its own
1204 If this is not desirable,
1206 .Bd -literal -offset indent
1211 call will turn this off.
1212 To turn splitting back on, write
1214 .Bd -literal -offset indent
1222 argument macro may be used whenever an argument is referenced.
1223 If called without arguments, the
1227 .Dl Usage: .Ar Oo Ao argument Ac Oc ...
1229 .Bl -tag -width ".Li .Ar\ file1\ file2" -compact -offset 15n
1234 .It Li ".Ar file1 ."
1236 .It Li ".Ar file1 file2"
1238 .It Li ".Ar f1 f2 f3 :"
1240 .It Li ".Ar file ) ) ,"
1245 The default width is 12n.
1247 .Ss "Configuration Declaration (Section Four Only)"
1251 macro is used to demonstrate a
1253 declaration for a device interface in a section four manual.
1255 .Dl Usage: .Cd Ao argument Ac ...
1257 .Bl -tag -width ".Li .Cd\ Xdevice\ le0\ at\ scode?X" -offset 15n
1258 .It Li ".Cd \*[q]device le0 at scode?\*[q]"
1259 .Cd "device le0 at scode?"
1266 command causes a line break before and after its arguments are printed.
1269 The default width is 12n.
1271 .Ss "Command Modifiers"
1273 The command modifier is identical to the
1275 (flag) command with the exception that the
1277 macro does not assert a dash in front of every argument.
1278 Traditionally flags are marked by the preceding dash, however, some commands
1279 or subsets of commands do not use them.
1280 Command modifiers may also be specified in conjunction with interactive
1281 commands such as editor commands.
1285 The default width is 10n.
1287 .Ss "Defined Variables"
1289 A variable (or constant) which is defined in an include file
1290 is specified by the macro
1293 .Dl Usage: .Dv Ao defined variable Ac ...
1295 .Bl -tag -width ".Li .Dv\ MAXHOSTNAMELEN" -compact -offset 15n
1296 .It Li ".Dv MAXHOSTNAMELEN"
1298 .It Li ".Dv TIOCGPGRP )"
1303 The default width is 12n.
1309 errno macro specifies the error return value for section 2, 3, and\~9 library
1311 The second example below shows
1315 general text domain macro, as it would be used in a section two manual page.
1317 .Dl Usage: .Er Ao errno type Ac ...
1319 .Bl -tag -width ".Li .Bq\ Er\ ENOTDIR" -compact -offset 15n
1322 .It Li ".Er ENOENT ) ;"
1324 .It Li ".Bq Er ENOTDIR"
1329 The default width is 17n.
1331 .Ss "Environment Variables"
1335 macro specifies an environment variable.
1337 .Dl Usage: .Ev Ao argument Ac ...
1339 .Bl -tag -width ".Li .Ev\ PRINTER\ )\ )\ ," -compact -offset 15n
1340 .It Li ".Ev DISPLAY"
1344 .It Li ".Ev PRINTER ) ) ,"
1349 The default width is 15n.
1355 macro handles command line flags.
1359 For interactive command flags, which are not prepended with a dash, the
1362 macro is identical, but without the dash.
1364 .Dl Usage: .Fl Ao argument Ac ...
1366 .Bl -tag -width ".Li .Fl\ xyz\ )\ ," -compact -offset 15n
1379 .It Li ".Fl xyz ) ,"
1387 macro without any arguments results in a dash representing stdin/stdout.
1390 a single dash will result in two dashes.
1392 The default width is 12n.
1394 .Ss "Function Declarations"
1398 macro is used in the
1400 section with section two or three functions.
1401 It is neither callable nor parsed.
1403 .Dl Usage: .Fd Ao argument Ac ...
1405 .Bl -tag -width ".Li .Fd\ X#include\ <sys/types.h>X" -compact -offset 15n
1406 .It Li ".Fd \*[q]#include <sys/types.h>\*[q]"
1407 .Fd "#include <sys/types.h>"
1414 command causes a line break if a function has already been presented and a
1415 break has not occurred.
1416 This leaves a nice vertical space in between the previous function call and
1417 the declaration for the next function.
1424 section, represents the
1426 statement, and is the short form of the above example.
1427 It specifies the C\~header file as being included in a C\~program.
1428 It also causes a line break.
1432 section, it represents the header file enclosed in angle brackets.
1434 .Dl Usage: .In Ao header file Ac
1436 .Bl -tag -width ".Li .In\ stdio.h" -compact -offset 15n
1437 .nr in-synopsis-section 1
1438 .It Li ".In stdio.h"
1440 .nr in-synopsis-section 0
1441 .It Li ".In stdio.h"
1445 .Ss "Function Types"
1447 This macro is intended for the
1450 It may be used anywhere else in the man page without problems, but its main
1451 purpose is to present the function type in kernel normal form for the
1453 of sections two and three (it causes a line break, allowing the function
1454 name to appear on the next line).
1456 .Dl Usage: .Ft Ao type Ac ...
1458 .Bl -tag -width ".Li .Ft\ struct\ stat" -compact -offset 15n
1459 .It Li ".Ft struct stat"
1463 .Ss "Functions (Library Routines)"
1471 .Dl Usage: .Fn Ao function Ac Oo Ao parameter Ac Oc ...
1473 .Bl -tag -width ".Li .Fn\ align\ Xchar\ *ptrX\ ," -compact -offset 15n
1474 .It Li ".Fn getchar"
1476 .It Li ".Fn strlen ) ,"
1478 .It Li ".Fn align \*[q]char *ptr\*[q] ,"
1479 .Fn align "char *ptr" ,
1482 Note that any call to another macro signals the end of the
1484 call (it will insert a closing parenthesis at that point).
1486 For functions with many parameters (which is rare), the macros
1494 (function argument).
1498 .Bd -literal -offset indent
1507 \&.Fa "struct rrec *newrr"
1516 .Bd -ragged -offset indent
1525 .Fa "struct rrec *newrr"
1534 section, the function will always begin at the beginning of line.
1535 If there is more than one function presented in the
1537 section and a function type has not been given, a line break will occur,
1538 leaving a nice vertical space between the current function name and the one
1541 The default width values of
1545 are 12n and 16n, respectively.
1547 .Ss "Function Arguments"
1551 macro is used to refer to function arguments (parameters) outside of the
1553 section of the manual or inside the
1555 section if the enclosure macros
1563 may also be used to refer to structure members.
1565 .Dl Usage: .Fa Ao function argument Ac ...
1567 .Bl -tag -width ".Li .Fa\ d_namlen\ )\ )\ ," -compact -offset 15n
1568 .It Li ".Fa d_namlen ) ) ,"
1570 .It Li ".Fa iov_len"
1575 The default width is 12n.
1581 macro generates text for use in the
1585 .Dl Usage: .Rv Oo \-std Oc Op Ao function Ac ...
1588 .Ql ".Rv \-std atexit"
1591 .Bd -ragged -offset -indent
1592 \# a small hack to suppress a warning message
1593 .ds section-old "\*[section]
1596 .ds section "\*[section-old]
1602 option is valid only for manual page sections\~2 and\~3.
1603 Currently, this macro does nothing if used without the
1611 macro generates text for use in the
1615 .Dl Usage: .Ex Oo \-std Oc Op Ao utility Ac ...
1621 .Bd -ragged -offset -indent
1622 \# a small hack to suppress a warning message
1623 .ds section-old "\*[section]
1626 .ds section "\*[section-old]
1632 option is valid only for manual page sections 1, 6 and\~8.
1633 Currently, this macro does nothing if used without the
1637 .Ss "Interactive Commands"
1641 macro designates an interactive or internal command.
1643 .Dl Usage: .Ic Ao argument Ac ...
1645 .Bl -tag -width ".Li .Ic\ setenv\ ,\ unsetenv" -compact -offset 15n
1648 .It Li ".Ic \*[q]do while {...}\*[q]"
1649 .Ic "do while {...}"
1650 .It Li ".Ic setenv , unsetenv"
1651 .Ic setenv , unsetenv
1655 The default width is 12n.
1661 macro is used to specify the library where a particular function is compiled
1664 .Dl Usage: .Lb Ao argument Ac ...
1666 Available arguments to
1668 and their results are:
1671 .Bl -tag -width ".Li libossaudio" -compact -offset indent
1739 Local, OS-specific additions might be found in the file
1741 look for strings named
1744 then denotes the keyword to be used with the
1752 command causes a line break before and after its arguments are printed.
1759 literal macro may be used for special characters, variable constants, etc.\&
1760 \- anything which should be displayed as it would be typed.
1762 .Dl Usage: .Li Ao argument Ac ...
1764 .Bl -tag -width ".Li .Li\ cntrl\-D\ )\ ," -compact -offset 15n
1767 .It Li ".Li M1 M2 M3 ;"
1769 .It Li ".Li cntrl\-D ) ,"
1771 .It Li ".Li 1024 ..."
1776 The default width is 16n.
1782 macro is used for the document title or subject name.
1783 It has the peculiarity of remembering the first argument it was called with,
1784 which should always be the subject name of the page.
1785 When called without arguments,
1787 regurgitates this initial name for the sole purpose of making less work for
1789 Note: A section two or three document function name is addressed with the
1797 and remaining sections.
1798 For interactive commands, such as the
1804 macro should be used.
1810 it can not recall the first argument it was invoked with.
1812 .Dl Usage: .Nm Oo Ao argument Ac Oc ...
1814 .Bl -tag -width ".Li .Nm\ groff_mdoc" -compact -offset 15n
1815 .It Li ".Nm groff_mdoc"
1817 .It Li ".Nm \e\-mdoc"
1819 .It Li ".Nm foo ) ) ,"
1826 The default width is 10n.
1832 macro places option brackets around any remaining arguments on the
1833 command line, and places any trailing punctuation outside the brackets.
1838 (which produce an opening and a closing option bracket respectively) may be used
1839 across one or more lines or to specify the exact position of the closing
1842 .Dl Usage: .Op Oo Ao option Ac Oc ...
1844 .Bl -tag -width ".Li .Op\ Fl\ c\ Ar\ objfil\ Op\ Ar\ corfil\ ," -compact -offset 15n
1849 .It Li ".Op Fl k ) ."
1851 .It Li ".Op Fl k Ar kookfile"
1852 .Op Fl k Ar kookfile
1853 .It Li ".Op Fl k Ar kookfile ,"
1854 .Op Fl k Ar kookfile ,
1855 .It Li ".Op Ar objfil Op Ar corfil"
1856 .Op Ar objfil Op Ar corfil
1857 .It Li ".Op Fl c Ar objfil Op Ar corfil ,"
1858 .Op Fl c Ar objfil Op Ar corfil ,
1859 .It Li ".Op word1 word2"
1861 .It Li ".Li .Op Oo Ao option Ac Oc ..."
1862 .Li .Op Oo Ao option Ac Oc ...
1865 Here a typical example of the
1871 .Bd -literal -offset indent
1873 \&.Op Fl k Ar kilobytes
1874 \&.Op Fl i Ar interval
1882 .Bd -filled -offset indent
1884 .Op Fl k Ar kilobytes
1885 .Op Fl i Ar interval
1891 The default width values of
1895 are 14n and 10n, respectively.
1901 macro formats path or file names.
1902 If called without arguments, the
1904 string is output, which represents the current user's home directory.
1906 .Dl Usage: .Pa Oo Ao pathname Ac Oc ...
1908 .Bl -tag -width ".Li .Pa\ /tmp/fooXXXXX\ )\ ." -compact -offset 15n
1911 .It Li ".Pa /usr/share"
1913 .It Li ".Pa /tmp/fooXXXXX ) ."
1914 .Pa /tmp/fooXXXXX ) .
1918 The default width is 32n.
1924 macro replaces standard abbreviations with their formal names.
1926 .Dl Usage: .St Ao abbreviation Ac ...
1929 .Dq Abbreviation/Formal Name
1935 .Bl -tag -width ".Li \-p1003.1g\-2000" -compact -offset indent
1952 .Bl -tag -width ".Li \-p1003.1g\-2000" -compact -offset indent
1953 .It Li \-iso9945\-1\-90
1955 .It Li \-iso9945\-1\-96
1959 .It Li \-p1003.1\-88
1961 .It Li \-p1003.1\-90
1963 .It Li \-p1003.1\-96
1965 .It Li \-p1003.1b\-93
1967 .It Li \-p1003.1c\-95
1969 .It Li \-p1003.1g\-2000
1971 .It Li \-p1003.1i\-95
1973 .It Li \-p1003.1\-2001
1975 .It Li \-p1003.1\-2004
1981 Part 2: Shell and Utilities
1983 .Bl -tag -width ".Li \-p1003.1g\-2000" -compact -offset indent
1984 .It Li \-iso9945\-2\-93
1988 .It Li \-p1003.2\-92
1990 .It Li \-p1003.2a\-92
1996 .Bl -tag -width ".Li \-p1003.1g\-2000" -compact -offset indent
2027 .Bl -tag -width ".Li \-p1003.1g\-2000" -compact -offset indent
2034 .Ss "Variable Types"
2038 macro may be used whenever a type is referenced.
2041 section, it causes a line break (useful for old style variable declarations).
2043 .Dl Usage: .Vt Ao type Ac ...
2045 .Bl -tag -width ".Li .Vt\ extern\ char\ *optarg\ ;" -compact -offset 15n
2046 .It Li ".Vt extern char *optarg ;"
2047 .Vt extern char *optarg ;
2054 Generic variable reference.
2056 .Dl Usage: .Va Ao variable Ac ...
2058 .Bl -tag -width ".Li .Va\ Xchar\ sX\ ]\ )\ )\ ," -compact -offset 15n
2061 .It Li ".Va settimer ,"
2063 .It Li ".Va \*[q]int *prt\*[q] ) :"
2065 .It Li ".Va \*[q]char s\*[q] ] ) ) ,"
2066 .Va "char s" ] ) ) ,
2070 The default width is 12n.
2072 .Ss "Manual Page Cross References"
2076 macro expects the first argument to be a manual page name.
2077 The optional second argument, if a string (defining the manual section), is
2078 put into parentheses.
2080 .Dl Usage: .Xr Ao man page name Ac Oo Ao section Ac Oc ...
2082 .Bl -tag -width ".Li .Xr\ xinit\ 1x\ ;" -compact -offset 15n
2089 .It Li ".Xr xinit 1x ;"
2094 The default width is 10n.
2097 .Sh "GENERAL TEXT DOMAIN"
2102 .Dl Usage: .At Oo Ao version Ac Oc ...
2104 .Bl -tag -width ".Li .At\ v6\ ." -compact -offset 15n
2111 The following values for
2115 .Dl 32v, v1, v2, v3, v4, v5, v6, v7, V, V.1, V.2, V.3, V.4
2120 .Dl "Usage: .Bx" Bro \-alpha | \-beta | \-devel Brc ...
2121 .Dl " .Bx" Oo Ao version Ac Oo Ao release Ac Oc Oc ...
2123 .Bl -tag -width ".Li .Bx\ -devel" -compact -offset 15n
2128 .It Li ".Bx \-devel"
2133 will be prepended to the string
2135 The following values for
2139 .Dl Reno, reno, Tahoe, tahoe, Lite, lite, Lite2, lite2
2144 .Dl Usage: .Nx Oo Ao version Ac Oc ...
2146 .Bl -tag -width ".Li .Nx\ 1.4\ ." -compact -offset 15n
2153 For possible values of
2155 see the description of the
2157 command above in section
2158 .Sx "TITLE MACROS" .
2163 .Dl Usage: .Fx Oo Ao version Ac Oc ...
2165 .Bl -tag -width ".Li .Fx\ 2.2\ ." -compact -offset 15n
2172 For possible values of
2174 see the description of the
2176 command above in section
2177 .Sx "TITLE MACROS" .
2179 .Ss "DragonFly Macro"
2182 .Dl Usage: .Dx Oo Ao version Ac Oc ...
2184 .Bl -tag -width ".Li .Dx\ 1.4\ ." -compact -offset 15n
2191 For possible values of
2193 see the description of the
2195 command above in section
2196 .Sx "TITLE MACROS" .
2201 .Dl Usage: .Ox Oo Ao version Ac Oc ...
2203 .Bl -tag -width ".Li .Ox\ 1.0" -compact -offset 15n
2211 .Dl Usage: .Bsx Oo Ao version Ac Oc ...
2213 .Bl -tag -width ".Li .Bsx\ 1.0" -compact -offset 15n
2223 .Bl -tag -width ".Li .Ux" -compact -offset 15n
2228 .Ss "Emphasis Macro"
2230 Text may be stressed or emphasized with the
2233 The usual font for emphasis is italic.
2235 .Dl Usage: .Em Ao argument Ac ...
2237 .Bl -tag -width ".Li .Em\ vide\ infra\ )\ )\ ," -compact -offset 15n
2238 .It Li ".Em does not"
2240 .It Li ".Em exceed 1024 ."
2242 .It Li ".Em vide infra ) ) ,"
2243 .Em vide infra ) ) ,
2247 The default width is 10n.
2253 font mode must be ended with the
2255 macro (the latter takes no arguments).
2256 Font modes may be nested within other font modes.
2259 has the following syntax:
2261 .Dl .Bf Ao font mode Ac
2264 must be one of the following three types:
2266 .Bl -tag -width ".Sy \&Sy | Fl symbolic" -compact -offset indent
2267 .It Sy \&Em | Fl emphasis
2270 macro was used for the entire block of text.
2271 .It Sy \&Li | Fl literal
2274 macro was used for the entire block of text.
2275 .It Sy \&Sy | Fl symbolic
2278 macro was used for the entire block of text.
2281 Both macros are neither callable nor parsed.
2283 .Ss "Enclosure and Quoting Macros"
2285 The concept of enclosure is similar to quoting.
2286 The object being to enclose one or more strings between a pair of characters
2287 like quotes or parentheses.
2288 The terms quoting and enclosure are used interchangeably throughout this
2290 Most of the one-line enclosure macros end in small letter
2292 to give a hint of quoting, but there are a few irregularities.
2293 For each enclosure macro there is also a pair of open and close macros which
2294 end in small letters
2304 .Bd -filled -offset 4n
2305 .Bl -column "quote" "close" "open" "Angle Bracket Enclosure" "`string' or string"
2306 .Em Quote Ta Em Open Ta Em Close Ta Em Function Ta Em Result
2307 .No .Aq Ta .Ao Ta .Ac Ta "Angle Bracket Enclosure" Ta Ao string Ac
2308 .No .Bq Ta .Bo Ta .Bc Ta "Bracket Enclosure" Ta Bo string Bc
2309 .No .Brq Ta .Bro Ta .Brc Ta "Brace Enclosure" Ta Bro string Brc
2310 .No .Dq Ta .Do Ta .Dc Ta "Double Quote" Ta Do string Dc
2311 .No .Eq Ta .Eo Ta .Ec Ta "Enclose String (in XX)" Ta XXstringXX
2312 .No .Pq Ta .Po Ta .Pc Ta "Parenthesis Enclosure" Ta Po string Pc
2313 .No .Ql Ta Ta Ta "Quoted Literal" Ta So string Sc or Li string
2314 .No .Qq Ta .Qo Ta .Qc Ta "Straight Double Quote" Ta Qo string Qc
2315 .No .Sq Ta .So Ta .Sc Ta "Single Quote" Ta So string Sc
2319 All macros ending with
2323 have a default width value of 12n.
2325 .Bl -tag -width ".Li .Ec , .Eo"
2327 These macros expect the first argument to be the opening and closing strings
2330 Due to the nine-argument limit in the original troff program two other
2331 macros have been implemented which are now rather obsolete:
2333 takes the first and second parameter as the left and right enclosure string,
2334 which are then used to enclose the arguments of
2336 The default width value is 12n for both macros.
2338 The first and second arguments of this macro are the opening and
2339 closing strings respectively, followed by the arguments to be enclosed.
2341 The quoted literal macro behaves differently in troff and nroff mode.
2344 a quoted literal is always quoted.
2345 If formatted with troff, an item is only quoted if the width of the item is
2346 less than three constant width characters.
2347 This is to make short strings more visible where the font change to literal
2348 (constant width) is less noticeable.
2350 The default width is 16n.
2352 The prefix macro suppresses the whitespace between its first and second
2355 .Bl -tag -width ".Li .Pf\ (\ Fa\ name2" -offset indent
2356 .It Li ".Pf ( Fa name2"
2361 The default width is 12n.
2365 macro (see below) performs the analogous suffix function.
2369 macro inserts an apostrophe and exits any special text modes, continuing in
2375 Examples of quoting:
2378 .Bl -tag -width ".Li .Bq\ Em\ Greek\ ,\ French\ ." -compact -offset indent
2381 .It Li ".Aq Pa ctype.h ) ,"
2385 .It Li ".Bq Em Greek , French ."
2386 .Bq Em Greek , French .
2389 .It Li ".Dq string abc ."
2391 .It Li ".Dq \'^[A\-Z]\'"
2393 .It Li ".Ql man mdoc"
2397 .It Li ".Qq string ) ,"
2399 .It Li ".Qq string Ns ),"
2405 .It Li ".Em or Ap ing"
2410 For a good example of nested enclosure macros, see the
2413 It was created from the same underlying enclosure macros as those presented
2419 extended argument list macros are discussed below.
2421 .Ss "No-Op or Normal Text Macro"
2425 macro can be used in a macro command line for parameters which should
2432 if you really want that English word (and not the macro) as a parameter.
2434 .Dl Usage: .No Ao argument Ac ...
2436 .Bl -tag -width ".Li .No\ test\ Ta\ with\ Ta\ tabs" -compact -offset 15n
2437 .It Li ".No test Ta with Ta tabs"
2438 .No test Ta with Ta tabs
2442 The default width is 12n.
2444 .Ss "No-Space Macro"
2448 macro suppresses insertion of a space between the current position and its
2450 For example, it is useful for old style argument lists where there is no
2451 space between the flag and argument:
2453 .Dl "Usage:" ... Ao argument Ac \&Ns Oo Ao argument Ac Oc ...
2454 .Dl " " .Ns Ao argument Ac ...
2456 .Bl -tag -width ".Li .Op\ Fl\ I\ Ns\ Ar\ directory" -compact -offset 15n
2457 .It Li ".Op Fl I Ns Ar directory"
2458 .Op Fl I Ns Ar directory
2463 macro always invokes the
2465 macro after eliminating the space unless another macro name follows it.
2466 If used as a command (i.e., the second form above in the
2473 .Ss "Section Cross References"
2477 macro designates a reference to a section header within the same document.
2479 .Dl Usage: .Sx Ao section reference Ac ...
2481 .Bl -tag -width ".Li .Sx\ FILES" -offset 15n
2487 The default width is 16n.
2491 The symbolic emphasis macro is generally a boldface macro in either the
2492 symbolic sense or the traditional English usage.
2494 .Dl Usage: .Sy Ao symbol Ac ...
2496 .Bl -tag -width ".Li .Sy\ Important\ Notice" -compact -offset 15n
2497 .It Li ".Sy Important Notice"
2498 .Sy Important Notice
2502 The default width is 6n.
2504 .Ss Mathematical Symbols
2506 Use this macro for mathematical symbols and similar things.
2508 .Dl Usage: .Ms Ao math symbol Ac ...
2510 .Bl -tag -width ".Li .Ms\ sigma" -compact -offset 15n
2516 The default width is 6n.
2518 .Ss "References and Citations"
2520 The following macros make a modest attempt to handle references.
2521 At best, the macros make it convenient to manually drop in a subset of
2525 .Bl -tag -width 6n -offset indent -compact
2527 Reference start (does not take arguments).
2528 Causes a line break in the
2530 section and begins collection of reference information until the reference
2533 Reference end (does not take arguments).
2534 The reference is printed.
2536 Reference author name; one name per invocation.
2540 City/place (not implemented yet).
2544 Issuer/publisher name.
2550 Optional information.
2554 Corporate or foreign author.
2560 Optional hypertext reference.
2565 Macros beginning with
2567 are not callable but accept multiple arguments in the usual way.
2570 macro is handled properly as a parameter; other macros will cause strange
2575 can be used outside of the
2581 .Bd -literal -offset indent
2585 \&.%T "Implementation Notes on foobar(1)"
2586 \&.%R "Technical Report ABC\-DE\-12\-345"
2587 \&.%Q "Drofnats College, Nowhere"
2594 .Bd -ragged -offset indent
2598 .%T "Implementation Notes on foobar(1)"
2599 .%R "Technical Report ABC-DE-12-345"
2600 .%Q "Drofnats College, Nowhere"
2605 .Ss "Trade Names (or Acronyms and Type Names)"
2607 The trade name macro prints its arguments in a smaller font.
2608 Its intended use is to imitate a small caps fonts for uppercase acronyms.
2610 .Dl Usage: .Tn Ao symbol Ac ...
2612 .Bl -tag -width ".Li .Tn\ ASCII" -compact -offset 15n
2620 The default width is 10n.
2622 .Ss "Extended Arguments"
2628 macros allow one to extend an argument list on a macro boundary for the
2635 are implemented similarly to all other macros opening and closing an
2636 enclosure (without inserting characters, of course).
2637 This means that the following is true for those macros also.
2639 Here is an example of
2641 using the space mode macro to turn spacing off:
2643 .Bd -literal -offset indent
2645 \&.It Xo Sy I Ar operation
2646 \&.No \een Ar count No \een
2654 .Bd -filled -offset indent
2657 .It Xo Sy I Ar operation
2658 .No \en Ar count No \en
2667 .Bd -literal -offset indent
2669 \&.It Cm S No / Ar old_pattern Xo
2670 \&.No / Ar new_pattern
2679 .Bd -filled -offset indent
2682 .It Cm S No \&/ Ar old_pattern Xo
2683 .No \&/ Ar new_pattern
2693 and enclosure macros: Test the value of a variable.
2695 .Bd -literal -offset indent
2698 \&.Oo \e&! Oc Ns Ar variable Oo
2699 \&.Ar operator variable ...
2706 .Bd -filled -offset indent
2707 .Bl -tag -width flag -compact
2710 .Oo \&! Oc Ns Ar variable Oo
2711 .Ar operator variable ...
2718 .Sh "PAGE STRUCTURE DOMAIN"
2720 .Ss "Section Headers"
2724 section header macros are required in every man page.
2725 The remaining section headers are recommended at the discretion of the
2726 author writing the manual page.
2729 macro is parsed but not generally callable.
2730 It can be used as an argument in a call to
2732 only; it then reactivates the default font for
2735 The default width is 8n.
2737 .Bl -tag -width ".Li .Sh\ RETURN\ VALUES"
2742 If not specified, headers, footers and page layout defaults will not be set
2743 and things will be rather unpleasant.
2746 section consists of at least three items.
2749 name macro naming the subject of the man page.
2750 The second is the name description macro,
2752 which separates the subject name from the third item, which is the
2754 The description should be the most terse and lucid possible, as the space
2760 then all its arguments.
2762 .It Li ".Sh LIBRARY"
2763 This section is for section two and three function calls.
2764 It should consist of a single
2768 .Sx "Library Names" .
2770 .It Li ".Sh SYNOPSIS"
2773 section describes the typical usage of the subject of a man page.
2774 The macros required are either
2785 The function name macro
2787 is required for manual page sections\~2 and\~3; the command and general name
2790 is required for sections 1, 5, 6, 7, and\~8.
2791 Section\~4 manuals require a
2796 configuration device usage macro.
2797 Several other macros may be necessary to produce the synopsis line as shown
2800 .Bd -filled -offset indent
2808 The following macros were used:
2811 .Dl ".Op Fl benstuv"
2815 .It Li ".Sh DESCRIPTION"
2816 In most cases the first text in the
2818 section is a brief paragraph on the command, function or file, followed by a
2819 lexical list of options and respective explanations.
2820 To create such a list, the
2827 macros are used (see
2828 .Sx Lists and Columns
2831 .It Li ".Sh IMPLEMENTATION NOTES"
2832 Implementation specific information should be placed here.
2834 .It Li ".Sh RETURN VALUES"
2835 Sections 2, 3 and\~9 function return values should go here.
2838 macro may be used to generate text for use in the
2840 section for most section 2 and 3 library functions;
2842 .Sx "Return Values" .
2848 section headers are part of the preferred manual page layout and must be
2849 used appropriately to maintain consistency.
2850 They are listed in the order in which they would be used.
2852 .Bl -tag -width ".Li .Sh\ COMPATIBILITY"
2853 .It Li ".Sh ENVIRONMENT"
2856 section should reveal any related environment variables and clues to their
2857 behavior and/or usage.
2860 Files which are used or created by the man page subject should be listed via
2867 .It Li ".Sh EXAMPLES"
2868 There are several ways to create examples.
2871 section below for details.
2873 .It Li ".Sh DIAGNOSTICS"
2874 Diagnostic messages from a command should be placed in this section.
2877 macro may be used to generate text for use in the
2879 section for most section 1, 6 and\~8 commands;
2883 .It Li ".Sh COMPATIBILITY"
2884 Known compatibility issues (e.g. deprecated options or parameters)
2885 should be listed here.
2888 Specific error handling, especially from library functions (man page
2889 sections 2, 3, and\~9) should go here.
2892 macro is used to specify an error (errno).
2894 .It Li ".Sh SEE ALSO"
2895 References to other material on the man page topic and cross references to
2896 other relevant man pages should be placed in the
2899 Cross references are specified using the
2904 style references are not accommodated.
2906 It is recommended that the cross references are sorted on the section
2907 number, then alphabetically on the names within a section, and placed
2908 in that order and comma separated.
2916 .It Li ".Sh STANDARDS"
2917 If the command, library function or file adheres to a specific
2918 implementation such as
2922 this should be noted here.
2923 If the command does not adhere to any standard, its history should be noted
2928 .It Li ".Sh HISTORY"
2929 Any command which does not adhere to any specific standards should be
2930 outlined historically in this section.
2932 .It Li ".Sh AUTHORS"
2933 Credits should be placed here.
2936 macro for names and the
2938 macro for e-mail addresses within optional contact information.
2939 Explicitly indicate whether the person authored the initial manual page
2940 or the software or whatever the person is being credited for.
2942 Blatant problems with the topic go here.
2948 sections may be added; for example, this section was set with:
2950 .Bd -literal -offset 15n
2951 \&.Sh "PAGE STRUCTURE DOMAIN"
2954 .Ss "Subsection Headers"
2956 Subsection headers have exactly the same syntax as section headers:
2958 is parsed but not generally callable.
2959 It can be used as an argument in a call to
2961 only; it then reactivates the default font for
2964 The default width is 8n.
2966 .Ss "Paragraphs and Line Spacing"
2968 .Bl -tag -width ".Li .Pp"
2972 paragraph command may be used to specify a line space where necessary.
2973 The macro is not necessary after a
2981 macro (which both assert a vertical distance unless the
2985 The macro is neither callable nor parsed and takes no arguments; an
2992 .\" This worked with version one, need to redo for version three
2995 .\" .Cw (ax+bx+c) \ is\ produced\ by\ \&
2996 .\" .\".Cw (ax+bx+c) \&.Va_by_) \&_and_\& \&[?/]m_b1_e1_f1[?/]\&
3013 .\" .Em is produced by
3029 .\" This example shows the same equation in a different format.
3033 .\" signs were forced with
3037 .\" .Cw (ax\ +\ bx\ +\ c) \ is\ produced\ by\ \&
3038 .\" .\".Cw (ax+bx+c) \&.Va_by_) \&_and_\& \&[?/]m_b1_e1_f1[?/]\&
3049 .\" .Li \&.Cx \e\ +\e\ \e&
3060 .\" .Em is produced by
3068 .\" .Li \&.Cx \e\ +\e\ \e&
3079 .\" The incantation below was
3085 .\" .Cw \&[?/]m_b1_e1_f1[?/]\& is\ produced\ by
3087 .\" .Li \&.Cx Op Sy ?/
3097 .\" .Em is produced by
3099 .\" .Li \&.Ar \e\ b1 e1 f1
3113 The only keep that is implemented at this time is for words.
3120 The only option that
3122 accepts currently is
3124 (this is also the default if no option is given) which is useful for
3125 preventing line breaks in the middle of options.
3126 In the example for the make command line arguments (see
3127 .Sx What's in a Name ) ,
3130 from placing up the flag and the argument on separate lines.
3132 Both macros are neither callable nor parsed.
3134 More work needs to be done with the keep macros; specifically, a
3136 option should be added.
3138 .Ss "Examples and Displays"
3140 There are seven types of displays.
3142 .Bl -tag -width ".Li .D1"
3145 Display one line of indented text.
3146 This macro is parsed but not callable.
3150 The above was produced by:
3151 .Li ".D1 Fl ldghfstru" .
3155 Display one line of indented
3160 example macro has been used throughout this file.
3161 It allows the indentation (display) of one line of text.
3162 Its default font is set to constant width (literal).
3164 is parsed but not callable.
3166 .Dl % ls \-ldg /usr/local/bin
3168 The above was produced by:
3169 .Li ".Dl % ls \e\-ldg /usr/local/bin" .
3175 display must be ended with the
3178 It has the following syntax:
3180 .Bd -ragged -compact
3181 .Bl -tag -width ".Li .Bd" -offset indent
3183 .Bro \-literal | \-filled | \-unfilled | \-ragged | \-centered Brc
3184 .Oo \-offset Ao string Ac Oc Oo \-file Ao file name Ac Oc Oo \-compact Oc Xc
3189 .Bl -tag -width ".Fl file Ao Ar file name Ac " -compact
3191 Fill, but do not adjust the right margin (only left-justify).
3193 Center lines between the current left and right margin.
3194 Note that each single line is centered.
3196 Do not fill; display a block of text as typed, using line breaks as
3197 specified by the user.
3198 This can produce overlong lines without warning messages.
3200 Display a filled block.
3201 The block of text is formatted (i.e., the text is justified on both the left
3204 Display block with literal font (usually fixed-width).
3205 Useful for source code or simple tabbed or spaced text.
3206 .It Fl file Ao Ar file name Ac
3207 The file whose name follows the
3209 flag is read and displayed before any data enclosed with
3213 using the selected display type.
3215 .Xr troff/ Ns Nm \-mdoc
3216 commands in the file will be processed.
3217 .It Fl offset Ao Ar string Ac
3220 is specified with one of the following strings, the string is interpreted to
3221 indicate the level of indentation for the forthcoming block of text:
3224 .Bl -tag -width ".Ar indent-two" -compact
3226 Align block on the current left margin; this is the default mode of
3229 Supposedly center the block.
3230 At this time unfortunately, the block merely gets left aligned about an
3231 imaginary center margin.
3233 Indent by one default indent value or tab.
3234 The default indent value is also used for the
3238 macros, so one is guaranteed the two types of displays will line up.
3239 The indentation value is normally set to\~6n or about two thirds of an inch
3240 (six constant width characters).
3242 Indent two times the default indent value.
3246 aligns the block about two inches from the right side of the page.
3247 This macro needs work and perhaps may never do the right thing within
3254 is a valid numeric expression instead
3255 .Pf ( Em with a scale indicator other than
3257 use that value for indentation.
3258 The most useful scale indicators are
3262 specifying the so-called
3266 This is approximately the width of the letters
3271 of the current font (for nroff output, both scale indicators give the same
3275 isn't a numeric expression, it is tested whether it is an
3277 macro name, and the default offset value associated with this macro is used.
3278 Finally, if all tests fail,
3281 (typeset with a fixed-width font) is taken as the offset.
3283 Suppress insertion of vertical space before begin of display.
3287 End display (takes no arguments).
3290 .Ss "Lists and Columns"
3292 There are several types of lists which may be initiated with the
3295 Items within the list are specified with the
3297 item macro, and each list must end with the
3300 Lists may be nested within themselves and within displays.
3301 The use of columns inside of lists or lists inside of columns is unproven.
3303 In addition, several list attributes may be specified such as the width of a
3304 tag, the list offset, and compactness (blank lines between items allowed or
3306 Most of this document has been formatted with a tag style list
3309 It has the following syntax forms:
3312 .Bd -ragged -compact
3313 .Bl -tag -width ".Li .Bl" -offset indent -compact
3315 .Bro \-hang | \-ohang | \-tag | \-diag | \-inset Brc
3316 .Oo \-width Ao string Ac Oc
3317 .Oo \-offset Ao string Ac Oc Oo \-compact Oc Xc
3319 .No \-column Oo \-offset Ao string Ac Oc
3320 .Ao string1 Ac Ao string2 Ac ... Xc
3322 .Bro \-item | \-enum Oo \-nested Oc | \-bullet | \-hyphen | \-dash Brc
3323 .Oo \-offset Ao string Ac Oc Oo \-compact Oc Xc
3328 And now a detailed description of the list types.
3331 .Bl -tag -width ".Fl column" -compact
3335 .Bd -literal -offset indent
3336 \&.Bl \-bullet \-offset indent \-compact
3338 Bullet one goes here.
3348 .Bl -bullet -offset indent -compact
3350 Bullet one goes here.
3356 .It Fl dash No ( or Fl hyphen )
3359 .Bd -literal -offset indent
3360 \&.Bl \-dash \-offset indent \-compact
3372 .Bl -dash -offset indent -compact
3383 .Bd -literal -offset indent
3384 \&.Bl \-enum \-offset indent \-compact
3396 .Bl -enum -offset indent -compact
3404 If you want to nest enumerated lists, use the
3406 flag (starting with the second-level list):
3408 .Bd -literal -offset indent
3409 \&.Bl \-enum \-offset indent \-compact
3412 \&.Bl \-enum \-nested \-compact
3416 And item three here.
3427 .Bl -enum -offset indent -compact
3430 .Bl -enum -nested -compact
3434 And item three here.
3444 without list markers.
3446 .Bd -literal -offset indent
3447 \&.Bl \-item \-offset indent
3463 .Bl -item -offset indent
3479 to specify the tag width.
3482 .Bl -tag -width "PPID" -compact -offset indent
3484 sleep time of the process (seconds blocked)
3488 resulting from references by the process
3489 to pages not loaded in core.
3491 numerical user-id of process owner
3493 numerical id of parent of process priority
3494 (non-positive when in non-interruptible wait)
3500 .Bd -literal -offset indent
3501 \&.Bl \-tag \-width "PPID" \-compact \-offset indent
3503 sleep time of the process (seconds blocked)
3507 resulting from references by the process
3508 to pages not loaded in core.
3510 numerical user\-id of process owner
3512 numerical id of parent of process priority
3513 (non\-positive when in non\-interruptible wait)
3519 Diag lists create section four diagnostic lists and are similar to inset
3520 lists except callable macros are ignored.
3523 flag is not meaningful in this context.
3527 .Bd -literal -offset indent
3529 \&.It You can't use Sy here.
3530 The message says all.
3538 .It You can't use Sy here.
3539 The message says all.
3544 A list with hanging tags.
3546 .Bl -hang -offset indent
3548 labels appear similar to tagged lists when the
3549 label is smaller than the label width.
3550 .It Em Longer hanged list labels
3551 blend into the paragraph unlike
3552 tagged paragraph labels.
3555 And the unformatted text which created it:
3557 .Bd -literal -offset indent
3558 \&.Bl \-hang \-offset indent
3560 labels appear similar to tagged lists when the
3561 label is smaller than the label width.
3562 \&.It Em Longer hanged list labels
3563 blend into the paragraph unlike
3564 tagged paragraph labels.
3570 Lists with overhanging tags do not use indentation for the items; tags are
3571 written to a separate line.
3573 .Bl -ohang -offset indent
3575 sleep time of the process (seconds blocked)
3579 resulting from references by the process
3580 to pages not loaded in core.
3582 numerical user-id of process owner
3584 numerical id of parent of process priority
3585 (non-positive when in non-interruptible wait)
3591 .Bd -literal -offset indent
3592 \&.Bl \-ohang \-offset indent
3594 sleep time of the process (seconds blocked)
3598 resulting from references by the process
3599 to pages not loaded in core.
3601 numerical user\-id of process owner
3603 numerical id of parent of process priority
3604 (non\-positive when in non\-interruptible wait)
3610 Here is an example of inset labels:
3611 .Bl -inset -offset indent
3613 The tagged list (also called a tagged paragraph)
3614 is the most common type of list used in the
3618 attribute as described below.
3620 Diag lists create section four diagnostic lists
3621 and are similar to inset lists except callable
3624 Hanged labels are a matter of taste.
3626 Overhanging labels are nice when space is constrained.
3628 Inset labels are useful for controlling blocks of
3629 paragraphs and are valuable for converting
3631 manuals to other formats.
3634 Here is the source text which produced the above example:
3636 .Bd -literal -offset indent
3637 \&.Bl \-inset \-offset indent
3639 The tagged list (also called a tagged paragraph)
3640 is the most common type of list used in the
3643 Diag lists create section four diagnostic lists
3644 and are similar to inset lists except callable
3647 Hanged labels are a matter of taste.
3649 Overhanging labels are nice when space is constrained.
3651 Inset labels are useful for controlling blocks of
3652 paragraphs and are valuable for converting
3654 manuals to other formats.
3660 This list type generates multiple columns.
3661 The number of columns and the width of each column is determined by the
3672 (dot) immediately followed by a valid
3674 macro name, interpret
3676 and use the width of the result.
3677 Otherwise, the width of
3679 (typeset with a fixed-width font) is taken as the
3685 argument is parsed to make a row, each column within the row is a separate
3686 argument separated by a tab or the
3692 .Bl -column -offset indent ".Sy String" ".Sy Nroff" ".Sy Troff"
3693 .It Sy String Ta Sy Nroff Ta Sy Troff
3694 .It Li <= Ta <= Ta \*(<=
3695 .It Li >= Ta >= Ta \*(>=
3702 \&.Bl \-column \-offset indent ".Sy String" ".Sy Nroff" ".Sy Troff"
3703 \&.It Sy String Ta Sy Nroff Ta Sy Troff
3704 \&.It Li <= Ta <= Ta \e*(<=
3705 \&.It Li >= Ta >= Ta \e*(>=
3710 Don't abuse this list type!
3711 For more complicated cases it might be far better and easier to use
3713 the table preprocessor.
3719 .Bl -tag -width ".Fl indent Ao Ar string Ac"
3720 .It Fl width Ao Ar string Ac
3725 (dot) immediately followed by a valid
3727 macro name, interpret
3729 and use the width of the result.
3730 Almost all lists in this document use this option.
3734 .Bd -literal -offset indent
3735 \&.Bl \-tag \-width ".Fl test Ao Ar string Ac"
3736 \&.It Fl test Ao Ar string Ac
3737 This is a longer sentence to show how the
3739 flag works in combination with a tag list.
3746 .Bl -tag -width ".Fl test Ao Ar string Ac"
3747 .It Fl test Ao Ar string Ac
3748 This is a longer sentence to show how the
3750 flag works in combination with a tag list.
3754 (Note that the current state of
3758 is interpreted; afterwards, all variables are restored again.
3759 However, boxes (used for enclosures) can't be saved in
3762 as a consequence, arguments must always be
3764 to avoid nasty errors.
3765 For example, do not write
3768 .Ql ".Ao Ar string Xc"
3769 instead if you really need only an opening angle bracket.)
3773 is a valid numeric expression
3774 .Em ( with a scale indicator other than
3776 use that value for indentation.
3777 The most useful scale indicators are
3781 specifying the so-called
3785 This is approximately the width of the letters
3790 of the current font (for nroff output, both scale indicators give the same
3794 isn't a numeric expression, it is tested whether it is an
3796 macro name, and the default width value associated with this macro is used.
3797 Finally, if all tests fail,
3800 (typeset with a fixed-width font) is taken as the width.
3802 If a width is not specified for the tag list type, every time
3804 is invoked, an attempt is made to determine an appropriate width.
3805 If the first argument to
3807 is a callable macro, the default width for that macro will be used;
3808 otherwise, the default width of
3811 .It Fl offset Ao Ar string Ac
3816 a default indent value (normally set to\~6n, similar to the value used in
3823 is a valid numeric expression instead
3824 .Pf ( Em with a scale indicator other than
3826 use that value for indentation.
3827 The most useful scale indicators are
3831 specifying the so-called
3835 This is approximately the width of the letters
3840 of the current font (for nroff output, both scale indicators give the same
3844 isn't a numeric expression, it is tested whether it is an
3846 macro name, and the default offset value associated with this macro is used.
3847 Finally, if all tests fail,
3850 (typeset with a fixed-width font) is taken as the offset.
3852 Suppress insertion of vertical space before the list and between list items.
3856 .Sh "MISCELLANEOUS MACROS"
3858 Here a list of the remaining macros which do not fit well into one of the
3860 We couldn't find real examples for the following macros:
3864 They are documented here for completeness \- if you know how to use them
3865 properly please send a mail to
3866 .Mt bug-groff@gnu.org
3867 (including an example).
3869 .Bl -tag -width ".Li .Bt"
3873 .Bd -ragged -offset indent
3877 It is neither callable nor parsed and takes no arguments.
3881 .Dl Usage: .Fr Ao function return value Ac ...
3883 Don't use this macro.
3884 It allows a break right before the return value (usually a single digit)
3885 which is bad typographical behaviour.
3888 to tie the return value to the previous word.
3891 Use this macro to include a (header) file literally.
3894 followed by the file name, then the contents of
3897 .Dl Usage: .Hf Ao file Ac
3899 It is neither callable nor parsed.
3905 Exact usage unknown.
3906 The documentation in the
3908 source file describes it as a macro for
3909 .Dq "menu entries" .
3911 Its default width is 6n.
3917 Exact usage unknown.
3918 The documentation in the
3920 source file describes it as
3921 .Dq old function type (fortran) .
3924 Activate (toggle) space mode.
3926 .Dl Usage: .Sm Oo on | off Oc ...
3928 If space mode is off, no spaces between macro arguments are inserted.
3929 If called without a parameter (or if the next parameter is neither
3939 .Bd -ragged -offset indent
3943 It is neither callable nor parsed and takes no arguments.
3947 .Sh "PREDEFINED STRINGS"
3949 The following strings are predefined:
3951 .Bl -column String infinity "Troff " "straight double quote" -offset indent
3952 .It Sy String Ta Sy Nroff Ta Sy Troff Ta Sy Meaning
3953 .It Li <= Ta <= Ta \*[<=] Ta "less equal"
3954 .It Li >= Ta >= Ta \*[>=] Ta "greater equal"
3955 .It Li Rq Ta '' Ta \*[Rq] Ta "right double quote"
3956 .It Li Lq Ta `` Ta \*[Lq] Ta "left double quote"
3957 .It Li ua Ta ^ Ta \*[ua] Ta "upwards arrow"
3958 .It Li aa Ta \' Ta \*[aa] Ta "acute accent"
3959 .It Li ga Ta \` Ta \*[ga] Ta "grave accent"
3960 .It Li q Ta \&" Ta \*[q] Ta "straight double quote"
3961 .It Li Pi Ta pi Ta \*[Pi] Ta "greek pi"
3962 .It Li Ne Ta != Ta \*[Ne] Ta "not equal"
3963 .It Li Le Ta <= Ta \*[Le] Ta "less equal"
3964 .It Li Ge Ta >= Ta \*[Ge] Ta "greater equal"
3965 .It Li Lt Ta < Ta \*[Lt] Ta "less than"
3966 .It Li Gt Ta > Ta \*[Gt] Ta "greater than"
3967 .It Li Pm Ta +\- Ta \*[Pm] Ta "plus minus"
3968 .It Li If Ta infinity Ta \*[If] Ta "infinity"
3969 .It Li Am Ta \*[Am] Ta \*[Am] Ta "ampersand"
3970 .It Li Na Ta \*[Na] Ta \*[Na] Ta "not a number"
3971 .It Li Ba Ta \*[Ba] Ta \*[Ba] Ta "vertical bar"
3974 The names of the columns
3978 are a bit misleading;
3982 representation, while
3984 gives the best glyph form available.
3985 For example, a Unicode enabled
3987 device will have proper glyph representations for all strings, whereas the
3988 enhancement for a Latin1
3990 device is only the plus-minus sign.
3992 String names which consist of two characters can be written as
3994 string names which consist of one character can be written as
3996 A generic syntax for a string name of any length is
4005 \#=====================================================================
4011 available in previous versions of
4013 has been removed since
4016 provides better facilities to check parameters; additionally, many error and
4017 warning messages have been added to this macro package, making it both more
4020 The only remaining debugging macro is
4022 which yields a register dump of all global registers and strings.
4023 A normal user will never need it.
4026 .Sh "FORMATTING WITH GROFF, TROFF, AND NROFF"
4028 By default, the package inhibits page breaks, headers, and footers if
4035 to make the manual more efficient for viewing on-line.
4036 This behaviour can be changed (e.g.\& to create a hardcopy of the
4038 output) by setting the register
4040 to zero while calling
4042 resulting in multiple pages instead of a single, very long page:
4044 .Dl groff \-Tlatin1 \-rcR=0 \-mdoc foo.man > foo.txt
4046 For double-sided printing, set register
4050 .Dl groff \-Tps \-rD1 \-mdoc foo.man > foo.ps
4052 To change the document font size to 11pt or 12pt, set register
4056 .Dl groff \-Tdvi \-rS11 \-mdoc foo.man > foo.dvi
4064 The line and title length can be changed by setting the registers
4070 .Dl groff \-Tutf8 \-rLL=100n \-rLT=100n \-mdoc foo.man | less
4072 If not set, both registers default to 78n for TTY devices and 6.5i
4078 .Bl -tag -width mdoc/doc-ditroff -compact
4080 The main manual macro package.
4082 A wrapper file to call
4084 .It Pa mdoc/doc-common
4085 Common strings, definitions, stuff related typographic output.
4086 .It Pa mdoc/doc-nroff
4087 Definitions used for a
4090 .It Pa mdoc/doc-ditroff
4091 Definitions used for all other devices.
4093 Local additions and customizations.
4095 Use this file if you don't know whether the
4099 package should be used.
4100 Multiple man pages (in either format) can be handled.
4114 Section 3f has not been added to the header routines.
4117 font should be changed in
4122 needs to have a check to prevent splitting up
4123 if the line length is too short.
4125 separates the last parenthesis, and sometimes
4126 looks ridiculous if a line is in fill mode.
4128 The list and display macros do not do any keeps
4129 and certainly should be able to.
4130 .\" Note what happens if the parameter list overlaps a newline
4132 .\" to make sure a line boundary is crossed:
4134 .\" \&.Fn struct\e\ dictionarytable\e\ *dictionarylookup struct\e\ dictionarytable\e\ *tab[]
4137 .\" produces, nudge nudge,
4138 .\" .Fn struct\ dictionarytable\ *dictionarylookup char\ *h struct\ dictionarytable\ *tab[] ,
4139 .\" .Fn struct\ dictionarytable\ *dictionarylookup char\ *h struct\ dictionarytable\ *tab[] ,
4141 .\" .Fn struct\ dictionarytable\ *dictionarylookup char\ *h struct\ dictionarytable\ *tab[] .
4143 .\" If double quotes are used, for example:
4145 .\" \&.Fn \*qstruct dictionarytable *dictionarylookup\*q \*qchar *h\*q \*qstruct dictionarytable *tab[]\*q
4148 .\" produces, nudge nudge,
4149 .\" .Fn "struct dictionarytable *dictionarylookup" "char *h" "struct dictionarytable *tab[]" ,
4151 .\" .Fn "struct dictionarytable *dictionarylookup" "char *h" "struct dictionarytable *tab[]" ,
4153 .\" .Fn "struct dictionarytable *dictionarylookup" "char *h" "struct dictionarytable *tab[]" .
4155 .\" Not a pretty sight...
4156 .\" In a paragraph, a long parameter containing unpaddable spaces as
4157 .\" in the former example will cause
4159 .\" to break the line and spread
4160 .\" the remaining words out.
4161 .\" The latter example will adjust nicely to
4162 .\" justified margins, but may break in between an argument and its
4166 .\" the right margin adjustment is normally ragged and the problem is
4169 .\" Local Variables: