4 .\" A complete reference of the mdoc macro package for GNU troff.
6 .\" Based on NetBSD's mdoc.samples.7, version 1.21.
9 .\" Warning: You can't format this file with the old mdoc macros!
12 .\" Copyright (C) 1990, 1993
13 .\" The Regents of the University of California. All rights reserved.
15 .\" Redistribution and use in source and binary forms, with or without
16 .\" modification, are permitted provided that the following conditions
18 .\" 1. Redistributions of source code must retain the above copyright
19 .\" notice, this list of conditions and the following disclaimer.
20 .\" 2. Redistributions in binary form must reproduce the above copyright
21 .\" notice, this list of conditions and the following disclaimer in the
22 .\" documentation and/or other materials provided with the distribution.
24 .\" ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change]
25 .\" 4. Neither the name of the University nor the names of its contributors
26 .\" may be used to endorse or promote products derived from this software
27 .\" without specific prior written permission.
29 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
30 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
31 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
32 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
33 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
34 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
35 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
36 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
37 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
38 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
41 .\" @(#)mdoc.samples.7 8.2 (Berkeley) 12/30/93
43 .\" This reference invokes every macro in the package several
44 .\" times and is guaranteed to give a worst case performance
45 .\" for an already extremely slow package.
56 .Nd reference for groff's mdoc implementation
61 .Nm groff Fl m Ns Cm doc Ar
66 A complete reference for writing
74 formatting package for
79 package, addressed page layout leaving the manipulation of fonts and other
80 typesetting details to the individual author.
83 page layout macros make up the
84 .Em "page structure domain"
85 which consists of macros for titles, section headers, displays and lists
86 \(en essentially items which affect the physical position of text on a
88 In addition to the page structure domain, there are two more domains, the
93 The general text domain is defined as macros which perform tasks such as
94 quoting or emphasizing pieces of text.
95 The manual domain is defined as macros that are a subset of the day to day
96 informal language used to describe commands, routines and related
99 Macros in the manual domain handle command names, command line arguments and
100 options, function names, function parameters, pathnames, variables, cross
101 references to other manual pages, and so on.
102 These domain items have value for both the author and the future user of the
104 Hopefully, the consistency gained across the manual set will provide easier
105 translation to future documentation tools.
109 manual pages, a manual entry is simply referred to as a man page, regardless
110 of actual length and without sexist intention.
113 .Sh "GETTING STARTED"
115 The material presented in the remainder of this document is outlined
118 .Bl -enum -width 3n -offset indent
120 . Tn "TROFF IDIOSYNCRASIES"
122 . Bl -tag -width 2n -compact
124 . It "Passing Space Characters in an Argument"
125 . It "Trailing Blank Space Characters"
126 . It "Escaping Special Characters"
127 . It "Other Possible Pitfalls"
131 . Tn "A MANUAL PAGE TEMPLATE"
140 . Tn "INTRODUCTION OF MANUAL AND GENERAL TEXT DOMAINS"
142 . Bl -tag -width 2n -compact
143 . It "What's in a Name" Ns ...
144 . It "General Syntax"
150 . Bl -tag -width 2n -compact
154 . It "Configuration Declarations (Section Four Only)"
155 . It "Command Modifiers"
156 . It "Defined Variables"
158 . It "Environment Variables"
160 . It "Function Declarations"
161 . It "Function Types"
162 . It "Functions (Library Routines)"
163 . It "Function Arguments"
166 . \" .It "Header File (including source code)"
167 . It "Interactive Commands"
174 . It "Variable Types"
176 . It "Manual Page Cross References"
180 . Tn "GENERAL TEXT DOMAIN"
182 . Bl -tag -width 2n -compact
187 . It "DragonFly Macro"
191 . It "Emphasis Macro"
193 . It "Enclosure and Quoting Macros"
194 . It "No-Op or Normal Text Macro"
195 . It "No-Space Macro"
196 . It "Section Cross References"
198 . It "Mathematical Symbols"
199 . It "References and Citations"
200 . It "Trade Names (or Acronyms and Type Names)"
201 . It "Extended Arguments"
205 . Tn "PAGE STRUCTURE DOMAIN"
207 . Bl -tag -width 2n -compact
208 . It "Section Headers"
209 . It "Subsection Headers"
210 . It "Paragraphs and Line Spacing"
212 . It "Examples and Displays"
213 . It "Lists and Columns"
217 . Tn "MISCELLANEOUS MACROS"
220 . Tn "PREDEFINED STRINGS"
226 . Tn "FORMATTING WITH GROFF, TROFF, AND NROFF"
243 .Sh "TROFF IDIOSYNCRASIES"
247 package attempts to simplify the process of writing a man page.
248 Theoretically, one should not have to learn the tricky details of
253 however, there are a few limitations which are unavoidable and best gotten
255 And, too, be forewarned, this package is
264 a macro is called by placing a
266 (dot character) at the beginning of a line followed by the two-character
267 (or three-character) name for the macro.
268 There can be space or tab characters between the dot and the macro name.
269 Arguments may follow the macro separated by spaces (but
272 It is the dot character at the beginning of the line which causes
275 to interpret the next two (or more) characters as a macro name.
276 A single starting dot followed by nothing is ignored.
279 (dot character) at the beginning of an input line in some context other than
280 a macro invocation, precede the
284 escape sequence which translates literally to a zero-width space, and is
285 never displayed in the output.
290 macros accept an unlimited number of arguments (contrary to other versions
291 of troff which can't handle more than nine arguments).
292 In limited cases, arguments may be continued or extended on the next
294 .Sx Extended Arguments
296 Almost all macros handle quoted arguments (see
297 .Sx Passing Space Characters in an Argument
302 general text domain and manual domain macros are special in that their
305 for callable macro names.
306 This means an argument on the argument list which matches a general text or
307 manual domain macro name (and which is defined to be callable) will be
308 executed or called when it is processed.
309 In this case the argument, although the name of a macro, is not preceded by
313 This makes it possible to nest macros; for example the option macro,
317 the flag and argument macros,
321 to specify an optional flag with an argument:
323 .Bl -tag -width ".Op Fl s Ar bytes" -offset indent
326 .Ql ".Op Fl s Ar bytes"
330 To prevent a string from being interpreted as a macro name, precede the
331 string with the escape sequence
334 .Bl -tag -width ".Op \&Fl s \&Ar bytes" -offset indent
335 .It Op \&Fl s \&Ar bytes
337 .Ql ".Op \e&Fl s \e&Ar bytes"
345 are not interpreted as macros.
346 Macros whose argument lists are parsed for callable arguments are referred
349 and macros which may be called from an argument list are referred to as
351 throughout this document.
354 as almost all of the macros in
356 are parsed, but as it was cumbersome to constantly refer to macros as
357 being callable and being able to call other macros, the term parsed
361 In the following, we call an
363 macro which starts a line (with a leading dot) a
365 if this distinction is necessary.
367 .Ss "Passing Space Characters in an Argument"
369 Sometimes it is desirable to give as an argument a string containing one or
370 more blank space characters, say, to specify arguments to commands which
371 expect particular arrangement of items in the argument list.
372 Additionally, it makes
375 For example, the function command
377 expects the first argument to be the name of a function and any remaining
378 arguments to be function parameters.
381 stipulates the declaration of function parameters in the parenthesized
382 parameter list, each parameter is guaranteed to be at minimum a two word
387 There are two possible ways to pass an argument which contains
389 One way of passing a string containing blank spaces is to use the hard or
390 unpaddable space character
392 that is, a blank space preceded by the escape character
394 This method may be used with any macro but has the side effect of
395 interfering with the adjustment of text over the length of a line.
397 sees the hard space as if it were any other printable character and cannot
398 split the string into blank or newline separated pieces as one would expect.
399 This method is useful for strings which are not expected to overlap a line
401 An alternative is to use
403 a paddable (i.e.\& stretchable), unbreakable space (this is a
407 The second method is to enclose the string with double quotes.
411 .Bl -tag -width ".Fn fetch char\ *str" -offset indent
412 .It Fn fetch char\ *str
414 .Ql ".Fn fetch char\e *str"
415 .It Fn fetch "char *str"
416 can also be created by
417 .Ql ".Fn fetch \*[q]char *str\*[q]"
423 before the space in the first example
424 or double quotes in the second example
427 would see three arguments, and the result would be:
429 .Dl Fn fetch char *str
431 .\" For an example of what happens when the parameter list overlaps a newline
432 .\" boundary, see the
436 .Ss "Trailing Blank Space Characters"
439 can be confused by blank space characters at the end of a line.
440 It is a wise preventive measure to globally remove all blank spaces
442 .Ao blank-space Ac Ns Ao end-of-line Ac
444 Should the need arise to use a blank character at the end of a line, it
445 may be forced with an unpaddable space and the
451 .Ss "Escaping Special Characters"
453 Special characters like the newline character
455 are handled by replacing the
461 to preserve the backslash.
463 .Ss "Other Possible Pitfalls"
465 A warning is emitted when an empty input line is found outside of displays
470 (Well, it is even better to use
472 macros to avoid the usage of low-level commands.)
474 Leading spaces will cause a break and are output directly.
475 Avoid this behaviour if possible.
476 Similarly, do not use more than one space character between words in an
477 ordinary text line; contrary to other text formatters, they are
479 replaced with a single space.
483 directly as an argument.
492 inserts two space characters after a punctuation mark closing a sentence;
497 are treated transparently, not influencing the sentence-ending behaviour.
498 To change this, insert
500 before or after the dot:
502 .Bd -literal -offset indent
521 .Bd -filled -offset indent
538 As can be seen in the first and third line,
540 handles punctuation characters specially in macro arguments.
541 This will be explained in section
544 In the same way, you have to protect trailing full stops of abbreviations
545 with a trailing zero-width space:
548 A comment in the source file of a man page can be either started with
554 anywhere (the latter is a
557 extension); the rest of such a line is ignored.
560 .Sh "A MANUAL PAGE TEMPLATE"
562 The body of a man page is easily constructed from a basic template:
564 .Bd -literal -offset indent
565 \&.\e" The following commands are required for all man pages.
566 \&.Dd Month day, year
567 \&.Dt DOCUMENT_TITLE [section number] [architecture/volume]
568 \&.Os [OPERATING_SYSTEM] [version/release]
571 \&.Nd one line description of name
572 \&.\e" This next command is for sections 2 and 3 only.
576 \&.\e" The following commands should be uncommented and
577 \&.\e" used where appropriate.
578 \&.\e" .Sh IMPLEMENTATION NOTES
579 \&.\e" This next command is for sections 2, 3, and 9 only
580 \&.\e" (function return values).
581 \&.\e" .Sh RETURN VALUES
582 \&.\e" This next command is for sections 1, 6, 7, and 8 only.
583 \&.\e" .Sh ENVIRONMENT
585 \&.\e" This next command is for sections 1, 6, and 8 only
586 \&.\e" (command return values to the shell).
587 \&.\e" .Sh EXIT STATUS
589 \&.\e" This next command is for sections 1, 4, 6, 7, 8, and 9 only
590 \&.\e" (fprintf/stderr type diagnostics).
591 \&.\e" .Sh DIAGNOSTICS
592 \&.\e" .Sh COMPATIBILITY
593 \&.\e" This next command is for sections 2, 3, 4, and 9 only
594 \&.\e" (settings of the errno variable).
605 The first items in the template are the commands
610 the document date, the operating system the man page or subject source is
611 developed or modified for, and the man page title (in
613 along with the section of the manual the page belongs in.
614 These commands identify the page and are discussed below in
617 The remaining items in the template are section headers
625 The headers are discussed in
626 .Sx "PAGE STRUCTURE DOMAIN" ,
627 after presentation of
628 .Sx "MANUAL DOMAIN" .
629 Several content macros are used to demonstrate page layout macros; reading
630 about content macros before page layout macros is recommended.
635 In the description of all macros below, optional arguments are put into
639 represents zero or more additional arguments.
640 Alternative values for a parameter are separated with
642 If there are alternative values for a mandatory parameter, braces are used
645 to enclose the value set.
646 Meta-variables are specified within angles.
650 .Bl -tag -width 6n -offset indent
654 .Op \-test1 Op \-test2 | \-test3
660 Except stated explicitly, all macros are parsed and callable.
662 Note that a macro takes effect up to the next nested macro.
669 Consequently, a warning message is emitted for most commands if the first
670 argument is a macro itself since it cancels the effect of the calling
672 Another consequence is that quoting macros never insert literal quotes;
675 .Ql ".Ic \*[q]foo <bar>\*[q]" .
677 Most macros have a default width value which can be used to specify a label
687 It is recommended not to use this rather obscure feature to avoid
688 dependencies on local modifications of the
695 The title macros are part of the page structure domain but are presented
696 first and separately for someone who wishes to start writing a man page
698 Three header macros designate the document title or manual page title, the
699 operating system, and the date of authorship.
700 These macros are called once at the very beginning of the document and are
701 used to construct headers and footers only.
705 .Op Aq document title
706 .Op Aq section number
709 The document title is the subject of the man page and must be in
711 due to troff limitations.
715 The section number may be a number in the range
716 .No 1,\~ Ns ... Ns ,\~9
722 If it is specified, and no volume name is given, a default volume name is
727 .Tn \*[operating-system] ,
728 the following sections are defined:
732 1 \*[volume-operating-system] \*[volume-ds-1]
733 2 \*[volume-operating-system] \*[volume-ds-2]
734 3 \*[volume-operating-system] \*[volume-ds-3]
735 4 \*[volume-operating-system] \*[volume-ds-4]
736 5 \*[volume-operating-system] \*[volume-ds-5]
737 6 \*[volume-operating-system] \*[volume-ds-6]
738 7 \*[volume-operating-system] \*[volume-ds-7]
739 8 \*[volume-operating-system] \*[volume-ds-8]
740 9 \*[volume-operating-system] \*[volume-ds-9]
744 A volume name may be arbitrary or one of the following:
749 USD \*[volume-ds-USD]
750 PS1 \*[volume-ds-PS1]
751 AMD \*[volume-ds-AMD]
752 SMM \*[volume-ds-SMM]
753 URM \*[volume-ds-URM]
754 PRM \*[volume-ds-PRM]
756 IND \*[volume-ds-IND]
757 LOCAL \*[volume-ds-LOCAL]
758 CON \*[volume-ds-CON]
770 Values from the previous table will specify a new volume name.
771 If the third parameter is a keyword designating a computer architecture,
772 its value is prepended to the default volume name as specified by the
774 By default, the following architecture keywords are defined:
776 \# we use `No' to avoid hyphenation
777 .Bd -ragged -offset indent
778 .No acorn26 , acorn32 , algor , alpha , amd64 , amiga , amigappc ,
779 .No arc , arm , arm26 , arm32 , armish , atari , aviion ,
780 .No beagle , bebox , cats , cesfic , cobalt , dreamcast ,
781 .No emips , evbarm , evbmips , evbppc , evbsh3 , ews4800mips ,
782 .No hp300 , hp700 , hpcarm , hpcmips , hpcsh , hppa , hppa64 ,
783 .No i386 , ia64 , ibmnws , iyonix , landisk , loongson , luna68k , luna88k ,
784 .No m68k , mac68k , macppc , mips , mips64 , mipsco , mmeye ,
785 .No mvme68k , mvme88k , mvmeppc , netwinder , news68k , newsmips , next68k ,
786 .No ofppc , palm , pc532 , playstation2 , pmax , pmppc , powerpc , prep ,
787 .No rs6000 , sandpoint , sbmips , sgi , sgimips , sh3 , shark ,
788 .No socppc , solbourne , sparc , sparc64 , sun2 , sun3 ,
789 .No tahoe , vax , x68k , x86_64 , xen , zaurus
793 If the section number is neither a numeric expression in the range 1 to\~9
794 nor one of the above described keywords, the third parameter is used
795 verbatim as the volume name.
797 In the following examples, the left (which is identical to the right) and
798 the middle part of the manual page header strings are shown.
801 prevents the digit\~7 from being a valid numeric expression.
804 .Bl -tag -width ".Li .Dt\ FOO\ 2\ i386" -compact -offset indent
807 .Ql \*[volume-operating-system] \*[volume-ds-7]
808 .It Li ".Dt FOO 7 bar"
810 .Ql \*[volume-operating-system] \*[volume-ds-7]
811 .It Li ".Dt FOO \e&7 bar"
814 .It Li ".Dt FOO 2 i386"
816 .Ql \*[volume-operating-system]/\*[volume-as-i386] \*[volume-ds-2]
817 .It Li ".Dt FOO \*[q]\*[q] bar"
824 Local, OS-specific additions might be found in the file
826 look for strings named
828 (for the former type) and
830 (for the latter type);
832 then denotes the keyword to be used with the
836 This macro is neither callable nor parsed.
839 .Op Aq operating system
842 If the first parameter is empty,
844 .Sq Tn "\*[operating-system]"
846 This may be overridden in the local configuration file,
848 In general, the name of the operating system should be the common acronym,
853 The release should be the standard release nomenclature for the system
855 In the following table, the possible second arguments for some predefined
856 operating systems are listed.
859 local additions might be defined in
861 look for strings named
862 .Ql operating\-system\-XXX\-YYY ,
865 is the acronym for the operating system and
870 .Bl -tag -width ".No DragonFly" -offset indent
872 7th, 7, III, 3, V, V.2, V.3, V.4
874 3, 4, 4.1, 4.2, 4.3, 4.3t, 4.3T, 4.3r, 4.3R, 4.4
876 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,
877 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,
878 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.0.3,
879 3.1, 3.1.1, 4.0, 4.0.1, 5.0, 5.0.1, 5.0.2, 5.1, 5.1.2, 5.1.3, 5.1.4,
880 5.2, 5.2.1, 5.2.2, 6.0, 6.0.1, 6.0.2, 6.0.3, 6.0.4, 6.0.5, 6.1, 6.1.1,
883 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,
884 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,
885 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,
886 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, 7.2, 7.3, 7.4,
887 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, 9.2, 9.3, 10.0
889 2.0, 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 2.8, 2.9, 3.0, 3.1, 3.2, 3.3, 3.4,
890 3.5, 3.6, 3.7, 3.8, 3.9, 4.0, 4.1, 4.2, 4.3, 4.4, 4.5, 4.6, 4.7, 4.8, 4.9,
891 5.0, 5.1, 5.2, 5.3, 5.4, 5.5, 5.6
893 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.8, 1.8.1, 1.9, 1.10, 1.12, 1.12.2,
894 1.13, 2.0, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 2.8, 2.9, 2.9.1, 2.10, 2.10.1,
895 2.11, 2.12, 2.13, 3.0, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6, 3.7, 3.8
897 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,
898 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, 9.7.0,
899 9.8.0, 10.1.0, 10.2.0, 10.3.0, 10.4.0, 10.5.0, 10.6.0, 10.7.0, 10.8.0,
900 11.0.0, 11.1.0, 11.2.0, 11.3.0, 11.4.0, 11.5.0, 12.0.0, 12.1.0, 12.2.0,
901 13.0.0, 13.1.0, 13.2.0, 13.3.0, 13.4.0, 14.0.0
908 an unknown second parameter will be replaced with the string
910 for the other predefined acronyms it will be ignored and a warning message
912 Unrecognized arguments are displayed as given in the page footer.
913 For instance, a typical footer might be:
918 .Ql 4.3\~Berkeley Distribution ,
919 or for a locally produced set
921 .Dl .Os CS Department
928 macro is not present, the bottom left corner of the manual page will be
931 This macro is neither callable nor parsed.
942 is used for the date string.
943 If it has exactly three arguments, they are concatenated, separated with
946 .Dl .Dd January 25, 2001
948 The month's name shall not be abbreviated.
950 With any other number of arguments, the current date is used, ignoring
953 As a special exception, the format
954 .Bd -filled -offset indent
965 manuals to automatically insert the current date when committing.
967 This macro is neither callable nor parsed.
971 .Sh "INTRODUCTION OF MANUAL AND GENERAL TEXT DOMAINS"
973 .Ss "What's in a Name" Ns ...
975 The manual domain macro names are derived from the day to day informal
976 language used to describe commands, subroutines and related files.
977 Slightly different variations of this language are used to describe the
978 three different aspects of writing a man page.
979 First, there is the description of
982 Second is the description of a
987 macros, and third, the description of a command to a user in the verbal
988 sense; that is, discussion of a command in the text of a man page.
992 macros are themselves a type of command; the general syntax for a troff
995 .Bd -filled -offset indent
996 .Li ".Xx argument1 argument2" ...
1001 is a macro command, and anything following it are arguments to
1003 In the second case, the description of a
1005 command using the content macros is a bit more involved; a typical
1007 command line might be displayed as:
1009 .Bd -filled -offset indent
1012 .Ao Ar infile Ac Ao Ar outfile Ac
1018 is the command name and the
1023 argument designated as optional by the option brackets.
1031 .Em meta arguments ;
1032 in this example, the user has to replace the meta expressions given in angle
1033 brackets with real file names.
1034 Note that in this document meta arguments are used to describe
1036 commands; in most man pages, meta variables are not specifically written
1037 with angle brackets.
1038 The macros which formatted the above example:
1040 .Bd -literal -offset indent
1043 \&.Ao Ar infile Ac Ao Ar outfile Ac
1047 In the third case, discussion of commands and command syntax includes both
1048 examples above, but may add more detail.
1053 from the example above might be referred to as
1056 .Em file arguments .
1057 Some command line argument lists are quite long:
1060 .Bl -tag -width ".Nm make" -offset indent -compact
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
1076 Here one might talk about the command
1078 and qualify the argument,
1080 as an argument to the flag,
1082 or discuss the optional file operand
1084 In the verbal context, such detail can prevent confusion, however the
1086 package does not have a macro for an argument
1091 argument macro is used for an operand or file argument like
1093 as well as an argument to a flag like
1095 The make command line was produced from:
1097 .Bd -literal -offset indent
1100 \&.Op Fl D Ar variable
1102 \&.Op Fl f Ar makefile
1103 \&.Op Fl I Ar directory
1104 \&.Op Fl j Ar max_jobs
1105 \&.Op Ar variable Ns = Ns Ar value
1116 macros are explained in
1119 .Ss "General Syntax"
1121 The manual domain and general text domain macros share a similar syntax with
1122 a few minor deviations; most notably,
1128 differ only when called without arguments; and
1132 impose an order on their argument lists.
1133 All content macros are capable of recognizing and properly handling
1134 punctuation, provided each punctuation character is separated by a leading
1136 If a command is given:
1138 .Dl \&.Ar sptr, ptr),
1144 The punctuation is not recognized and all is output in the
1147 If the punctuation is separated by a leading white space:
1149 .Dl \&.Ar "sptr , ptr ) ,"
1153 .Dl Ar sptr , ptr ) ,
1155 The punctuation is now recognized and output in the default font
1156 distinguishing it from the argument strings.
1157 To remove the special meaning from a punctuation character escape it with
1160 The following punctuation characters are recognized by
1163 .Bl -column -offset indent-two XXXXXX XXXXXX XXXXXX XXXXXX
1164 .It Li .\& Ta Li ,\& Ta Li :\& Ta Li ;\& Ta Li (\&
1165 .It Li )\& Ta Li [\& Ta Li ]\& Ta Li ?\& Ta Li !\&
1170 is limited as a macro language, and has difficulty when presented with a
1171 string containing a member of the mathematical, logical or quotation set:
1173 .Bd -literal -offset indent-two
1174 {+,\-,/,*,%,<,>,<=,>=,=,==,&,`,',"}
1180 may assume it is supposed to actually perform the operation or evaluation
1181 suggested by the characters.
1182 To prevent the accidental evaluation of these characters, escape them with
1184 Typical syntax is shown in the first content macro displayed below,
1192 The address macro identifies an address construct.
1194 .Dl Usage: .Ad Ao address Ac ...
1196 .Bl -tag -width ".Li .Ad\ f1\ ,\ f2\ ,\ f3\ :" -compact -offset 15n
1199 .It Li ".Ad addr1 ."
1201 .It Li ".Ad addr1 , file2"
1203 .It Li ".Ad f1 , f2 , f3 :"
1205 .It Li ".Ad addr ) ) ,"
1210 The default width is 12n.
1216 macro is used to specify the name of the author of the item being
1217 documented, or the name of the author of the actual manual page.
1219 .Dl Usage: .An Ao author name Ac ...
1221 .Bl -tag -width ".Li .An\ \*[q]Joe\ Author\*[q]\ )\ )\ ," -offset 15n
1222 .It Li ".An \*[q]Joe Author\*[q]"
1224 .It Li ".An \*[q]Joe Author\*[q] ,"
1226 .It Li ".An \*[q]Joe Author\*[q] Aq nobody@FreeBSD.org"
1227 .An "Joe Author" Aq nobody@FreeBSD.org
1228 .It Li ".An \*[q]Joe Author\*[q] ) ) ,"
1229 .An "Joe Author" ) ) ,
1233 The default width is 12n.
1239 command causes a line break allowing each new name to appear on its own
1241 If this is not desirable,
1243 .Bd -literal -offset indent
1248 call will turn this off.
1249 To turn splitting back on, write
1251 .Bd -literal -offset indent
1259 argument macro may be used whenever an argument is referenced.
1260 If called without arguments, the
1264 .Dl Usage: .Ar Oo Ao argument Ac Oc ...
1266 .Bl -tag -width ".Li .Ar\ file1\ file2" -compact -offset 15n
1271 .It Li ".Ar file1 ."
1273 .It Li ".Ar file1 file2"
1275 .It Li ".Ar f1 f2 f3 :"
1277 .It Li ".Ar file ) ) ,"
1282 The default width is 12n.
1284 .Ss "Configuration Declaration (Section Four Only)"
1288 macro is used to demonstrate a
1290 declaration for a device interface in a section four manual.
1292 .Dl Usage: .Cd Ao argument Ac ...
1294 .Bl -tag -width ".Li .Cd\ Xdevice\ le0\ at\ scode?X" -offset 15n
1295 .It Li ".Cd \*[q]device le0 at scode?\*[q]"
1296 .Cd "device le0 at scode?"
1303 command causes a line break before and after its arguments are printed.
1306 The default width is 12n.
1308 .Ss "Command Modifiers"
1310 The command modifier is identical to the
1312 (flag) command with the exception that the
1314 macro does not assert a dash in front of every argument.
1315 Traditionally flags are marked by the preceding dash, however, some commands
1316 or subsets of commands do not use them.
1317 Command modifiers may also be specified in conjunction with interactive
1318 commands such as editor commands.
1322 The default width is 10n.
1324 .Ss "Defined Variables"
1326 A variable (or constant) which is defined in an include file
1327 is specified by the macro
1330 .Dl Usage: .Dv Ao defined variable Ac ...
1332 .Bl -tag -width ".Li .Dv\ MAXHOSTNAMELEN" -compact -offset 15n
1333 .It Li ".Dv MAXHOSTNAMELEN"
1335 .It Li ".Dv TIOCGPGRP )"
1340 The default width is 12n.
1346 errno macro specifies the error return value for section 2, 3, and\~9 library
1348 The second example below shows
1352 general text domain macro, as it would be used in a section two manual page.
1354 .Dl Usage: .Er Ao errno type Ac ...
1356 .Bl -tag -width ".Li .Bq\ Er\ ENOTDIR" -compact -offset 15n
1359 .It Li ".Er ENOENT ) ;"
1361 .It Li ".Bq Er ENOTDIR"
1366 The default width is 17n.
1368 .Ss "Environment Variables"
1372 macro specifies an environment variable.
1374 .Dl Usage: .Ev Ao argument Ac ...
1376 .Bl -tag -width ".Li .Ev\ PRINTER\ )\ )\ ," -compact -offset 15n
1377 .It Li ".Ev DISPLAY"
1381 .It Li ".Ev PRINTER ) ) ,"
1386 The default width is 15n.
1392 macro handles command line flags.
1396 For interactive command flags, which are not prepended with a dash, the
1399 macro is identical, but without the dash.
1401 .Dl Usage: .Fl Ao argument Ac ...
1403 .Bl -tag -width ".Li .Fl\ xyz\ )\ ," -compact -offset 15n
1416 .It Li ".Fl xyz ) ,"
1424 macro without any arguments results in a dash representing stdin/stdout.
1427 a single dash will result in two dashes.
1429 The default width is 12n.
1431 .Ss "Function Declarations"
1435 macro is used in the
1437 section with section two or three functions.
1438 It is neither callable nor parsed.
1440 .Dl Usage: .Fd Ao argument Ac ...
1442 .Bl -tag -width ".Li .Fd\ X#include\ <sys/types.h>X" -compact -offset 15n
1443 .It Li ".Fd \*[q]#include <sys/types.h>\*[q]"
1444 .Fd "#include <sys/types.h>"
1451 command causes a line break if a function has already been presented and a
1452 break has not occurred.
1453 This leaves a nice vertical space in between the previous function call and
1454 the declaration for the next function.
1461 section, represents the
1463 statement, and is the short form of the above example.
1464 It specifies the C\~header file as being included in a C\~program.
1465 It also causes a line break.
1469 section, it represents the header file enclosed in angle brackets.
1471 .Dl Usage: .In Ao header file Ac
1473 .Bl -tag -width ".Li .In\ stdio.h" -compact -offset 15n
1474 .nr in-synopsis-section 1
1475 .It Li ".In stdio.h"
1477 .nr in-synopsis-section 0
1478 .It Li ".In stdio.h"
1482 .Ss "Function Types"
1484 This macro is intended for the
1487 It may be used anywhere else in the man page without problems, but its main
1488 purpose is to present the function type in kernel normal form for the
1490 of sections two and three (it causes a line break, allowing the function
1491 name to appear on the next line).
1493 .Dl Usage: .Ft Ao type Ac ...
1495 .Bl -tag -width ".Li .Ft\ struct\ stat" -compact -offset 15n
1496 .It Li ".Ft struct stat"
1500 .Ss "Functions (Library Routines)"
1508 .Dl Usage: .Fn Ao function Ac Oo Ao parameter Ac Oc ...
1510 .Bl -tag -width ".Li .Fn\ align\ Xchar\ *ptrX\ ," -compact -offset 15n
1511 .It Li ".Fn getchar"
1513 .It Li ".Fn strlen ) ,"
1515 .It Li ".Fn align \*[q]char *ptr\*[q] ,"
1516 .Fn align "char *ptr" ,
1519 Note that any call to another macro signals the end of the
1521 call (it will insert a closing parenthesis at that point).
1523 For functions with many parameters (which is rare), the macros
1531 (function argument).
1535 .Bd -literal -offset indent
1544 \&.Fa "struct rrec *newrr"
1553 .Bd -ragged -offset indent
1562 .Fa "struct rrec *newrr"
1571 section, the function will always begin at the beginning of line.
1572 If there is more than one function presented in the
1574 section and a function type has not been given, a line break will occur,
1575 leaving a nice vertical space between the current function name and the one
1578 The default width values of
1582 are 12n and 16n, respectively.
1584 .Ss "Function Arguments"
1588 macro is used to refer to function arguments (parameters) outside of the
1590 section of the manual or inside the
1592 section if the enclosure macros
1600 may also be used to refer to structure members.
1602 .Dl Usage: .Fa Ao function argument Ac ...
1604 .Bl -tag -width ".Li .Fa\ d_namlen\ )\ )\ ," -compact -offset 15n
1605 .It Li ".Fa d_namlen ) ) ,"
1607 .It Li ".Fa iov_len"
1612 The default width is 12n.
1618 macro generates text for use in the
1622 .Dl Usage: .Rv Oo \-std Oc Op Ao function Ac ...
1625 .Ql ".Rv \-std atexit"
1628 .Bd -ragged -offset indent
1629 \# a small hack to suppress a warning message
1630 .ds section-old "\*[section]
1633 .ds section "\*[section-old]
1639 option is valid only for manual page sections\~2 and\~3.
1640 Currently, this macro does nothing if used without the
1648 macro generates text for use in the
1652 .Dl Usage: .Ex Oo \-std Oc Op Ao utility Ac ...
1658 .Bd -ragged -offset indent
1659 \# a small hack to suppress a warning message
1660 .ds section-old "\*[section]
1663 .ds section "\*[section-old]
1669 option is valid only for manual page sections 1, 6 and\~8.
1670 Currently, this macro does nothing if used without the
1674 .Ss "Interactive Commands"
1678 macro designates an interactive or internal command.
1680 .Dl Usage: .Ic Ao argument Ac ...
1682 .Bl -tag -width ".Li .Ic\ setenv\ ,\ unsetenv" -compact -offset 15n
1685 .It Li ".Ic \*[q]do while {...}\*[q]"
1686 .Ic "do while {...}"
1687 .It Li ".Ic setenv , unsetenv"
1688 .Ic setenv , unsetenv
1692 The default width is 12n.
1698 macro is used to specify the library where a particular function is compiled
1701 .Dl Usage: .Lb Ao argument Ac ...
1703 Available arguments to
1705 and their results are:
1708 .Bl -tag -width ".Li librpcsec_gss" -compact -offset indent
1815 .It Li librpcsec_gss
1852 Local, OS-specific additions might be found in the file
1854 look for strings named
1857 then denotes the keyword to be used with the
1865 command causes a line break before and after its arguments are printed.
1872 literal macro may be used for special characters, variable constants, etc.\&
1873 \- anything which should be displayed as it would be typed.
1875 .Dl Usage: .Li Ao argument Ac ...
1877 .Bl -tag -width ".Li .Li\ cntrl\-D\ )\ ," -compact -offset 15n
1880 .It Li ".Li M1 M2 M3 ;"
1882 .It Li ".Li cntrl\-D ) ,"
1884 .It Li ".Li 1024 ..."
1889 The default width is 16n.
1895 macro is used for the document title or subject name.
1896 It has the peculiarity of remembering the first argument it was called with,
1897 which should always be the subject name of the page.
1898 When called without arguments,
1900 regurgitates this initial name for the sole purpose of making less work for
1903 causes a line break within the
1907 Note: A section two or three document function name is addressed with the
1915 and remaining sections.
1916 For interactive commands, such as the
1922 macro should be used.
1928 it can not recall the first argument it was invoked with.
1930 .Dl Usage: .Nm Oo Ao argument Ac Oc ...
1932 .Bl -tag -width ".Li .Nm\ groff_mdoc" -compact -offset 15n
1933 .It Li ".Nm groff_mdoc"
1935 .It Li ".Nm \e\-mdoc"
1937 .It Li ".Nm foo ) ) ,"
1944 The default width is 10n.
1950 macro places option brackets around any remaining arguments on the
1951 command line, and places any trailing punctuation outside the brackets.
1956 (which produce an opening and a closing option bracket respectively) may be used
1957 across one or more lines or to specify the exact position of the closing
1960 .Dl Usage: .Op Oo Ao option Ac Oc ...
1962 .Bl -tag -width ".Li .Op\ Fl\ c\ Ar\ objfil\ Op\ Ar\ corfil\ ," -compact -offset 15n
1967 .It Li ".Op Fl k ) ."
1969 .It Li ".Op Fl k Ar kookfile"
1970 .Op Fl k Ar kookfile
1971 .It Li ".Op Fl k Ar kookfile ,"
1972 .Op Fl k Ar kookfile ,
1973 .It Li ".Op Ar objfil Op Ar corfil"
1974 .Op Ar objfil Op Ar corfil
1975 .It Li ".Op Fl c Ar objfil Op Ar corfil ,"
1976 .Op Fl c Ar objfil Op Ar corfil ,
1977 .It Li ".Op word1 word2"
1979 .It Li ".Li .Op Oo Ao option Ac Oc ..."
1980 .Li .Op Oo Ao option Ac Oc ...
1983 Here a typical example of the
1989 .Bd -literal -offset indent
1991 \&.Op Fl k Ar kilobytes
1992 \&.Op Fl i Ar interval
2000 .Bd -filled -offset indent
2002 .Op Fl k Ar kilobytes
2003 .Op Fl i Ar interval
2009 The default width values of
2013 are 14n and 10n, respectively.
2019 macro formats path or file names.
2020 If called without arguments, the
2022 string is output, which represents the current user's home directory.
2024 .Dl Usage: .Pa Oo Ao pathname Ac Oc ...
2026 .Bl -tag -width ".Li .Pa\ /tmp/fooXXXXX\ )\ ." -compact -offset 15n
2029 .It Li ".Pa /usr/share"
2031 .It Li ".Pa /tmp/fooXXXXX ) ."
2032 .Pa /tmp/fooXXXXX ) .
2036 The default width is 32n.
2042 macro replaces standard abbreviations with their formal names.
2044 .Dl Usage: .St Ao abbreviation Ac ...
2047 .Dq Abbreviation/Formal Name
2053 .Bl -tag -width ".Li \-p1003.1g\-2000" -compact -offset indent
2072 .Bl -tag -width ".Li \-p1003.1g\-2000" -compact -offset indent
2073 .It Li \-iso9945\-1\-90
2075 .It Li \-iso9945\-1\-96
2079 .It Li \-p1003.1\-88
2081 .It Li \-p1003.1\-90
2083 .It Li \-p1003.1\-96
2085 .It Li \-p1003.1b\-93
2087 .It Li \-p1003.1c\-95
2089 .It Li \-p1003.1g\-2000
2091 .It Li \-p1003.1i\-95
2093 .It Li \-p1003.1\-2001
2095 .It Li \-p1003.1\-2004
2097 .It Li \-p1003.1\-2008
2103 Part 2: Shell and Utilities
2105 .Bl -tag -width ".Li \-p1003.1g\-2000" -compact -offset indent
2106 .It Li \-iso9945\-2\-93
2110 .It Li \-p1003.2\-92
2112 .It Li \-p1003.2a\-92
2119 .Bl -tag -width ".Li \-p1003.1g\-2000" -compact -offset indent
2149 .Bl -tag -width ".Li \-p1003.1g\-2000" -compact -offset indent
2158 .Ss "Variable Types"
2162 macro may be used whenever a type is referenced.
2165 section, it causes a line break (useful for old style variable declarations).
2167 .Dl Usage: .Vt Ao type Ac ...
2169 .Bl -tag -width ".Li .Vt\ extern\ char\ *optarg\ ;" -compact -offset 15n
2170 .It Li ".Vt extern char *optarg ;"
2171 .Vt extern char *optarg ;
2178 Generic variable reference.
2180 .Dl Usage: .Va Ao variable Ac ...
2182 .Bl -tag -width ".Li .Va\ Xchar\ sX\ ]\ )\ )\ ," -compact -offset 15n
2185 .It Li ".Va settimer ,"
2187 .It Li ".Va \*[q]int *prt\*[q] ) :"
2189 .It Li ".Va \*[q]char s\*[q] ] ) ) ,"
2190 .Va "char s" ] ) ) ,
2194 The default width is 12n.
2196 .Ss "Manual Page Cross References"
2200 macro expects the first argument to be a manual page name.
2201 The optional second argument, if a string (defining the manual section), is
2202 put into parentheses.
2204 .Dl Usage: .Xr Ao man page name Ac Oo Ao section Ac Oc ...
2206 .Bl -tag -width ".Li .Xr\ xinit\ 1x\ ;" -compact -offset 15n
2213 .It Li ".Xr xinit 1x ;"
2218 The default width is 10n.
2221 .Sh "GENERAL TEXT DOMAIN"
2226 .Dl Usage: .At Oo Ao version Ac Oc ...
2228 .Bl -tag -width ".Li .At\ v6\ ." -compact -offset 15n
2235 The following values for
2239 .Dl 32v, v1, v2, v3, v4, v5, v6, v7, III, V, V.1, V.2, V.3, V.4
2244 .Dl "Usage: .Bx" Bro \-alpha | \-beta | \-devel Brc ...
2245 .Dl " .Bx" Oo Ao version Ac Oo Ao release Ac Oc Oc ...
2247 .Bl -tag -width ".Li .Bx\ -devel" -compact -offset 15n
2252 .It Li ".Bx \-devel"
2257 will be prepended to the string
2259 The following values for
2263 .Dl Reno, reno, Tahoe, tahoe, Lite, lite, Lite2, lite2
2268 .Dl Usage: .Nx Oo Ao version Ac Oc ...
2270 .Bl -tag -width ".Li .Nx\ 1.4\ ." -compact -offset 15n
2277 For possible values of
2279 see the description of the
2281 command above in section
2282 .Sx "TITLE MACROS" .
2287 .Dl Usage: .Fx Oo Ao version Ac Oc ...
2289 .Bl -tag -width ".Li .Fx\ 2.2\ ." -compact -offset 15n
2296 For possible values of
2298 see the description of the
2300 command above in section
2301 .Sx "TITLE MACROS" .
2303 .Ss "DragonFly Macro"
2306 .Dl Usage: .Dx Oo Ao version Ac Oc ...
2308 .Bl -tag -width ".Li .Dx\ 1.4\ ." -compact -offset 15n
2315 For possible values of
2317 see the description of the
2319 command above in section
2320 .Sx "TITLE MACROS" .
2325 .Dl Usage: .Ox Oo Ao version Ac Oc ...
2327 .Bl -tag -width ".Li .Ox\ 1.0" -compact -offset 15n
2335 .Dl Usage: .Bsx Oo Ao version Ac Oc ...
2337 .Bl -tag -width ".Li .Bsx\ 1.0" -compact -offset 15n
2347 .Bl -tag -width ".Li .Ux" -compact -offset 15n
2352 .Ss "Emphasis Macro"
2354 Text may be stressed or emphasized with the
2357 The usual font for emphasis is italic.
2359 .Dl Usage: .Em Ao argument Ac ...
2361 .Bl -tag -width ".Li .Em\ vide\ infra\ )\ )\ ," -compact -offset 15n
2362 .It Li ".Em does not"
2364 .It Li ".Em exceed 1024 ."
2366 .It Li ".Em vide infra ) ) ,"
2367 .Em vide infra ) ) ,
2371 The default width is 10n.
2377 font mode must be ended with the
2379 macro (the latter takes no arguments).
2380 Font modes may be nested within other font modes.
2383 has the following syntax:
2385 .Dl .Bf Ao font mode Ac
2388 must be one of the following three types:
2390 .Bl -tag -width ".Sy \&Sy | Fl symbolic" -compact -offset indent
2391 .It Sy \&Em | Fl emphasis
2394 macro was used for the entire block of text.
2395 .It Sy \&Li | Fl literal
2398 macro was used for the entire block of text.
2399 .It Sy \&Sy | Fl symbolic
2402 macro was used for the entire block of text.
2405 Both macros are neither callable nor parsed.
2407 .Ss "Enclosure and Quoting Macros"
2409 The concept of enclosure is similar to quoting.
2410 The object being to enclose one or more strings between a pair of characters
2411 like quotes or parentheses.
2412 The terms quoting and enclosure are used interchangeably throughout this
2414 Most of the one-line enclosure macros end in small letter
2416 to give a hint of quoting, but there are a few irregularities.
2417 For each enclosure macro there is also a pair of open and close macros which
2418 end in small letters
2431 Quote Open Close Function Result
2432 \&.Aq .Ao .Ac Angle Bracket Enclosure <string>
2433 \&.Bq .Bo .Bc Bracket Enclosure [string]
2434 \&.Brq .Bro .Brc Brace Enclosure {string}
2435 \&.Dq .Do .Dc Double Quote "string"
2436 \&.Eq .Eo .Ec Enclose String (in XX) XXstring
2437 \&.Pq .Po .Pc Parenthesis Enclosure (string)
2438 \&.Ql Quoted Literal \*[Lq]string\*[Rq] or string
2439 \&.Qq .Qo .Qc Straight Double Quote "string"
2440 \&.Sq .So .Sc Single Quote 'string'
2443 All macros ending with
2447 have a default width value of 12n.
2449 .Bl -tag -width ".Li .Ec , .Eo"
2451 These macros expect the first argument to be the opening and closing strings
2454 Due to the nine-argument limit in the original troff program two other
2455 macros have been implemented which are now rather obsolete:
2457 takes the first and second parameter as the left and right enclosure string,
2458 which are then used to enclose the arguments of
2460 The default width value is 12n for both macros.
2462 The first and second arguments of this macro are the opening and
2463 closing strings respectively, followed by the arguments to be enclosed.
2465 The quoted literal macro behaves differently in troff and nroff mode.
2468 a quoted literal is always quoted.
2469 If formatted with troff, an item is only quoted if the width of the item is
2470 less than three constant width characters.
2471 This is to make short strings more visible where the font change to literal
2472 (constant width) is less noticeable.
2474 The default width is 16n.
2476 The prefix macro suppresses the whitespace between its first and second
2479 .Bl -tag -width ".Li .Pf\ (\ Fa\ name2" -offset indent
2480 .It Li ".Pf ( Fa name2"
2485 The default width is 12n.
2489 macro (see below) performs the analogous suffix function.
2493 macro inserts an apostrophe and exits any special text modes, continuing in
2499 Examples of quoting:
2502 .Bl -tag -width ".Li .Bq\ Em\ Greek\ ,\ French\ ." -compact -offset indent
2505 .It Li ".Aq Pa ctype.h ) ,"
2509 .It Li ".Bq Em Greek , French ."
2510 .Bq Em Greek , French .
2513 .It Li ".Dq string abc ."
2515 .It Li ".Dq \'^[A\-Z]\'"
2517 .It Li ".Ql man mdoc"
2521 .It Li ".Qq string ) ,"
2523 .It Li ".Qq string Ns ),"
2529 .It Li ".Em or Ap ing"
2534 For a good example of nested enclosure macros, see the
2537 It was created from the same underlying enclosure macros as those presented
2543 extended argument list macros are discussed below.
2545 .Ss "No-Op or Normal Text Macro"
2549 macro can be used in a macro command line for parameters which should
2556 if you really want that English word (and not the macro) as a parameter.
2558 .Dl Usage: .No Ao argument Ac ...
2560 .Bl -tag -width ".Li .No\ test\ Ta\ with\ Ta\ tabs" -compact -offset 15n
2561 .It Li ".No test Ta with Ta tabs"
2562 .No test Ta with Ta tabs
2566 The default width is 12n.
2568 .Ss "No-Space Macro"
2572 macro suppresses insertion of a space between the current position and its
2574 For example, it is useful for old style argument lists where there is no
2575 space between the flag and argument:
2577 .Dl "Usage:" ... Ao argument Ac \&Ns Oo Ao argument Ac Oc ...
2578 .Dl " " .Ns Ao argument Ac ...
2580 .Bl -tag -width ".Li .Op\ Fl\ I\ Ns\ Ar\ directory" -compact -offset 15n
2581 .It Li ".Op Fl I Ns Ar directory"
2582 .Op Fl I Ns Ar directory
2587 macro always invokes the
2589 macro after eliminating the space unless another macro name follows it.
2590 If used as a command (i.e., the second form above in the
2597 .Ss "Section Cross References"
2601 macro designates a reference to a section header within the same document.
2603 .Dl Usage: .Sx Ao section reference Ac ...
2605 .Bl -tag -width ".Li .Sx\ FILES" -offset 15n
2611 The default width is 16n.
2615 The symbolic emphasis macro is generally a boldface macro in either the
2616 symbolic sense or the traditional English usage.
2618 .Dl Usage: .Sy Ao symbol Ac ...
2620 .Bl -tag -width ".Li .Sy\ Important\ Notice" -compact -offset 15n
2621 .It Li ".Sy Important Notice"
2622 .Sy Important Notice
2626 The default width is 6n.
2628 .Ss Mathematical Symbols
2630 Use this macro for mathematical symbols and similar things.
2632 .Dl Usage: .Ms Ao math symbol Ac ...
2634 .Bl -tag -width ".Li .Ms\ sigma" -compact -offset 15n
2640 The default width is 6n.
2642 .Ss "References and Citations"
2644 The following macros make a modest attempt to handle references.
2645 At best, the macros make it convenient to manually drop in a subset of
2649 .Bl -tag -width 6n -offset indent -compact
2651 Reference start (does not take arguments).
2652 Causes a line break in the
2654 section and begins collection of reference information until the reference
2657 Reference end (does not take arguments).
2658 The reference is printed.
2660 Reference author name; one name per invocation.
2668 Issuer/publisher name.
2674 Optional information.
2678 Corporate or foreign author.
2684 Optional hypertext reference.
2689 Macros beginning with
2691 are not callable but accept multiple arguments in the usual way.
2694 macro is handled properly as a parameter; other macros will cause strange
2699 can be used outside of the
2705 .Bd -literal -offset indent
2709 \&.%T "Implementation Notes on foobar(1)"
2710 \&.%R "Technical Report ABC\-DE\-12\-345"
2711 \&.%Q "Drofnats College"
2719 .Bd -ragged -offset indent
2723 .%T "Implementation Notes on foobar(1)"
2724 .%R "Technical Report ABC-DE-12-345"
2725 .%Q "Drofnats College"
2731 .Ss "Trade Names (or Acronyms and Type Names)"
2733 The trade name macro prints its arguments in a smaller font.
2734 Its intended use is to imitate a small caps fonts for uppercase acronyms.
2736 .Dl Usage: .Tn Ao symbol Ac ...
2738 .Bl -tag -width ".Li .Tn\ ASCII" -compact -offset 15n
2746 The default width is 10n.
2748 .Ss "Extended Arguments"
2754 macros allow one to extend an argument list on a macro boundary for the
2761 are implemented similarly to all other macros opening and closing an
2762 enclosure (without inserting characters, of course).
2763 This means that the following is true for those macros also.
2765 Here is an example of
2767 using the space mode macro to turn spacing off:
2769 .Bd -literal -offset indent
2771 \&.It Xo Sy I Ar operation
2772 \&.No \een Ar count No \een
2780 .Bd -filled -offset indent
2783 .It Xo Sy I Ar operation
2784 .No \en Ar count No \en
2793 .Bd -literal -offset indent
2795 \&.It Cm S No / Ar old_pattern Xo
2796 \&.No / Ar new_pattern
2805 .Bd -filled -offset indent
2808 .It Cm S No \&/ Ar old_pattern Xo
2809 .No \&/ Ar new_pattern
2819 and enclosure macros: Test the value of a variable.
2821 .Bd -literal -offset indent
2824 \&.Oo \e&! Oc Ns Ar variable Oo
2825 \&.Ar operator variable ...
2832 .Bd -filled -offset indent
2833 .Bl -tag -width flag -compact
2836 .Oo \&! Oc Ns Ar variable Oo
2837 .Ar operator variable ...
2844 .Sh "PAGE STRUCTURE DOMAIN"
2846 .Ss "Section Headers"
2850 section header macros are required in every man page.
2851 The remaining section headers are recommended at the discretion of the
2852 author writing the manual page.
2855 macro is parsed but not generally callable.
2856 It can be used as an argument in a call to
2858 only; it then reactivates the default font for
2861 The default width is 8n.
2863 .Bl -tag -width ".Li .Sh\ RETURN\ VALUES"
2868 If not specified, headers, footers and page layout defaults will not be set
2869 and things will be rather unpleasant.
2872 section consists of at least three items.
2875 name macro naming the subject of the man page.
2876 The second is the name description macro,
2878 which separates the subject name from the third item, which is the
2880 The description should be the most terse and lucid possible, as the space
2886 then all its arguments.
2888 .It Li ".Sh LIBRARY"
2889 This section is for section two and three function calls.
2890 It should consist of a single
2894 .Sx "Library Names" .
2896 .It Li ".Sh SYNOPSIS"
2899 section describes the typical usage of the subject of a man page.
2900 The macros required are either
2911 The function name macro
2913 is required for manual page sections\~2 and\~3; the command and general name
2916 is required for sections 1, 5, 6, 7, and\~8.
2917 Section\~4 manuals require a
2922 configuration device usage macro.
2923 Several other macros may be necessary to produce the synopsis line as shown
2926 .Bd -filled -offset indent
2934 The following macros were used:
2937 .Dl ".Op Fl benstuv"
2941 .It Li ".Sh DESCRIPTION"
2942 In most cases the first text in the
2944 section is a brief paragraph on the command, function or file, followed by a
2945 lexical list of options and respective explanations.
2946 To create such a list, the
2953 macros are used (see
2954 .Sx Lists and Columns
2957 .It Li ".Sh IMPLEMENTATION NOTES"
2958 Implementation specific information should be placed here.
2960 .It Li ".Sh RETURN VALUES"
2961 Sections 2, 3 and\~9 function return values should go here.
2964 macro may be used to generate text for use in the
2966 section for most section 2 and 3 library functions;
2968 .Sx "Return Values" .
2974 section headers are part of the preferred manual page layout and must be
2975 used appropriately to maintain consistency.
2976 They are listed in the order in which they would be used.
2978 .Bl -tag -width ".Li .Sh\ COMPATIBILITY"
2979 .It Li ".Sh ENVIRONMENT"
2982 section should reveal any related environment variables and clues to their
2983 behavior and/or usage.
2986 Files which are used or created by the man page subject should be listed via
2993 .It Li ".Sh EXAMPLES"
2994 There are several ways to create examples.
2997 section below for details.
2999 .It Li ".Sh DIAGNOSTICS"
3000 Diagnostic messages from a command should be placed in this section.
3003 macro may be used to generate text for use in the
3005 section for most section 1, 6 and\~8 commands;
3009 .It Li ".Sh COMPATIBILITY"
3010 Known compatibility issues (e.g.\& deprecated options or parameters)
3011 should be listed here.
3014 Specific error handling, especially from library functions (man page
3015 sections 2, 3, and\~9) should go here.
3018 macro is used to specify an error (errno).
3020 .It Li ".Sh SEE ALSO"
3021 References to other material on the man page topic and cross references to
3022 other relevant man pages should be placed in the
3025 Cross references are specified using the
3030 style references are not accommodated.
3032 It is recommended that the cross references are sorted on the section
3033 number, then alphabetically on the names within a section, and placed
3034 in that order and comma separated.
3042 .It Li ".Sh STANDARDS"
3043 If the command, library function or file adheres to a specific
3044 implementation such as
3048 this should be noted here.
3049 If the command does not adhere to any standard, its history should be noted
3054 .It Li ".Sh HISTORY"
3055 Any command which does not adhere to any specific standards should be
3056 outlined historically in this section.
3058 .It Li ".Sh AUTHORS"
3059 Credits should be placed here.
3062 macro for names and the
3064 macro for e-mail addresses within optional contact information.
3065 Explicitly indicate whether the person authored the initial manual page
3066 or the software or whatever the person is being credited for.
3068 Blatant problems with the topic go here.
3074 sections may be added; for example, this section was set with:
3076 .Bd -literal -offset 15n
3077 \&.Sh "PAGE STRUCTURE DOMAIN"
3080 .Ss "Subsection Headers"
3082 Subsection headers have exactly the same syntax as section headers:
3084 is parsed but not generally callable.
3085 It can be used as an argument in a call to
3087 only; it then reactivates the default font for
3090 The default width is 8n.
3092 .Ss "Paragraphs and Line Spacing"
3094 .Bl -tag -width ".Li .Pp"
3098 paragraph command may be used to specify a line space where necessary.
3099 The macro is not necessary after a
3107 macro (which both assert a vertical distance unless the
3111 The macro is neither callable nor parsed and takes no arguments; an
3118 .\" This worked with version one, need to redo for version three
3121 .\" .Cw (ax+bx+c) \ is\ produced\ by\ \&
3122 .\" .\".Cw (ax+bx+c) \&.Va_by_) \&_and_\& \&[?/]m_b1_e1_f1[?/]\&
3139 .\" .Em is produced by
3155 .\" This example shows the same equation in a different format.
3159 .\" signs were forced with
3163 .\" .Cw (ax\ +\ bx\ +\ c) \ is\ produced\ by\ \&
3164 .\" .\".Cw (ax+bx+c) \&.Va_by_) \&_and_\& \&[?/]m_b1_e1_f1[?/]\&
3175 .\" .Li \&.Cx \e\ +\e\ \e&
3186 .\" .Em is produced by
3194 .\" .Li \&.Cx \e\ +\e\ \e&
3205 .\" The incantation below was
3211 .\" .Cw \&[?/]m_b1_e1_f1[?/]\& is\ produced\ by
3213 .\" .Li \&.Cx Op Sy ?/
3223 .\" .Em is produced by
3225 .\" .Li \&.Ar \e\ b1 e1 f1
3239 The only keep that is implemented at this time is for words.
3246 The only option that
3248 accepts currently is
3250 (this is also the default if no option is given) which is useful for
3251 preventing line breaks in the middle of options.
3252 In the example for the make command line arguments (see
3253 .Sx What's in a Name ) ,
3256 from placing up the flag and the argument on separate lines.
3258 Both macros are neither callable nor parsed.
3260 More work needs to be done with the keep macros; specifically, a
3262 option should be added.
3264 .Ss "Examples and Displays"
3266 There are seven types of displays.
3268 .Bl -tag -width ".Li .D1"
3271 Display one line of indented text.
3272 This macro is parsed but not callable.
3276 The above was produced by:
3277 .Li ".D1 Fl ldghfstru" .
3281 Display one line of indented
3286 example macro has been used throughout this file.
3287 It allows the indentation (display) of one line of text.
3288 Its default font is set to constant width (literal).
3290 is parsed but not callable.
3292 .Dl % ls \-ldg /usr/local/bin
3294 The above was produced by:
3295 .Li ".Dl % ls \e\-ldg /usr/local/bin" .
3301 display must be ended with the
3304 It has the following syntax:
3306 .Bd -ragged -compact
3307 .Bl -tag -width ".Li .Bd" -offset indent
3309 .Bro \-literal | \-filled | \-unfilled | \-ragged | \-centered Brc
3310 .Oo \-offset Ao string Ac Oc Oo \-file Ao file name Ac Oc Oo \-compact Oc Xc
3315 .Bl -tag -width ".Fl file Ao Ar file name Ac " -compact
3317 Fill, but do not adjust the right margin (only left-justify).
3319 Center lines between the current left and right margin.
3320 Note that each single line is centered.
3322 Do not fill; display a block of text as typed, using line breaks as
3323 specified by the user.
3324 This can produce overlong lines without warning messages.
3326 Display a filled block.
3327 The block of text is formatted (i.e., the text is justified on both the left
3330 Display block with literal font (usually fixed-width).
3331 Useful for source code or simple tabbed or spaced text.
3332 .It Fl file Ao Ar file name Ac
3333 The file whose name follows the
3335 flag is read and displayed before any data enclosed with
3339 using the selected display type.
3341 .Xr troff/ Ns Nm \-mdoc
3342 commands in the file will be processed.
3343 .It Fl offset Ao Ar string Ac
3346 is specified with one of the following strings, the string is interpreted to
3347 indicate the level of indentation for the forthcoming block of text:
3350 .Bl -tag -width ".Ar indent-two" -compact
3352 Align block on the current left margin; this is the default mode of
3355 Supposedly center the block.
3356 At this time unfortunately, the block merely gets left aligned about an
3357 imaginary center margin.
3359 Indent by one default indent value or tab.
3360 The default indent value is also used for the
3364 macros, so one is guaranteed the two types of displays will line up.
3365 The indentation value is normally set to\~6n or about two thirds of an inch
3366 (six constant width characters).
3368 Indent two times the default indent value.
3372 aligns the block about two inches from the right side of the page.
3373 This macro needs work and perhaps may never do the right thing within
3380 is a valid numeric expression instead
3381 .Pf ( Em with a scale indicator other than
3383 use that value for indentation.
3384 The most useful scale indicators are
3388 specifying the so-called
3392 This is approximately the width of the letters
3397 of the current font (for nroff output, both scale indicators give the same
3401 isn't a numeric expression, it is tested whether it is an
3403 macro name, and the default offset value associated with this macro is used.
3404 Finally, if all tests fail,
3407 (typeset with a fixed-width font) is taken as the offset.
3409 Suppress insertion of vertical space before begin of display.
3413 End display (takes no arguments).
3416 .Ss "Lists and Columns"
3418 There are several types of lists which may be initiated with the
3421 Items within the list are specified with the
3423 item macro, and each list must end with the
3426 Lists may be nested within themselves and within displays.
3427 The use of columns inside of lists or lists inside of columns is unproven.
3429 In addition, several list attributes may be specified such as the width of a
3430 tag, the list offset, and compactness (blank lines between items allowed or
3432 Most of this document has been formatted with a tag style list
3435 It has the following syntax forms:
3438 .Bd -ragged -compact
3439 .Bl -tag -width ".Li .Bl" -offset indent -compact
3441 .Bro \-hang | \-ohang | \-tag | \-diag | \-inset Brc
3442 .Oo \-width Ao string Ac Oc
3443 .Oo \-offset Ao string Ac Oc Oo \-compact Oc Xc
3445 .No \-column Oo \-offset Ao string Ac Oc
3446 .Ao string1 Ac Ao string2 Ac ... Xc
3448 .Bro \-item | \-enum Oo \-nested Oc | \-bullet | \-hyphen | \-dash Brc
3449 .Oo \-offset Ao string Ac Oc Oo \-compact Oc Xc
3454 And now a detailed description of the list types.
3457 .Bl -tag -width ".Fl column" -compact
3461 .Bd -literal -offset indent
3462 \&.Bl \-bullet \-offset indent \-compact
3464 Bullet one goes here.
3474 .Bl -bullet -offset indent -compact
3476 Bullet one goes here.
3482 .It Fl dash No ( or Fl hyphen )
3485 .Bd -literal -offset indent
3486 \&.Bl \-dash \-offset indent \-compact
3498 .Bl -dash -offset indent -compact
3509 .Bd -literal -offset indent
3510 \&.Bl \-enum \-offset indent \-compact
3522 .Bl -enum -offset indent -compact
3530 If you want to nest enumerated lists, use the
3532 flag (starting with the second-level list):
3534 .Bd -literal -offset indent
3535 \&.Bl \-enum \-offset indent \-compact
3538 \&.Bl \-enum \-nested \-compact
3542 And item three here.
3553 .Bl -enum -offset indent -compact
3556 .Bl -enum -nested -compact
3560 And item three here.
3570 without list markers.
3572 .Bd -literal -offset indent
3573 \&.Bl \-item \-offset indent
3589 .Bl -item -offset indent
3605 to specify the tag width.
3608 .Bl -tag -width "PPID" -compact -offset indent
3610 sleep time of the process (seconds blocked)
3614 resulting from references by the process
3615 to pages not loaded in core.
3617 numerical user-id of process owner
3619 numerical id of parent of process priority
3620 (non-positive when in non-interruptible wait)
3626 .Bd -literal -offset indent
3627 \&.Bl \-tag \-width "PPID" \-compact \-offset indent
3629 sleep time of the process (seconds blocked)
3633 resulting from references by the process
3634 to pages not loaded in core.
3636 numerical user\-id of process owner
3638 numerical id of parent of process priority
3639 (non\-positive when in non\-interruptible wait)
3645 Diag lists create section four diagnostic lists and are similar to inset
3646 lists except callable macros are ignored.
3649 flag is not meaningful in this context.
3653 .Bd -literal -offset indent
3655 \&.It You can't use Sy here.
3656 The message says all.
3664 .It You can't use Sy here.
3665 The message says all.
3670 A list with hanging tags.
3672 .Bl -hang -offset indent
3674 labels appear similar to tagged lists when the
3675 label is smaller than the label width.
3676 .It Em Longer hanged list labels
3677 blend into the paragraph unlike
3678 tagged paragraph labels.
3681 And the unformatted text which created it:
3683 .Bd -literal -offset indent
3684 \&.Bl \-hang \-offset indent
3686 labels appear similar to tagged lists when the
3687 label is smaller than the label width.
3688 \&.It Em Longer hanged list labels
3689 blend into the paragraph unlike
3690 tagged paragraph labels.
3696 Lists with overhanging tags do not use indentation for the items; tags are
3697 written to a separate line.
3699 .Bl -ohang -offset indent
3701 sleep time of the process (seconds blocked)
3705 resulting from references by the process
3706 to pages not loaded in core.
3708 numerical user-id of process owner
3710 numerical id of parent of process priority
3711 (non-positive when in non-interruptible wait)
3717 .Bd -literal -offset indent
3718 \&.Bl \-ohang \-offset indent
3720 sleep time of the process (seconds blocked)
3724 resulting from references by the process
3725 to pages not loaded in core.
3727 numerical user\-id of process owner
3729 numerical id of parent of process priority
3730 (non\-positive when in non\-interruptible wait)
3736 Here is an example of inset labels:
3737 .Bl -inset -offset indent
3739 The tagged list (also called a tagged paragraph)
3740 is the most common type of list used in the
3744 attribute as described below.
3746 Diag lists create section four diagnostic lists
3747 and are similar to inset lists except callable
3750 Hanged labels are a matter of taste.
3752 Overhanging labels are nice when space is constrained.
3754 Inset labels are useful for controlling blocks of
3755 paragraphs and are valuable for converting
3757 manuals to other formats.
3760 Here is the source text which produced the above example:
3762 .Bd -literal -offset indent
3763 \&.Bl \-inset \-offset indent
3765 The tagged list (also called a tagged paragraph)
3766 is the most common type of list used in the
3769 Diag lists create section four diagnostic lists
3770 and are similar to inset lists except callable
3773 Hanged labels are a matter of taste.
3775 Overhanging labels are nice when space is constrained.
3777 Inset labels are useful for controlling blocks of
3778 paragraphs and are valuable for converting
3780 manuals to other formats.
3786 This list type generates multiple columns.
3787 The number of columns and the width of each column is determined by the
3798 (dot) immediately followed by a valid
3800 macro name, interpret
3802 and use the width of the result.
3803 Otherwise, the width of
3805 (typeset with a fixed-width font) is taken as the
3811 argument is parsed to make a row, each column within the row is a separate
3812 argument separated by a tab or the
3818 .Bl -column -offset indent ".Sy String" ".Sy Nroff" ".Sy Troff"
3819 .It Sy String Ta Sy Nroff Ta Sy Troff
3820 .It Li <= Ta <= Ta \*(<=
3821 .It Li >= Ta >= Ta \*(>=
3828 \&.Bl \-column \-offset indent ".Sy String" ".Sy Nroff" ".Sy Troff"
3829 \&.It Sy String Ta Sy Nroff Ta Sy Troff
3830 \&.It Li <= Ta <= Ta \e*(<=
3831 \&.It Li >= Ta >= Ta \e*(>=
3836 Don't abuse this list type!
3837 For more complicated cases it might be far better and easier to use
3839 the table preprocessor.
3845 .Bl -tag -width ".Fl indent Ao Ar string Ac"
3846 .It Fl width Ao Ar string Ac
3851 (dot) immediately followed by a valid
3853 macro name, interpret
3855 and use the width of the result.
3856 Almost all lists in this document use this option.
3860 .Bd -literal -offset indent
3861 \&.Bl \-tag \-width ".Fl test Ao Ar string Ac"
3862 \&.It Fl test Ao Ar string Ac
3863 This is a longer sentence to show how the
3865 flag works in combination with a tag list.
3872 .Bl -tag -width ".Fl test Ao Ar string Ac"
3873 .It Fl test Ao Ar string Ac
3874 This is a longer sentence to show how the
3876 flag works in combination with a tag list.
3880 (Note that the current state of
3884 is interpreted; afterwards, all variables are restored again.
3885 However, boxes (used for enclosures) can't be saved in
3888 as a consequence, arguments must always be
3890 to avoid nasty errors.
3891 For example, do not write
3894 .Ql ".Ao Ar string Xc"
3895 instead if you really need only an opening angle bracket.)
3899 is a valid numeric expression
3900 .Em ( with a scale indicator other than
3902 use that value for indentation.
3903 The most useful scale indicators are
3907 specifying the so-called
3911 This is approximately the width of the letters
3916 of the current font (for nroff output, both scale indicators give the same
3920 isn't a numeric expression, it is tested whether it is an
3922 macro name, and the default width value associated with this macro is used.
3923 Finally, if all tests fail,
3926 (typeset with a fixed-width font) is taken as the width.
3928 If a width is not specified for the tag list type, every time
3930 is invoked, an attempt is made to determine an appropriate width.
3931 If the first argument to
3933 is a callable macro, the default width for that macro will be used;
3934 otherwise, the default width of
3937 .It Fl offset Ao Ar string Ac
3942 a default indent value (normally set to\~6n, similar to the value used in
3949 is a valid numeric expression instead
3950 .Pf ( Em with a scale indicator other than
3952 use that value for indentation.
3953 The most useful scale indicators are
3957 specifying the so-called
3961 This is approximately the width of the letters
3966 of the current font (for nroff output, both scale indicators give the same
3970 isn't a numeric expression, it is tested whether it is an
3972 macro name, and the default offset value associated with this macro is used.
3973 Finally, if all tests fail,
3976 (typeset with a fixed-width font) is taken as the offset.
3978 Suppress insertion of vertical space before the list and between list items.
3982 .Sh "MISCELLANEOUS MACROS"
3984 Here a list of the remaining macros which do not fit well into one of the
3986 We couldn't find real examples for the following macros:
3990 They are documented here for completeness \- if you know how to use them
3991 properly please send a mail to
3992 .Mt bug-groff@gnu.org
3993 (including an example).
3995 .Bl -tag -width ".Li .Bt"
3999 .Bd -ragged -offset indent
4003 It is neither callable nor parsed and takes no arguments.
4007 .Dl Usage: .Fr Ao function return value Ac ...
4009 Don't use this macro.
4010 It allows a break right before the return value (usually a single digit)
4011 which is bad typographical behaviour.
4014 to tie the return value to the previous word.
4017 Use this macro to include a (header) file literally.
4020 followed by the file name, then the contents of
4023 .Dl Usage: .Hf Ao file Ac
4025 It is neither callable nor parsed.
4031 Exact usage unknown.
4032 The documentation in the
4034 source file describes it as a macro for
4035 .Dq "menu entries" .
4037 Its default width is 6n.
4043 Exact usage unknown.
4044 The documentation in the
4046 source file describes it as
4047 .Dq old function type (fortran) .
4050 Activate (toggle) space mode.
4052 .Dl Usage: .Sm Oo on | off Oc ...
4054 If space mode is off, no spaces between macro arguments are inserted.
4055 If called without a parameter (or if the next parameter is neither
4065 .Bd -ragged -offset indent
4069 It is neither callable nor parsed and takes no arguments.
4073 .Sh "PREDEFINED STRINGS"
4075 The following strings are predefined:
4080 String Nroff Troff Meaning
4081 <= <= \*[<=] less equal
4082 >= >= \*[>=] greater equal
4083 Rq '' \*[Rq] right double quote
4084 Lq `` \*[Lq] left double quote
4085 ua ^ \*[ua] upwards arrow
4086 aa \' \*[aa] acute accent
4087 ga \` \*[ga] grave accent
4088 q \&" \*[q] straight double quote
4089 Pi pi \*[Pi] greek pi
4090 Ne != \*[Ne] not equal
4091 Le <= \*[Le] less equal
4092 Ge >= \*[Ge] greater equal
4093 Lt < \*[Lt] less than
4094 Gt > \*[Gt] greater than
4095 Pm +\- \*[Pm] plus minus
4096 If infinity \*[If] infinity
4097 Am \*[Am] \*[Am] ampersand
4098 Na \*[Na] \*[Na] not a number
4099 Ba \*[Ba] \*[Ba] vertical bar
4102 The names of the columns
4106 are a bit misleading;
4110 representation, while
4112 gives the best glyph form available.
4113 For example, a Unicode enabled
4115 device will have proper glyph representations for all strings, whereas the
4116 enhancement for a Latin1
4118 device is only the plus-minus sign.
4120 String names which consist of two characters can be written as
4122 string names which consist of one character can be written as
4124 A generic syntax for a string name of any length is
4133 \#=====================================================================
4139 available in previous versions of
4141 has been removed since
4144 provides better facilities to check parameters; additionally, many error and
4145 warning messages have been added to this macro package, making it both more
4148 The only remaining debugging macro is
4150 which yields a register dump of all global registers and strings.
4151 A normal user will never need it.
4154 .Sh "FORMATTING WITH GROFF, TROFF, AND NROFF"
4156 By default, the package inhibits page breaks, headers, and footers if
4163 to make the manual more efficient for viewing on-line.
4164 This behaviour can be changed (e.g.\& to create a hardcopy of the
4166 output) by setting the register
4168 to zero while calling
4170 resulting in multiple pages instead of a single, very long page:
4172 .Dl groff \-Tlatin1 \-rcR=0 \-mdoc foo.man > foo.txt
4174 For double-sided printing, set register
4178 .Dl groff \-Tps \-rD1 \-mdoc foo.man > foo.ps
4180 To change the document font size to 11pt or 12pt, set register
4184 .Dl groff \-Tdvi \-rS11 \-mdoc foo.man > foo.dvi
4192 The line and title length can be changed by setting the registers
4198 .Dl groff \-Tutf8 \-rLL=100n \-rLT=100n \-mdoc foo.man | less
4200 If not set, both registers default to 78n for TTY devices and 6.5i
4206 .Bl -tag -width mdoc/doc-ditroff -compact
4208 The main manual macro package.
4210 A wrapper file to call
4212 .It Pa mdoc/doc-common
4213 Common strings, definitions, stuff related typographic output.
4214 .It Pa mdoc/doc-nroff
4215 Definitions used for a
4218 .It Pa mdoc/doc-ditroff
4219 Definitions used for all other devices.
4221 Local additions and customizations.
4223 Use this file if you don't know whether the
4227 package should be used.
4228 Multiple man pages (in either format) can be handled.
4242 Section 3f has not been added to the header routines.
4245 font should be changed in
4250 needs to have a check to prevent splitting up
4251 if the line length is too short.
4253 separates the last parenthesis, and sometimes
4254 looks ridiculous if a line is in fill mode.
4256 The list and display macros do not do any keeps
4257 and certainly should be able to.
4258 .\" Note what happens if the parameter list overlaps a newline
4260 .\" to make sure a line boundary is crossed:
4262 .\" \&.Fn struct\e\ dictionarytable\e\ *dictionarylookup struct\e\ dictionarytable\e\ *tab[]
4265 .\" produces, nudge nudge,
4266 .\" .Fn struct\ dictionarytable\ *dictionarylookup char\ *h struct\ dictionarytable\ *tab[] ,
4267 .\" .Fn struct\ dictionarytable\ *dictionarylookup char\ *h struct\ dictionarytable\ *tab[] ,
4269 .\" .Fn struct\ dictionarytable\ *dictionarylookup char\ *h struct\ dictionarytable\ *tab[] .
4271 .\" If double quotes are used, for example:
4273 .\" \&.Fn \*qstruct dictionarytable *dictionarylookup\*q \*qchar *h\*q \*qstruct dictionarytable *tab[]\*q
4276 .\" produces, nudge nudge,
4277 .\" .Fn "struct dictionarytable *dictionarylookup" "char *h" "struct dictionarytable *tab[]" ,
4279 .\" .Fn "struct dictionarytable *dictionarylookup" "char *h" "struct dictionarytable *tab[]" ,
4281 .\" .Fn "struct dictionarytable *dictionarylookup" "char *h" "struct dictionarytable *tab[]" .
4283 .\" Not a pretty sight...
4284 .\" In a paragraph, a long parameter containing unpaddable spaces as
4285 .\" in the former example will cause
4287 .\" to break the line and spread
4288 .\" the remaining words out.
4289 .\" The latter example will adjust nicely to
4290 .\" justified margins, but may break in between an argument and its
4294 .\" the right margin adjustment is normally ragged and the problem is
4297 .\" Local Variables: