]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/groff/tmac/groff_mdoc.man
Bring in latest (cosmetic) vendor fixes to this file.
[FreeBSD/FreeBSD.git] / contrib / groff / tmac / groff_mdoc.man
1 .\" groff_mdoc.man
2 .\"
3 .\"   A complete reference of the mdoc macro package for GNU troff.
4 .\"
5 .\" Based on NetBSD's mdoc.samples.7, version 1.21.
6 .\"
7 .\"
8 .\"   Warning: You can't format this file with the old mdoc macros!
9 .\"
10 .\"
11 .\" Copyright (c) 1990, 1993
12 .\"     The Regents of the University of California.  All rights reserved.
13 .\"
14 .\" Redistribution and use in source and binary forms, with or without
15 .\" modification, are permitted provided that the following conditions
16 .\" are met:
17 .\" 1. Redistributions of source code must retain the above copyright
18 .\"    notice, this list of conditions and the following disclaimer.
19 .\" 2. Redistributions in binary form must reproduce the above copyright
20 .\"    notice, this list of conditions and the following disclaimer in the
21 .\"    documentation and/or other materials provided with the distribution.
22 .\" 3. All advertising materials mentioning features or use of this software
23 .\"    must display the following acknowledgement:
24 .\"      This product includes software developed by the University of
25 .\"      California, Berkeley and its contributors.
26 .\" 4. Neither the name of the University nor the names of its contributors
27 .\"    may be used to endorse or promote products derived from this software
28 .\"    without specific prior written permission.
29 .\"
30 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
31 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
32 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
33 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
34 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
35 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
36 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
37 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
38 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
39 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
40 .\" SUCH DAMAGE.
41 .\"
42 .\"     @(#)mdoc.samples.7 8.2 (Berkeley) 12/30/93
43 .\"
44 .\" This reference invokes every macro in the package several
45 .\" times and is guaranteed to give a worst case performance
46 .\" for an already extremely slow package.
47 .\"
48 .
49 .Dd July 20, 2001
50 .Os
51 .Dt GROFF_MDOC 7
52 .
53 .
54 .Sh NAME
55 .
56 .Nm groff_mdoc
57 .Nd reference for groff's mdoc implementation
58 .
59 .
60 .Sh SYNOPSIS
61 .
62 .Nm groff Fl m Ns Cm doc Ar
63 .
64 .
65 .Sh DESCRIPTION
66 .
67 A complete reference for writing
68 .Ux
69 manual pages with the
70 .Nm \-mdoc
71 macro package; a
72 .Em content Ns -based
73 and
74 .Em domain Ns -based
75 formatting package for
76 .Tn GNU
77 .Xr troff 1 .
78 Its predecessor, the
79 .Xr \-man 7
80 package, addressed page layout leaving the manipulation of fonts and other
81 typesetting details to the individual author.
82 In
83 .Nm \-mdoc ,
84 page layout macros make up the
85 .Em "page structure domain"
86 which consists of macros for titles, section headers, displays and lists
87 \- essentially items which affect the physical position of text on a
88 formatted page.
89 In addition to the page structure domain, there are two more domains, the
90 .Em manual
91 domain and the
92 .Em general
93 text domain.
94 The general text domain is defined as macros which perform tasks such as
95 quoting or emphasizing pieces of text.
96 The manual domain is defined as macros that are a subset of the day to day
97 informal language used to describe commands, routines and related
98 .Ux
99 files.
100 Macros in the manual domain handle command names, command line arguments and
101 options, function names, function parameters, pathnames, variables, cross
102 references to other manual pages, and so on.
103 These domain items have value for both the author and the future user of the
104 manual page.
105 It is hoped the consistency gained across the manual set will provide easier
106 translation to future documentation tools.
107 .Pp
108 Throughout the
109 .Ux
110 manual pages, a manual entry is simply referred to as a man page, regardless
111 of actual length and without sexist intention.
112 .
113 .
114 .Sh "GETTING STARTED"
115 .
116 The material presented in the remainder of this document is outlined
117 as follows:
118 .
119 .Bl -enum -width 3n -offset indent
120 .  It
121 .  Tn "TROFF IDIOSYNCRASIES"
122 .
123 .  Bl -tag -width 2n -compact
124 .    It "Macro Usage"
125 .    It "Passing Space Characters in an Argument"
126 .    It "Trailing Blank Space Characters"
127 .    It "Escaping Special Characters"
128 .    It "Other Possible Pitfalls"
129 .  El
130 .
131 .  It
132 .  Tn "A MANUAL PAGE TEMPLATE"
133 .
134 .  It
135 .  Tn "CONVENTIONS"
136 .
137 .  It
138 .  Tn "TITLE MACROS"
139 .
140 .  It
141 .  Tn "INTRODUCTION OF MANUAL AND GENERAL TEXT DOMAINS"
142 .
143 .  Bl -tag -width 2n -compact
144 .    It "What's in a Name" Ns ...
145 .    It "General Syntax"
146 .  El
147 .
148 .  It
149 .  Tn "MANUAL DOMAIN"
150 .
151 .  Bl -tag -width 2n -compact
152 .    It "Addresses"
153 .    It "Author Name"
154 .    It "Arguments"
155 .    It "Configuration Declarations (Section Four Only)"
156 .    It "Command Modifiers"
157 .    It "Defined Variables"
158 .    It "Errno's"
159 .    It "Environment Variables"
160 .    It "Flags"
161 .    It "Function Declarations"
162 .    It "Function Types"
163 .    It "Functions (Library Routines)"
164 .    It "Function Arguments"
165 .    It "Return Values"
166 .    It "Exit Status"
167 .    \" .It "Header File (including source code)"
168 .    It "Interactive Commands"
169 .    It "Library Names"
170 .    It "Literals"
171 .    It "Names"
172 .    It "Options"
173 .    It "Pathnames"
174 .    It "Standards"
175 .    It "Variable Types"
176 .    It "Variables"
177 .    It "Manual Page Cross References"
178 .  El
179 .
180 .  It
181 .  Tn "GENERAL TEXT DOMAIN"
182 .
183 .  Bl -tag -width 2n -compact
184 .    It "AT&T Macro"
185 .    It "BSD Macro"
186 .    It "NetBSD Macro"
187 .    It "FreeBSD Macro"
188 .    It "OpenBSD Macro"
189 .    It "BSD/OS Macro"
190 .    It "UNIX Macro"
191 .    It "Emphasis Macro"
192 .    It "Font Mode"
193 .    It "Enclosure and Quoting Macros"
194 .    It "No-Op or Normal Text Macro"
195 .    It "No-Space Macro"
196 .    It "Section Cross References"
197 .    It "Symbolics"
198 .    It "Mathematical Symbols"
199 .    It "References and Citations"
200 .    It "Trade Names (or Acronyms and Type Names)"
201 .    It "Extended Arguments"
202 .  El
203 .
204 .  It
205 .  Tn "PAGE STRUCTURE DOMAIN"
206 .
207 .  Bl -tag -width 2n -compact
208 .    It "Section Headers"
209 .    It "Subsection Headers"
210 .    It "Paragraphs and Line Spacing"
211 .    It "Keeps"
212 .    It "Examples and Displays"
213 .    It "Lists and Columns"
214 .  El
215 .
216 .  It
217 .  Tn "MISCELLANEOUS MACROS"
218 .
219 .  It
220 .  Tn "PREDEFINED STRINGS"
221 .
222 .  It
223 .  Tn "DIAGNOSTICS"
224 .
225 .  It
226 .  Tn "FORMATTING WITH GROFF, TROFF, AND NROFF"
227 .
228 .  It
229 .  Tn "FILES"
230 .
231 .  It
232 .  Tn "SEE ALSO"
233 .
234 .  It
235 .  Tn "BUGS"
236 .El
237 .
238 .\" XXX
239 .if t \
240 .  ne 7
241 .
242 .
243 .Sh "TROFF IDIOSYNCRASIES"
244 .
245 The
246 .Nm \-mdoc
247 package attempts to simplify the process of writing a man page.
248 Theoretically, one should not have to learn the dirty details of
249 .Tn GNU
250 .Xr troff 1
251 to use
252 .Nm \-mdoc ;
253 however, there are a few limitations which are unavoidable and best gotten
254 out of the way.
255 And, too, be forewarned, this package is
256 .Em not
257 fast.
258 .
259 .Ss "Macro Usage"
260 .
261 As in
262 .Tn GNU
263 .Xr troff 1 ,
264 a macro is called by placing a
265 .Ql .\&
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 characters between the dot and the macro name (but
269 .Em no
270 tabs).
271 Arguments may follow the macro separated by spaces (again, no tabs).
272 It is the dot character at the beginning of the line which causes
273 .Tn GNU
274 .Xr troff 1
275 to interpret the next two (or more) characters as a macro name.
276 A single starting dot followed by nothing is ignored.
277 To place a
278 .Ql .\&
279 (dot character) at the beginning of an input line in some context other than
280 a macro invocation, precede the
281 .Ql .\&
282 (dot) with the
283 .Ql \e&
284 escape sequence.
285 The
286 .Ql \e&
287 translates literally to a zero-width space, and is never displayed in
288 the output.
289 .Pp
290 In general,
291 .Tn GNU
292 .Xr troff 1
293 macros accept an unlimited number of arguments (contrary to other versions
294 of troff which can't handle more than nine arguments).
295 In limited cases, arguments may be continued or extended on the next
296 line (See
297 .Sx Extended Arguments
298 below).
299 Almost all macros handle quoted arguments (see
300 .Sx Passing Space Characters in an Argument
301 below).
302 .Pp
303 Most of the
304 .Nm \-mdoc
305 general text domain and manual domain macros are special in that their
306 argument lists are
307 .Em parsed
308 for callable macro names.
309 This means an argument on the argument list which matches a general text or
310 manual domain macro name and is determined to be callable will be executed
311 or called when it is processed.
312 In this case the argument, although the name of a macro, is not preceded by
313 a
314 .Ql .\&
315 (dot).
316 It is in this manner that many macros are nested; for example the
317 option macro,
318 .Ql .Op ,
319 may
320 .Em call
321 the flag and argument macros,
322 .Ql \&Fl
323 and
324 .Ql \&Ar ,
325 to specify an optional flag with an argument:
326 .
327 .Bl -tag -width ".Op Fl s Ar bytes" -offset indent
328 .It Op Fl s Ar bytes
329 is produced by
330 .Ql ".Op Fl s Ar bytes"
331 .El
332 .
333 .Pp
334 To prevent a string from being interpreted as a macro name, precede the
335 string with the escape sequence
336 .Ql \e& :
337 .
338 .Bl -tag -width ".Op \&Fl s \&Ar bytes" -offset indent
339 .It Op \&Fl s \&Ar bytes
340 is produced by
341 .Ql ".Op \e&Fl s \e&Ar bytes"
342 .El
343 .
344 .Pp
345 Here the strings
346 .Ql \&Fl
347 and
348 .Ql \&Ar
349 are not interpreted as macros.
350 Macros whose argument lists are parsed for callable arguments are referred
351 to as
352 .Em parsed
353 and macros which may be called from an argument list are referred to as
354 .Em callable
355 throughout this document.
356 This is a technical
357 .Em faux pas
358 as almost all of the macros in
359 .Nm \-mdoc
360 are parsed, but as it was cumbersome to constantly refer to macros as
361 being callable and being able to call other macros, the term parsed
362 has been used.
363 .
364 .Ss "Passing Space Characters in an Argument"
365 .
366 Sometimes it is desirable to give as an argument a string containing one or
367 more blank space characters.
368 This may be necessary to specify arguments to macros which expect particular
369 arrangement of items in the argument list.  Additionally, it makes
370 .Nm \-mdoc
371 working faster.
372 For example, the function macro
373 .Ql .Fn
374 expects the first argument to be the name of a function and any remaining
375 arguments to be function parameters.
376 As
377 .Tn ANSI\~C
378 stipulates the declaration of function parameters in the parenthesized
379 parameter list, each parameter is guaranteed to be at minimum a two word
380 string.
381 For example,
382 .Fa int foo .
383 .Pp
384 There are two possible ways to pass an argument which contains
385 an embedded space.
386 One way of passing a string containing blank spaces is to use the hard or
387 unpaddable space character
388 .Ql \e\  ,
389 that is, a blank space preceded by the escape character
390 .Ql \e .
391 This method may be used with any macro but has the side effect of
392 interfering with the adjustment of text over the length of a line.
393 .Xr Troff
394 sees the hard space as if it were any other printable character and cannot
395 split the string into blank or newline separated pieces as one would expect.
396 This method is useful for strings which are not expected to overlap a line
397 boundary.
398 An alternative is to use
399 .Ql \e~ ,
400 a paddable (i.e.\& stretchable), unbreakable space (this is a
401 .Tn GNU
402 .Xr troff 1
403 extension).
404 The second method is to enclose the string with double quotes.
405 .Pp
406 For example:
407 .
408 .Bl -tag -width ".Fn fetch char\ *str" -offset indent
409 .It Fn fetch char\ *str
410 is created by
411 .Ql ".Fn fetch char\e *str"
412 .It Fn fetch "char *str"
413 can also be created by
414 .Ql ".Fn fetch \*[q]char *str\*[q]"
415 .El
416 .
417 .Pp
418 If the
419 .Ql \e
420 before the space resp.\& the double quotes were omitted,
421 .Ql .Fn
422 would see three arguments, and the result would be:
423 .Pp
424 .Dl Fn fetch char *str
425 .Pp
426 .\" For an example of what happens when the parameter list overlaps a newline
427 .\" boundary, see the
428 .\" .Sx BUGS
429 .\" section.
430 .
431 .Ss "Trailing Blank Space Characters"
432 .
433 .Xr Troff
434 can be confused by blank space characters at the end of a line.
435 It is a wise preventive measure to globally remove all blank spaces
436 from
437 .Ao blank-space Ac Ns Ao end-of-line Ac
438 character sequences.
439 Should the need arise to force a blank character at the end of a line, it
440 may be forced with an unpaddable space and the
441 .Ql \e&
442 escape character.
443 For example,
444 .Ql string\e\ \e& .
445 .
446 .Ss "Escaping Special Characters"
447 .
448 Special characters like the newline character
449 .Ql \en
450 are handled by replacing the
451 .Ql \e
452 with
453 .Ql \ee
454 (e.g.\&
455 .Ql \een )
456 to preserve the backslash.
457 .
458 .Ss "Other Possible Pitfalls"
459 .
460 A warning is emitted when an empty input line is found outside of displays
461 (see below).
462 Use
463 .Ql .sp
464 instead.
465 (Well, it is even better to use
466 .Nm \-mdoc
467 macros to avoid the usage of low-level commands.)
468 .Pp
469 Leading spaces will cause a break and are output directly.
470 Avoid this behaviour if possible.
471 Similarly, do not use more than one space character between words in an
472 ordinary text line; contrary to other text formatters, they are
473 .Em not
474 replaced with a single space.
475 .Pp
476 You can't pass
477 .Ql \*[q]
478 directly as an argument.
479 Use
480 .Ql \e*[q]
481 (or
482 .Ql \e*q )
483 instead.
484 .Pp
485 By default,
486 .Xr troff 1
487 inserts two space characters after a punctuation mark closing a sentence;
488 characters like
489 .Ql \&)
490 or
491 .Ql \&'
492 are treated transparently, not influencing the sentence-ending behaviour.
493 To change this, insert
494 .Ql \e&
495 before or after the dot:
496 .
497 .Bd -literal -offset indent
498 The
499 \&.Ql .
500 character.
501 \&.Pp
502 The
503 \&.Ql \e&.
504 character.
505 \&.Pp
506 \&.No test .
507 test
508 \&.Pp
509 \&.No test.
510 test
511 .Ed
512 .Pp
513 .
514 gives
515 .
516 .Bd -filled -offset indent
517 The
518 .Ql .
519 character
520 .Pp
521 The
522 .Ql \&.
523 character.
524 .Pp
525 .No test .
526 test
527 .Pp
528 .No test.
529 test
530 .Ed
531 .Pp
532 .
533 As can be seen in the first and third line,
534 .Nm \-mdoc
535 handles punctuation characters specially in macro arguments.
536 This will be explained in section
537 .Sx General Syntax
538 below.
539 In the same way, you have to protect trailing full stops of abbreviations
540 with a trailing zero-width space:
541 .Ql e.g.\e& .
542 .Pp
543 A comment in the source file of a man page can be either started with
544 .Ql .\e"
545 on a single line,
546 .Ql \e"
547 after some input, or
548 .Ql \e#
549 anywhere (the latter is a
550 .Tn GNU
551 .Xr troff 1
552 extension); the rest of such a line is ignored.
553 .
554 .
555 .Sh "A MANUAL PAGE TEMPLATE"
556 .
557 The body of a man page is easily constructed from a basic template:
558 .
559 .Bd -literal -offset indent
560 \&.\e" The following requests are required for all man pages.
561 \&.Dd Month day, year
562 \&.Os [OPERATING_SYSTEM] [version/release]
563 \&.Dt DOCUMENT_TITLE [section number] [architecture/volume]
564 \&.Sh NAME
565 \&.Nm name
566 \&.Nd one line description of name
567 \&.\e" This next request is for sections 2 and 3 only.
568 \&.\e" .Sh LIBRARY
569 \&.Sh SYNOPSIS
570 \&.Sh DESCRIPTION
571 \&.\e" The following requests should be uncommented and
572 \&.\e" used where appropriate.
573 \&.\e" .Sh IMPLEMENTATION NOTES
574 \&.\e" This next request is for sections 2, 3 and 9 function
575 \&.\e" return values only.
576 \&.\e" .Sh RETURN VALUES
577 \&.\e" This next request is for sections 1, 6, 7 and 8 only.
578 \&.\e" .Sh ENVIRONMENT
579 \&.\e" .Sh FILES
580 \&.\e" .Sh EXAMPLES
581 \&.\e" This next request is for sections 1, 6, 7, 8 and 9 only
582 \&.\e"     (command return values (to shell) and
583 \&.\e"     fprintf/stderr type diagnostics).
584 \&.\e" .Sh DIAGNOSTICS
585 \&.\e" .Sh COMPATIBILITY
586 \&.\e" This next request is for sections 2, 3 and 9 error
587 \&.\e"     and signal handling only.
588 \&.\e" .Sh ERRORS
589 \&.\e" .Sh SEE ALSO
590 \&.\e" .Sh STANDARDS
591 \&.\e" .Sh HISTORY
592 \&.\e" .Sh AUTHORS
593 \&.\e" .Sh BUGS
594 .Ed
595 .Pp
596 .
597 The first items in the template are the macros
598 .Ql .Dd ,
599 .Ql .Os ,
600 and
601 .Ql .Dt ;
602 the document date, the operating system the man page or subject source is
603 developed or modified for, and the man page title (in
604 .Em upper case )
605 along with the section of the manual the page belongs in.
606 These macros identify the page and are discussed below in
607 .Sx TITLE MACROS .
608 .Pp
609 The remaining items in the template are section headers
610 .Pf ( Li .Sh ) ;
611 of which
612 .Sx NAME ,
613 .Sx SYNOPSIS ,
614 and
615 .Sx DESCRIPTION
616 are mandatory.
617 The headers are discussed in
618 .Sx "PAGE STRUCTURE DOMAIN" ,
619 after presentation of
620 .Sx "MANUAL DOMAIN" .
621 Several content macros are used to demonstrate page layout macros; reading
622 about content macros before page layout macros is recommended.
623 .
624 .
625 .Sh CONVENTIONS
626 .
627 In the description of all macros below, optional arguments are put into
628 brackets.
629 An ellipsis
630 .Pf ( Sq ... )
631 represents zero or more additional arguments.
632 Alternative values for a parameter are separated with
633 .Ql | .
634 If there are alternative values for a mandatory parameter, braces are used
635 (together with
636 .Ql | )
637 to enclose the value set.
638 Meta-variables are specified within angles.
639 .Pp
640 Example:
641 .
642 .Bl -tag -width 6n -offset indent
643 .It Li .Xx Xo
644 .Aq foo 
645 .Brq bar1 | bar2
646 .Op \-test1 Op \-test2 | \-test3
647 .No ...
648 .Xc
649 .El
650 .
651 .Pp
652 Except stated explicitly, all macros are parsed and callable.
653 .Pp
654 Most macros have a default width value which can be used to specify a label
655 width
656 .Pf ( Fl width )
657 or offset
658 .Pf ( Fl offset )
659 for the
660 .Ql .Bl
661 and
662 .Ql .Bd
663 macros.
664 It is recommended not to use this rather obscure feature to avoid
665 dependencies on local modifications of the
666 .Nm \-mdoc
667 package.
668 .
669 .
670 .Sh "TITLE MACROS"
671 .
672 The title macros are part of the page structure domain but are presented
673 first and separately for someone who wishes to start writing a man page
674 yesterday.
675 Three header macros designate the document title or manual page title, the
676 operating system, and the date of authorship.
677 These macros are called once at the very beginning of the document and are
678 used to construct headers and footers only.
679 .
680 .Bl -tag -width 6n
681 .It Li .Dt Xo
682 .Op Aq document title
683 .Op Aq section number
684 .Op Aq volume
685 .Xc
686 The document title is the subject of the man page and must be in
687 .Tn CAPITALS
688 due to troff limitations.
689 If omitted,
690 .Sq Tn UNTITLED
691 is used.
692 The section number may be a number in the range
693 .No 1,\~ Ns ... Ns ,\~9
694 or
695 .Ql unass ,
696 .Ql draft ,
697 or
698 .Ql paper .
699 If it is specified, and no volume name is given, a default volume name is
700 used.
701 .
702 .Pp
703 Under
704 .Tn \*[operating-system] ,
705 the following sections are defined:
706 .Pp
707 .Bl -column LOCAL -offset indent -compact
708 .It Li 1   Ta "\*[volume-ds-1]"
709 .It Li 2   Ta "\*[volume-ds-2]"
710 .It Li 3   Ta "\*[volume-ds-3]"
711 .It Li 4   Ta "\*[volume-ds-4]"
712 .It Li 5   Ta "\*[volume-ds-5]"
713 .It Li 6   Ta "\*[volume-ds-6]"
714 .It Li 7   Ta "\*[volume-ds-7]"
715 .It Li 8   Ta "\*[volume-ds-8]"
716 .It Li 9   Ta "\*[volume-ds-9]"
717 .El
718 .Pp
719 .
720 A volume name may be arbitrary or one of the following:
721 .
722 .Pp
723 .Bl -column LOCAL -offset indent -compact
724 .It Li USD   Ta "\*[volume-ds-USD]"
725 .It Li PS1   Ta "\*[volume-ds-PS1]"
726 .It Li AMD   Ta "\*[volume-ds-AMD]"
727 .It Li SMM   Ta "\*[volume-ds-SMM]"
728 .It Li URM   Ta "\*[volume-ds-URM]"
729 .It Li PRM   Ta "\*[volume-ds-PRM]"
730 .It Li KM    Ta "\*[volume-ds-KM]"
731 .It Li IND   Ta "\*[volume-ds-IND]"
732 .It Li LOCAL Ta "\*[volume-ds-LOCAL]"
733 .It Li CON   Ta "\*[volume-ds-CON]"
734 .El
735 .Pp
736 .
737 For compatibility,
738 .Ql MMI
739 can be used for
740 .Ql IND ,
741 and
742 .Ql LOC
743 for
744 .Ql LOCAL .
745 Values from the previous table will specify a new volume name.
746 If the third parameter is a keyword designating a computer architecture,
747 its value is appended to the volume name as specified by the second
748 parameter.  By default, the following architecture keywords are defined:
749 .
750 \# we use `No' to avoid hyphenation
751 .Bd -ragged -offset indent
752 .No alpha , amiga , arc , arm26 , arm32 , atari , bebox , cobalt , evbsh3 ,
753 .No hp300 , hpcmips , i386 , luna68k , m68k , mac68k , macppc , mips ,
754 .No mmeye , mvme68k , news68k , newsmips , next68k , ofppc , pc532 , pmax ,
755 .No powerpc , prep , sgimips , sh3 , sparc , sparc64 , sun3 , tahoe , vax ,
756 .No x68k
757 .Ed
758 .Pp
759 .
760 In the following examples, the left (which is identical to the right) and
761 the middle part of the manual page header strings are shown.
762 .
763 .Bd -ragged
764 .Bl -tag -width ".Li .Dt\ FOO\ 2\ mac68k" -compact -offset indent
765 .It Li ".Dt FOO 7"
766 .Ql FOO(7)
767 .Ql System Reference Manual
768 .It Li ".Dt FOO 2 mac68k"
769 .Ql FOO(2)
770 .Ql System Programmer's Manual (mac68k Architecture)
771 .It Li ".Dt FOO \*[q]\*[q] bar"
772 .Ql FOO
773 .Ql bar
774 .El
775 .Ed
776 .Pp
777 .
778 Local, OS-specific additions might be found in the file
779 .Pa mdoc.local ;
780 look for strings named
781 .Ql volume-ds-XXX
782 (for the former type) and
783 .Ql volume-as-XXX
784 (for the latter type);
785 .Ql XXX
786 then denotes the keyword to be used with the
787 .Ql .Dt
788 macro.
789 .Pp
790 This macro is neither callable nor parsed.
791 .
792 .It Li .Os Xo
793 .Op Aq operating system
794 .Op Aq release
795 .Xc
796 If the first parameter is empty,
797 the default
798 .Sq Tn "\*[operating-system]"
799 is used.
800 This may be overridden in the local configuration file,
801 .Pa mdoc.local .
802 In general, the name of the operating system should be the common acronym,
803 e.g.\&
804 .Tn BSD
805 or
806 .Tn ATT .
807 The release should be the standard release nomenclature for the system
808 specified.
809 In the following table, the possible second arguments for some predefined
810 operating systems are listed.
811 Similar to
812 .Ql .Dt ,
813 local additions might be defined in
814 .Pa mdoc.local ;
815 look for strings named
816 .Ql operating-system-XXX-YYY ,
817 where
818 .Ql XXX
819 is the acronym for the operating system and
820 .Ql YYY
821 the release ID.
822 .
823 .Bd -ragged -compact
824 .Bl -tag -width ".No FreeBSD" -offset indent
825 .It ATT
826 7th, 7, III, 3, V, V.2, V.3, V.4
827 .It BSD
828 3, 4, 4.1, 4.2, 4.3, 4.3t, 4.3T, 4.3r, 4.3R, 4.4
829 .It NetBSD
830 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,
831 1.3, 1.3a, 1.4, 1.5
832 .It FreeBSD
833 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,
834 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,
835 4.2, 5.0
836 .El
837 .Ed
838 .Pp
839 .
840 For
841 .Tn ATT ,
842 an unknown second parameter will be replaced with the string
843 .Tn UNIX ;
844 for the other predefined acronyms it will be ignored and a warning message
845 emitted.
846 Unrecognized arguments are displayed as given in the page footer.
847 For instance, a typical footer might be:
848 .Pp
849 .Dl .Os BSD 4.3
850 .Pp
851 giving
852 .Ql 4.3\~Berkeley Distribution ,
853 or for a locally produced set
854 .Pp
855 .Dl .Os CS Department
856 .Pp
857 which will produce
858 .Ql CS\~Department .
859 .Pp
860 If the
861 .Ql .Os
862 macro is not present, the bottom left corner of the manual page will be
863 ugly.
864 .Pp
865 This macro is neither callable nor parsed.
866 .
867 .It Li .Dd Oo
868 .Aq month
869 .Aq day ,
870 .Aq year
871 .Oc
872 If
873 .Ql Dd
874 has no arguments,
875 .Ql Epoch
876 is used for the date string.
877 If it has exactly three arguments, they are concatenated, separated with
878 unbreakable space:
879 .Pp
880 .Dl .Dd January 25, 2001
881 .Pp
882 Otherwise, the current date is used, ignoring the parameters.
883 .Pp
884 This macro is neither callable nor parsed.
885 .El
886 .
887 .
888 .Sh "INTRODUCTION OF MANUAL AND GENERAL TEXT DOMAINS"
889 .
890 .Ss "What's in a Name" Ns ...
891 .
892 The manual domain macro names are derived from the day to day informal
893 language used to describe commands, subroutines and related files.
894 Slightly different variations of this language are used to describe the
895 three different aspects of writing a man page.
896 First, there is the description of
897 .Nm \-mdoc
898 macro request usage.
899 Second is the description of a
900 .Ux
901 command
902 .Em with
903 .Nm \-mdoc
904 macros, and third, the description of a command to a user in the verbal
905 sense; that is, discussion of a command in the text of a man page.
906 .Pp
907 In the first case,
908 .Xr troff 1
909 macros are themselves a type of command; the general syntax for a troff
910 command is:
911 .
912 .Bd -filled -offset indent
913 .Li ".Xx argument1 argument2" ...
914 .Ed
915 .Pp
916 .
917 .Ql .Xx
918 is a macro command or request, and anything following it are arguments to
919 be processed.
920 In the second case, the description of a
921 .Ux
922 command using the content macros is a bit more involved; a typical
923 .Sx SYNOPSIS
924 command line might be displayed as:
925 .
926 .Bd -filled -offset indent
927 .Nm filter
928 .Op Fl flag
929 .Ao Ar infile Ac Ao Ar outfile Ac
930 .Ed
931 .Pp
932 .
933 Here,
934 .Nm filter
935 is the command name and the
936 bracketed string
937 .Fl flag
938 is a
939 .Em flag
940 argument designated as optional by the option brackets.
941 In
942 .Nm \-mdoc
943 terms,
944 .Ao Ar infile Ac
945 and
946 .Ao Ar outfile Ac
947 are called
948 .Em meta arguments ;
949 in this example, the user has to replace the meta expressions given in angle
950 brackets with real file names.
951 Note that in this document meta arguments are used to describe
952 .Nm \-mdoc
953 commands; in most man pages, meta variables are not specifically written
954 with angle brackets.
955 The macros which formatted the above example:
956 .
957 .Bd -literal -offset indent
958 \&.Nm filter
959 \&.Op Fl flag
960 \&.Ao Ar infile Ac Ao Ar outfile Ac
961 .Ed
962 .Pp
963 .
964 In the third case, discussion of commands and command syntax includes both
965 examples above, but may add more detail.
966 The arguments
967 .Ao Ar infile Ac
968 and
969 .Ao Ar outfile Ac
970 from the example above might be referred to as
971 .Em operands
972 or
973 .Em file arguments .
974 Some command line argument lists are quite long:
975 .
976 .Bd -ragged
977 .Bl -tag -width ".Nm make" -offset indent -compact
978 .It Nm make
979 .Op Fl eiknqrstv
980 .Op Fl D Ar variable
981 .Op Fl d Ar flags
982 .Op Fl f Ar makefile
983 .Op Fl I Ar directory
984 .Op Fl j Ar max_jobs
985 .Op Ar variable Ns = Ns Ar value
986 .Bk
987 .Op Ar target ...
988 .Ek
989 .El
990 .Ed
991 .Pp
992 .
993 Here one might talk about the command
994 .Nm make
995 and qualify the argument,
996 .Ar makefile ,
997 as an argument to the flag,
998 .Fl f ,
999 or discuss the optional file operand
1000 .Ar target .
1001 In the verbal context, such detail can prevent confusion, however the
1002 .Nm \-mdoc
1003 package does not have a macro for an argument
1004 .Em to
1005 a flag.
1006 Instead the
1007 .Ql \&Ar
1008 argument macro is used for an operand or file argument like
1009 .Ar target
1010 as well as an argument to a flag like
1011 .Ar variable .
1012 The make command line was produced from:
1013 .
1014 .Bd -literal -offset indent
1015 \&.Nm make
1016 \&.Op Fl eiknqrstv
1017 \&.Op Fl D Ar variable
1018 \&.Op Fl d Ar flags
1019 \&.Op Fl f Ar makefile
1020 \&.Op Fl I Ar directory
1021 \&.Op Fl j Ar max_jobs
1022 \&.Op Ar variable Ns = Ns Ar value
1023 \&.Bk
1024 \&.Op Ar target ...
1025 \&.Ek
1026 .Ed
1027 .Pp
1028 .
1029 The
1030 .Ql .Bk
1031 and
1032 .Ql .Ek
1033 macros are explained in
1034 .Sx Keeps .
1035 .
1036 .Ss "General Syntax"
1037 .
1038 The manual domain and general text domain macros share a similar syntax with
1039 a few minor deviations; most notably,
1040 .Ql .Ar ,
1041 .Ql .Fl ,
1042 .Ql .Nm ,
1043 and
1044 .Ql .Pa
1045 differ only when called without arguments; and
1046 .Ql .Fn
1047 and
1048 .Ql .Xr
1049 impose an order on their argument lists.
1050 All content macros are capable of recognizing and properly handling
1051 punctuation, provided each punctuation character is separated by a leading
1052 space.
1053 If a request is given:
1054 .Pp
1055 .Dl \&.Ar sptr, ptr),
1056 .Pp
1057 The result is:
1058 .Pp
1059 .Dl Ar sptr, ptr),
1060 .Pp
1061 The punctuation is not recognized and all is output in the
1062 font used by
1063 .Ql .Ar .
1064 If the punctuation is separated by a leading white space:
1065 .Pp
1066 .Dl \&.Ar "sptr , ptr ) ,"
1067 .Pp
1068 The result is:
1069 .Pp
1070 .Dl Ar sptr , ptr ) ,
1071 .Pp
1072 The punctuation is now recognized and output in the default font
1073 distinguishing it from the argument strings.
1074 To remove the special meaning from a punctuation character escape it with
1075 .Ql \e& .
1076 .Pp
1077 .Xr Troff
1078 is limited as a macro language, and has difficulty when presented with a
1079 string containing a member of the mathematical, logical or quotation set:
1080 .
1081 .Bd -literal -offset indent-two
1082 {+,\-,/,*,%,<,>,<=,>=,=,==,&,`,',"}
1083 .Ed
1084 .Pp
1085 .
1086 The problem is that
1087 .Xr troff
1088 may assume it is supposed to actually perform the operation or evaluation
1089 suggested by the characters.
1090 To prevent the accidental evaluation of these characters, escape them with
1091 .Ql \e& .
1092 Typical syntax is shown in the first content macro displayed below,
1093 .Ql .Ad .
1094 .
1095 .
1096 .Sh "MANUAL DOMAIN"
1097 .
1098 .Ss Addresses
1099 .
1100 The address macro identifies an address construct.
1101 .Pp
1102 .Dl Usage: .Ad Ao address Ac ...
1103 .Pp
1104 .Bl -tag -width ".Li .Ad\ f1\ ,\ f2\ ,\ f3\ :" -compact -offset 15n
1105 .It Li ".Ad addr1"
1106 .Ad addr1
1107 .It Li ".Ad addr1 ."
1108 .Ad addr1 .
1109 .It Li ".Ad addr1 , file2"
1110 .Ad addr1 , file2
1111 .It Li ".Ad f1 , f2 , f3 :"
1112 .Ad f1 , f2 , f3 :
1113 .It Li ".Ad addr ) ) ,"
1114 .Ad addr ) ) ,
1115 .El
1116 .Pp
1117 .
1118 The default width is 12n.
1119 .
1120 .Ss "Author Name"
1121 .
1122 The
1123 .Ql .An
1124 macro is used to specify the name of the author of the item being
1125 documented, or the name of the author of the actual manual page.
1126 .Pp
1127 .Dl Usage: .An Ao author name Ac ...
1128 .Pp
1129 .Bl -tag -width ".Li .An\ \*[q]Joe\ Author\*[q]\ )\ )\ ," -offset 15n
1130 .It Li ".An \*[q]Joe Author\*[q]"
1131 .An "Joe Author"
1132 .It Li ".An \*[q]Joe Author\*[q] ,"
1133 .An "Joe Author" ,
1134 .It Li ".An \*[q]Joe Author\*[q] Aq nobody@FreeBSD.org"
1135 .An "Joe Author" Aq nobody@FreeBSD.org
1136 .It Li ".An \*[q]Joe Author\*[q] ) ) ,"
1137 .An "Joe Author" ) ) ,
1138 .El
1139 .Pp
1140 .
1141 The default width is 12n.
1142 .Pp
1143 In the
1144 .Sx AUTHORS
1145 section, the
1146 .Ql .An
1147 request causes a line break allowing each new name to appear on its own
1148 line.
1149 If this is not desirable,
1150 .
1151 .Bd -literal -offset indent
1152 \&.An -nosplit
1153 .Ed
1154 .Pp
1155 .
1156 call will turn this off.
1157 To turn splitting back on, write
1158 .
1159 .Bd -literal -offset indent
1160 \&.An -split
1161 .Ed
1162 .
1163 .Ss "Arguments"
1164 .
1165 The
1166 .Li .Ar
1167 argument macro may be used whenever an argument is referenced.
1168 If called without arguments, the
1169 .Sq Ar
1170 string is output.
1171 .Pp
1172 .Dl Usage: .Ar Oo Ao argument Ac Oc ...
1173 .Pp
1174 .Bl -tag -width ".Li .Ar\ file1\ file2" -compact -offset 15n
1175 .It Li .Ar
1176 .Ar
1177 .It Li ".Ar file1"
1178 .Ar file1
1179 .It Li ".Ar file1 ."
1180 .Ar file1 .
1181 .It Li ".Ar file1 file2"
1182 .Ar file1 file2
1183 .It Li ".Ar f1 f2 f3 :"
1184 .Ar f1 f2 f3 :
1185 .It Li ".Ar file ) ) ,"
1186 .Ar file ) ) ,
1187 .El
1188 .Pp
1189 .
1190 The default width is 12n.
1191 .
1192 .Ss "Configuration Declaration (Section Four Only)"
1193 .
1194 The
1195 .Ql .Cd
1196 macro is used to demonstrate a
1197 .Xr config 8
1198 declaration for a device interface in a section four manual.
1199 .Pp
1200 .Dl Usage: .Cd Ao argument Ac ...
1201 .Pp
1202 .Bl -tag -width ".Li .Cd\ Xdevice\ le0\ at\ scode?X" -offset 15n
1203 .It Li ".Cd \*[q]device le0 at scode?\*[q]"
1204 .Cd "device le0 at scode?"
1205 .El
1206 .Pp
1207 In the
1208 .Sx SYNOPSIS
1209 section a
1210 .Ql .Cd
1211 request causes a line break before and after its arguments are printed.
1212 .Pp
1213 .
1214 The default width is 12n.
1215 .
1216 .Ss "Command Modifiers"
1217 .
1218 The command modifier is identical to the
1219 .Ql .Fl
1220 (flag) command with the exception that the
1221 .Ql .Cm
1222 macro does not assert a dash in front of every argument.
1223 Traditionally flags are marked by the preceding dash, however, some commands
1224 or subsets of commands do not use them.
1225 Command modifiers may also be specified in conjunction with interactive
1226 commands such as editor commands.
1227 See
1228 .Sx Flags .
1229 .Pp
1230 The default width is 10n.
1231 .
1232 .Ss "Defined Variables"
1233 .
1234 A variable (or constant) which is defined in an include file
1235 is specified by the macro
1236 .Ql .Dv .
1237 .Pp
1238 .Dl Usage: .Dv Ao defined variable Ac ...
1239 .Pp
1240 .Bl -tag -width ".Li .Dv\ MAXHOSTNAMELEN" -compact -offset 15n
1241 .It Li ".Dv MAXHOSTNAMELEN"
1242 .Dv MAXHOSTNAMELEN
1243 .It Li ".Dv TIOCGPGRP )"
1244 .Dv TIOCGPGRP )
1245 .El
1246 .Pp
1247 .
1248 The default width is 12n.
1249 .
1250 .Ss Errno's
1251 .
1252 The
1253 .Ql .Er
1254 errno macro specifies the error return value for section 2, 3, and\~9 library
1255 routines.
1256 The second example below shows
1257 .Ql .Er
1258 used with the
1259 .Ql .Bq
1260 general text domain macro, as it would be used in a section two manual page.
1261 .Pp
1262 .Dl Usage: .Er Ao errno type Ac ...
1263 .Pp
1264 .Bl -tag -width ".Li .Bq\ Er\ ENOTDIR" -compact -offset 15n
1265 .It Li ".Er ENOENT"
1266 .Er ENOENT
1267 .It Li ".Er ENOENT ) ;"
1268 .Er ENOENT ) ;
1269 .It Li ".Bq Er ENOTDIR"
1270 .Bq Er ENOTDIR
1271 .El
1272 .Pp
1273 .
1274 The default width is 17n.
1275 .
1276 .Ss "Environment Variables"
1277 .
1278 The
1279 .Ql .Ev
1280 macro specifies an environment variable.
1281 .Pp
1282 .Dl Usage: .Ev Ao argument Ac ...
1283 .Pp
1284 .Bl -tag -width ".Li .Ev\ PRINTER\ )\ )\ ," -compact -offset 15n
1285 .It Li ".Ev DISPLAY"
1286 .Ev DISPLAY
1287 .It Li ".Ev PATH ."
1288 .Ev PATH .
1289 .It Li ".Ev PRINTER ) ) ,"
1290 .Ev PRINTER ) ) ,
1291 .El
1292 .Pp
1293 .
1294 The default width is 15n.
1295 .
1296 .Ss Flags
1297 .
1298 The
1299 .Ql .Fl
1300 macro handles command line flags.
1301 It prepends a dash,
1302 .Ql \- ,
1303 to the flag.
1304 For interactive command flags, which are not prepended with a dash, the
1305 .Ql .Cm
1306 (command modifier)
1307 macro is identical, but without the dash.
1308 .Pp
1309 .Dl Usage: .Fl Ao argument Ac ...
1310 .Pp
1311 .Bl -tag -width ".Li .Fl\ xyz\ )\ ," -compact -offset 15n
1312 .It Li .Fl
1313 .Fl
1314 .It Li ".Fl cfv"
1315 .Fl cfv
1316 .It Li ".Fl cfv ."
1317 .Fl cfv .
1318 .It Li ".Cm cfv ."
1319 .Cm cfv .
1320 .It Li ".Fl s v t"
1321 .Fl s v t
1322 .It Li ".Fl \- ,"
1323 .Fl \- ,
1324 .It Li ".Fl xyz ) ,"
1325 .Fl xyz ) ,
1326 .It Li ".Fl |"
1327 .Fl |
1328 .El
1329 .Pp
1330 The
1331 .Ql .Fl
1332 macro without any arguments results in a dash representing stdin/stdout.
1333 Note that giving
1334 .Ql .Fl
1335 a single dash will result in two dashes.
1336 .Pp
1337 The default width is 12n.
1338 .
1339 .Ss "Function Declarations"
1340 .
1341 The
1342 .Ql .Fd
1343 macro is used in the
1344 .Sx SYNOPSIS
1345 section with section two or three functions.
1346 It is neither callable nor parsed.
1347 .Pp
1348 .Dl Usage: .Fd Ao argument Ac ...
1349 .Pp
1350 .Bl -tag -width ".Li .Fd\ X#include\ <sys/types.h>X" -compact -offset 15n
1351 .It Li ".Fd \*[q]#include <sys/types.h>\*[q]"
1352 .Fd "#include <sys/types.h>"
1353 .El
1354 .Pp
1355 In the
1356 .Sx SYNOPSIS
1357 section a
1358 .Ql .Fd
1359 request causes a line break if a function has already been presented and a
1360 break has not occurred.
1361 This leaves a nice vertical space in between the previous function call and
1362 the declaration for the next function.
1363 .
1364 .Pp
1365 The
1366 .Ql .In
1367 .Li ( #include
1368 statement)
1369 macro is the short form of the above example.
1370 It specifies the C\~header file as being included in a C\~program.
1371 It also causes a line break, and is neither callable nor parsed.
1372 .Pp
1373 .Dl Usage: .In Ao header file Ac
1374 .Pp
1375 .Bl -tag -width ".Li .In\ stdio.h" -compact -offset 15n
1376 .It Li ".In stdio.h"
1377 .In stdio.h
1378 .El
1379 .
1380 .Ss "Function Types"
1381 .
1382 This macro is intended for the
1383 .Sx SYNOPSIS
1384 section.
1385 It may be used anywhere else in the man page without problems, but its main
1386 purpose is to present the function type in kernel normal form for the
1387 .Sx SYNOPSIS
1388 of sections two and three (it causes a line break, allowing the function
1389 name to appear on the next line).
1390 .Pp
1391 .Dl Usage: .Ft Ao type Ac ...
1392 .Pp
1393 .Bl -tag -width ".Li .Ft\ struct\ stat" -compact -offset 15n
1394 .It Li ".Ft struct stat"
1395 .Ft struct stat
1396 .El
1397 .
1398 .Ss "Functions (Library Routines)"
1399 .
1400 The 
1401 .Ql .Fn
1402 macro is modeled on
1403 .Tn ANSI\~C
1404 conventions.
1405 .Pp
1406 .Dl Usage: .Fn Ao function Ac Oo Ao parameter Ac Oc ...
1407 .Pp
1408 .Bl -tag -width ".Li .Fn\ align\ Xchar\ *ptrX\ ," -compact -offset 15n
1409 .It Li ".Fn getchar"
1410 .Fn getchar
1411 .It Li ".Fn strlen ) ,"
1412 .Fn strlen ) ,
1413 .It Li ".Fn align \*[q]char *ptr\*[q] ,"
1414 .Fn align "char *ptr" ,
1415 .El
1416 .Pp
1417 Note that any call to another macro signals the end of the
1418 .Ql .Fn
1419 call (it will insert a closing parenthesis at that point).
1420 .Pp
1421 For functions with many parameters (which is rare), the macros
1422 .Ql .Fo
1423 (function open)
1424 and
1425 .Ql .Fc
1426 (function close)
1427 may be used with
1428 .Ql .Fa
1429 (function argument).
1430 .Pp
1431 Example:
1432 .
1433 .Bd -literal -offset indent
1434 \&.Ft int
1435 \&.Fo res_mkquery
1436 \&.Fa "int op"
1437 \&.Fa "char *dname"
1438 \&.Fa "int class"
1439 \&.Fa "int type"
1440 \&.Fa "char *data"
1441 \&.Fa "int datalen"
1442 \&.Fa "struct rrec *newrr"
1443 \&.Fa "char *buf"
1444 \&.Fa "int buflen"
1445 \&.Fc
1446 .Ed
1447 .Pp
1448 .
1449 Produces:
1450 .
1451 .Bd -ragged -offset indent
1452 .Ft int
1453 .Fo res_mkquery
1454 .Fa "int op"
1455 .Fa "char *dname"
1456 .Fa "int class"
1457 .Fa "int type"
1458 .Fa "char *data"
1459 .Fa "int datalen"
1460 .Fa "struct rrec *newrr"
1461 .Fa "char *buf"
1462 .Fa "int buflen"
1463 .Fc
1464 .Ed
1465 .Pp
1466 .
1467 In the
1468 .Sx SYNOPSIS
1469 section, the function will always begin at the beginning of line.
1470 If there is more than one function presented in the
1471 .Sx SYNOPSIS
1472 section and a function type has not been given, a line break will occur,
1473 leaving a nice vertical space between the current function name and the one
1474 prior.
1475 .Pp
1476 The default width values of
1477 .Ql .Fn
1478 and
1479 .Ql .Fo
1480 are 12n and 16n, respectively.
1481 .
1482 .Ss "Function Arguments"
1483 .
1484 The
1485 .Ql .Fa
1486 macro is used to refer to function arguments (parameters) outside of the
1487 .Sx SYNOPSIS
1488 section of the manual or inside the
1489 .Sx SYNOPSIS
1490 section if the enclosure macros
1491 .Ql .Fo
1492 and
1493 .Ql .Fc
1494 instead of
1495 .Ql .Fn
1496 are used.
1497 .Ql .Fa
1498 may also be used to refer to structure members.
1499 .Pp
1500 .Dl Usage: .Fa Ao function argument Ac ...
1501 .Pp
1502 .Bl -tag -width ".Li .Fa\ d_namlen\ )\ )\ ," -compact -offset 15n
1503 .It Li ".Fa d_namlen ) ) ,"
1504 .Fa d_namlen ) ) ,
1505 .It Li ".Fa iov_len"
1506 .Fa iov_len
1507 .El
1508 .Pp
1509 .
1510 The default width is 12n.
1511 .
1512 .Ss "Return Values"
1513 .
1514 The
1515 .Ql .Rv
1516 macro generates text for use in the
1517 .Sx RETURN VALUES
1518 section.
1519 .Pp
1520 .Dl Usage: .Rv Oo -std Oc Op Ao function Ac ...
1521 .Pp
1522 For example,
1523 .Ql ".Rv -std atexit"
1524 produces:
1525 .
1526 .Bd -ragged -offset -indent
1527 \# a small hack to suppress a warning message
1528 .ds section-old "\*[section]
1529 .ds section 3
1530 .Rv -std atexit
1531 .ds section "\*[section-old]
1532 .Ed
1533 .Pp
1534 .
1535 The
1536 .Fl std
1537 option is valid only for manual page sections\~2 and\~3.
1538 Currently, this macro does nothing if used without the
1539 .Fl std
1540 flag.
1541 .
1542 .Ss "Exit Status"
1543 .
1544 The
1545 .Ql .Ex
1546 macro generates text for use in the
1547 .Sx DIAGNOSTICS
1548 section.
1549 .Pp
1550 .Dl Usage: .Ex Oo -std Oc Op Ao utility Ac ...
1551 .Pp
1552 For example,
1553 .Ql ".Ex -std cat"
1554 produces:
1555 .
1556 .Bd -ragged -offset -indent
1557 \# a small hack to suppress a warning message
1558 .ds section-old "\*[section]
1559 .ds section 1
1560 .Ex -std cat
1561 .ds section "\*[section-old]
1562 .Ed
1563 .Pp
1564 .
1565 The
1566 .Fl std
1567 option is valid only for manual page sections 1, 6 and\~8.
1568 Currently, this macro does nothing if used without the
1569 .Fl std
1570 flag.
1571 .
1572 .Ss "Interactive Commands"
1573 .
1574 The
1575 .Ql .Ic
1576 macro designates an interactive or internal command.
1577 .Pp
1578 .Dl Usage: .Ic Ao argument Ac ...
1579 .Pp
1580 .Bl -tag -width ".Li .Ic\ setenv\ ,\ unsetenv" -compact -offset 15n
1581 .It Li ".Ic :wq"
1582 .Ic :wq
1583 .It Li ".Ic \*[q]do while {...}\*[q]"
1584 .Ic "do while {...}"
1585 .It Li ".Ic setenv , unsetenv"
1586 .Ic setenv , unsetenv
1587 .El
1588 .Pp
1589 .
1590 The default width is 12n.
1591 .
1592 .Ss "Library Names"
1593 .
1594 The
1595 .Ql .Lb
1596 macro is used to specify the library where a particular function is compiled
1597 in.
1598 .Pp
1599 .Dl Usage: .Lb Ao argument Ac ...
1600 .Pp
1601 Available arguments to
1602 .Ql .Lb 
1603 and their results are:
1604 .
1605 .Pp
1606 .Bl -tag -width ".Li libossaudio" -compact -offset indent
1607 .It Li libarm32
1608 .Lb libarm32
1609 .It Li libc
1610 .Lb libc
1611 .It Li libcompat
1612 .Lb libcompat
1613 .It Li libcrypt
1614 .Lb libcrypt
1615 .It Li libcurses
1616 .Lb libcurses
1617 .It Li libedit
1618 .Lb libedit
1619 .It Li libi386
1620 .Lb libi386
1621 .It Li libipsec
1622 .Lb libipsec
1623 .It Li libkvm
1624 .Lb libkvm
1625 .It Li libm
1626 .Lb libm
1627 .It Li libmenu
1628 .Lb libmenu
1629 .It Li libossaudio
1630 .Lb libossaudio
1631 .It Li libposix
1632 .Lb libposix
1633 .It Li libresolv
1634 .Lb libresolv
1635 .It Li libtermcap
1636 .Lb libtermcap
1637 .It Li libutil
1638 .Lb libutil
1639 .It Li libz
1640 .Lb libz
1641 .El
1642 .Pp
1643 .
1644 Local, OS-specific additions might be found in the file
1645 .Pa mdoc.local ;
1646 look for strings named
1647 .Ql str-Lb-XXX .
1648 .Ql XXX
1649 then denotes the keyword to be used with the
1650 .Ql .Lb
1651 macro.
1652 .
1653 .Ss Literals
1654 .
1655 The
1656 .Ql .Li
1657 literal macro may be used for special characters, variable constants, etc.\&
1658 -- anything which should be displayed as it would be typed.
1659 .Pp
1660 .Dl Usage: .Li Ao argument Ac ...
1661 .Pp
1662 .Bl -tag -width ".Li .Li\ cntrl-D\ )\ ,"  -compact -offset 15n
1663 .It Li ".Li \een"
1664 .Li \en
1665 .It Li ".Li M1 M2 M3 ;"
1666 .Li M1 M2 M3 ;
1667 .It Li ".Li cntrl-D ) ,"
1668 .Li cntrl-D ) ,
1669 .It Li ".Li 1024 ..."
1670 .Li 1024 ...
1671 .El
1672 .Pp
1673 .
1674 The default width is 16n.
1675 .
1676 .Ss Names
1677 .
1678 The
1679 .Ql .Nm
1680 macro is used for the document title or subject name.
1681 It has the peculiarity of remembering the first argument it was called with,
1682 which should always be the subject name of the page.
1683 When called without arguments,
1684 .Ql .Nm
1685 regurgitates this initial name for the sole purpose of making less work for
1686 the author.
1687 Note: A section two or three document function name is addressed with the
1688 .Ql .Nm
1689 in the
1690 .Sx NAME
1691 section, and with
1692 .Ql .Fn
1693 in the
1694 .Sx SYNOPSIS
1695 and remaining sections.
1696 For interactive commands, such as the
1697 .Ql while
1698 command keyword in
1699 .Xr csh 1 ,
1700 the
1701 .Ql .Ic
1702 macro should be used.
1703 While
1704 .Ql .Ic
1705 is nearly identical
1706 to
1707 .Ql .Nm ,
1708 it can not recall the first argument it was invoked with.
1709 .Pp
1710 .Dl Usage: .Nm Oo Ao argument Ac Oc ...
1711 .Pp
1712 .Bl -tag -width ".Li .Nm\ groff_mdoc" -compact -offset 15n
1713 .It Li ".Nm groff_mdoc"
1714 .Nm groff_mdoc
1715 .It Li ".Nm \e-mdoc"
1716 .Nm \-mdoc
1717 .It Li ".Nm foo ) ) ,"
1718 .Nm foo ) ) ,
1719 .It Li ".Nm :"
1720 .Nm :
1721 .El
1722 .Pp
1723 .
1724 The default width is 10n.
1725 .
1726 .Ss Options
1727 .
1728 The
1729 .Ql .Op
1730 macro places option brackets around any remaining arguments on the
1731 command line, and places any trailing punctuation outside the brackets.
1732 The macros
1733 .Ql .Oo
1734 and
1735 .Ql .Oc
1736 (which produce an opening and a closing option bracket respectively) may be used
1737 across one or more lines or to specify the exact position of the closing
1738 parenthesis.
1739 .Pp
1740 .Dl Usage: .Op Oo Ao option Ac Oc ...
1741 .Pp
1742 .Bl -tag -width ".Li .Op\ Fl\ c\ Ar\ objfil\ Op\ Ar\ corfil\ ," -compact -offset 15n
1743 .It Li .Op
1744 .Op
1745 .It Li ".Op Fl k"
1746 .Op Fl k
1747 .It Li ".Op Fl k ) ."
1748 .Op Fl k ) .
1749 .It Li ".Op Fl k Ar kookfile"
1750 .Op Fl k Ar kookfile
1751 .It Li ".Op Fl k Ar kookfile ,"
1752 .Op Fl k Ar kookfile ,
1753 .It Li ".Op Ar objfil Op Ar corfil"
1754 .Op Ar objfil Op Ar corfil
1755 .It Li ".Op Fl c Ar objfil Op Ar corfil ,"
1756 .Op Fl c Ar objfil Op Ar corfil ,
1757 .It Li ".Op word1 word2"
1758 .Op word1 word2
1759 .It Li ".Li .Op Oo Ao option Ac Oc ..."
1760 .Li .Op Oo Ao options Ac Oc ...
1761 .El
1762 .Pp
1763 Here a typical example of the
1764 .Ql .Oo
1765 and
1766 .Ql .Oc
1767 macros:
1768 .
1769 .Bd -literal -offset indent
1770 \&.Oo
1771 \&.Op Fl k Ar kilobytes
1772 \&.Op Fl i Ar interval
1773 \&.Op Fl c Ar count
1774 \&.Oc
1775 .Ed
1776 .Pp
1777 .
1778 Produces:
1779 .
1780 .Bd -filled -offset indent
1781 .Oo
1782 .Op Fl k Ar kilobytes
1783 .Op Fl i Ar interval
1784 .Op Fl c Ar count
1785 .Oc
1786 .Ed
1787 .Pp
1788 .
1789 The default width values of
1790 .Ql .Op
1791 and
1792 .Ql .Oo
1793 are 14n and 10n, respectively.
1794 .
1795 .Ss Pathnames
1796 .
1797 The
1798 .Ql .Pa
1799 macro formats path or file names.
1800 If called without arguments, the
1801 .Sq Pa
1802 string is output, which represents the current user's home directory.
1803 .Pp
1804 .Dl Usage: .Pa Oo Ao pathname Ac Oc ...
1805 .Pp
1806 .Bl -tag -width ".Li .Pa\ /tmp/fooXXXXX\ )\ ." -compact -offset 15n
1807 .It Li .Pa
1808 .Pa
1809 .It Li ".Pa /usr/share"
1810 .Pa /usr/share
1811 .It Li ".Pa /tmp/fooXXXXX ) ."
1812 .Pa /tmp/fooXXXXX ) .
1813 .El
1814 .Pp
1815 .
1816 The default width is 32n.
1817 .
1818 .Ss Standards
1819 .
1820 The
1821 .Ql .St
1822 macro replaces standard abbreviations with their formal names.
1823 .Pp
1824 .Dl Usage: .St Ao abbreviation Ac ...
1825 .Pp
1826 Available pairs for
1827 .Dq Abbreviation/Formal Name
1828 are:
1829 .
1830 .Pp
1831 .Tn ANSI/ISO C
1832 .Pp
1833 .Bl -tag -width ".Li -iso9945-1-90" -compact -offset indent
1834 .It Li -ansiC
1835 .St -ansiC
1836 .It Li -ansiC-89
1837 .St -ansiC-89
1838 .It Li -isoC
1839 .St -isoC
1840 .It Li -isoC-99
1841 .St -isoC-99
1842 .El
1843 .Pp
1844 .
1845 .Tn POSIX
1846 Part 1: System API
1847 .Pp
1848 .Bl -tag -width ".Li -p1003.1g-2000" -compact -offset indent
1849 .It Li -iso9945-1-90
1850 .St -iso9945-1-90
1851 .It Li -iso9945-1-96
1852 .St -iso9945-1-96
1853 .It Li -p1003.1
1854 .St -p1003.1
1855 .It Li -p1003.1-88
1856 .St -p1003.1-88
1857 .It Li -p1003.1-90
1858 .St -p1003.1-90
1859 .It Li -p1003.1-96
1860 .St -p1003.1-96
1861 .It Li -p1003.1b-93
1862 .St -p1003.1b-93
1863 .It Li -p1003.1c-95
1864 .St -p1003.1c-95
1865 .It Li -p1003.1g-2000
1866 .St -p1003.1g-2000
1867 .It Li -p1003.1i-95
1868 .St -p1003.1i-95
1869 .El
1870 .Pp
1871 .
1872 .Tn POSIX
1873 Part 2: Shell and Utilities
1874 .Pp
1875 .Bl -tag -width ".Li -p1003.1g-2000" -compact -offset indent
1876 .It Li -iso9945-2-93
1877 .St -iso9945-2-93
1878 .It Li -p1003.2
1879 .St -p1003.2
1880 .It Li -p1003.2-92
1881 .St -p1003.2-92
1882 .It Li -p1003.2a-92
1883 .St -p1003.2a-92
1884 .El
1885 .Pp
1886 .
1887 X/Open
1888 .Bl -tag -width ".Li -p1003.1g-2000" -compact -offset indent
1889 .Pp
1890 .It Li -susv2
1891 .St -susv2
1892 .It Li -svid4
1893 .St -svid4
1894 .It Li -xbd5
1895 .St -xbd5
1896 .It Li -xcu5
1897 .St -xcu5
1898 .It Li -xcurses4.2
1899 .St -xcurses4.2
1900 .It Li -xns5
1901 .St -xns5
1902 .It Li -xns5.2
1903 .St -xns5.2
1904 .It Li -xpg3
1905 .St -xpg3
1906 .It Li -xpg4
1907 .St -xpg4
1908 .It Li -xpg4.2
1909 .St -xpg4.2
1910 .It Li -xsh5
1911 .St -xsh5
1912 .El
1913 .Pp
1914 .
1915 Miscellaneous
1916 .Pp
1917 .Bl -tag -width ".Li -p1003.1g-2000" -compact -offset indent
1918 .It Li -ieee754
1919 .St -ieee754
1920 .It Li -iso8802-3
1921 .St -iso8802-3
1922 .El
1923 .
1924 .Ss "Variable Types"
1925 .
1926 The
1927 .Ql .Vt
1928 macro may be used whenever a type is referenced.
1929 In the
1930 .Sx SYNOPSIS
1931 section, it causes a line break (useful for old style variable declarations).
1932 .Pp
1933 .Dl Usage: .Vt Ao type Ac ...
1934 .Pp
1935 .Bl -tag -width ".Li .Vt\ extern\ char\ *optarg\ ;" -compact -offset 15n
1936 .It Li ".Vt extern char *optarg ;"
1937 .Vt extern char *optarg ;
1938 .It Li ".Vt FILE *"
1939 .Vt FILE *
1940 .El
1941 .
1942 .Ss Variables
1943 .
1944 Generic variable reference.
1945 .Pp
1946 .Dl Usage: .Va Ao variable Ac ...
1947 .Pp
1948 .Bl -tag -width ".Li .Va\ Xchar\ sX\ ]\ )\ )\ ," -compact -offset 15n
1949 .It Li ".Va count"
1950 .Va count
1951 .It Li ".Va settimer ,"
1952 .Va settimer ,
1953 .It Li ".Va \*[q]int *prt\*[q] ) :"
1954 .Va "int *prt" ) :
1955 .It Li ".Va \*[q]char s\*[q] ] ) ) ,"
1956 .Va "char s" ] ) ) ,
1957 .El
1958 .Pp
1959 .
1960 The default width is 12n.
1961 .
1962 .Ss "Manual Page Cross References"
1963 .
1964 The
1965 .Ql .Xr
1966 macro expects the first argument to be a manual page name.
1967 The optional second argument, if a string (defining the manual section), is
1968 put into parentheses.
1969 .Pp
1970 .Dl Usage: .Xr Ao man page name Ac Oo Ao section Ac Oc ...
1971 .Pp
1972 .Bl -tag -width ".Li .Xr\ xinit\ 1x\ ;" -compact -offset 15n
1973 .It Li ".Xr mdoc"
1974 .Xr mdoc
1975 .It Li ".Xr mdoc ,"
1976 .Xr mdoc ,
1977 .It Li ".Xr mdoc 7"
1978 .Xr mdoc 7
1979 .It Li ".Xr xinit 1x ;"
1980 .Xr xinit 1x ;
1981 .El
1982 .Pp
1983 .
1984 The default width is 10n.
1985 .
1986 .
1987 .Sh "GENERAL TEXT DOMAIN"
1988 .
1989 .Ss "AT&T Macro"
1990 .
1991 .Pp
1992 .Dl Usage: .At Oo Ao version Ac Oc ...
1993 .Pp
1994 .Bl -tag -width ".Li .At\ v6\ ." -compact -offset 15n
1995 .It Li .At
1996 .At
1997 .It Li ".At v6 ."
1998 .At v6 .
1999 .El
2000 .Pp
2001 The following values for
2002 .Ao version Ac
2003 are possible:
2004 .Pp
2005 .Dl 32v, v1, v2, v3, v4, v5, v6, v7, V, V.1, V.2, V.3, V.4
2006 .
2007 .Ss "BSD Macro"
2008 .
2009 .Pp
2010 .Dl "Usage: .Bx" Bro -alpha | -beta | -devel Brc ...
2011 .Dl "       .Bx" Oo Ao version Ac Oo Ao release Ac Oc Oc ...
2012 .Pp
2013 .Bl -tag -width ".Li .Bx\ -devel" -compact -offset 15n
2014 .It Li .Bx
2015 .Bx
2016 .It Li ".Bx 4.3 ."
2017 .Bx 4.3 .
2018 .It Li ".Bx \-devel"
2019 .Bx -devel
2020 .El
2021 .Pp
2022 .Ao version Ac
2023 will be prepended to the string
2024 .Sq Bx .
2025 The following values for
2026 .Ao release Ac
2027 are possible:
2028 .Pp
2029 .Dl Reno, reno, Tahoe, tahoe, Lite, lite, Lite2, lite2
2030 .
2031 .Ss "NetBSD Macro"
2032 .
2033 .Pp
2034 .Dl Usage: .Nx Oo Ao version Ac Oc ...
2035 .Pp
2036 .Bl -tag -width ".Li .Nx\ 1.4\ ." -compact -offset 15n
2037 .It Li .Nx
2038 .Nx
2039 .It Li ".Nx 1.4 ."
2040 .Nx 1.4 .
2041 .El
2042 .Pp
2043 For possible values of
2044 .Ao version Ac
2045 see the description of the
2046 .Ql .Os
2047 request above in section
2048 .Sx "TITLE MACROS" .
2049 .
2050 .Ss "FreeBSD Macro"
2051 .
2052 .Pp
2053 .Dl Usage: .Fx Oo Ao version Ac Oc ...
2054 .Pp
2055 .Bl -tag -width ".Li .Fx\ 2.2\ ." -compact -offset 15n
2056 .It Li .Fx
2057 .Fx
2058 .It Li ".Fx 2.2 ."
2059 .Fx 2.2 .
2060 .El
2061 .Pp
2062 For possible values of
2063 .Ao version Ac
2064 see the description of the
2065 .Ql .Os
2066 request above in section
2067 .Sx "TITLE MACROS" .
2068 .
2069 .Ss "OpenBSD Macro"
2070 .
2071 .Pp
2072 .Dl Usage: .Ox Oo Ao version Ac Oc ...
2073 .Pp
2074 .Bl -tag -width ".Li .Ox\ 1.0" -compact -offset 15n
2075 .It Li ".Ox 1.0"
2076 .Ox 1.0
2077 .El
2078 .
2079 .Ss "BSD/OS Macro"
2080 .
2081 .Pp
2082 .Dl Usage: .Bsx Oo Ao version Ac Oc ...
2083 .Pp
2084 .Bl -tag -width ".Li .Bsx\ 1.0" -compact -offset 15n
2085 .It Li ".Bsx 1.0"
2086 .Bsx 1.0
2087 .El
2088 .
2089 .Ss "UNIX Macro"
2090 .
2091 .Pp
2092 .Dl Usage: .Ux ...
2093 .Pp
2094 .Bl -tag -width ".Li .Ux" -compact -offset 15n
2095 .It Li .Ux
2096 .Ux
2097 .El
2098 .
2099 .Ss "Emphasis Macro"
2100 .
2101 Text may be stressed or emphasized with the
2102 .Ql .Em
2103 macro.
2104 The usual font for emphasis is italic.
2105 .Pp
2106 .Dl Usage: .Em Ao argument Ac ...
2107 .Pp
2108 .Bl -tag -width ".Li .Em\ vide\ infra\ )\ )\ ," -compact -offset 15n
2109 .It Li ".Em does not"
2110 .Em does not
2111 .It Li ".Em exceed 1024 ."
2112 .Em exceed 1024 .
2113 .It Li ".Em vide infra ) ) ,"
2114 .Em vide infra ) ) ,
2115 .El
2116 .Pp
2117 .
2118 The default width is 10n.
2119 .
2120 .Ss "Font Mode"
2121 .
2122 The
2123 .Ql .Bf
2124 font mode must be ended with the
2125 .Ql .Ef
2126 macro (the latter takes no arguments).
2127 Font modes may be nested within other font modes.
2128 .Pp
2129 .Ql .Bf
2130 has the following syntax:
2131 .Pp
2132 .Dl .Bf Ao font mode Ac
2133 .Pp
2134 .Ao font mode Ac
2135 must be one of the following three types:
2136 .Pp
2137 .Bl -tag -width ".Sy \&Sy | Fl symbolic" -compact -offset indent
2138 .It Sy \&Em | Fl emphasis
2139 Same as if the 
2140 .Ql .Em
2141 macro was used for the entire block of text.
2142 .It Sy \&Li | Fl literal
2143 Same as if the
2144 .Ql .Li
2145 macro was used for the entire block of text.
2146 .It Sy \&Sy | Fl symbolic
2147 Same as if the
2148 .Ql .Sy
2149 macro was used for the entire block of text.
2150 .El
2151 .Pp
2152 Both macros are neither callable nor parsed.
2153 .
2154 .Ss "Enclosure and Quoting Macros"
2155 .
2156 The concept of enclosure is similar to quoting.
2157 The object being to enclose one or more strings between a pair of characters
2158 like quotes or parentheses.
2159 The terms quoting and enclosure are used interchangeably throughout this
2160 document.
2161 Most of the one-line enclosure macros end in small letter
2162 .Ql q
2163 to give a hint of quoting, but there are a few irregularities.
2164 For each enclosure macro there is also a pair of open and close macros which
2165 end in small letters
2166 .Ql o
2167 and
2168 .Ql c
2169 respectively.
2170 .Pp
2171 \# XXX
2172 .if t \
2173 .  ne 10
2174 .
2175 .Bd -filled -offset 4n
2176 .Bl -column "quote" "close" "open" "Angle Bracket Enclosure" "`string' or string"
2177 .Em Quote Ta Em Open Ta Em Close Ta Em Function               Ta Em Result
2178 .No .Aq   Ta    .Ao  Ta    .Ac   Ta "Angle Bracket Enclosure" Ta Ao string Ac
2179 .No .Bq   Ta    .Bo  Ta    .Bc   Ta "Bracket Enclosure"       Ta Bo string Bc
2180 .No .Brq  Ta    .Bro Ta    .Brc  Ta "Brace Enclosure"         Ta Bro string Brc
2181 .No .Dq   Ta    .Do  Ta    .Dc   Ta "Double Quote"            Ta Do string Dc
2182 .No .Eq   Ta    .Eo  Ta    .Ec   Ta "Enclose String (in XX)"  Ta XXstringXX
2183 .No .Pq   Ta    .Po  Ta    .Pc   Ta "Parenthesis Enclosure"   Ta Po string Pc
2184 .No .Ql   Ta         Ta          Ta "Quoted Literal"          Ta So string Sc or Li string
2185 .No .Qq   Ta    .Qo  Ta    .Qc   Ta "Straight Double Quote"   Ta Qo string Qc
2186 .No .Sq   Ta    .So  Ta    .Sc   Ta "Single Quote"            Ta So string Sc
2187 .El
2188 .Ed
2189 .Pp
2190 All macros ending with
2191 .Sq q
2192 and
2193 .Sq o
2194 have a default width value of 12n.
2195 .
2196 .Bl -tag -width ".Li .Ec , .Eo"
2197 .It Li .Eo , .Ec
2198 These macros expect the first argument to be the opening and closing strings
2199 respectively.
2200 .It Li .Es , .En
2201 Due to the nine-argument limit in the original troff program two other
2202 macros have been implemented which are now rather obsolete:
2203 .Ql .Es
2204 takes the first and second parameter as the left and right enclosure string,
2205 which are then used to enclose the arguments of
2206 .Ql .En .
2207 The default width value is 12n for both macros.
2208 .It Li .Eq
2209 The first and second arguments of this macro are the opening and
2210 closing strings respectively, followed by the arguments to be enclosed.
2211 .It Li .Ql
2212 The quoted literal macro behaves differently in troff and nroff mode.
2213 If formatted with
2214 .Xr nroff ,
2215 a quoted literal is always quoted.
2216 If formatted with troff, an item is only quoted if the width of the item is
2217 less than three constant width characters.
2218 This is to make short strings more visible where the font change to literal
2219 (constant width) is less noticeable.
2220 .Pp
2221 The default width is 16n.
2222 .It Li .Pf
2223 The prefix macro suppresses the whitespace between its first and second
2224 argument:
2225 .
2226 .Bl -tag -width ".Li .Pf\ (\ Fa\ name2" -offset indent
2227 .It Li ".Pf ( Fa name2"
2228 .Pf ( Fa name2
2229 .El
2230 .Pp
2231 .
2232 The default width is 12n.
2233 .Pp
2234 The
2235 .Ql .Ns
2236 macro (see below) performs the analogous suffix function.
2237 .It Li .Ap
2238 The
2239 .Ql .Ap
2240 macro inserts an apostrophe and exits any special text modes, continuing in
2241 .Ql .No
2242 mode.
2243 .El
2244 .Pp
2245 .
2246 Examples of quoting:
2247 .
2248 .Pp
2249 .Bl -tag -width ".Li .Bq\ Em\ Greek\ ,\ French\ ." -compact -offset indent
2250 .It Li .Aq
2251 .Aq
2252 .It Li ".Aq Pa ctype.h ) ,"
2253 .Aq Pa ctype.h ) ,
2254 .It Li .Bq
2255 .Bq
2256 .It Li ".Bq Em Greek , French ."
2257 .Bq Em Greek , French .
2258 .It Li .Dq
2259 .Dq
2260 .It Li ".Dq string abc ."
2261 .Dq string abc .
2262 .It Li ".Dq \'^[A-Z]\'"
2263 .Dq \'^[A-Z]\'
2264 .It Li ".Ql man mdoc"
2265 .Ql man mdoc
2266 .It Li .Qq
2267 .Qq
2268 .It Li ".Qq string ) ,"
2269 .Qq string ) ,
2270 .It Li ".Qq string Ns ),"
2271 .Qq string Ns ),
2272 .It Li .Sq
2273 .Sq
2274 .It Li ".Sq string"
2275 .Sq string
2276 .It Li ".Em or Ap ing"
2277 .Em or Ap ing
2278 .El
2279 .Pp
2280 .
2281 For a good example of nested enclosure macros, see the
2282 .Ql .Op
2283 option macro.
2284 It was created from the same underlying enclosure macros as those presented
2285 in the list above.
2286 The
2287 .Ql .Xo
2288 and
2289 .Ql .Xc
2290 extended argument list macros are discussed below.
2291 .
2292 .Ss "No-Op or Normal Text Macro"
2293 .
2294 The
2295 .Ql .No
2296 macro can be used in a macro command line for parameters which should
2297 .Em not
2298 be formatted.
2299 Be careful to add
2300 .Ql \e&
2301 to the word
2302 .Ql \&No
2303 if you really want that English word (and not the macro) as a parameter.
2304 .Pp
2305 .Dl Usage: .No Ao argument Ac ...
2306 .Pp
2307 .Bl -tag -width ".Li .No\ test\ Ta\ with\ Ta\ tabs" -compact -offset 15n
2308 .It Li ".No test Ta with Ta tabs"
2309 .No test Ta with Ta tabs
2310 .El
2311 .Pp
2312 .
2313 The default width is 12n.
2314 .
2315 .Ss "No-Space Macro"
2316 .
2317 The
2318 .Ql .Ns
2319 macro suppresses insertion of a space between the current position and its
2320 first parameter.
2321 For example, it is useful for old style argument lists where there is no
2322 space between the flag and argument:
2323 .Pp
2324 .Dl "Usage:" ... Ao argument Ac \&Ns Oo Ao argument Ac Oc ...
2325 .Dl "      " .Ns Ao argument Ac ...
2326 .Pp
2327 .Bl -tag -width ".Li .Op\ Fl\ I\ Ns\ Ar\ directory" -compact -offset 15n
2328 .It Li ".Op Fl I Ns Ar directory"
2329 .Op Fl I Ns Ar directory
2330 .El
2331 .Pp
2332 Note: The
2333 .Ql .Ns
2334 macro always invokes the
2335 .Ql .No
2336 macro after eliminating the space unless another macro name follows it.
2337 If used as a request (i.e., the second form above in the
2338 .Sq Usage
2339 line),
2340 .Ql .Ns
2341 is identical to
2342 .Ql .No .
2343 .
2344 .Ss "Section Cross References"
2345 .
2346 The
2347 .Ql .Sx
2348 macro designates a reference to a section header within the same document.
2349 .Pp
2350 .Dl Usage: .Sx Ao section reference Ac ...
2351 .Pp
2352 .Bl -tag -width ".Li .Sx\ FILES" -offset 15n
2353 .It Li ".Sx FILES"
2354 .Sx FILES
2355 .El
2356 .Pp
2357 .
2358 The default width is 16n.
2359 .
2360 .Ss Symbolics
2361 .
2362 The symbolic emphasis macro is generally a boldface macro in either the
2363 symbolic sense or the traditional English usage.
2364 .Pp
2365 .Dl Usage: .Sy Ao symbol Ac ...
2366 .Pp
2367 .Bl -tag -width ".Li .Sy\ Important\ Notice" -compact -offset 15n
2368 .It Li ".Sy Important Notice"
2369 .Sy Important Notice
2370 .El
2371 .Pp
2372 .
2373 The default width is 6n.
2374 .
2375 .Ss Mathematical Symbols
2376 .
2377 Use this macro for mathematical symbols and similar things.
2378 .Pp
2379 .Dl Usage: .Ms Ao math symbol Ac ...
2380 .Pp
2381 .Bl -tag -width ".Li .Ms\ sigma" -compact -offset 15n
2382 .It Li ".Ms sigma"
2383 .Ms sigma
2384 .El
2385 .Pp
2386 .
2387 The default width is 6n.
2388 .
2389 .Ss "References and Citations"
2390 .
2391 The following macros make a modest attempt to handle references.
2392 At best, the macros make it convenient to manually drop in a subset of
2393 .Xr refer 1
2394 style references.
2395 .Pp
2396 .Bl -tag -width 6n -offset indent -compact
2397 .It Li .Rs
2398 Reference start (does not take arguments).
2399 Causes a line break in the
2400 .Sx "SEE ALSO"
2401 section and begins collection of reference information until the reference
2402 end macro is read.
2403 .It Li .Re
2404 Reference end (does not take arguments).
2405 The reference is printed.
2406 .It Li .%A
2407 Reference author name; one name per invocation.
2408 .It Li .%B
2409 Book title.
2410 .It Li .%C
2411 City/place (not implemented yet).
2412 .It Li .%D
2413 Date.
2414 .It Li .%I
2415 Issuer/publisher name.
2416 .It Li .%J
2417 Journal name.
2418 .It Li .%N
2419 Issue number.
2420 .It Li .%O
2421 Optional information.
2422 .It Li .%P
2423 Page number.
2424 .It Li .%Q
2425 Corporate or foreign author.
2426 .It Li .%R
2427 Report name.
2428 .It Li .%T
2429 Title of article.
2430 .It Li .%V
2431 Volume.
2432 .El
2433 .Pp
2434 Macros beginning with
2435 .Ql %
2436 are not callable but accept multiple arguments in the usual way.
2437 Only the
2438 .Ql .Tn
2439 macro is handled properly as a parameter; other macros will cause strange
2440 output.
2441 .Ql .%B
2442 and
2443 .Ql .%T
2444 can be used outside of the
2445 .Ql .Rs/.Re
2446 environment.
2447 .Pp
2448 Example:
2449 .
2450 .Bd -literal -offset indent
2451 \&.Rs
2452 \&.%A "Matthew Bar"
2453 \&.%A "John Foo"
2454 \&.%T "Implementation Notes on foobar(1)"
2455 \&.%R "Technical Report ABC-DE-12-345"
2456 \&.%Q "Drofnats College, Nowhere"
2457 \&.%D "April 1991"
2458 \&.Re
2459 .Ed
2460 .Pp
2461 produces
2462 .
2463 .Bd -ragged -offset indent
2464 .Rs
2465 .%A "Matthew Bar"
2466 .%A "John Foo"
2467 .%T "Implementation Notes on foobar(1)"
2468 .%R "Technical Report ABC-DE-12-345"
2469 .%Q "Drofnats College, Nowhere"
2470 .%D "April 1991"
2471 .Re
2472 .Ed
2473 .
2474 .Ss "Trade Names (or Acronyms and Type Names)"
2475 .
2476 The trade name macro prints its arguments in a smaller font.
2477 Its intended use is to imitate a small caps fonts for uppercase acronyms.
2478 .Pp
2479 .Dl Usage: .Tn Ao symbol Ac ...
2480 .Pp
2481 .Bl -tag -width ".Li .Tn\ ASCII" -compact -offset 15n
2482 .It Li ".Tn DEC"
2483 .Tn DEC
2484 .It Li ".Tn ASCII"
2485 .Tn ASCII
2486 .El
2487 .Pp
2488 .
2489 The default width is 10n.
2490 .
2491 .Ss "Extended Arguments"
2492 .
2493 The
2494 .Li .Xo
2495 and
2496 .Li .Xc
2497 macros allow one to extend an argument list on a macro boundary for the
2498 .Ql .It
2499 macro (see below).
2500 Note that
2501 .Li .Xo
2502 and
2503 .Li .Xc
2504 are implemented similarly to all other macros opening and closing an
2505 enclosure (without inserting characters, of course).
2506 This means that the following is true for those macros also.
2507 .Pp
2508 Here is an example of
2509 .Ql .Xo
2510 using the space mode macro to turn spacing off:
2511 .
2512 .Bd -literal -offset indent
2513 \&.Sm off
2514 \&.It Xo Sy I Ar operation
2515 \&.No \een Ar count No \een
2516 \&.Xc
2517 \&.Sm on
2518 .Ed
2519 .Pp
2520 .
2521 produces
2522 .
2523 .Bd -filled -offset indent
2524 .Bl -tag -compact
2525 .Sm off
2526 .It Xo Sy I Ar operation
2527 .No \en Ar count No \en
2528 .Xc
2529 .Sm on
2530 .El
2531 .Ed
2532 .Pp
2533 .
2534 Another one:
2535 .
2536 .Bd -literal -offset indent
2537 \&.Sm off
2538 \&.It Cm S No / Ar old_pattern Xo
2539 \&.No / Ar new_pattern
2540 \&.No / Op Cm g
2541 \&.Xc
2542 \&.Sm on
2543 .Ed
2544 .Pp
2545 .
2546 produces
2547 .
2548 .Bd -filled -offset indent
2549 .Bl -tag -compact
2550 .Sm off
2551 .It Cm S No \&/ Ar old_pattern Xo
2552 .No \&/ Ar new_pattern
2553 .No \&/ Op Cm g
2554 .Xc
2555 .Sm on
2556 .El
2557 .Ed
2558 .Pp
2559 .
2560 Another example of
2561 .Ql .Xo
2562 and enclosure macros: Test the value of a variable.
2563 .
2564 .Bd -literal -offset indent
2565 \&.It Xo
2566 \&.Ic .ifndef
2567 \&.Oo \e&! Oc Ns Ar variable Oo
2568 \&.Ar operator variable ...
2569 \&.Oc Xc
2570 .Ed
2571 .Pp
2572 .
2573 produces
2574 .
2575 .Bd -filled -offset indent
2576 .Bl -tag -width flag -compact
2577 .It Xo
2578 .Ic .ifndef
2579 .Oo \&! Oc Ns Ar variable Oo
2580 .Ar operator variable ...
2581 .Oc Xc
2582 .El
2583 .Ed
2584 .Pp
2585 .
2586 .
2587 .Sh "PAGE STRUCTURE DOMAIN"
2588 .
2589 .Ss "Section Headers"
2590 .
2591 The following
2592 .Ql .Sh
2593 section header macros are required in every man page.
2594 The remaining section headers are recommended at the discretion of the
2595 author writing the manual page.
2596 The
2597 .Ql .Sh
2598 macro is parsed but not generally callable.
2599 It can be used as an argument in a call to
2600 .Ql .Sh
2601 only; it then reactivates the default font for
2602 .Ql .Sh .
2603 .Pp
2604 The default width is 8n.
2605 .
2606 .Bl -tag -width ".Li .Sh\ RETURN\ VALUES"
2607 .It Li ".Sh NAME"
2608 The
2609 .Ql ".Sh NAME"
2610 macro is mandatory.
2611 If not specified, headers, footers and page layout defaults will not be set
2612 and things will be rather unpleasant.
2613 The
2614 .Sx NAME
2615 section consists of at least three items.
2616 The first is the
2617 .Ql .Nm
2618 name macro naming the subject of the man page.
2619 The second is the name description macro,
2620 .Ql .Nd ,
2621 which separates the subject name from the third item, which is the
2622 description.
2623 The description should be the most terse and lucid possible, as the space
2624 available is small.
2625 .Pp
2626 .Ql .Nd
2627 first prints
2628 .Ql - ,
2629 then all its arguments.
2630 .
2631 .It Li ".Sh LIBRARY"
2632 This section is for section two and three function calls.
2633 It should consist of a single
2634 .Ql .Lb
2635 macro call;
2636 see
2637 .Sx "Library Names" .
2638 .
2639 .It Li ".Sh SYNOPSIS"
2640 The
2641 .Sx SYNOPSIS
2642 section describes the typical usage of the subject of a man page.
2643 The macros required are either
2644 .Ql .Nm ,
2645 .Ql .Cd ,
2646 or
2647 .Ql .Fn
2648 (and possibly
2649 .Ql .Fo ,
2650 .Ql .Fc ,
2651 .Ql .Fd ,
2652 and
2653 .Ql .Ft ) .
2654 The function name macro
2655 .Ql .Fn
2656 is required for manual page sections\~2 and\~3; the command and general name
2657 macro
2658 .Ql .Nm
2659 is required for sections 1, 5, 6, 7, and\~8.
2660 Section\~4 manuals require a
2661 .Ql .Nm ,
2662 .Ql .Fd
2663 or a
2664 .Ql .Cd
2665 configuration device usage macro.
2666 Several other macros may be necessary to produce the synopsis line as shown
2667 below:
2668 .
2669 .Bd -filled -offset indent
2670 .Nm cat
2671 .Op Fl benstuv
2672 .Op Fl
2673 .Ar
2674 .Ed
2675 .Pp
2676 .
2677 The following macros were used:
2678 .Pp
2679 .Dl ".Nm cat"
2680 .Dl ".Op Fl benstuv"
2681 .Dl ".Op Fl"
2682 .Dl .Ar
2683 .
2684 .It Li ".Sh DESCRIPTION"
2685 In most cases the first text in the
2686 .Sx DESCRIPTION
2687 section is a brief paragraph on the command, function or file, followed by a
2688 lexical list of options and respective explanations.
2689 To create such a list, the
2690 .Ql .Bl
2691 (begin list),
2692 .Ql .It
2693 (list item) and
2694 .Ql .El
2695 (end list)
2696 macros are used (see
2697 .Sx Lists and Columns
2698 below).
2699 .
2700 .It Li ".Sh IMPLEMENTATION NOTES"
2701 Implementation specific information should be placed here.
2702 .
2703 .It Li ".Sh RETURN VALUES"
2704 Sections 2, 3 and\~9 function return values should go here.
2705 The
2706 .Ql .Rv
2707 macro may be used to generate text for use in the
2708 .Sx RETURN VALUES
2709 section for most section 2 and 3 library functions;
2710 see
2711 .Sx "Return Values" .
2712 .El
2713 .Pp
2714 .
2715 The following
2716 .Ql .Sh
2717 section headers are part of the preferred manual page layout and must be
2718 used appropriately to maintain consistency.
2719 They are listed in the order in which they would be used.
2720 .
2721 .Bl -tag -width ".Li .Sh\ COMPATIBILITY"
2722 .It Li ".Sh ENVIRONMENT"
2723 The
2724 .Sx ENVIRONMENT
2725 section should reveal any related environment variables and clues to their
2726 behavior and/or usage.
2727 .
2728 .It Li ".Sh FILES"
2729 Files which are used or created by the man page subject should be listed via
2730 the
2731 .Ql .Pa
2732 macro in the
2733 .Sx FILES
2734 section.
2735 .
2736 .It Li ".Sh EXAMPLES"
2737 There are several ways to create examples.
2738 See the
2739 .Sx EXAMPLES
2740 section below for details.
2741 .
2742 .It Li ".Sh DIAGNOSTICS"
2743 Diagnostic messages from a command should be placed in this section.
2744 The
2745 .Ql .Ex
2746 macro may be used to generate text for use in the
2747 .Sx DIAGNOSTICS
2748 section for most section 1, 6 and\~8 commands;
2749 see
2750 .Sx "Exit Status" .
2751 .
2752 .It Li ".Sh COMPATIBILITY"
2753 Known compatibility issues (e.g. deprecated options or parameters)
2754 should be listed here.
2755 .
2756 .It Li ".Sh ERRORS"
2757 Specific error handling, especially from library functions (man page
2758 sections 2, 3, and\~9) should go here.
2759 The
2760 .Ql .Er
2761 macro is used to specify an error (errno).
2762 .
2763 .It Li ".Sh SEE ALSO"
2764 References to other material on the man page topic and cross references to
2765 other relevant man pages should be placed in the
2766 .Sx "SEE ALSO"
2767 section.
2768 Cross references are specified using the
2769 .Ql .Xr
2770 macro.
2771 Currently
2772 .Xr refer 1
2773 style references are not accommodated.
2774 .Pp
2775 It is recommended that the cross references are sorted on the section
2776 number, then alphabetically on the names within a section, and placed
2777 in that order and comma separated.
2778 Example:
2779 .Pp
2780 .Xr ls 1 ,
2781 .Xr ps 1 ,
2782 .Xr group 5 ,
2783 .Xr passwd 5
2784 .
2785 .It Li ".Sh STANDARDS"
2786 If the command, library function or file adheres to a specific
2787 implementation such as
2788 .St -p1003.2
2789 or
2790 .St -ansiC
2791 this should be noted here.
2792 If the command does not adhere to any standard, its history should be noted
2793 in the
2794 .Sx HISTORY
2795 section.
2796 .
2797 .It Li ".Sh HISTORY"
2798 Any command which does not adhere to any specific standards should be
2799 outlined historically in this section.
2800 .
2801 .It Li ".Sh AUTHORS"
2802 Credits should be placed here.
2803 The
2804 .Ql .An
2805 macro should be used to specify the name(s) of the person(s).
2806 .
2807 .It Li ".Sh BUGS"
2808 Blatant problems with the topic go here.
2809 .El
2810 .Pp
2811 .
2812 User-specified
2813 .Ql .Sh
2814 sections may be added; for example, this section was set with:
2815 .
2816 .Bd -literal -offset 15n
2817 \&.Sh "PAGE STRUCTURE DOMAIN"
2818 .Ed
2819 .
2820 .Ss "Subsection Headers"
2821 .
2822 Subsection headers have exactly the same syntax as section headers:
2823 .Ql .Ss
2824 is parsed but not generally callable.
2825 It can be used as an argument in a call to
2826 .Ql .Ss
2827 only; it then reactivates the default font for
2828 .Ql .Ss .
2829 .Pp
2830 The default width is 8n.
2831 .
2832 .Ss "Paragraphs and Line Spacing"
2833 .
2834 .Bl -tag -width ".Li .Pp"
2835 .It Li .Pp
2836 The 
2837 .Ql .Pp
2838 paragraph command may be used to specify a line space where necessary.
2839 The macro is not necessary after a
2840 .Ql .Sh
2841 or
2842 .Ql .Ss
2843 macro or before a
2844 .Ql .Bl
2845 or
2846 .Ql .Bd
2847 macro (which both assert a vertical distance unless the
2848 .Fl compact
2849 flag is given).
2850 .Pp
2851 The macro is neither callable nor parsed and takes no arguments; an
2852 alternative name is
2853 .Ql .Lp .
2854 .El
2855 .
2856 .\" XXX
2857 .
2858 .\" This worked with version one, need to redo for version three
2859 .\" .Pp
2860 .\" .Ds I
2861 .\" .Cw (ax+bx+c) \ is\ produced\ by\ \&
2862 .\" .\".Cw (ax+bx+c) \&.Va_by_) \&_and_\& \&[?/]m_b1_e1_f1[?/]\&
2863 .\" .Cl Cx \t\t
2864 .\" .Li \&.Cx\ (
2865 .\" .Cx
2866 .\" .Cl Cx \t\t
2867 .\" .Li \&.Va ax
2868 .\" .Cx
2869 .\" .Cl Cx \t\t
2870 .\" .Li \&.Sy \+
2871 .\" .Cx
2872 .\" .Cl Cx \&(\&
2873 .\" .Va ax
2874 .\" .Cx +
2875 .\" .Va by
2876 .\" .Cx +
2877 .\" .Va c )
2878 .\" .Cx \t
2879 .\" .Em is produced by
2880 .\" .Cx \t
2881 .\" .Li \&.Va by
2882 .\" .Cx
2883 .\" .Cl Cx \t\t
2884 .\" .Li \&.Sy \+
2885 .\" .Cx
2886 .\" .Cl Cx \t\t
2887 .\" .Li \&.Va c )
2888 .\" .Cx
2889 .\" .Cl Cx \t\t
2890 .\" .Li \&.Cx
2891 .\" .Cx
2892 .\" .Cw
2893 .\" .De
2894 .\" .Pp
2895 .\" This example shows the same equation in a different format.
2896 .\" The spaces
2897 .\" around the
2898 .\" .Li \&+
2899 .\" signs were forced with
2900 .\" .Li \e :
2901 .\" .Pp
2902 .\" .Ds I
2903 .\" .Cw (ax\ +\ bx\ +\ c) \ is\ produced\ by\ \&
2904 .\" .\".Cw (ax+bx+c) \&.Va_by_) \&_and_\& \&[?/]m_b1_e1_f1[?/]\&
2905 .\" .Cl Cx \t\t
2906 .\" .Li \&.Cx\ (
2907 .\" .Cx
2908 .\" .Cl Cx \t\t
2909 .\" .Li \&.Va a
2910 .\" .Cx
2911 .\" .Cl Cx \t\t
2912 .\" .Li \&.Sy x
2913 .\" .Cx
2914 .\" .Cl Cx \t\t
2915 .\" .Li \&.Cx \e\ +\e\ \e&
2916 .\" .Cx
2917 .\" .Cl Cx \&(\&
2918 .\" .Va a
2919 .\" .Sy x
2920 .\" .Cx \ +\ \&
2921 .\" .Va b
2922 .\" .Sy y
2923 .\" .Cx \ +\ \&
2924 .\" .Va c )
2925 .\" .Cx \t
2926 .\" .Em is produced by
2927 .\" .Cl Cx \t\t
2928 .\" .Li \&.Va b
2929 .\" .Cx
2930 .\" .Cl Cx \t\t
2931 .\" .Li \&.Sy y
2932 .\" .Cx
2933 .\" .Cl Cx \t\t
2934 .\" .Li \&.Cx \e\ +\e\ \e&
2935 .\" .Cx
2936 .\" .Cl Cx \t\t
2937 .\" .Li \&.Va c )
2938 .\" .Cx
2939 .\" .Cl Cx \t\t
2940 .\" .Li \&.Cx
2941 .\" .Cx
2942 .\" .Cw
2943 .\" .De
2944 .\" .Pp
2945 .\" The incantation below was
2946 .\" lifted from the
2947 .\" .Xr adb 1
2948 .\" manual page:
2949 .\" .Pp
2950 .\" .Ds I
2951 .\" .Cw \&[?/]m_b1_e1_f1[?/]\& is\ produced\ by
2952 .\" .Cl Cx \t\t
2953 .\" .Li \&.Cx Op Sy ?/
2954 .\" .Cx
2955 .\" .Cl Cx \t\t
2956 .\" .Li \&.Nm m
2957 .\" .Cx
2958 .\" .Cl Cx Op Sy ?/
2959 .\" .Nm m
2960 .\" .Ad \ b1 e1 f1
2961 .\" .Op Sy ?/
2962 .\" .Cx \t
2963 .\" .Em is produced by
2964 .\" .Cx \t
2965 .\" .Li \&.Ar \e\ b1 e1 f1
2966 .\" .Cx
2967 .\" .Cl Cx \t\t
2968 .\" .Li \&.Op Sy ?/
2969 .\" .Cx
2970 .\" .Cl Cx \t\t
2971 .\" .Li \&.Cx
2972 .\" .Cx
2973 .\" .Cw
2974 .\" .De
2975 .\" .Pp
2976 .
2977 .Ss Keeps
2978 .
2979 The only keep that is implemented at this time is for words.
2980 The macros are
2981 .Ql .Bk
2982 (begin keep)
2983 and
2984 .Ql .Ek
2985 (end keep).
2986 The only option that
2987 .Ql .Bk
2988 accepts currently is
2989 .Fl words
2990 (this is also the default if no option is given) which is useful for
2991 preventing line breaks in the middle of options.
2992 In the example for the make command line arguments (see
2993 .Sx What's in a Name ) ,
2994 the keep prevented
2995 .Xr nroff
2996 from placing up the flag and the argument on separate lines.
2997 .Pp
2998 Both macros are neither callable nor parsed.
2999 .Pp
3000 More work needs to be done with the keep macros; specifically, a
3001 .Fl line
3002 option should be added.
3003 .
3004 .Ss "Examples and Displays"
3005 .
3006 There are seven types of displays.
3007 .Pp
3008 .Bl -tag -width ".Li .D1"
3009 .It Li .D1
3010 (This is D-one.)
3011 Display one line of indented text.
3012 This macro is parsed but not callable.
3013 .Pp
3014 .D1 Fl ldghfstru
3015 .Pp
3016 The above was produced by:
3017 .Li ".D1 Fl ldghfstru" .
3018 .
3019 .It Li .Dl
3020 (This is D-ell.)
3021 Display one line of indented
3022 .Em literal
3023 text.
3024 The
3025 .Ql .Dl
3026 example macro has been used throughout this file.
3027 It allows the indentation (display) of one line of text.
3028 Its default font is set to constant width (literal).
3029 .Ql .Dl
3030 is parsed but not callable.
3031 .Pp
3032 .Dl % ls -ldg /usr/local/bin
3033 .Pp
3034 The above was produced by:
3035 .Li ".Dl % ls -ldg /usr/local/bin" .
3036 .
3037 .It Li .Bd
3038 Begin display.
3039 The
3040 .Ql .Bd
3041 display must be ended with the
3042 .Ql .Ed
3043 macro.
3044 It has the following syntax:
3045 .Pp
3046 .Bl -tag -width ".Li .Bd" -offset indent
3047 .It Li .Bd Xo
3048 .Bro \-literal | \-filled | \-unfilled | \-ragged | \-centered Brc
3049 .Oo \-offset Ao string Ac Oc Oo \-file Ao file name Ac Oc Oo \-compact Oc Xc
3050 .El
3051 .Pp
3052 .
3053 .Bl -tag -width ".Fl file Ao Ar file name Ac " -compact
3054 .It Fl ragged
3055 Fill, but do not adjust the right margin (only left-justify).
3056 .It Fl centered
3057 Center lines between the current left and right margin.
3058 Note that each single line is centered.
3059 .It Fl unfilled
3060 Do not fill; display a block of text as typed, using line breaks as
3061 specified by the user.
3062 This can produce overlong lines without warning messages.
3063 .It Fl filled
3064 Display a filled block.
3065 The block of text is formatted (i.e., the text is justified on both the left
3066 and right side).
3067 .It Fl literal
3068 Display block with literal font (usually fixed-width).
3069 Useful for source code or simple tabbed or spaced text.
3070 .It Fl file Ao Ar file name Ac
3071 The file whose name follows the
3072 .Fl file
3073 flag is read and displayed before any data enclosed with
3074 .Ql .Bd
3075 and
3076 .Ql .Ed ,
3077 using the selected display type.
3078 Any
3079 .Xr troff/ Ns Nm \-mdoc
3080 commands in the file will be processed.
3081 .It Fl offset Ao Ar string Ac
3082 If
3083 .Fl offset
3084 is specified with one of the following strings, the string is interpreted to
3085 indicate the level of indentation for the forthcoming block of text:
3086 .
3087 .Pp
3088 .Bl -tag -width ".Ar indent-two" -compact
3089 .It Ar left
3090 Align block on the current left margin; this is the default mode of
3091 .Ql .Bd .
3092 .It Ar center
3093 Supposedly center the block.
3094 At this time unfortunately, the block merely gets left aligned about an
3095 imaginary center margin.
3096 .It Ar indent
3097 Indent by one default indent value or tab.
3098 The default indent value is also used for the
3099 .Ql .D1
3100 and 
3101 .Ql .Dl
3102 macros, so one is guaranteed the two types of displays will line up.
3103 The indentation value is normally set to\~6n or about two thirds of an inch
3104 (six constant width characters).
3105 .It Ar indent-two
3106 Indent two times the default indent value.
3107 .It Ar right
3108 This
3109 .Em left
3110 aligns the block about two inches from the right side of the page.
3111 This macro needs work and perhaps may never do the right thing within
3112 .Xr troff .
3113 .El
3114 .Pp
3115 .
3116 If
3117 .Ao string Ac
3118 is a valid numeric expression instead
3119 .Pf ( Em with a scale indicator other than
3120 .Sq Em u ) ,
3121 use that value for indentation.
3122 The most useful scale indicators are
3123 .Sq m
3124 and
3125 .Sq n ,
3126 specifying the so-called
3127 .Em \&Em
3128 and
3129 .Em "En square" .
3130 This is approximately the width of the letter
3131 .Sq m
3132 resp.\& the letter
3133 .Sq n
3134 of the current font (for nroff output, both scale indicators give the same
3135 values).
3136 If
3137 .Ao string Ac
3138 isn't a numeric expression, it is tested whether it is an
3139 .Nm \-mdoc
3140 macro name, and the default offset value associated with this macro is used.
3141 Finally, if all tests fail,
3142 the width of
3143 .Ao string Ac
3144 (typeset with a fixed-width font) is taken as the offset.
3145 .It Fl compact
3146 Suppress insertion of vertical space before begin of display.
3147 .El
3148 .
3149 .It Li .Ed
3150 End display (takes no arguments).
3151 .El
3152 .
3153 .Ss "Lists and Columns"
3154 .
3155 There are several types of lists which may be initiated with the
3156 .Ql .Bl
3157 begin-list macro.
3158 Items within the list are specified with the
3159 .Ql .It
3160 item macro, and each list must end with the
3161 .Ql .El
3162 macro.
3163 Lists may be nested within themselves and within displays.
3164 The use of columns inside of lists or lists inside of columns is unproven.
3165 .Pp
3166 In addition, several list attributes may be specified such as the width of a
3167 tag, the list offset, and compactness (blank lines between items allowed or
3168 disallowed).
3169 Most of this document has been formatted with a tag style list
3170 .Pf ( Fl tag ) .
3171 .Pp
3172 It has the following syntax forms:
3173 .
3174 .Pp
3175 .Bl -tag -width ".Li .Bl" -offset indent -compact
3176 .It Li .Bl Xo
3177 .Bro \-hang | \-ohang | \-tag | \-diag | \-inset Brc
3178 .Oo \-width Ao string Ac Oc
3179 .Oo \-offset Ao string Ac Oc Oo \-compact Oc Xc
3180 .It Li .Bl Xo
3181 .No \-column Oo \-offset Ao string Ac Oc
3182 .Ao string1 Ac Ao string2 Ac ... Xc
3183 .It Li .Bl Xo
3184 .Bro \-item | \-enum Oo \-nested Oc | \-bullet | \-hyphen | \-dash Brc
3185 .Oo \-offset Ao string Ac Oc Oo \-compact Oc Xc
3186 .El
3187 .Pp
3188 .
3189 And now a detailed description of the list types.
3190 .
3191 .Pp
3192 .Bl -tag -width ".Fl column" -compact
3193 .It Fl bullet
3194 A bullet list.
3195 .
3196 .Bd -literal -offset indent
3197 \&.Bl -bullet -offset indent -compact
3198 \&.It
3199 Bullet one goes here.
3200 \&.It
3201 Bullet two here.
3202 \&.El
3203 .Ed
3204 .Pp
3205 .
3206 Produces:
3207 .
3208 .Pp
3209 .Bl -bullet -offset indent -compact
3210 .It
3211 Bullet one goes here.
3212 .It
3213 Bullet two here.
3214 .El
3215 .Pp
3216 .
3217 .It Fl dash No ( or Fl hyphen )
3218 A dash list.
3219 .
3220 .Bd -literal -offset indent
3221 \&.Bl -dash -offset indent -compact
3222 \&.It
3223 Dash one goes here.
3224 \&.It
3225 Dash two here.
3226 \&.El
3227 .Ed
3228 .Pp
3229 .
3230 Produces:
3231 .
3232 .Pp
3233 .Bl -dash -offset indent -compact
3234 .It
3235 Dash one goes here.
3236 .It
3237 Dash two here.
3238 .El
3239 .Pp
3240 .
3241 .It Fl enum
3242 An enumerated list.
3243 .
3244 .Bd -literal -offset indent
3245 \&.Bl -enum -offset indent -compact
3246 \&.It
3247 Item one goes here.
3248 \&.It
3249 And item two here.
3250 \&.El
3251 .Ed
3252 .Pp
3253 .
3254 The result:
3255 .
3256 .Pp
3257 .Bl -enum -offset indent -compact
3258 .It
3259 Item one goes here.
3260 .It
3261 And item two here.
3262 .El
3263 .Pp
3264 .
3265 If you want to nest enumerated lists, use the
3266 .Fl nested
3267 flag (starting with the second-level list):
3268 .
3269 .Bd -literal -offset indent
3270 \&.Bl -enum -offset indent -compact
3271 \&.It
3272 Item one goes here
3273 \&.Bl -enum -nested -compact
3274 \&.It
3275 Item two goes here.
3276 \&.It
3277 And item three here.
3278 \&.El
3279 \&.It
3280 And item four here.
3281 \&.El
3282 .Ed
3283 .Pp
3284 .
3285 Result:
3286 .
3287 .Pp
3288 .Bl -enum -offset indent -compact
3289 .It
3290 Item one goes here.
3291 .Bl -enum -nested -compact
3292 .It
3293 Item two goes here.
3294 .It
3295 And item three here.
3296 .El
3297 .It
3298 And item four here.
3299 .El
3300 .Pp
3301 .
3302 .It Fl item
3303 A list of type
3304 .Fl item
3305 without list markers.
3306 .
3307 .Bd -literal -offset indent
3308 \&.Bl -item -offset indent
3309 \&.It
3310 Item one goes here.
3311 Item one goes here.
3312 Item one goes here.
3313 \&.It
3314 Item two here.
3315 Item two here.
3316 Item two here.
3317 \&.El
3318 .Ed
3319 .Pp
3320 .
3321 Produces:
3322 .
3323 .Pp
3324 .Bl -item -offset indent
3325 .It
3326 Item one goes here.
3327 Item one goes here.
3328 Item one goes here.
3329 .It
3330 Item two here.
3331 Item two here.
3332 Item two here.
3333 .El
3334 .Pp
3335 .
3336 .It Fl tag
3337 A list with tags.
3338 Use
3339 .Fl width
3340 to specify the tag width.
3341 .
3342 .Pp
3343 .Bl -tag -width "PPID" -compact -offset indent
3344 .It SL
3345 sleep time of the process (seconds blocked)
3346 .It PAGEIN
3347 number of disk
3348 .Tn I/O Ns 's
3349 resulting from references by the process
3350 to pages not loaded in core.
3351 .It UID
3352 numerical user-id of process owner
3353 .It PPID
3354 numerical id of parent of process priority
3355 (non-positive when in non-interruptible wait)
3356 .El
3357 .Pp
3358 .
3359 The raw text:
3360 .
3361 .Bd -literal -offset indent
3362 \&.Bl -tag -width "PPID" -compact -offset indent
3363 \&.It SL
3364 sleep time of the process (seconds blocked)
3365 \&.It PAGEIN
3366 number of disk
3367 \&.Tn I/O Ns 's
3368 resulting from references by the process
3369 to pages not loaded in core.
3370 \&.It UID
3371 numerical user-id of process owner
3372 \&.It PPID
3373 numerical id of parent of process priority
3374 (non-positive when in non-interruptible wait)
3375 \&.El
3376 .Ed
3377 .Pp
3378 .
3379 .It Fl diag
3380 Diag lists create section four diagnostic lists and are similar to inset
3381 lists except callable macros are ignored.
3382 The
3383 .Fl width
3384 flag is not meaningful in this context.
3385 .Pp
3386 Example:
3387 .
3388 .Bd -literal -offset indent
3389 \&.Bl -diag
3390 \&.It You can't use Sy here.
3391 The message says all.
3392 \&.El
3393 .Ed
3394 .Pp
3395 .
3396 produces
3397 .
3398 .Bl -diag
3399 .It You can't use Sy here.
3400 The message says all.
3401 .El
3402 .Pp
3403 .
3404 .It Fl hang
3405 A list with hanging tags.
3406 .
3407 .Bl -hang -offset indent
3408 .It Em Hanged
3409 labels appear similar to tagged lists when the
3410 label is smaller than the label width.
3411 .It Em Longer hanged list labels
3412 blend into the paragraph unlike
3413 tagged paragraph labels.
3414 .El
3415 .Pp
3416 And the unformatted text which created it:
3417 .
3418 .Bd -literal -offset indent
3419 \&.Bl -hang -offset indent
3420 \&.It Em Hanged
3421 labels appear similar to tagged lists when the
3422 label is smaller than the label width.
3423 \&.It Em Longer hanged list labels
3424 blend into the paragraph unlike
3425 tagged paragraph labels.
3426 \&.El
3427 .Ed
3428 .Pp
3429 .
3430 .It Fl ohang
3431 Lists with overhanging tags do not use indentation for the items; tags are
3432 written to a separate line.
3433 .Pp
3434 .Bl -ohang -offset indent
3435 .It Sy SL
3436 sleep time of the process (seconds blocked)
3437 .It Sy PAGEIN
3438 number of disk
3439 .Tn I/O Ns 's
3440 resulting from references by the process
3441 to pages not loaded in core.
3442 .It Sy UID
3443 numerical user-id of process owner
3444 .It Sy PPID
3445 numerical id of parent of process priority
3446 (non-positive when in non-interruptible wait)
3447 .El
3448 .Pp
3449 .
3450 The raw text:
3451 .
3452 .Bd -literal -offset indent
3453 \&.Bl -ohang -offset indent
3454 \&.It Sy SL
3455 sleep time of the process (seconds blocked)
3456 \&.It Sy PAGEIN
3457 number of disk
3458 \&.Tn I/O Ns 's
3459 resulting from references by the process
3460 to pages not loaded in core.
3461 \&.It Sy UID
3462 numerical user-id of process owner
3463 \&.It Sy PPID
3464 numerical id of parent of process priority
3465 (non-positive when in non-interruptible wait)
3466 \&.El
3467 .Ed
3468 .Pp
3469 .
3470 .It Fl inset
3471 Here is an example of inset labels:
3472 .Bl -inset -offset indent
3473 .It Em Tag
3474 The tagged list (also called a tagged paragraph)
3475 is the most common type of list used in the
3476 Berkeley manuals.
3477 Use a
3478 .Fl width
3479 attribute as described below.
3480 .It Em Diag
3481 Diag lists create section four diagnostic lists
3482 and are similar to inset lists except callable
3483 macros are ignored.
3484 .It Em Hang
3485 Hanged labels are a matter of taste.
3486 .It Em Ohang
3487 Overhanging labels are nice when space is constrained.
3488 .It Em Inset
3489 Inset labels are useful for controlling blocks of
3490 paragraphs and are valuable for converting
3491 .Nm \-mdoc
3492 manuals to other formats.
3493 .El
3494 .Pp
3495 Here is the source text which produced the above example:
3496 .
3497 .Bd -literal -offset indent
3498 \&.Bl -inset -offset indent
3499 \&.It Em Tag
3500 The tagged list (also called a tagged paragraph)
3501 is the most common type of list used in the
3502 Berkeley manuals.
3503 \&.It Em Diag
3504 Diag lists create section four diagnostic lists
3505 and are similar to inset lists except callable
3506 macros are ignored.
3507 \&.It Em Hang
3508 Hanged labels are a matter of taste.
3509 \&.It Em Ohang
3510 Overhanging labels are nice when space is constrained.
3511 \&.It Em Inset
3512 Inset labels are useful for controlling blocks of
3513 paragraphs and are valuable for converting
3514 \&.Nm \-mdoc
3515 manuals to other formats.
3516 \&.El
3517 .Ed
3518 .Pp
3519 .
3520 .It Fl column
3521 This list type generates multiple columns.
3522 The number of columns and the width of each column is determined by the
3523 arguments to the
3524 .Fl column
3525 list,
3526 .Aq Ar string1 ,
3527 .Aq Ar string2 ,
3528 etc.
3529 If
3530 .Aq Ar stringN
3531 starts with a
3532 .Ql .\&
3533 (dot) immediately followed by a valid
3534 .Nm \-mdoc
3535 macro name, interpret
3536 .Aq Ar stringN
3537 and use the width of the result.
3538 Otherwise, the width of
3539 .Aq Ar stringN
3540 (typeset with a fixed-width font) is taken as the
3541 .Ar N Ns th
3542 column width.
3543 .Pp
3544 Each
3545 .Ql .It
3546 argument is parsed to make a row, each column within the row is a separate
3547 argument separated by a tab or the
3548 .Ql .Ta
3549 macro.
3550 .Pp
3551 The table:
3552 .
3553 .Bl -column -offset indent ".Sy String" ".Sy Nroff" ".Sy Troff"
3554 .It Sy String Ta Sy Nroff Ta Sy Troff
3555 .It Li <= Ta <= Ta \*(<=
3556 .It Li >= Ta >= Ta \*(>=
3557 .El
3558 .Pp
3559 .
3560 was produced by:
3561 .
3562 .Bd -literal
3563 \&.Bl -column -offset indent ".Sy String" ".Sy Nroff" ".Sy Troff"
3564 \&.It Sy String Ta Sy Nroff Ta Sy Troff
3565 \&.It Li <= Ta <= Ta \e*(<=
3566 \&.It Li >= Ta >= Ta \e*(>=
3567 \&.El
3568 .Ed
3569 .El
3570 .Pp
3571 .
3572 Other keywords:
3573 .
3574 .Bl -tag -width ".Fl indent Ao Ar string Ac"
3575 .It Fl width Ao Ar string Ac
3576 If
3577 .Aq Ar string
3578 starts with a
3579 .Ql .\&
3580 (dot) immediately followed by a valid
3581 .Nm \-mdoc
3582 macro name, interpret
3583 .Aq Ar string
3584 and use the width of the result.
3585 Almost all lists in this document use this option.
3586 .Pp
3587 Example:
3588 .
3589 .Bd -literal -offset indent
3590 \&.Bl -tag -width ".Fl test Ao Ar string Ac"
3591 \&.It Fl test Ao Ar string Ac
3592 This is a longer sentence to show how the
3593 \&.Fl width
3594 flag works in combination with a tag list.
3595 \&.El
3596 .Ed
3597 .Pp
3598 .
3599 gives:
3600 .
3601 .Bl -tag -width ".Fl test Ao Ar string Ac"
3602 .It Fl test Ao Ar string Ac
3603 This is a longer sentence to show how the
3604 .Fl width
3605 flag works in combination with a tag list.
3606 .El
3607 .Pp
3608 .
3609 (Note that the current state of
3610 .Nm \-mdoc
3611 is saved before
3612 .Aq Ar string
3613 is interpreted; afterwards, all variables are restored again.
3614 However, boxes (used for enclosures) can't be saved in
3615 .Tn GNU
3616 .Xr troff 1 ;
3617 as a consequence, arguments must always be
3618 .Em balanced
3619 to avoid nasty errors.
3620 For example, do not write
3621 .Ql ".Ao Ar string"
3622 but
3623 .Ql ".Ao Ar string Xc"
3624 instead if you really need only an opening angle bracket.)
3625 .Pp
3626 Otherwise, if
3627 .Aq Ar string
3628 is a valid numeric expression
3629 .Em ( with a scale indicator other than
3630 .Sq Em u ) ,
3631 use that value for indentation.
3632 The most useful scale indicators are
3633 .Sq m
3634 and
3635 .Sq n ,
3636 specifying the so-called
3637 .Em \&Em
3638 and
3639 .Em "En square" .
3640 This is approximately the width of the letter
3641 .Sq m
3642 resp.\& the letter
3643 .Sq n
3644 of the current font (for nroff output, both scale indicators give the same
3645 values).
3646 If
3647 .Aq Ar string
3648 isn't a numeric expression, it is tested whether it is an
3649 .Nm \-mdoc
3650 macro name, and the default width value associated with this macro is used.
3651 Finally, if all tests fail,
3652 the width of
3653 .Aq Ar string
3654 (typeset with a fixed-width font) is taken as the width.
3655 .Pp
3656 If a width is not specified for the tag list type, every time
3657 .Ql .It
3658 is invoked, an attempt is made to determine an appropriate width.
3659 If the first argument to
3660 .Ql .It
3661 is a callable macro, the default width for that macro will be used;
3662 otherwise, the default width of
3663 .Ql .No
3664 is used.
3665 .It Fl offset Ao Ar string Ac
3666 If
3667 .Aq Ar string
3668 is
3669 .Ar indent ,
3670 a default indent value (normally set to\~6n, similar to the value used in
3671 .Ql .Dl
3672 or
3673 .Ql .Bd )
3674 is used.
3675 If
3676 .Aq Ar string
3677 is a valid numeric expression instead
3678 .Pf ( Em with a scale indicator other than
3679 .Sq Em u ) ,
3680 use that value for indentation.
3681 The most useful scale indicators are
3682 .Sq m
3683 and
3684 .Sq n ,
3685 specifying the so-called
3686 .Em \&Em
3687 and
3688 .Em "En square" .
3689 This is approximately the width of the letter
3690 .Sq m
3691 resp.\& the letter
3692 .Sq n
3693 of the current font (for nroff output, both scale indicators give the same
3694 values).
3695 If
3696 .Aq Ar string
3697 isn't a numeric expression, it is tested whether it is an
3698 .Nm \-mdoc
3699 macro name, and the default offset value associated with this macro is used.
3700 Finally, if all tests fail,
3701 the width of
3702 .Aq Ar string
3703 (typeset with a fixed-width font) is taken as the offset.
3704 .It Fl compact
3705 Suppress insertion of vertical space before the list and between list items.
3706 .El
3707 .
3708 .
3709 .Sh "MISCELLANEOUS MACROS"
3710 .
3711 Here a list of the remaining macros which do not fit well into one of the
3712 above sections.
3713 We couldn't find real examples for the following macros:
3714 .Ql .Me
3715 and
3716 .Ql .Ot .
3717 They are documented here for completeness \- if you know how to use them
3718 properly please send a mail to
3719 .Mt bug-groff@gnu.org
3720 (including an example).
3721 .
3722 .Bl -tag -width ".Li .Bt"
3723 .It Li .Bt
3724 prints
3725 .
3726 .Bd -ragged -offset indent
3727 .Bt
3728 .Ed
3729 .Pp
3730 It is neither callable nor parsed and takes no arguments.
3731 .
3732 .It Li .Fr
3733 .Pp
3734 .Dl Usage: .Fr Ao function return value Ac ...
3735 .Pp
3736 Don't use this macro.
3737 It allows a break right before the return value (usually a single digit)
3738 which is bad typographical behaviour.
3739 Use
3740 .Ql \e~
3741 to tie the return value to the previous word.
3742 .
3743 .It Li .Hf
3744 Use this macro to include a (header) file literally.
3745 It first prints
3746 .Ql File:
3747 followed by the file name, then the contents of
3748 .Ao file Ac .
3749 .Pp
3750 .Dl Usage: .Hf Ao file Ac
3751 .Pp
3752 It is neither callable nor parsed.
3753 .
3754 .It Li .Lk
3755 To be written.
3756 .
3757 .It Li .Me
3758 Exact usage unknown.
3759 The documentation in the
3760 .Nm \-mdoc
3761 source file describes it as a macro for
3762 .Dq "menu entries" .
3763 .Pp
3764 Its default width is 6n.
3765 .
3766 .It Li .Mt
3767 To be written.
3768 .
3769 .It Li .Ot
3770 Exact usage unknown.
3771 The documentation in the
3772 .Nm \-mdoc
3773 source file describes it as
3774 .Dq old function type (fortran) .
3775 .
3776 .It Li .Sm
3777 Activate (toggle) space mode.
3778 .Pp
3779 .Dl Usage: .Sm Oo on | off Oc ...
3780 .Pp
3781 If space mode is off, no spaces between macro arguments are inserted.
3782 If called without a parameter (or if the next parameter is neither
3783 .Ql on
3784 nor
3785 .Ql off ,
3786 .Ql .Sm
3787 toggles space mode.
3788 .
3789 .It Li .Ud
3790 prints
3791 .
3792 .Bd -ragged -offset indent
3793 .Ud
3794 .Ed
3795 .Pp
3796 It is neither callable nor parsed and takes no arguments.
3797 .El
3798 .
3799 .
3800 .Sh "PREDEFINED STRINGS"
3801 .
3802 The following strings are predefined:
3803 .Pp
3804 .Bl -column String infinity "Troff " "straight double quote" -offset indent
3805 .It Sy String Ta Sy Nroff Ta Sy Troff Ta Sy Meaning
3806 .It Li <=     Ta <=       Ta \*[<=]   Ta "less equal"
3807 .It Li >=     Ta >=       Ta \*[>=]   Ta "greater equal"
3808 .It Li Rq     Ta ''       Ta \*[Rq]   Ta "right double quote"
3809 .It Li Lq     Ta ``       Ta \*[Lq]   Ta "left double quote"
3810 .It Li ua     Ta ^        Ta \*[ua]   Ta "upwards arrow"
3811 .It Li aa     Ta \'       Ta \*[aa]   Ta "acute accent"
3812 .It Li ga     Ta \`       Ta \*[ga]   Ta "grave accent"
3813 .It Li q      Ta \&"      Ta \*[q]    Ta "straight double quote"
3814 .It Li Pi     Ta pi       Ta \*[Pi]   Ta "greek pi"
3815 .It Li Ne     Ta !=       Ta \*[Ne]   Ta "not equal"
3816 .It Li Le     Ta <=       Ta \*[Le]   Ta "less equal"
3817 .It Li Ge     Ta >=       Ta \*[Ge]   Ta "greater equal"
3818 .It Li Lt     Ta <        Ta \*[Lt]   Ta "less than"
3819 .It Li Gt     Ta >        Ta \*[Gt]   Ta "greater than"
3820 .It Li Pm     Ta +\-      Ta \*[Pm]   Ta "plus minus"
3821 .It Li If     Ta infinity Ta \*[If]   Ta "infinity"
3822 .It Li Na     Ta \*[Na]   Ta \*[Na]   Ta "not a number"
3823 .It Li Ba     Ta \*[Ba]   Ta \*[Ba]   Ta "vertical bar"
3824 .El
3825 .Pp
3826 The names of the columns
3827 .Sy Nroff
3828 and
3829 .Sy Troff
3830 are a bit misleading;
3831 .Sy Nroff
3832 shows the
3833 .Tn ASCII
3834 representation, while
3835 .Sy Troff
3836 gives the best glyph form available.
3837 For example, a Unicode enabled
3838 .Tn TTY Ns - Ns
3839 device will have proper glyph representations for all strings, whereas the
3840 enhancement for a Latin1
3841 .Tn TTY Ns - Ns
3842 device is only the plus-minus sign.
3843 .Pp
3844 String names which consist of two characters can be written as
3845 .Ql \e*(xx ;
3846 string names which consist of one character can be written as
3847 .Ql \e*x .
3848 A generic syntax for a string name of any length is
3849 .Ql \e*[xxx]
3850 (this is a
3851 .Tn GNU
3852 .Xr troff 1
3853 extension).
3854 .
3855 .
3856 \#
3857 \#=====================================================================
3858 \#
3859 .Sh DIAGNOSTICS
3860 .
3861 The debugging macro
3862 .Ql .Db
3863 available in previous versions of
3864 .Nm \-mdoc
3865 has been removed since
3866 .Tn GNU
3867 .Xr troff 1
3868 provides better facilities to check parameters; additionally, many error and
3869 warning messages have been added to this macro package, making it both more
3870 robust and verbose.
3871 .Pp
3872 The only remaining debugging macro is
3873 .Ql .Rd
3874 which yields a register dump of all global registers and strings.
3875 A normal user will never need it.
3876 .
3877 .
3878 .Sh "FORMATTING WITH GROFF, TROFF, AND NROFF"
3879 .
3880 By default, the package inhibits page breaks, headers, and footers if
3881 displayed with a
3882 .Tn TTY
3883 device like
3884 .Sq latin1
3885 or
3886 .Sq unicode
3887 to make the manual more efficient for viewing on-line.
3888 This behaviour can be changed (e.g.\& to create a hardcopy of the
3889 .Tn TTY
3890 output) by setting the register
3891 .Ql cR
3892 to zero while calling
3893 .Xr groff :
3894 .Pp
3895 .Dl groff -Tlatin1 -rcR=0 -mdoc foo.man > foo.txt
3896 .Pp
3897 For double-sided printing, set register
3898 .Ql D
3899 to\~1:
3900 .Pp
3901 .Dl groff -Tps -rD1 -mdoc foo.man > foo.ps
3902 .Pp
3903 To change the document font size to 11pt or 12pt, set register
3904 .Ql S
3905 accordingly:
3906 .Pp
3907 .Dl groff -Tdvi -rS11 -mdoc foo.man > foo.dvi
3908 .Pp
3909 Register
3910 .Ql S
3911 is ignored for
3912 .Tn TTY
3913 devices.
3914 .
3915 .
3916 .Sh FILES
3917 .
3918 .Bl -tag -width mdoc/doc-ditroff -compact
3919 .It Pa doc.tmac
3920 The main manual macro package.
3921 .It Pa mdoc.tmac
3922 A wrapper file to call
3923 .Pa doc.tmac .
3924 .It Pa mdoc/doc-common
3925 Common strings, definitions, stuff related typographic output.
3926 .It Pa mdoc/doc-nroff
3927 Definitions used for a
3928 .Tn TTY
3929 output device.
3930 .It Pa mdoc/doc-ditroff
3931 Definitions used for all other devices.
3932 .It Pa mdoc.local
3933 Local additions and customizations.
3934 .It Pa andoc.tmac
3935 This file checks whether the
3936 .Nm \-mdoc
3937 or the
3938 .Nm \-man
3939 package should be used.
3940 .El
3941 .
3942 .
3943 .Sh "SEE ALSO"
3944 .
3945 .Xr groff 1 ,
3946 .Xr man 1 ,
3947 .Xr troff 1 ,
3948 .Xr groff_man 7
3949 .
3950 .
3951 .Sh BUGS
3952 .
3953 Section 3f has not been added to the header routines.
3954 .Pp
3955 .Ql \&.Nm
3956 font should be changed in
3957 .Sx NAME
3958 section.
3959 .Pp
3960 .Ql \&.Fn
3961 needs to have a check to prevent splitting up
3962 if the line length is too short.
3963 Occasionally it
3964 separates the last parenthesis, and sometimes
3965 looks ridiculous if a line is in fill mode.
3966 .Pp
3967 The list and display macros do not do any keeps
3968 and certainly should be able to.
3969 .\" Note what happens if the parameter list overlaps a newline
3970 .\" boundary.
3971 .\" to make sure a line boundary is crossed:
3972 .\" .Bd -literal
3973 .\" \&.Fn struct\e\ dictionarytable\e\ *dictionarylookup struct\e\ dictionarytable\e\ *tab[]
3974 .\" .Ed
3975 .\" .Pp
3976 .\" produces, nudge nudge,
3977 .\" .Fn struct\ dictionarytable\ *dictionarylookup char\ *h struct\ dictionarytable\ *tab[] ,
3978 .\" .Fn struct\ dictionarytable\ *dictionarylookup char\ *h struct\ dictionarytable\ *tab[] ,
3979 .\" nudge
3980 .\" .Fn struct\ dictionarytable\ *dictionarylookup char\ *h struct\ dictionarytable\ *tab[] .
3981 .\" .Pp
3982 .\" If double quotes are used, for example:
3983 .\" .Bd -literal
3984 .\" \&.Fn \*qstruct dictionarytable *dictionarylookup\*q \*qchar *h\*q \*qstruct dictionarytable *tab[]\*q
3985 .\" .Ed
3986 .\" .Pp
3987 .\" produces, nudge nudge,
3988 .\" .Fn "struct dictionarytable *dictionarylookup" "char *h" "struct dictionarytable *tab[]" ,
3989 .\" nudge
3990 .\" .Fn "struct dictionarytable *dictionarylookup" "char *h" "struct dictionarytable *tab[]" ,
3991 .\" nudge
3992 .\" .Fn "struct dictionarytable *dictionarylookup" "char *h" "struct dictionarytable *tab[]" .
3993 .\" .Pp
3994 .\" Not a pretty sight...
3995 .\" In a paragraph, a long parameter containing unpaddable spaces as
3996 .\" in the former example will cause
3997 .\" .Xr troff
3998 .\" to break the line and spread
3999 .\" the remaining words out.
4000 .\" The latter example will adjust nicely to
4001 .\" justified margins, but may break in between an argument and its
4002 .\" declaration.
4003 .\" In
4004 .\" .Xr nroff
4005 .\" the right margin adjustment is normally ragged and the problem is
4006 .\" not as severe.
4007 .
4008 .\" Local Variables:
4009 .\" mode: nroff
4010 .\" End: