OSDN Git Service

c08892b858e97c41386fa8310294b1e19d488b49
[linuxjm/LDP_man-pages.git] / original / man7 / mdoc.samples.7
1 .\" Copyright (c) 1990, 1993
2 .\"     The Regents of the University of California.  All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\"    notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\" 3. All advertising materials mentioning features or use of this software
13 .\"    must display the following acknowledgement:
14 .\"     This product includes software developed by the University of
15 .\"     California, Berkeley and its contributors.
16 .\" 4. Neither the name of the University nor the names of its contributors
17 .\"    may be used to endorse or promote products derived from this software
18 .\"    without specific prior written permission.
19 .\"
20 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 .\" SUCH DAMAGE.
31 .\"
32 .\"     @(#)mdoc.samples.7      8.2 (Berkeley) 12/30/93
33 .\"     $Id: mdoc.samples.7,v 1.17 1998/12/03 03:38:45 jkoshy Exp $
34 .\"
35 .\" This tutorial sampler invokes every macro in the package several
36 .\" times and is guaranteed to give a worst case performance
37 .\" for an already extremely slow package.
38 .\"
39 .Dd December 30, 1993
40 .Os
41 .Dt MDOC.SAMPLES 7
42 .Sh NAME
43 .Nm mdoc.samples
44 .Nd tutorial sampler for writing
45 .Bx
46 manuals with
47 .Nm \-mdoc
48 .Sh SYNOPSIS
49 .Nm man mdoc.samples
50 .Sh DESCRIPTION
51 A tutorial sampler for writing
52 .Bx
53 manual pages with the
54 .Nm \-mdoc
55 macro package, a
56 .Em content Ns \-based
57 and
58 .Em domain Ns \-based
59 formatting
60 package for
61 .Xr troff 1 .
62 Its predecessor, the
63 .Xr \-man 7
64 package,
65 addressed page layout leaving the
66 manipulation of fonts and other
67 typesetting details to the individual author.
68 In
69 .Nm \-mdoc ,
70 page layout macros
71 make up the
72 .Em "page structure domain"
73 which consists of macros for titles, section headers, displays
74 and lists. Essentially items which affect the physical position
75 of text on a formatted page.
76 In addition to the page structure domain, there are two more domains,
77 the manual domain and the general text domain.
78 The general text domain is defined as macros which
79 perform tasks such as quoting or emphasizing pieces of text.
80 The manual domain is defined as macros that are a subset of the
81 day to day informal language used to describe commands, routines
82 and related
83 .Bx
84 files.
85 Macros in the manual domain handle
86 command names, command-line arguments and options, function names,
87 function parameters, pathnames, variables, cross
88 references to other manual pages, and so on.
89 These domain
90 items have value
91 for both the author and the future user of the manual page.
92 It is hoped the consistency gained
93 across the manual set will provide easier
94 translation to future documentation tools.
95 .Pp
96 Throughout the
97 .Ux
98 manual pages, a manual entry
99 is simply referred
100 to as a man page, regardless of actual length and without
101 sexist intention.
102 .Sh GETTING STARTED
103 Since a tutorial document is normally read when a person
104 desires to use the material immediately, the assumption has
105 been made that the user of this document may be impatient.
106 The material presented in the remained of this document is
107 outlined as follows:
108 .Bl -enum -offset indent
109 .It
110 .Tn "TROFF IDIOSYNCRASIES"
111 .Bl -tag -width flag -compact -offset indent
112 .It "Macro Usage" .
113 .It "Passing Space Characters in an Argument" .
114 .It "Trailing Blank Space Characters (a warning)" .
115 .It "Escaping Special Characters" .
116 .El
117 .It
118 .Tn "THE ANATOMY OF A MAN PAGE"
119 .Bl -tag -width flag -compact -offset indent
120 .It "A manual page template" .
121 .El
122 .It
123 .Tn "TITLE MACROS" .
124 .It
125 .Tn "INTRODUCTION OF MANUAL AND GENERAL TEXT DOMAINS" .
126 .Bl -tag -width flag -compact -offset indent
127 .It "What's in a name..." .
128 .It "General Syntax" .
129 .El
130 .It
131 .Tn "MANUAL DOMAIN"
132 .Bl -tag -width flag -compact -offset indent
133 .It "Addresses" .
134 .It "Author name" .
135 .It "Arguments" .
136 .It "Configuration Declarations (section four only)" .
137 .It "Command Modifier" .
138 .It "Defined Variables" .
139 .It "Errno's (Section two only)" .
140 .It "Environment Variables" .
141 .It "Function Argument" .
142 .It "Function Declaration" .
143 .It "Flags" .
144 .It "Functions (library routines)" .
145 .It "Function Types" .
146 .\" .It "Header File (including source code)" .
147 .It "Interactive Commands" .
148 .It "Names" .
149 .It "Options" .
150 .It "Pathnames" .
151 .It "Variables" .
152 .It "Cross References" .
153 .El
154 .It
155 .Tn "GENERAL TEXT DOMAIN"
156 .Bl -tag -width flag -compact -offset indent
157 .It "AT&T Macro" .
158 .It "BSD Macro" .
159 .It "FreeBSD Macro" .
160 .It "UNIX Macro" .
161 .It "Enclosure/Quoting Macros"
162 .Bl -tag -width flag -compact -offset indent
163 .It "Angle Bracket Quote/Enclosure" .
164 .It "Bracket Quotes/Enclosure" .
165 .It "Double Quote macro/Enclosure" .
166 .It "Parenthesis Quote/Enclosure" .
167 .It "Single Quotes/Enclosure" .
168 .It "Prefix Macro" .
169 .El
170 .It "No\-Op or Normal Text Macro" .
171 .It "No Space Macro" .
172 .It "Section Cross References" .
173 .It "References and Citations" .
174 .It "Return Values (sections two and three only)"
175 .It "Trade Names (Acronyms and Type Names)" .
176 .It "Extended  Arguments" .
177 .El
178 .It
179 .Tn "PAGE STRUCTURE DOMAIN"
180 .Bl -tag -width flag -compact -offset indent
181 .It "Section Headers" .
182 .It "Paragraphs and Line Spacing" .
183 .It "Keeps" .
184 .It "Displays" .
185 .It "Font Modes (Emphasis, Literal, and Symbolic)" .
186 .It "Lists and Columns" .
187 .El
188 .It
189 .Tn "PREDEFINED STRINGS"
190 .It
191 .Tn "DIAGNOSTICS"
192 .It
193 .Tn "FORMATTING WITH GROFF, TROFF AND NROFF"
194 .It
195 .Tn "BUGS"
196 .El
197 .ne 7
198 .Sh TROFF IDIOSYNCRASIES
199 The
200 .Nm \-mdoc
201 package attempts to simplify the process of writing a man page.
202 Theoretically, one should not have to learn the dirty details of
203 .Xr troff 1
204 to use
205 .Nm \-mdoc ;
206 however, there are a few
207 limitations which are unavoidable and best gotten out
208 of the way.
209 And, too, be forewarned, this package is
210 .Em not
211 fast.
212 .Ss Macro Usage
213 As in
214 .Xr troff 1 ,
215 a macro is called by placing a
216 .Ql \&\.
217 (dot character)
218 at the beginning of
219 a line followed by the two character name for the macro.
220 Arguments may follow the macro separated by spaces.
221 It is the dot character at the beginning of the line which causes
222 .Xr troff 1
223 to interpret the next two characters as a macro name.
224 To place a
225 .Ql \&\.
226 (dot character)
227 at the beginning of a line in some context other than
228 a macro invocation, precede the
229 .Ql \&\.
230 (dot) with the
231 .Ql \e&
232 escape sequence.
233 The
234 .Ql \e&
235 translates literally to a zero width space, and is never displayed in the
236 output.
237 .Pp
238 In general,
239 .Xr troff 1
240 macros accept up to nine arguments, any
241 extra arguments are ignored.
242 Most macros in
243 .Nm \-mdoc
244 accept nine arguments and,
245 in limited cases, arguments may be continued or extended
246 on the
247 next line (See
248 .Sx Extensions ) .
249 A few macros handle quoted arguments (see
250 .Sx Passing Space Characters in an Argument
251 below).
252 .Pp
253 Most of the
254 .Nm \-mdoc
255 general text domain and manual domain macros are special
256 in that their argument lists are
257 .Em parsed
258 for callable macro names.
259 This means an argument on the argument list which matches
260 a general text or manual domain macro name and is determined
261 to be callable will be executed
262 or called when it is processed.
263 In this case
264 the argument, although the name of a macro,
265 is not preceded by a
266 .Ql \&\.
267 (dot).
268 It is in this manner that many macros are nested; for
269 example
270 the option macro,
271 .Ql \&.Op ,
272 may
273 .Em call
274 the flag and argument macros,
275 .Ql \&Fl
276 and
277 .Ql \&Ar ,
278 to specify an optional flag with an argument:
279 .Bl -tag -width "\&.Op \&Fl s \&Ar bytes" -offset indent
280 .It Op Fl s Ar bytes
281 is produced by
282 .Li \&.Op \&Fl s \&Ar bytes
283 .El
284 .Pp
285 To prevent a two character
286 string from being interpreted as a macro name, precede
287 the string with the
288 escape sequence
289 .Ql \e& :
290 .Bl -tag -width "\&.Op \&Fl s \&Ar bytes" -offset indent
291 .It Op \&Fl s \&Ar bytes
292 is produced by
293 .Li \&.Op \e&Fl s \e&Ar bytes
294 .El
295 .Pp
296 Here the strings
297 .Ql \&Fl
298 and
299 .Ql \&Ar
300 are not interpreted as macros.
301 Macros whose argument lists are parsed for callable arguments
302 are referred to
303 as parsed and macros which may be called from an argument
304 list are referred to as callable
305 throughout this document and in the companion quick reference
306 manual
307 .Xr mdoc 7 .
308 This is a technical
309 .Em faux pas
310 as almost all of the macros in
311 .Nm \-mdoc
312 are parsed, but as it was cumbersome to constantly refer to macros
313 as being callable and being able to call other macros,
314 the term parsed has been used.
315 .Ss Passing Space Characters in an Argument
316 Sometimes it is desirable to give as one argument a string
317 containing one or more blank space characters.
318 This may be necessary
319 to defeat the nine argument limit or to specify arguments to macros
320 which expect particular arrangement of items in the argument list.
321 For example,
322 the function macro
323 .Ql \&.Fn
324 expects the first argument to be the name of a function and any
325 remaining arguments to be function parameters.
326 As
327 .Tn "ANSI C"
328 stipulates the declaration of function parameters in the
329 parenthesized parameter list, each parameter is guaranteed
330 to be at minimum a two word string.
331 For example,
332 .Fa int foo .
333 .Pp
334 There are two possible ways to pass an argument which contains
335 an embedded space.
336 .Em Implementation note :
337 Unfortunately, the most convenient way
338 of passing spaces in between quotes by reassigning individual
339 arguments before parsing was fairly expensive speed wise
340 and space wise to implement in all the macros for
341 .Tn AT&T
342 .Xr troff .
343 It is not expensive for
344 .Xr groff
345 but for the sake of portability, has been limited
346 to the following macros which need
347 it the most:
348 .Pp
349 .Bl -tag -width 4n -offset indent -compact
350 .It Li \&Cd
351 Configuration declaration (section 4
352 .Sx SYNOPSIS )
353 .It Li \&Bl
354 Begin list (for the width specifier).
355 .It Li \&Em
356 Emphasized text.
357 .It Li \&Fn
358 Functions (sections two and four).
359 .It Li \&It
360 List items.
361 .It Li \&Li
362 Literal text.
363 .It Li \&Sy
364 Symbolic text.
365 .It Li \&%B
366 Book titles.
367 .It Li \&%J
368 Journal names.
369 .It Li \&%O
370 Optional notes for a reference.
371 .It Li \&%R
372 Report title (in a reference).
373 .It Li \&%T
374 Title of article in a book or journal.
375 .El
376 .Pp
377 One way of passing a string
378 containing blank spaces is to use the hard or unpaddable space character
379 .Ql \e\  ,
380 that is, a blank space preceded by the escape character
381 .Ql \e .
382 This method may be used with any macro but has the side effect
383 of interfering with the adjustment of text
384 over the length of a line.
385 .Xr Troff
386 sees the hard space as if it were any other printable character and
387 cannot split the string into blank or newline separated pieces as one
388 would expect.
389 The method is useful for strings which are not expected
390 to overlap a line boundary.
391 For example:
392 .Bl -tag -width "fetch(char *str)" -offset indent
393 .It Fn fetch char\ *str
394 is created by
395 .Ql \&.Fn fetch char\e *str
396 .It Fn fetch "char *str"
397 can also be created by
398 .Ql \&.Fn fetch "\\*qchar *str\\*q"
399 .El
400 .Pp
401 If the
402 .Ql \e
403 or quotes
404 were omitted,
405 .Ql \&.Fn
406 would see three arguments and
407 the result would be:
408 .Pp
409 .Dl Fn fetch char *str
410 .Pp
411 For an example of what happens when the parameter list overlaps
412 a newline boundary, see the
413 .Sx BUGS
414 section.
415 .Ss Trailing Blank Space Characters
416 .Xr Troff
417 can be confused by blank space characters at the end of a line.
418 It
419 is a wise preventive measure to globally remove all blank spaces
420 from <blank-space><end-of-line> character sequences.
421 Should the need
422 arise to force a blank character at the end of a line,
423 it may be forced with an unpaddable space and the
424 .Ql \e&
425 escape character.
426 For example,
427 .Ql string\e\ \e& .
428 .Ss Escaping Special Characters
429 Special characters
430 like the newline character
431 .Ql \en ,
432 are handled by replacing the
433 .Ql \e
434 with
435 .Ql \ee
436 (e.g.
437 .Ql \een )
438 to preserve
439 the backslash.
440 .Sh THE ANATOMY OF A MAN PAGE
441 The body of a man page is easily constructed from a basic
442 template found in the file
443 .Pa /usr/share/misc/mdoc.template .
444 Several example man pages can also be found
445 in
446 .Pa /usr/share/examples/mdoc .
447 .Pp
448 .Ss A manual page template
449 .Bd -literal -offset indent
450 \&.\e" The following requests are required for all man pages.
451 \&.Dd Month day, year
452 \&.Os OPERATING_SYSTEM [version/release]
453 \&.Dt DOCUMENT_TITLE [section number] [volume]
454 \&.Sh NAME
455 \&.Nm name
456 \&.Nd one line description of name
457 \&.Sh SYNOPSIS
458 \&.Sh DESCRIPTION
459 \&.\e" The following requests should be uncommented and
460 \&.\e" used where appropriate.  This next request is
461 \&.\e" for sections 2 and 3 function return values only.
462 \&.\e" .Sh RETURN VALUE
463 \&.\e" This next request is for sections 1, 6, 7 & 8 only
464 \&.\e" .Sh ENVIRONMENT
465 \&.\e" .Sh FILES
466 \&.\e" .Sh EXAMPLES
467 \&.\e" This next request is for sections 1, 6, 7 & 8 only
468 \&.\e"     (command return values (to shell) and
469 \&.\e"    fprintf/stderr type diagnostics)
470 \&.\e" .Sh DIAGNOSTICS
471 \&.\e" The next request is for sections 2 and 3 error
472 \&.\e" and signal handling only.
473 \&.\e" .Sh ERRORS
474 \&.\e" .Sh SEE ALSO
475 \&.\e" .Sh CONFORMING TO
476 \&.\e" .Sh HISTORY
477 \&.\e" .Sh AUTHORS
478 \&.\e" .Sh BUGS
479 .Ed
480 .Pp
481 The first items in the template are the macros
482 .Pq Li \&.Dd , \&.Os , \&.Dt ;
483 the document date,
484 the operating system the man page or subject source is developed
485 or modified for,
486 and the man page title
487 .Pq Em in upper case
488 along with the section of the manual the page
489 belongs in.
490 These macros identify the page,
491 and are discussed below in
492 .Sx TITLE MACROS .
493 .Pp
494 The remaining items in the template are section headers
495 .Pq Li \&.Sh ;
496 of which
497 .Sx NAME ,
498 .Sx SYNOPSIS
499 and
500 .Sx DESCRIPTION
501 are mandatory.
502 The
503 headers are
504 discussed in
505 .Sx PAGE STRUCTURE DOMAIN ,
506 after
507 presentation of
508 .Sx MANUAL DOMAIN .
509 Several content macros are used to demonstrate page layout macros;
510 reading about content macros before page layout macros is
511 recommended.
512 .Sh TITLE MACROS
513 The title macros are the first portion of the page structure
514 domain, but are presented first and separate for someone who
515 wishes to start writing a man page yesterday.
516 Three header macros designate the document title or manual page title,
517 the operating system,
518 and the date of authorship.
519 These macros are one called once at the very beginning of the document
520 and are used to construct the headers and footers only.
521 .Bl -tag -width 6n
522 .It Li \&.Dt DOCUMENT_TITLE section# [volume]
523 The document title is the
524 subject of the man page and must be in
525 .Tn CAPITALS
526 due to troff
527 limitations.
528 The section number may be 1,\ ...,\ 8,
529 and if it is specified,
530 the volume title may be omitted.
531 A volume title may be arbitrary or one of the following:
532 .\" .Cl
533 .\" USD UNIX User's Supplementary Documents
534 .\" .Cl
535 .\" PS1 UNIX Programmer's Supplementary Documents
536 .Pp
537 .Bl -column SMM -offset indent -compact
538 .It Li AMD      UNIX Ancestral Manual Documents
539 .It Li SMM      UNIX System Manager's Manual
540 .It Li URM      UNIX Reference Manual
541 .It Li PRM      UNIX Programmer's Manual
542 .El
543 .Pp
544 The default volume labeling is
545 .Li URM
546 for sections 1, 6, and 7;
547 .Li SMM
548 for section 8;
549 .Li PRM
550 for sections 2, 3, 4, and 5.
551 .\" .Cl
552 .\" MMI UNIX Manual Master Index
553 .\" .Cl
554 .\" CON UNIX Contributed Software Manual
555 .\" .Cl
556 .\" LOC UNIX Local Manual
557 .It Li \&.Os operating_system release#
558 The name of the operating system
559 should be the common acronym, for example,
560 .Tn BSD
561 or
562 .Tn FreeBSD
563 or
564 .Tn ATT .
565 The release should be the standard release
566 nomenclature for the system specified, for example, 4.3, 4.3+Tahoe, V.3,
567 V.4.
568 Unrecognized arguments are displayed as given in the page footer.
569 For instance, a typical footer might be:
570 .Pp
571 .Dl \&.Os 4.3BSD
572 .Pp
573 or
574 .Dl \&.Os FreeBSD 2.2
575 .Pp
576 or for a locally produced set
577 .Pp
578 .Dl \&.Os CS Department
579 .Pp
580 The Berkeley default,
581 .Ql \&.Os
582 without an argument, has been defined as
583 .Tn BSD
584 in the
585 site-specific file
586 .Pa /usr/share/tmac/mdoc/doc-common .
587 It really should default to
588 .Tn LOCAL .
589 Note, if the
590 .Ql \&.Os
591 macro is not present, the bottom left corner of the page
592 will be ugly.
593 .It Li \&.Dd month day, year
594 The date should be written formally:
595 .Pp
596 .ne 5
597 .Dl January 25, 1989
598 .El
599 .Sh INTRODUCTION OF MANUAL AND GENERAL TEXT DOMAINS
600 .Ss What's in a name...
601 The manual domain macro names are derived from the day to day
602 informal language used to describe commands, subroutines and related
603 files.
604 Slightly different variations of this language are used to describe
605 the three different aspects of writing a man page.
606 First, there is the description of
607 .Nm \-mdoc
608 macro request usage.
609 Second is the description of a
610 .Ux
611 command
612 .Em with
613 .Nm \-mdoc
614 macros and third,
615 the description of a command to a user in the verbal sense;
616 that is, discussion of a command in the text of a man page.
617 .Pp
618 In the first case,
619 .Xr troff 1
620 macros are themselves a type of command;
621 the general syntax for a troff command is:
622 .Bd -filled -offset indent
623 \&.Va argument1 argument2 ... argument9
624 .Ed
625 .Pp
626 The
627 .Ql \&.Va
628 is a macro command or request, and anything following it is an argument to
629 be processed.
630 In the second case,
631 the description of a
632 .Ux
633 command using the content macros is a
634 bit more involved;
635 a typical
636 .Sx SYNOPSIS
637 command line might be displayed as:
638 .Bd -filled -offset indent
639 .Nm filter
640 .Op Fl flag
641 .Ar infile outfile
642 .Ed
643 .Pp
644 Here,
645 .Nm filter
646 is the command name and the
647 bracketed string
648 .Fl flag
649 is a
650 .Em flag
651 argument designated as optional by the option brackets.
652 In
653 .Nm \-mdoc
654 terms,
655 .Ar infile
656 and
657 .Ar outfile
658 are
659 called
660 .Em arguments .
661 The macros which formatted the above example:
662 .Bd -literal -offset indent
663 \&.Nm filter
664 \&.Op \&Fl flag
665 \&.Ar infile outfile
666 .Ed
667 .Pp
668 In the third case, discussion of commands and command syntax
669 includes both examples above, but may add more detail.
670 The
671 arguments
672 .Ar infile
673 and
674 .Ar outfile
675 from the example above might be referred to as
676 .Em operands
677 or
678 .Em file arguments .
679 Some command-line argument lists are quite long:
680 .Bl -tag -width make -offset indent
681 .It Nm make
682 .Op Fl eiknqrstv
683 .Op Fl D Ar variable
684 .Op Fl d Ar flags
685 .Op Fl f Ar makefile
686 .Bk -words
687 .Op Fl I Ar directory
688 .Ek
689 .Op Fl j Ar max_jobs
690 .Op Ar variable=value
691 .Bk -words
692 .Op Ar target ...
693 .Ek
694 .El
695 .Pp
696 Here one might talk about the command
697 .Nm make
698 and qualify the argument
699 .Ar makefile ,
700 as an argument to the flag,
701 .Fl f ,
702 or discuss the optional
703 file
704 operand
705 .Ar target .
706 In the verbal context, such detail can prevent confusion,
707 however the
708 .Nm \-mdoc
709 package
710 does not have a macro for an argument
711 .Em to
712 a flag.
713 Instead the
714 .Ql \&Ar
715 argument macro is used for an operand or file argument like
716 .Ar target
717 as well as an argument to a flag like
718 .Ar variable .
719 The make command line was produced from:
720 .Bd -literal -offset indent
721 \&.Nm make
722 \&.Op Fl eiknqrstv
723 \&.Op Fl D Ar variable
724 \&.Op Fl d Ar flags
725 \&.Op Fl f Ar makefile
726 \&.Op Fl I Ar directory
727 \&.Op Fl j Ar max_jobs
728 \&.Op Ar variable=value
729 \&.Bk -words
730 \&.Op Ar target ...
731 \&.Ek
732 .Ed
733 .Pp
734 The
735 .Ql \&.Bk
736 and
737 .Ql \&.Ek
738 macros are explained in
739 .Sx Keeps .
740 .Ss General Syntax
741 The manual domain and general text domain macros share a similar
742 syntax with a few minor deviations:
743 .Ql \&.Ar ,
744 .Ql \&.Fl ,
745 .Ql \&.Nm ,
746 and
747 .Ql \&.Pa
748 differ only when called without arguments;
749 .Ql \&.Fn
750 and
751 .Ql \&.Xr
752 impose an order on their argument lists
753 and the
754 .Ql \&.Op
755 and
756 .Ql \&.Fn
757 macros
758 have nesting limitations.
759 All content macros
760 are capable of recognizing and properly handling punctuation,
761 provided each punctuation character is separated by a leading space.
762 If a request is given:
763 .Pp
764 .Dl \&.Li sptr, ptr),
765 .Pp
766 The result is:
767 .Pp
768 .Dl Li sptr, ptr),
769 .Pp
770 The punctuation is not recognized and all is output in the
771 literal font. If the punctuation is separated by a leading
772 white space:
773 .Pp
774 .Dl \&.Li "sptr , ptr ) ,"
775 .Pp
776 The result is:
777 .Pp
778 .Dl Li sptr , ptr ) ,
779 .Pp
780 The punctuation is now recognized and is output in the
781 default font distinguishing it from the strings in literal font.
782 .Pp
783 To remove the special meaning from a punctuation character
784 escape it with
785 .Ql \e& .
786 .Xr Troff
787 is limited as a macro language, and has difficulty
788 when presented with a string containing
789 a member of the mathematical, logical or
790 quotation set:
791 .Bd -literal -offset indent-two
792 \&{+,\-,/,*,\&%,<,>,<=,>=,=,==,&,`,',"}
793 .Ed
794 .Pp
795 The problem is that
796 .Xr troff
797 may assume it is supposed to actually perform the operation
798 or evaluation suggested by the characters.  To prevent
799 the accidental evaluation of these characters,
800 escape them with
801 .Ql \e& .
802 Typical syntax is shown in the first content macro displayed
803 below,
804 .Ql \&.Ad .
805 .Sh MANUAL DOMAIN
806 .Ss Address Macro
807 The address macro identifies an address construct
808 of the form addr1[,addr2[,addr3]].
809 .Pp
810 .Dl Usage: .Ad address ... \*(Pu
811 .Bl -tag -width ".Ad f1 , f2 , f3 :" -compact -offset 14n
812 .It Li \&.Ad addr1
813 .Ad addr1
814 .It Li \&.Ad addr1\ .
815 .Ad addr1 .
816 .It Li \&.Ad addr1\ , file2
817 .Ad addr1 , file2
818 .It Li \&.Ad f1\ , f2\ , f3\ :
819 .Ad f1 , f2 , f3 :
820 .It Li \&.Ad addr\ )\ )\ ,
821 .Ad addr ) ) ,
822 .El
823 .Pp
824 It is an error to call
825 .Ql \&.Ad
826 without arguments.
827 .Ql \&.Ad
828 is callable by other macros and is parsed.
829 .Ss Author Name
830 The
831 .Ql \&.An
832 macro is used to specify the name of the author of the item being
833 documented, or the name of the author of the actual manual page.
834 Any remaining arguments after the name information are assumed
835 to be punctuation.
836 .Pp
837 .Dl Usage: .An author_name \*(Pu
838 .Bl -tag -width ".An Joe Author ) ) ," -compact -offset 14n
839 .It Li \&.An Joe\ Author
840 .An Joe Author
841 .It Li \&.An Joe\ Author\ ,
842 .An Joe\ Author ,
843 .It Li \&.An Joe\ Author\ \&Aq\ nobody@FreeBSD.ORG
844 .An Joe Author Aq nobody@FreeBSD.ORG
845 .It Li \&.An Joe\ Author\ )\ )\ ,
846 .An Joe Author ) ) ,
847 .El
848 .Pp
849 The
850 .Ql \&.An
851 macro is parsed and is callable.
852 It is an error to call
853 .Ql \&.An
854 without
855 any arguments.
856 .Ss Argument Macro
857 The
858 .Ql \&.Ar
859 argument macro may be used whenever
860 a command-line argument is referenced.
861 .Pp
862 .Dl Usage: .Ar argument ... \*(Pu
863 .Bl -tag -width ".Ar file1 file2" -compact -offset 15n
864 .It Li \&.Ar
865 .Ar
866 .It Li \&.Ar file1
867 .Ar file1
868 .It Li \&.Ar file1\ .
869 .Ar file1 .
870 .It Li \&.Ar file1 file2
871 .Ar file1 file2
872 .It Li \&.Ar f1 f2 f3\ :
873 .Ar f1 f2 f3 :
874 .It Li \&.Ar file\ )\ )\ ,
875 .Ar file ) ) ,
876 .El
877 .Pp
878 If
879 .Ql \&.Ar
880 is called without arguments
881 .Ql Ar
882 is assumed.
883 The
884 .Ql \&.Ar
885 macro is parsed and is callable.
886 .Ss Configuration Declaration (section four only)
887 The
888 .Ql \&.Cd
889 macro is used to demonstrate a
890 .Xr config 8
891 declaration for a device interface in a section four manual.
892 This macro accepts quoted arguments (double quotes only).
893 .Pp
894 .Bl -tag -width "device le0 at scode?" -offset indent
895 .It Cd "device le0 at scode?"
896 produced by:
897 .Ql ".Cd device le0 at scode?" .
898 .El
899 .Ss Command Modifier
900 The command modifier is identical to the
901 .Ql \&.Fl
902 (flag) command with the exception
903 the
904 .Ql \&.Cm
905 macro does not assert a dash
906 in front of every argument.
907 Traditionally flags are marked by the
908 preceding dash, some commands or subsets of commands do not use them.
909 Command modifiers may also be specified in conjunction with interactive
910 commands such as editor commands.
911 See
912 .Sx Flags .
913 .Ss Defined Variables
914 A variable which is defined in an include file is specified
915 by the macro
916 .Ql \&.Dv .
917 .Pp
918 .Dl Usage: .Dv defined_variable ... \*(Pu
919 .Bl -tag -width ".Dv MAXHOSTNAMELEN" -compact -offset 14n
920 .It Li ".Dv MAXHOSTNAMELEN"
921 .Dv MAXHOSTNAMELEN
922 .It Li ".Dv TIOCGPGRP )"
923 .Dv TIOCGPGRP )
924 .El
925 .Pp
926 It is an error to call
927 .Ql \&.Dv
928 without arguments.
929 .Ql \&.Dv
930 is parsed and is callable.
931 .Ss Errno's (Section two only)
932 The
933 .Ql \&.Er
934 errno macro specifies the error return value
935 for section two library routines.
936 The second example
937 below shows
938 .Ql \&.Er
939 used with the
940 .Ql \&.Bq
941 general text domain macro, as it would be used in
942 a section two manual page.
943 .Pp
944 .Dl Usage: .Er ERRNOTYPE ... \*(Pu
945 .Bl -tag -width ".Bq Er ENOTDIR" -compact -offset 14n
946 .It Li \&.Er ENOENT
947 .Er ENOENT
948 .It Li \&.Er ENOENT\ )\ ;
949 .Er ENOENT ) ;
950 .It Li \&.Bq \&Er ENOTDIR
951 .Bq Er ENOTDIR
952 .El
953 .Pp
954 It is an error to call
955 .Ql \&.Er
956 without arguments.
957 The
958 .Ql \&.Er
959 macro is parsed and is callable.
960 .Ss Environment Variables
961 The
962 .Ql \&.Ev
963 macro specifies an environment variable.
964 .Pp
965 .Dl Usage: .Ev argument ... \*(Pu
966 .Bl -tag -width ".Ev PRINTER ) ) ," -compact -offset 14n
967 .It Li \&.Ev DISPLAY
968 .Ev  DISPLAY
969 .It Li \&.Ev PATH\ .
970 .Ev PATH .
971 .It Li \&.Ev PRINTER\ )\ )\ ,
972 .Ev PRINTER ) ) ,
973 .El
974 .Pp
975 It is an error to call
976 .Ql \&.Ev
977 without arguments.
978 The
979 .Ql \&.Ev
980 macro is parsed and is callable.
981 .Ss Function Argument
982 The
983 .Ql \&.Fa
984 macro is used to refer to function arguments (parameters)
985 outside of the
986 .Sx SYNOPSIS
987 section of the manual or inside
988 the
989 .Sx SYNOPSIS
990 section should a parameter list be too
991 long for the
992 .Ql \&.Fn
993 macro and the enclosure macros
994 .Ql \&.Fo
995 and
996 .Ql \&.Fc
997 must be used.
998 .Ql \&.Fa
999 may also be used to refer to structure members.
1000 .Pp
1001 .Dl Usage: .Fa function_argument ... \*(Pu
1002 .Bl -tag -width ".Fa d_namlen\ )\ )\ ," -compact -offset 14n
1003 .It Li \&.Fa d_namlen\ )\ )\ ,
1004 .Fa d_namlen ) ) ,
1005 .It Li \&.Fa iov_len
1006 .Fa iov_len
1007 .El
1008 .Pp
1009 It is an error to call
1010 .Ql \&.Fa
1011 without arguments.
1012 .Ql \&.Fa
1013 is parsed and is callable.
1014 .Ss Function Declaration
1015 The
1016 .Ql \&.Fd
1017 macro is used in the
1018 .Sx SYNOPSIS
1019 section with section two or three
1020 functions.
1021 The
1022 .Ql \&.Fd
1023 macro does not call other macros and is not callable by other
1024 macros.
1025 .Pp
1026 .Dl Usage: .Fd include_file (or defined variable)
1027 .Pp
1028 In the
1029 .Sx SYNOPSIS
1030 section a
1031 .Ql \&.Fd
1032 request causes a line break if a function has already been presented
1033 and a break has not occurred.
1034 This leaves a nice vertical space
1035 in between the previous function call and the declaration for the
1036 next function.
1037 .Ss Flags
1038 The
1039 .Ql \&.Fl
1040 macro handles command-line flags.
1041 It prepends
1042 a dash,
1043 .Ql \- ,
1044 to the flag.
1045 For interactive command flags, which
1046 are not prepended with a dash, the
1047 .Ql \&.Cm
1048 (command modifier)
1049 macro is identical, but without the dash.
1050 .Pp
1051 .Dl Usage: .Fl argument ... \*(Pu
1052 .Bl -tag -width ".Fl \-s \-t \-v" -compact -offset 14n
1053 .It Li \&.Fl
1054 .Fl
1055 .It Li \&.Fl cfv
1056 .Fl cfv
1057 .It Li \&.Fl cfv\ .
1058 .Fl cfv .
1059 .It Li \&.Fl s v t
1060 .Fl s v t
1061 .It Li \&.Fl -\ ,
1062 .Fl - ,
1063 .It Li \&.Fl xyz\ )\ ,
1064 .Fl xyz ) ,
1065 .El
1066 .Pp
1067 The
1068 .Ql \&.Fl
1069 macro without any arguments results
1070 in a dash representing \fIstdin\fP/\fIstdout\fP.
1071 Note that giving
1072 .Ql \&.Fl
1073 a single dash, will result in two dashes.
1074 The
1075 .Ql \&.Fl
1076 macro is parsed and is callable.
1077 .Ss Functions (library routines)
1078 The .Fn macro is modeled on ANSI C conventions.
1079 .Bd -literal
1080 Usage: .Fn [type] function [[type] parameters ... \*(Pu]
1081 .Ed
1082 .Bl -tag -width ".Fn _int align_ _const * char *sptrsxx" -compact
1083 .It Li "\&.Fn getchar"
1084 .Fn getchar
1085 .It Li "\&.Fn strlen ) ,"
1086 .Fn strlen ) ,
1087 .It Li \&.Fn "\\*qint align\\*q" "\\*qconst * char *sptrs\\*q" ,
1088 .Fn "int align" "const * char *sptrs" ,
1089 .El
1090 .Pp
1091 It is an error to call
1092 .Ql \&.Fn
1093 without any arguments.
1094 The
1095 .Ql \&.Fn
1096 macro
1097 is parsed and is callable,
1098 note that any call to another macro signals the end of
1099 the
1100 .Ql \&.Fn
1101 call (it will close-parenthesis at that point).
1102 .Pp
1103 For functions that have more than eight parameters (and this
1104 is rare), the
1105 macros
1106 .Ql \&.Fo
1107 (function open)
1108 and
1109 .Ql \&.Fc
1110 (function close)
1111 may be used with
1112 .Ql \&.Fa
1113 (function argument)
1114 to get around the limitation.
1115 For example:
1116 .Bd -literal -offset indent
1117 \&.Fo "int res_mkquery"
1118 \&.Fa "int op"
1119 \&.Fa "char *dname"
1120 \&.Fa "int class"
1121 \&.Fa "int type"
1122 \&.Fa "char *data"
1123 \&.Fa "int datalen"
1124 \&.Fa "struct rrec *newrr"
1125 \&.Fa "char *buf"
1126 \&.Fa "int buflen"
1127 \&.Fc
1128 .Ed
1129 .Pp
1130 Produces:
1131 .Bd -filled -offset indent
1132 .Fo "int res_mkquery"
1133 .Fa "int op"
1134 .Fa "char *dname"
1135 .Fa "int class"
1136 .Fa "int type"
1137 .Fa "char *data"
1138 .Fa "int datalen"
1139 .Fa "struct rrec *newrr"
1140 .Fa "char *buf"
1141 .Fa "int buflen"
1142 .Fc
1143 .Ed
1144 .Pp
1145 The
1146 .Ql \&.Fo
1147 and
1148 .Ql \&.Fc
1149 macros are parsed and are callable.
1150 In the
1151 .Sx SYNOPSIS
1152 section, the function will always begin at
1153 the beginning of line.
1154 If there is more than one function
1155 presented in the
1156 .Sx SYNOPSIS
1157 section and a function type has not been
1158 given, a line break will occur, leaving a nice vertical space
1159 between the current function name and the one prior.
1160 At the moment,
1161 .Ql \&.Fn
1162 does not check its word boundaries
1163 against troff line lengths and may split across a newline
1164 ungracefully.
1165 This will be fixed in the near future.
1166 .Ss Function Type
1167 This macro is intended for the
1168 .Sx SYNOPSIS
1169 section.
1170 It may be used
1171 anywhere else in the man page without problems, but its main purpose
1172 is to present the function type in kernel normal form for the
1173 .Sx SYNOPSIS
1174 of sections two and three
1175 (it causes a line break allowing the function name to appear
1176 on the next line).
1177 .Pp
1178 .Dl Usage: .Ft type ... \*(Pu
1179 .Bl -tag -width "\&.Ft struct stat" -offset 14n -compact
1180 .It Li \&.Ft struct stat
1181 .Ft struct stat
1182 .El
1183 .Pp
1184 The
1185 .Ql \&.Ft
1186 request is not callable by other macros.
1187 .Ss Interactive Commands
1188 The
1189 .Ql \&.Ic
1190 macro designates an interactive or internal command.
1191 .Pp
1192 .Dl Usage: .Ic argument ... \*(Pu
1193 .Bl -tag -width ".Ic setenv , unsetenvxx" -compact -offset 14n
1194 .It Li \&.Ic :wq
1195 .Ic :wq
1196 .It Li \&.Ic do while {...}
1197 .Ic do while {...}
1198 .It Li \&.Ic setenv\ , unsetenv
1199 .Ic setenv , unsetenv
1200 .El
1201 .Pp
1202 It is an error to call
1203 .Ql \&.Ic
1204 without arguments.
1205 The
1206 .Ql \&.Ic
1207 macro is parsed and is callable.
1208 .Ss Name Macro
1209 The
1210 .Ql \&.Nm
1211 macro is used for the document title or subject name.
1212 It has the peculiarity of remembering the first
1213 argument it was called with, which should
1214 always be the subject name of the page.
1215 When called without
1216 arguments,
1217 .Ql \&.Nm
1218 regurgitates this initial name for the sole purpose
1219 of making less work for the author.
1220 Note:
1221 a section two
1222 or three document function name is addressed with the
1223 .Ql \&.Nm
1224 in the
1225 .Sx NAME
1226 section, and with
1227 .Ql \&.Fn
1228 in the
1229 .Sx SYNOPSIS
1230 and remaining sections.
1231 For interactive commands, such as the
1232 .Ql while
1233 command keyword in
1234 .Xr csh 1 ,
1235 the
1236 .Ql \&.Ic
1237 macro should be used.
1238 While the
1239 .Ql \&.Ic
1240 is nearly identical
1241 to
1242 .Ql \&.Nm ,
1243 it can not recall the first argument it was invoked with.
1244 .Pp
1245 .Dl Usage: .Nm argument ... \*(Pu
1246 .Bl -tag -width ".Nm mdoc.sample" -compact -offset 14n
1247 .It Li \&.Nm mdoc.sample
1248 .Nm mdoc.sample
1249 .It Li \&.Nm \e-mdoc
1250 .Nm \-mdoc .
1251 .It Li \&.Nm foo\ )\ )\ ,
1252 .Nm foo ) ) ,
1253 .It Li \&.Nm
1254 .Nm
1255 .El
1256 .Pp
1257 The
1258 .Ql \&.Nm
1259 macro is parsed and is callable.
1260 .Ss Options
1261 The
1262 .Ql \&.Op
1263 macro
1264 places option brackets around the any remaining arguments on the command
1265 line, and places any
1266 trailing punctuation outside the brackets.
1267 The macros
1268 .Ql \&.Oc
1269 and
1270 .Ql \&.Oo
1271 may be used across one or more lines.
1272 .Pp
1273 .Dl Usage: .Op options ... \*(Pu
1274 .Bl -tag -width ".Op Fl c Ar objfil Op Ar corfil ," -compact -offset indent
1275 .It Li \&.Op
1276 .Op
1277 .It Li ".Op Fl k"
1278 .Op Fl k
1279 .It Li ".Op Fl k ) ."
1280 .Op Fl k ) .
1281 .It Li ".Op Fl k Ar kookfile"
1282 .Op Fl k Ar kookfile
1283 .It Li ".Op Fl k Ar kookfile ,"
1284 .Op Fl k Ar kookfile ,
1285 .It Li ".Op Ar objfil Op Ar corfil"
1286 .Op Ar objfil Op Ar corfil
1287 .It Li ".Op Fl c Ar objfil Op Ar corfil ,"
1288 .Op Fl c Ar objfil Op Ar corfil ,
1289 .It Li \&.Op word1 word2
1290 .Op word1 word2
1291 .El
1292 .Pp
1293 The
1294 .Ql \&.Oc
1295 and
1296 .Ql \&.Oo
1297 macros:
1298 .Bd -literal -offset indent
1299 \&.Oo
1300 \&.Op \&Fl k \&Ar kilobytes
1301 \&.Op \&Fl i \&Ar interval
1302 \&.Op \&Fl c \&Ar count
1303 \&.Oc
1304 .Ed
1305 .Pp
1306 Produce:
1307 .Oo
1308 .Op Fl k Ar kilobytes
1309 .Op Fl i Ar interval
1310 .Op Fl c Ar count
1311 .Oc
1312 .Pp
1313 The macros
1314 .Ql \&.Op ,
1315 .Ql \&.Oc
1316 and
1317 .Ql \&.Oo
1318 are parsed and are callable.
1319 .Ss Pathnames
1320 The
1321 .Ql \&.Pa
1322 macro formats pathnames or filenames.
1323 .Pp
1324 .Dl Usage: .Pa pathname \*(Pu
1325 .Bl -tag -width ".Pa /tmp/fooXXXXX ) ." -compact -offset 14n
1326 .It Li \&.Pa /usr/share
1327 .Pa /usr/share
1328 .It Li \&.Pa /tmp/fooXXXXX\ )\ .
1329 .Pa /tmp/fooXXXXX ) .
1330 .El
1331 .Pp
1332 The
1333 .Ql \&.Pa
1334 macro is parsed and is callable.
1335 .Ss Variables
1336 Generic variable reference:
1337 .Pp
1338 .Dl Usage: .Va variable ... \*(Pu
1339 .Bl -tag -width ".Va char s ] ) ) ," -compact -offset 14n
1340 .It Li \&.Va count
1341 .Va count
1342 .It Li \&.Va settimer ,
1343 .Va settimer ,
1344 .It Li \&.Va int\ *prt\ )\ :
1345 .Va int\ *prt ) :
1346 .It Li \&.Va char\ s\ ]\ )\ )\ ,
1347 .Va char\ s ] ) ) ,
1348 .El
1349 .Pp
1350 It is an error to call
1351 .Ql \&.Va
1352 without any arguments.
1353 The
1354 .Ql \&.Va
1355 macro is parsed and is callable.
1356 .Ss Manual Page Cross References
1357 The
1358 .Ql \&.Xr
1359 macro expects the first argument to be
1360 a manual page name, and the second argument, if it exists,
1361 to be either a section page number or punctuation.
1362 Any
1363 remaining arguments are assumed to be punctuation.
1364 .Pp
1365 .Dl Usage: .Xr man_page [1,...,8] \*(Pu
1366 .Bl -tag -width ".Xr mdoc 7 ) ) ," -compact -offset 14n
1367 .It Li \&.Xr mdoc
1368 .Xr mdoc
1369 .It Li \&.Xr mdoc\ ,
1370 .Xr mdoc ,
1371 .It Li \&.Xr mdoc 7
1372 .Xr mdoc 7
1373 .It Li \&.Xr mdoc 7\ )\ )\ ,
1374 .Xr mdoc 7 ) ) ,
1375 .El
1376 .Pp
1377 The
1378 .Ql \&.Xr
1379 macro is parsed and is callable.
1380 It is an error to call
1381 .Ql \&.Xr
1382 without
1383 any arguments.
1384 .Sh GENERAL TEXT DOMAIN
1385 .Ss AT&T Macro
1386 .Bd -literal -offset indent -compact
1387 Usage: .At [v6 | v7 | 32v | V.1 | V.4] ... \*(Pu
1388 .Ed
1389 .Bl -tag -width ".At v6 ) ," -compact -offset 14n
1390 .It Li ".At"
1391 .At
1392 .It Li ".At v6 ."
1393 .At v6 .
1394 .El
1395 .Pp
1396 The
1397 .Ql \&.At
1398 macro is
1399 .Em not
1400 parsed and
1401 .Em not
1402 callable
1403 It accepts at most two arguments.
1404 .Ss BSD Macro
1405 .Dl Usage: .Bx [Version/release] ... \*(Pu
1406 .Bl -tag -width ".Bx 4.3 ) ," -compact -offset 14n
1407 .It Li ".Bx"
1408 .Bx
1409 .It Li ".Bx 4.3 ."
1410 .Bx 4.3 .
1411 .El
1412 .Pp
1413 The
1414 .Ql \&.Bx
1415 macro is parsed and is callable.
1416 .Ss FreeBSD Macro
1417 .Bd -literal -offset indent -compact
1418 Usage: .Fx Version.release ... \*(Pu
1419 .Ed
1420 .Bl -tag -width ".Fx 2.2 ) ," -compact -offset 14n
1421 .It Li ".Fx 2.2 ."
1422 .Fx 2.2 .
1423 .El
1424 .Pp
1425 The
1426 .Ql \&.Fx
1427 macro is
1428 .Em not
1429 parsed and
1430 .Em not
1431 callable
1432 It accepts at most two arguments.
1433 .Ss UNIX Macro
1434 .Dl Usage: .Ux ... \*(Pu
1435 .Bl -tag -width ".Ux 4.3 ) ," -compact -offset 14n
1436 .It Li ".Ux"
1437 .Ux
1438 .El
1439 .Pp
1440 The
1441 .Ql \&.Ux
1442 macro is parsed and is callable.
1443 .Ss Enclosure and Quoting Macros
1444 The concept of enclosure is similar to quoting.
1445 The object being to enclose one or more strings between
1446 a pair of characters like quotes or parentheses.
1447 The terms quoting and enclosure are used
1448 interchangeably throughout this document.
1449 Most of the
1450 one line enclosure macros end
1451 in small letter
1452 .Ql q
1453 to give a hint of quoting, but there are a few irregularities.
1454 For each enclosure macro
1455 there is also a pair of open and close macros which end
1456 in small letters
1457 .Ql o
1458 and
1459 .Ql c
1460 respectively.
1461 These can be used across one or more lines of text
1462 and while they have nesting limitations, the one line quote macros
1463 can be used inside
1464 of them.
1465 .Pp
1466 .ne 5
1467 .Bd -filled -offset indent
1468 .Bl -column "quote " "close " "open " "Enclose Stringx(in XX) " XXstringXX
1469 .Em " Quote      Close   Open   Function        Result"
1470 \&.Aq   .Ac     .Ao     Angle Bracket Enclosure <string>
1471 \&.Bq   .Bc     .Bo     Bracket Enclosure       [string]
1472 \&.Dq   .Dc     .Do     Double Quote    ``string''
1473         .Ec     .Eo     Enclose String (in XX)  XXstringXX
1474 \&.Pq   .Pc     .Po     Parenthesis Enclosure   (string)
1475 \&.Ql                   Quoted Literal  `st' or string
1476 \&.Qq   .Qc     .Qo     Straight Double Quote   "string"
1477 \&.Sq   .Sc     .So     Single Quote    `string'
1478 .El
1479 .Ed
1480 .Pp
1481 Except for the irregular macros noted below, all
1482 of the quoting macros are parsed and callable.
1483 All handle punctuation properly, as long as it
1484 is presented one character at a time and separated by spaces.
1485 The quoting macros examine opening and closing punctuation
1486 to determine whether it comes before or after the
1487 enclosing string
1488 This makes some nesting possible.
1489 .Bl -tag -width xxx,xxxx
1490 .It Li \&.Ec , \&.Eo
1491 These macros expect the first argument to be the
1492 opening and closing strings respectively.
1493 .It Li \&.Ql
1494 The quoted literal macro behaves differently for
1495 .Xr troff
1496 than
1497 .Xr nroff .
1498 If formatted with
1499 .Xr nroff ,
1500 a quoted literal is always quoted.
1501 If formatted with
1502 troff, an item is only quoted if the width
1503 of the item is less than three constant width characters.
1504 This is to make short strings more visible where the font change
1505 to literal (constant width) is less noticeable.
1506 .It Li \&.Pf
1507 The prefix macro is not callable, but it is parsed:
1508 .Bl -tag -width "(namexx" -offset indent
1509 .It Li ".Pf ( Fa name2"
1510 becomes
1511 .Pf ( Fa name2 .
1512 .El
1513 .Pp
1514 The
1515 .Ql \&.Ns
1516 (no space) macro performs the analogous suffix function.
1517 .El
1518 .Pp
1519 .ne 4
1520 Examples of quoting:
1521 .Bl -tag -width ".Aq Pa ctype.h ) ,xxxxxxxx" -compact -offset indent
1522 .It Li \&.Aq
1523 .Aq
1524 .It Li \&.Aq \&Ar ctype.h\ )\ ,
1525 .Aq Ar ctype.h ) ,
1526 .It Li \&.Bq
1527 .Bq
1528 .It Li \&.Bq \&Em Greek \&, French \&.
1529 .Bq Em Greek , French .
1530 .It Li \&.Dq
1531 .Dq
1532 .It Li ".Dq string abc ."
1533 .Dq string abc .
1534 .It Li ".Dq \'^[A-Z]\'"
1535 .Dq \'^[A-Z]\'
1536 .It Li "\&.Ql man mdoc"
1537 .Ql man mdoc
1538 .It Li \&.Qq
1539 .Qq
1540 .It Li "\&.Qq string ) ,"
1541 .Qq string ) ,
1542 .It Li "\&.Qq string Ns ),"
1543 .Qq string Ns ),
1544 .It Li \&.Sq
1545 .Sq
1546 .It Li "\&.Sq string
1547 .Sq string
1548 .El
1549 .Pp
1550 For a good example of nested enclosure macros, see the
1551 .Ql \&.Op
1552 option macro.
1553 It was created from the same
1554 underlying enclosure macros as those presented in the list
1555 above.
1556 The
1557 .Ql \&.Xo
1558 and
1559 .Ql \&.Xc
1560 extended argument list macros
1561 were also built from the same underlying routines and are a good
1562 example of
1563 .Nm \-mdoc
1564 macro usage at its worst.
1565 .Ss No\-Op or Normal Text Macro
1566 The macro
1567 .Ql \&.No
1568 is
1569 a hack for words in a macro command line which should
1570 .Em not
1571 be formatted and follows the conventional syntax
1572 for content macros.
1573 .Ss No Space Macro
1574 The
1575 .Ql \&.Ns
1576 macro eliminates unwanted spaces in between macro requests.
1577 It is useful for old style argument lists where there is no space
1578 between the flag and argument:
1579 .Bl -tag -width ".Op Fl I Ns Ar directoryxx" -offset indent
1580 .It Li ".Op Fl I Ns Ar directory"
1581 produces
1582 .Op Fl I Ns Ar directory
1583 .El
1584 .Pp
1585 Note: the
1586 .Ql \&.Ns
1587 macro always invokes the
1588 .Ql \&.No
1589 macro after eliminating the space unless another macro name
1590 follows it.
1591 The macro
1592 .Ql \&.Ns
1593 is parsed and is callable.
1594 .Ss Section Cross References
1595 The
1596 .Ql \&.Sx
1597 macro designates a reference to a section header
1598 within the same document.
1599 It is parsed and is callable.
1600 .Pp
1601 .Bl -tag -width "Li \&.Sx FILES" -offset 14n
1602 .It Li \&.Sx FILES
1603 .Sx FILES
1604 .El
1605 .Ss References and Citations
1606 The following macros make a modest attempt to handle references.
1607 At best, the macros make it convenient to manually drop in a subset of
1608 refer style references.
1609 .Pp
1610 .Bl -tag -width 6n -offset indent -compact
1611 .It Li ".Rs"
1612 Reference Start.
1613 Causes a line break and begins collection
1614 of reference information until the
1615 reference end macro is read.
1616 .It Li ".Re"
1617 Reference End.
1618 The reference is printed.
1619 .It Li ".%A"
1620 Reference author name, one name per invocation.
1621 .It Li ".%B"
1622 Book title.
1623 .It Li ".\&%C"
1624 City/place.
1625 .It Li ".\&%D"
1626 Date.
1627 .It Li ".%J"
1628 Journal name.
1629 .It Li ".%N"
1630 Issue number.
1631 .It Li ".%O"
1632 Optional information.
1633 .It Li ".%P"
1634 Page number.
1635 .It Li ".%R"
1636 Report name.
1637 .It Li ".%T"
1638 Title of article.
1639 .It Li ".%V"
1640 Volume(s).
1641 .El
1642 .Pp
1643 The macros beginning with
1644 .Ql %
1645 are not callable, and are parsed only for the trade name macro which
1646 returns to its caller.
1647 (And not very predictably at the moment either.)
1648 The purpose is to allow trade names
1649 to be pretty printed in
1650 .Xr troff Ns / Ns Xr ditroff
1651 output.
1652 .Ss Return Values
1653 The
1654 .Ql \&.Rv
1655 macro generates text for use in the
1656 .Sx RETURN VALUE
1657 section.
1658 .Pp
1659 .Dl Usage: .Rv [-std function]
1660 .Pp
1661 .Ql \&.Rv -std atexit
1662 will generate the following text:
1663 .Pp
1664 .\" fake chapter 3 to avoid error message from Rv
1665 .ds cH 3
1666 .Rv -std atexit
1667 .\" and back to 7 again
1668 .ds cH 7
1669 .Pp
1670 The
1671 .Fl std
1672 option is valid only for manual page sections 2 and 3.
1673 .Ss Trade Names (or Acronyms and Type Names)
1674 The trade name macro is generally a small caps macro for
1675 all upper case words longer than two characters.
1676 .Pp
1677 .Dl Usage: .Tn symbol ... \*(Pu
1678 .Bl -tag -width ".Tn ASCII" -compact -offset 14n
1679 .It Li \&.Tn DEC
1680 .Tn DEC
1681 .It Li \&.Tn ASCII
1682 .Tn ASCII
1683 .El
1684 .Pp
1685 The
1686 .Ql \&.Tn
1687 macro
1688 is parsed and is callable by other macros.
1689 .Ss Extended  Arguments
1690 The
1691 .Ql \&.Xo
1692 and
1693 .Ql \&.Xc
1694 macros allow one to extend an argument list
1695 on a macro boundary.
1696 Argument lists cannot
1697 be extended within a macro
1698 which expects all of its arguments on one line such
1699 as
1700 .Ql \&.Op .
1701 .Pp
1702 Here is an example of
1703 .Ql \&.Xo
1704 using the space mode macro to turn spacing off:
1705 .Bd -literal -offset indent
1706 \&.Sm off
1707 \&.It Xo Sy I Ar operation
1708 \&.No \een Ar count No \een
1709 \&.Xc
1710 \&.Sm on
1711 .Ed
1712 .Pp
1713 Produces
1714 .Bd -filled -offset indent
1715 .Bl -tag -width flag -compact
1716 .Sm off
1717 .It Xo Sy I Ar operation
1718 .No \en Ar count No \en
1719 .Xc
1720 .Sm on
1721 .El
1722 .Ed
1723 .Pp
1724 Another one:
1725 .Bd -literal -offset indent
1726 \&.Sm off
1727 \&.It Cm S No \&/ Ar old_pattern Xo
1728 \&.No \&/ Ar new_pattern
1729 \&.No \&/ Op Cm g
1730 \&.Xc
1731 \&.Sm on
1732 .Ed
1733 .Pp
1734 Produces
1735 .Bd -filled -offset indent
1736 .Bl -tag -width flag -compact
1737 .Sm off
1738 .It Cm S No \&/ Ar old_pattern Xo
1739 .No \&/ Ar new_pattern
1740 .No \&/ Op Cm g
1741 .Xc
1742 .Sm on
1743 .El
1744 .Ed
1745 .Pp
1746 Another example of
1747 .Ql \&.Xo
1748 and using enclosure macros:
1749 Test the value of a variable.
1750 .Bd -literal -offset indent
1751 \&.It Xo
1752 \&.Ic .ifndef
1753 \&.Oo \e&! Oc Ns Ar variable
1754 \&.Op Ar operator variable ...
1755 \&.Xc
1756 .Ed
1757 .Pp
1758 Produces
1759 .Bd -filled -offset indent
1760 .Bl -tag -width flag -compact
1761 .It Xo
1762 .Ic .ifndef
1763 .Oo \&! Oc Ns Ar variable
1764 .Op Ar operator variable ...
1765 .Xc
1766 .El
1767 .Ed
1768 .Pp
1769 All of the above examples have used the
1770 .Ql \&.Xo
1771 macro on the argument list of the
1772 .Ql \&.It
1773 (list-item)
1774 macro.
1775 The extend macros are not used very often, and when they are
1776 it is usually to extend the list-item argument list.
1777 Unfortunately, this is also where the extend macros are the
1778 most finicky.
1779 In the first two examples, spacing was turned off;
1780 in the third, spacing was desired in part of the output but
1781 not all of it.
1782 To make these macros work in this situation make sure
1783 the
1784 .Ql \&.Xo
1785 and
1786 .Ql \&.Xc
1787 macros are placed as shown in the third example.
1788 If the
1789 .Ql \&.Xo
1790 macro is not alone on the
1791 .Ql \&.It
1792 argument list, spacing will be unpredictable.
1793 The
1794 .Ql \&.Ns
1795 (no space macro)
1796 must not occur as the first or last macro on a line
1797 in this situation.
1798 Out of 900 manual pages (about 1500 actual pages)
1799 currently released with
1800 .Bx
1801 only fifteen use the
1802 .Ql \&.Xo
1803 macro.
1804 .Sh PAGE STRUCTURE DOMAIN
1805 .Ss Section Headers
1806 The first three
1807 .Ql \&.Sh
1808 section header macros
1809 list below are required in every
1810 man page.
1811 The remaining section headers
1812 are recommended at the discretion of the author
1813 writing the manual page.
1814 The
1815 .Ql \&.Sh
1816 macro can take up to nine arguments.
1817 It is parsed and but is not callable.
1818 .Bl -tag -width ".Sh SYNOPSIS"
1819 .It \&.Sh NAME
1820 The
1821 .Ql \&.Sh NAME
1822 macro is mandatory.
1823 If not specified,
1824 the headers, footers and page layout defaults
1825 will not be set and things will be rather unpleasant.
1826 The
1827 .Sx NAME
1828 section consists of at least three items.
1829 The first is the
1830 .Ql \&.Nm
1831 name macro naming the subject of the man page.
1832 The second is the Name Description macro,
1833 .Ql \&.Nd ,
1834 which separates the subject
1835 name from the third item, which is the description.
1836 The
1837 description should be the most terse and lucid possible,
1838 as the space available is small.
1839 .It \&.Sh SYNOPSIS
1840 The
1841 .Sx SYNOPSIS
1842 section describes the typical usage of the
1843 subject of a man page.
1844 The macros required
1845 are either
1846 .Ql ".Nm" ,
1847 .Ql ".Cd" ,
1848 .Ql ".Fn" ,
1849 (and possibly
1850 .Ql ".Fo" ,
1851 .Ql ".Fc" ,
1852 .Ql ".Fd" ,
1853 .Ql ".Ft"
1854 macros).
1855 The function name
1856 macro
1857 .Ql ".Fn"
1858 is required
1859 for manual page sections 2 and 3, the command and general
1860 name macro
1861 .Ql \&.Nm
1862 is required for sections 1, 5, 6, 7, 8.
1863 Section 4 manuals require a
1864 .Ql ".Nm" ,
1865 .Ql ".Fd"
1866 or a
1867 .Ql ".Cd"
1868 configuration device usage macro.
1869 Several other macros may be necessary to produce
1870 the synopsis line as shown below:
1871 .Pp
1872 .Bd -filled -offset indent
1873 .Nm cat
1874 .Op Fl benstuv
1875 .Op Fl
1876 .Ar
1877 .Ed
1878 .Pp
1879 The following macros were used:
1880 .Pp
1881 .Dl \&.Nm cat
1882 .Dl \&.Op \&Fl benstuv
1883 .Dl \&.Op \&Fl
1884 .Dl \&.Ar
1885 .Pp
1886 .Sy Note :
1887 The macros
1888 .Ql \&.Op ,
1889 .Ql \&.Fl ,
1890 and
1891 .Ql \&.Ar
1892 recognize the pipe bar character
1893 .Ql \*(Ba ,
1894 so a command line such as:
1895 .Pp
1896 .Dl ".Op Fl a | Fl b"
1897 .Pp
1898 will not go orbital.
1899 .Xr Troff
1900 normally interprets a \*(Ba as a special operator.
1901 See
1902 .Sx PREDEFINED STRINGS
1903 for a usable \*(Ba
1904 character in other situations.
1905 .It \&.Sh DESCRIPTION
1906 In most cases the first text in the
1907 .Sx DESCRIPTION
1908 section
1909 is a brief paragraph on the command, function or file,
1910 followed by a lexical list of options and respective
1911 explanations.
1912 To create such a list, the
1913 .Ql \&.Bl
1914 begin-list,
1915 .Ql \&.It
1916 list-item and
1917 .Ql \&.El
1918 end-list
1919 macros are used (see
1920 .Sx Lists and Columns
1921 below).
1922 .El
1923 .Pp
1924 The following
1925 .Ql \&.Sh
1926 section headers are part of the
1927 preferred manual page layout and must be used appropriately
1928 to maintain consistency.
1929 They are listed in the order
1930 in which they would be used.
1931 .Bl -tag -width SYNOPSIS
1932 .It \&.Sh ENVIRONMENT
1933 The
1934 .Sx ENVIRONMENT
1935 section should reveal any related
1936 environment
1937 variables and clues to their behavior and/or usage.
1938 .It \&.Sh EXAMPLES
1939 There are several ways to create examples.
1940 See
1941 the
1942 .Sx EXAMPLES
1943 section below
1944 for details.
1945 .It \&.Sh FILES
1946 Files which are used or created by the man page subject
1947 should be listed via the
1948 .Ql \&.Pa
1949 macro in the
1950 .Sx FILES
1951 section.
1952 .It \&.Sh SEE ALSO
1953 References to other material on the man page topic and
1954 cross references to other relevant man pages should
1955 be placed in the
1956 .Sx SEE ALSO
1957 section.
1958 Cross references
1959 are specified using the
1960 .Ql \&.Xr
1961 macro.
1962 Cross references in the
1963 .Sx SEE ALSO
1964 section should be sorted by section number, and then
1965 placed in alphabetical order and comma separated.  For example:
1966 .Pp
1967 .Xr ls 1 ,
1968 .Xr ps 1 ,
1969 .Xr group 5 ,
1970 .Xr passwd 5 .
1971 .Pp
1972 At this time
1973 .Xr refer 1
1974 style references are not accommodated.
1975 .It \&.Sh CONFORMING TO
1976 If the command, library function or file adheres to a
1977 specific implementation such as
1978 .St -p1003.2
1979 or
1980 .St -ansiC
1981 this should be noted here.
1982 If the
1983 command does not adhere to any standard, its history
1984 should be noted in the
1985 .Sx HISTORY
1986 section.
1987 .It \&.Sh HISTORY
1988 Any command which does not adhere to any specific standards
1989 should be outlined historically in this section.
1990 .It \&.Sh AUTHORS
1991 Credits, if need be, should be placed here.
1992 .It \&.Sh DIAGNOSTICS
1993 Diagnostics from a command should be placed in this section.
1994 .It \&.Sh ERRORS
1995 Specific error handling, especially from library functions
1996 (man page sections 2 and 3) should go here.
1997 The
1998 .Ql \&.Er
1999 macro is used to specify an errno.
2000 .It \&.Sh BUGS
2001 Blatant problems with the topic go here...
2002 .El
2003 .Pp
2004 User specified
2005 .Ql \&.Sh
2006 sections may be added,
2007 for example, this section was set with:
2008 .Bd -literal -offset 14n
2009 \&.Sh PAGE STRUCTURE DOMAIN
2010 .Ed
2011 .Ss Paragraphs and Line Spacing.
2012 .Bl -tag -width 6n
2013 .It \&.Pp
2014 The
2015 .Ql \&.Pp
2016 paragraph command may
2017 be used to specify a line space where necessary.
2018 The macro is not necessary after a
2019 .Ql \&.Sh
2020 or
2021 .Ql \&.Ss
2022 macro or before
2023 a
2024 .Ql \&.Bl
2025 macro.
2026 (The
2027 .Ql \&.Bl
2028 macro asserts a vertical distance unless the -compact flag is given).
2029 .El
2030 .\" This worked with version one, need to redo for version three
2031 .\" .Pp
2032 .\" .Ds I
2033 .\" .Cw (ax+bx+c) \ is\ produced\ by\ \&
2034 .\" .\".Cw (ax+bx+c) \&.Va_by_) \&_and_\& \&[?/]m_b1_e1_f1[?/]\&
2035 .\" .Cl Cx \t\t
2036 .\" .Li \&.Cx\ (
2037 .\" .Cx
2038 .\" .Cl Cx \t\t
2039 .\" .Li \&.Va ax
2040 .\" .Cx
2041 .\" .Cl Cx \t\t
2042 .\" .Li \&.Sy \+
2043 .\" .Cx
2044 .\" .Cl Cx \&(\&
2045 .\" .Va ax
2046 .\" .Cx +
2047 .\" .Va by
2048 .\" .Cx +
2049 .\" .Va c )
2050 .\" .Cx \t
2051 .\" .Em is produced by
2052 .\" .Cx \t
2053 .\" .Li \&.Va by
2054 .\" .Cx
2055 .\" .Cl Cx \t\t
2056 .\" .Li \&.Sy \+
2057 .\" .Cx
2058 .\" .Cl Cx \t\t
2059 .\" .Li \&.Va c )
2060 .\" .Cx
2061 .\" .Cl Cx \t\t
2062 .\" .Li \&.Cx
2063 .\" .Cx
2064 .\" .Cw
2065 .\" .De
2066 .\" .Pp
2067 .\" This example shows the same equation in a different format.
2068 .\" The spaces
2069 .\" around the
2070 .\" .Li \&+
2071 .\" signs were forced with
2072 .\" .Li \e :
2073 .\" .Pp
2074 .\" .Ds I
2075 .\" .Cw (ax\ +\ bx\ +\ c) \ is\ produced\ by\ \&
2076 .\" .\".Cw (ax+bx+c) \&.Va_by_) \&_and_\& \&[?/]m_b1_e1_f1[?/]\&
2077 .\" .Cl Cx \t\t
2078 .\" .Li \&.Cx\ (
2079 .\" .Cx
2080 .\" .Cl Cx \t\t
2081 .\" .Li \&.Va a
2082 .\" .Cx
2083 .\" .Cl Cx \t\t
2084 .\" .Li \&.Sy x
2085 .\" .Cx
2086 .\" .Cl Cx \t\t
2087 .\" .Li \&.Cx \e\ +\e\ \e&
2088 .\" .Cx
2089 .\" .Cl Cx \&(\&
2090 .\" .Va a
2091 .\" .Sy x
2092 .\" .Cx \ +\ \&
2093 .\" .Va b
2094 .\" .Sy y
2095 .\" .Cx \ +\ \&
2096 .\" .Va c )
2097 .\" .Cx \t
2098 .\" .Em is produced by
2099 .\" .Cl Cx \t\t
2100 .\" .Li \&.Va b
2101 .\" .Cx
2102 .\" .Cl Cx \t\t
2103 .\" .Li \&.Sy y
2104 .\" .Cx
2105 .\" .Cl Cx \t\t
2106 .\" .Li \&.Cx \e\ +\e\ \e&
2107 .\" .Cx
2108 .\" .Cl Cx \t\t
2109 .\" .Li \&.Va c )
2110 .\" .Cx
2111 .\" .Cl Cx \t\t
2112 .\" .Li \&.Cx
2113 .\" .Cx
2114 .\" .Cw
2115 .\" .De
2116 .\" .Pp
2117 .\" The incantation below was
2118 .\" lifted from the
2119 .\" .Xr adb 1
2120 .\" manual page:
2121 .\" .Pp
2122 .\" .Ds I
2123 .\" .Cw \&[?/]m_b1_e1_f1[?/]\& is\ produced\ by
2124 .\" .Cl Cx \t\t
2125 .\" .Li \&.Cx Op Sy ?/
2126 .\" .Cx
2127 .\" .Cl Cx \t\t
2128 .\" .Li \&.Nm m
2129 .\" .Cx
2130 .\" .Cl Cx Op Sy ?/
2131 .\" .Nm m
2132 .\" .Ad \ b1 e1 f1
2133 .\" .Op Sy ?/
2134 .\" .Cx \t
2135 .\" .Em is produced by
2136 .\" .Cx \t
2137 .\" .Li \&.Ar \e\ b1 e1 f1
2138 .\" .Cx
2139 .\" .Cl Cx \t\t
2140 .\" .Li \&.Op Sy ?/
2141 .\" .Cx
2142 .\" .Cl Cx \t\t
2143 .\" .Li \&.Cx
2144 .\" .Cx
2145 .\" .Cw
2146 .\" .De
2147 .\" .Pp
2148 .Ss Keeps
2149 The only keep that is implemented at this time is for words.
2150 The macros are
2151 .Ql \&.Bk
2152 (begin-keep)
2153 and
2154 .Ql \&.Ek
2155 (end-keep).
2156 The only option that
2157 .Ql \&.Bk
2158 accepts is
2159 .Fl words
2160 and is useful for preventing line breaks in the middle of options.
2161 In the example for the make command-line arguments (see
2162 .Sx What's in a name ) ,
2163 the keep prevented
2164 .Xr nroff
2165 from placing up the
2166 flag and the argument
2167 on separate lines.
2168 (Actually, the option macro used to prevent this from occurring,
2169 but was dropped when the decision (religious) was made to force
2170 right justified margins in
2171 .Xr troff
2172 as options in general look atrocious when spread across a sparse
2173 line.
2174 More work needs to be done with the keep macros, a
2175 .Fl line
2176 option needs to be added.)
2177 .Ss Examples and Displays
2178 There are five types of displays, a quickie one line indented display
2179 .Ql \&.D1 ,
2180 a quickie one line literal display
2181 .Ql \&.Dl ,
2182 and a block literal, block filled and block ragged which use
2183 the
2184 .Ql \&.Bd
2185 begin-display
2186 and
2187 .Ql \&.Ed
2188 end-display macros.
2189 .Pp
2190 .Bl -tag -width \&.Dlxx
2191 .It Li \&.D1
2192 (D-one) Display one line of indented text.
2193 This macro is parsed, but it is not callable.
2194 .Pp
2195 .Dl Fl ldghfstru
2196 .Pp
2197 The above was produced by:
2198 .Li \&.Dl Fl ldghfstru .
2199 .It Li \&.Dl
2200 (D-ell)
2201 Display one line of indented
2202 .Em literal
2203 text.
2204 The
2205 .Ql \&.Dl
2206 example macro has been used throughout this
2207 file.
2208 It allows
2209 the indent (display) of one line of text.
2210 Its default font is set to
2211 constant width (literal) however
2212 it is parsed and will recognized other macros.
2213 It is not callable however.
2214 .Pp
2215 .Dl % ls -ldg /usr/local/bin
2216 .Pp
2217 The above was produced by
2218 .Li \&.Dl % ls -ldg /usr/local/bin .
2219 .It Li \&.Bd
2220 Begin-display.
2221 The
2222 .Ql \&.Bd
2223 display must be ended with the
2224 .Ql \&.Ed
2225 macro.
2226 Displays may be nested within displays and
2227 lists.
2228 .Ql \&.Bd
2229 has the following syntax:
2230 .Pp
2231 .Dl ".Bd display-type [-offset offset_value] [-compact]"
2232 .Pp
2233 The display-type must be one of the following four types and
2234 may have an offset specifier for indentation:
2235 .Ql \&.Bd .
2236 .Pp
2237 .Bl -tag -width "file file_name  " -compact
2238 .It Fl ragged
2239 Display a block of text as typed,
2240 right (and left) margin edges are left ragged.
2241 .It Fl filled
2242 Display a filled (formatted) block.
2243 The block of text is formatted (the edges are filled \-
2244 not left unjustified).
2245 .It Fl literal
2246 Display a literal block, useful for source code or
2247 simple tabbed or spaced text.
2248 .It Fl file Ar file_name
2249 The filename following the
2250 .Fl file
2251 flag is read and displayed.
2252 Literal mode is
2253 asserted and tabs are set at 8 constant width character
2254 intervals, however any
2255 .Xr troff/ Ns Nm \-mdoc
2256 commands in file will be processed.
2257 .It Fl offset Ar string
2258 If
2259 .Fl offset
2260 is specified with one of the following strings, the string
2261 is interpreted to indicate the level of indentation for the
2262 forthcoming block of text:
2263 .Pp
2264 .Bl -tag -width "indent-two" -compact
2265 .It Ar left
2266 Align block on the current left margin,
2267 this is the default mode of
2268 .Ql \&.Bd .
2269 .It Ar center
2270 Supposedly center the block.
2271 At this time
2272 unfortunately, the block merely gets
2273 left aligned about an imaginary center margin.
2274 .It Ar indent
2275 Indents by one default indent value or tab.
2276 The default
2277 indent value is also used for the
2278 .Ql \&.D1
2279 display so one is guaranteed the two types of displays
2280 will line up.
2281 This indent is normally set to 6n or about two
2282 thirds of an inch (six constant width characters).
2283 .It Ar indent-two
2284 Indents two times the default indent value.
2285 .It Ar right
2286 This
2287 .Em left
2288 aligns the block about two inches from
2289 the right side of the page.
2290 This macro needs
2291 work and perhaps may never do the right thing by
2292 .Xr troff .
2293 .El
2294 .El
2295 .It ".Ed"
2296 End-display.
2297 .El
2298 .Ss Font Modes
2299 There are five macros for changing the appearance of the manual page text:
2300 .Bl -tag -width \&.Emxx
2301 .It \&.Em
2302 Text may be stressed or emphasized with the
2303 .Ql \&.Em
2304 macro.
2305 The usual font for emphasis is italic.
2306 .Pp
2307 .Dl Usage: .Em argument ... \*(Pu
2308 .Bl -tag -width ".Em vide infra ) ) ," -compact -offset 14n
2309 .It Li ".Em does not"
2310 .Em does not
2311 .It Li ".Em exceed 1024 ."
2312 .Em exceed 1024 .
2313 .It Li ".Em vide infra ) ) ,"
2314 .Em vide infra ) ) ,
2315 .El
2316 .Pp
2317 The
2318 .Ql \&.Em
2319 macro is parsed and is callable.
2320 It is an error to call
2321 .Ql \&.Em
2322 without arguments.
2323 .It \&.Li
2324 The
2325 .Ql \&.Li
2326 literal macro may be used for special characters,
2327 variable constants, anything which should be displayed as it
2328 would be typed.
2329 .Pp
2330 .Dl Usage: .Li argument ... \*(Pu
2331 .Bl -tag -width ".Li cntrl-D ) ,"  -compact -offset 14n
2332 .It Li \&.Li \een
2333 .Li \en
2334 .It Li \&.Li M1 M2 M3\ ;
2335 .Li M1 M2 M3 ;
2336 .It Li \&.Li cntrl-D\ )\ ,
2337 .Li cntrl-D ) ,
2338 .It Li \&.Li 1024\ ...
2339 .Li 1024 ...
2340 .El
2341 .Pp
2342 The
2343 .Ql \&.Li
2344 macro is parsed and is callable.
2345 .It \&.Sy
2346 The symbolic emphasis macro is generally a boldface macro in
2347 either the symbolic sense or the traditional English usage.
2348 .Pp
2349 .Dl Usage: .Sy symbol ... \*(Pu
2350 .Bl -tag -width ".Sy Important Noticex" -compact -offset 14n
2351 .It Li \&.Sy Important Notice
2352 .Sy Important Notice
2353 .El
2354 .Pp
2355 The
2356 .Ql \&.Sy
2357 macro is parsed and is callable.
2358 Arguments to
2359 .Ql \&.Sy
2360 may be quoted.
2361 .It Li \&.Bf
2362 Begin font mode.
2363 The
2364 .Ql \&.Bf
2365 font mode must be ended with the
2366 .Ql \&.Ef
2367 macro.
2368 Font modes may be nested within other font modes.
2369 .Ql \&.Bf
2370 has the following syntax:
2371 .Pp
2372 .Dl ".Bf font-mode"
2373 .Pp
2374 The font-mode must be one of the following three types:
2375 .Ql \&.Bf .
2376 .Pp
2377 .Bl -tag -width "file file_name  " -compact
2378 .It Sy \&Em | Fl emphasis
2379 Same as if the
2380 .Ql \&.Em
2381 macro was used for the entire block of text.
2382 .It Sy \&Li | Fl literal
2383 Same as if the
2384 .Ql \&.Li
2385 macro was used for the entire block of text.
2386 .It Sy \&Sy | Fl symbolic
2387 Same as if the
2388 .Ql \&.Sy
2389 macro was used for the entire block of text.
2390 .El
2391 .It ".Ef"
2392 End font mode.
2393 .El
2394 .Ss Tagged Lists and Columns
2395 There are several types of lists which may be initiated with the
2396 .Ql ".Bl"
2397 begin-list macro.
2398 Items within the list
2399 are specified with the
2400 .Ql ".It"
2401 item macro and
2402 each list must end with the
2403 .Ql ".El"
2404 macro.
2405 Lists may be nested within themselves and within displays.
2406 Columns may be used inside of lists, but lists are unproven
2407 inside of columns.
2408 .Pp
2409 In addition, several list attributes may be specified such as
2410 the width of a tag, the list offset, and compactness
2411 (blank lines between items allowed or disallowed).
2412 Most of this document has been formatted with a tag style list
2413 .Pq Fl tag .
2414 For a change of pace, the list-type used to present the list-types
2415 is an over-hanging list
2416 .Pq Fl ohang .
2417 This type of list is quite popular with
2418 .Tn TeX
2419 users, but might look a bit funny after having read many pages of
2420 tagged lists.
2421 The following list types are accepted by
2422 .Ql ".Bl" :
2423 .Pp
2424 .Bl -ohang -compact
2425 .It Fl bullet
2426 .It Fl item
2427 .It Fl enum
2428 These three are the simplest types of lists.
2429 Once the
2430 .Ql ".Bl"
2431 macro has been given, items in the list are merely
2432 indicated by a line consisting solely of the
2433 .Ql ".It"
2434 macro.
2435 For example, the source text for a simple enumerated list
2436 would look like:
2437 .Bd -literal -offset indent-two
2438 \&.Bl -enum -compact
2439 \&.It
2440 \&Item one goes here.
2441 \&.It
2442 \&And item two here.
2443 \&.It
2444 \&Lastly item three goes here.
2445 \&.El
2446 .Ed
2447 .Pp
2448 The results:
2449 .Pp
2450 .Bl -enum -offset indent-two -compact
2451 .It
2452 Item one goes here.
2453 .It
2454 And item two here.
2455 .It
2456 Lastly item three goes here.
2457 .El
2458 .Pp
2459 A simple bullet list construction:
2460 .Bd -literal -offset indent-two
2461 \&.Bl -bullet -compact
2462 \&.It
2463 \&Bullet one goes here.
2464 \&.It
2465 \&Bullet two here.
2466 \&.El
2467 .Ed
2468 .Pp
2469 Produces:
2470 .Bl -bullet -offset indent-two -compact
2471 .It
2472 Bullet one goes here.
2473 .It
2474 Bullet two here.
2475 .El
2476 .Pp
2477 .It Fl tag
2478 .It Fl diag
2479 .It Fl hang
2480 .It Fl ohang
2481 .It Fl inset
2482 These list-types collect arguments specified with the
2483 .Ql \&.It
2484 macro and create a label which may be
2485 .Em inset
2486 into the forthcoming text,
2487 .Em hanged
2488 from the forthcoming text,
2489 .Em overhanged
2490 from above and not indented or
2491 .Em tagged .
2492 This
2493 list was constructed with the
2494 .Ql Fl ohang
2495 list-type.
2496 The
2497 .Ql \&.It
2498 macro is parsed only for the inset, hang
2499 and tag list-types and is not callable.
2500 Here is an example of inset labels:
2501 .Bl -inset -offset indent
2502 .It Em Tag
2503 The tagged list (also called a tagged paragraph) is the
2504 most common type of list used in the Berkeley manuals.
2505 .It Em Diag
2506 Diag lists create section four diagnostic lists
2507 and are similar to inset lists except callable
2508 macros are ignored.
2509 .It Em Hang
2510 Hanged labels are a matter of taste.
2511 .It Em Ohang
2512 Overhanging labels are nice when space is constrained.
2513 .It Em Inset
2514 Inset labels are useful for controlling blocks of
2515 paragraphs and are valuable for converting
2516 .Nm \-mdoc
2517 manuals to other formats.
2518 .El
2519 .Pp
2520 Here is the source text which produced the above example:
2521 .Bd -literal -offset indent
2522 \&.Bl -inset -offset indent
2523 \&.It Em Tag
2524 \&The tagged list (also called a tagged paragraph) is the
2525 \&most common type of list used in the Berkeley manuals.
2526 \&.It Em Diag
2527 \&Diag lists create section four diagnostic lists
2528 \&and are similar to inset lists except callable
2529 \&macros are ignored.
2530 \&.It Em Hang
2531 \&Hanged labels are a matter of taste.
2532 \&.It Em Ohang
2533 \&Overhanging labels are nice when space is constrained.
2534 \&.It Em Inset
2535 \&Inset labels are useful for controlling blocks of
2536 \&paragraphs and are valuable for converting
2537 \&.Nm \-mdoc
2538 \&manuals to other formats.
2539 \&.El
2540 .Ed
2541 .Pp
2542 Here is a hanged list with two items:
2543 .Bl -hang -offset indent
2544 .It Em Hanged
2545 labels appear similar to tagged lists when the
2546 label is smaller than the label width.
2547 .It Em Longer hanged list labels
2548 blend in to the paragraph unlike
2549 tagged paragraph labels.
2550 .El
2551 .Pp
2552 And the unformatted text which created it:
2553 .Bd -literal -offset indent
2554 \&.Bl -hang -offset indent
2555 \&.It Em Hanged
2556 \&labels appear similar to tagged lists when the
2557 \&label is smaller than the label width.
2558 \&.It Em Longer hanged list labels
2559 \&blend in to the paragraph unlike
2560 \&tagged paragraph labels.
2561 \&.El
2562 .Ed
2563 .Pp
2564 The tagged list which follows uses an optional width specifier to control
2565 the width of the tag.
2566 .Pp
2567 .Bl -tag -width "PAGEIN" -compact -offset indent
2568 .It SL
2569 sleep time of the process (seconds blocked)
2570 .It PAGEIN
2571 number of disk
2572 .Tn I/O Ns 's
2573 resulting from references
2574 by the process to pages not loaded in core.
2575 .It UID
2576 numerical user-id of process owner
2577 .It PPID
2578 numerical ID of parent of process process priority
2579 (nonpositive when in noninterruptible wait)
2580 .El
2581 .Pp
2582 The raw text:
2583 .Bd -literal -offset indent
2584 \&.Bl -tag -width "PAGEIN" -compact -offset indent
2585 \&.It SL
2586 \&sleep time of the process (seconds blocked)
2587 \&.It PAGEIN
2588 \&number of disk
2589 \&.Tn I/O Ns 's
2590 \&resulting from references
2591 \&by the process to pages not loaded in core.
2592 \&.It UID
2593 \&numerical user ID of process owner
2594 \&.It PPID
2595 \&numerical ID of parent of process process priority
2596 \&(nonpositive when in noninterruptible wait)
2597 \&.El
2598 .Ed
2599 .Pp
2600 Acceptable width specifiers:
2601 .Bl -tag -width Ar -offset indent
2602 .It Fl width Ar "\&Fl"
2603 sets the width to the default width for a flag.
2604 All callable
2605 macros have a default width value.
2606 The
2607 .Ql \&.Fl ,
2608 value is presently
2609 set to ten constant width characters or about five sixth of
2610 an inch.
2611 .It Fl width Ar "24n"
2612 sets the width to 24 constant width characters or about two
2613 inches.
2614 The
2615 .Ql n
2616 is absolutely necessary for the scaling to work correctly.
2617 .It Fl width Ar "ENAMETOOLONG"
2618 sets width to the constant width length of the
2619 string given.
2620 .It Fl width  Ar "\\*qint mkfifo\\*q"
2621 again, the width is set to the constant width of the string
2622 given.
2623 .El
2624 .El
2625 .Pp
2626 If a width is not specified for the tag list type, the first
2627 time
2628 .Ql \&.It
2629 is invoked, an attempt is made to determine an appropriate
2630 width.
2631 If the first argument to
2632 .Ql ".It"
2633 is a callable macro, the default width for that macro will be used
2634 as if the macro name had been supplied as the width.
2635 However,
2636 if another item in the list is given with a different callable
2637 macro name, a new and nested list is assumed.
2638 .Sh PREDEFINED STRINGS
2639 The following strings are predefined as may be used by
2640 preceding with the troff string interpreting sequence
2641 .Ql \&\e*(xx
2642 where
2643 .Em xx
2644 is the name of the defined string or as
2645 .Ql \&\e*x
2646 where
2647 .Em x
2648 is the name of the string.
2649 The interpreting sequence may be used any where in the text.
2650 .Pp
2651 .Bl -column "String " "Nroff " "Troff " -offset indent
2652 .It Sy "String  Nroff   Troff"
2653 .It Li "<=" Ta \&<\&= Ta \*(<=
2654 .It Li ">=" Ta \&>\&= Ta \*(>=
2655 .It Li "Rq" Ta "''" Ta \*(Rq
2656 .It Li "Lq" Ta "``" Ta \*(Lq
2657 .It Li "ua" Ta ^ Ta \*(ua
2658 .It Li "aa" Ta ' Ta \*(aa
2659 .It Li "ga" Ta \` Ta \*(ga
2660 .\" .It Li "sL" Ta ` Ta \*(sL
2661 .\" .It Li "sR" Ta ' Ta \*(sR
2662 .It Li "q" Ta \&" Ta \*q
2663 .It Li "Pi" Ta pi Ta \*(Pi
2664 .It Li "Ne" Ta != Ta \*(Ne
2665 .It Li "Le" Ta <= Ta \*(Le
2666 .It Li "Ge" Ta >= Ta \*(Ge
2667 .It Li "Lt" Ta < Ta \*(Gt
2668 .It Li "Gt" Ta > Ta \*(Lt
2669 .It Li "Pm" Ta +- Ta \*(Pm
2670 .It Li "If" Ta infinity Ta \*(If
2671 .It Li "Na" Ta \fINaN\fP Ta \*(Na
2672 .It Li "Ba" Ta \fR\&|\fP Ta \*(Ba
2673 .El
2674 .Pp
2675 .Sy Note :
2676 The string named
2677 .Ql q
2678 should be written as
2679 .Ql \e*q
2680 since it is only one char.
2681 .Sh DIAGNOSTICS
2682 The debugging facilities for
2683 .Nm \-mdoc
2684 are limited, but can help detect subtle errors such
2685 as the collision of an argument name with an internal
2686 register or macro name.
2687 (A what?)
2688 A register is an arithmetic storage class for
2689 .Xr troff
2690 with a one or two character name.
2691 All registers internal to
2692 .Nm \-mdoc
2693 for
2694 .Xr troff
2695 and
2696 .Xr ditroff
2697 are two characters and
2698 of the form <upper_case><lower_case> such as
2699 .Ql \&Ar ,
2700 <lower_case><upper_case> as
2701 .Ql \&aR
2702 or
2703 <upper or lower letter><digit> as
2704 .Ql \&C\&1 .
2705 And adding to the muddle,
2706 .Xr troff
2707 has its own internal registers all of which are either
2708 two lower case characters or a dot plus a letter or metacharacter
2709 character.
2710 In one of the introduction examples, it was shown how to
2711 prevent the interpretation of a macro name with the escape sequence
2712 .Ql \e& .
2713 This is sufficient for the internal register names also.
2714 .Pp
2715 .\" Every callable macro name has a corresponding register
2716 .\" of the same name (<upper_case><lower_case>).
2717 .\" There are also specific registers which have
2718 .\" been used for stacks and arrays and are listed in the
2719 .\" .Sx Appendix .
2720 .\" .Bd -ragged -offset 4n
2721 .\" [A-Z][a-z]  registers corresponding to macro names (example ``Ar'')
2722 .\" [a-z][A-Z]  registers corresponding to macro names (example ``aR'')
2723 .\" C[0-9]              argument types (example C1)
2724 .\" O[0-9]              offset stack (displays)
2725 .\" h[0-9]              horizontal spacing stack (lists)
2726 .\" o[0-9]              offset (stack) (lists)
2727 .\" t[0-9]              tag stack (lists)
2728 .\" v[0-9]              vertical spacing stack (lists)
2729 .\" w[0-9]              width tag/label stack
2730 .\" .Ed
2731 .\" .Pp
2732 If a nonescaped register name is given in the argument list of a request
2733 unpredictable behavior will occur.
2734 In general, any time huge portions
2735 of text do not appear where expected in the output, or small strings
2736 such as list tags disappear, chances are there is a misunderstanding
2737 about an argument type in the argument list.
2738 Your mother never intended for you to remember this evil stuff - so here
2739 is a way to find out whether or not your arguments are valid: The
2740 .Ql \&.Db
2741 (debug)
2742 macro displays the interpretation of the argument list for most
2743 macros.
2744 Macros such as the
2745 .Ql \&.Pp
2746 (paragraph)
2747 macro do not contain debugging information.
2748 All of the callable macros do,
2749 and it is strongly advised whenever in doubt,
2750 turn on the
2751 .Ql \&.Db
2752 macro.
2753 .Pp
2754 .Dl Usage: \&.Db [on | off]
2755 .Pp
2756 An example of a portion of text with
2757 the debug macro placed above and below an
2758 artificially created problem (a flag argument
2759 .Ql \&aC
2760 which should be
2761 .Ql \e&aC
2762 in order to work):
2763 .Bd -literal -offset indent
2764 \&.Db on
2765 \&.Op Fl aC Ar file )
2766 \&.Db off
2767 .Ed
2768 .Pp
2769 The resulting output:
2770 .Bd -literal -offset indent
2771 DEBUGGING ON
2772 DEBUG(argv) MACRO: `.Op'  Line #: 2
2773         Argc: 1  Argv: `Fl'  Length: 2
2774         Space: `'  Class: Executable
2775         Argc: 2  Argv: `aC'  Length: 2
2776         Space: `'  Class: Executable
2777         Argc: 3  Argv: `Ar'  Length: 2
2778         Space: `'  Class: Executable
2779         Argc: 4  Argv: `file'  Length: 4
2780         Space: ` '  Class: String
2781         Argc: 5  Argv: `)'  Length: 1
2782         Space: ` '  Class: Closing Punctuation or suffix
2783         MACRO REQUEST: .Op Fl aC Ar file )
2784 DEBUGGING OFF
2785 .Ed
2786 .Pp
2787 The first line of information tells the name of the calling
2788 macro, here
2789 .Ql \&.Op ,
2790 and the line number it appears on.
2791 If one or more files are involved
2792 (especially if text from another file is included) the line number
2793 may be bogus.
2794 If there is only one file, it should be accurate.
2795 The second line gives the argument count, the argument
2796 .Pq Ql \&Fl
2797 and its length.
2798 If the length of an argument is two characters, the
2799 argument is tested to see if it is executable (unfortunately, any
2800 register which contains a nonzero value appears executable).
2801 The third line gives the space allotted for a class, and the
2802 class type.
2803 The problem here is the argument aC should not be
2804 executable.
2805 The four types of classes are string, executable, closing
2806 punctuation and opening punctuation.
2807 The last line shows the entire
2808 argument list as it was read.
2809 In this next example, the offending
2810 .Ql \&aC
2811 is escaped:
2812 .Bd -literal -offset indent
2813 \&.Db on
2814 \&.Em An escaped \e&aC
2815 \&.Db off
2816 .Ed
2817 .Bd -literal -offset indent
2818 DEBUGGING ON
2819 DEBUG(fargv) MACRO: `.Em'  Line #: 2
2820         Argc: 1  Argv: `An'  Length: 2
2821         Space: ` '  Class: String
2822         Argc: 2  Argv: `escaped'  Length: 7
2823         Space: ` '  Class: String
2824         Argc: 3  Argv: `aC'  Length: 2
2825         Space: ` '  Class: String
2826         MACRO REQUEST: .Em An escaped &aC
2827 DEBUGGING OFF
2828 .Ed
2829 .Pp
2830 The argument
2831 .Ql \e&aC
2832 shows up with the same length of 2 as the
2833 .Ql \e&
2834 sequence produces a zero width, but a register
2835 named
2836 .Ql \e&aC
2837 was not found and the type classified as string.
2838 .Pp
2839 Other diagnostics consist of usage statements and are self explanatory.
2840 .Sh GROFF, TROFF AND NROFF
2841 The
2842 .Nm \-mdoc
2843 package does not need compatibility mode with
2844 .Xr groff .
2845 .Pp
2846 The package inhibits page breaks, and the headers and footers
2847 which normally occur at those breaks with
2848 .Xr nroff ,
2849 to make the manual more efficient for viewing on-line.
2850 At the moment,
2851 .Xr groff
2852 with
2853 .Fl T Ns Ar ascii
2854 does eject the imaginary remainder of the page at end of file.
2855 The inhibiting of the page breaks makes
2856 .Xr nroff Ns 'd
2857 files unsuitable for hardcopy.
2858 There is a register named
2859 .Ql \&cR
2860 which can be set to zero in the site dependent style file
2861 .Pa /usr/src/share/tmac/doc-nroff
2862 to restore the old style behavior.
2863 .Sh FILES
2864 .Bl -tag -width /usr/share/man0/template.doc -compact
2865 .It Pa /usr/share/tmac/doc.tmac
2866 manual macro package
2867 .It Pa /usr/share/misc/mdoc.template
2868 template for writing a man page
2869 .It Pa /usr/share/examples/mdoc/*
2870 several example man pages
2871 .El
2872 .Sh BUGS
2873 Undesirable hyphenation on the dash of a flag
2874 argument is not yet resolved, and causes
2875 occasional mishaps in the
2876 .Sx DESCRIPTION
2877 section.
2878 (line break on the hyphen).
2879 .Pp
2880 Predefined strings are not declared in documentation.
2881 .Pp
2882 Section 3f has not been added to the header routines.
2883 .Pp
2884 .Ql \&.Nm
2885 font should be changed in
2886 .Sx NAME
2887 section.
2888 .Pp
2889 .Ql \&.Fn
2890 needs to have a check to prevent splitting up
2891 if the line length is too short.
2892 Occasionally it
2893 separates the last parenthesis, and sometimes
2894 looks ridiculous if a line is in fill mode.
2895 .Pp
2896 The method used to prevent header and footer page
2897 breaks (other than the initial header and footer) when using
2898 nroff occasionally places an unsightly partially filled line (blank)
2899 at the would be bottom of the page.
2900 .Pp
2901 The list and display macros to not do any keeps
2902 and certainly should be able to.
2903 .\" Note what happens if the parameter list overlaps a newline
2904 .\" boundary.
2905 .\" to make sure a line boundary is crossed:
2906 .\" .Bd -literal
2907 .\" \&.Fn struct\e\ dictionarytable\e\ *dictionarylookup struct\e\ dictionarytable\e\ *tab[]
2908 .\" .Ed
2909 .\" .Pp
2910 .\" produces, nudge nudge,
2911 .\" .Fn struct\ dictionarytable\ *dictionarylookup char\ *h struct\ dictionarytable\ *tab[] ,
2912 .\" .Fn struct\ dictionarytable\ *dictionarylookup char\ *h struct\ dictionarytable\ *tab[] ,
2913 .\" nudge
2914 .\" .Fn struct\ dictionarytable\ *dictionarylookup char\ *h struct\ dictionarytable\ *tab[] .
2915 .\" .Pp
2916 .\" If double quotes are used, for example:
2917 .\" .Bd -literal
2918 .\" \&.Fn \*qstruct dictionarytable *dictionarylookup\*q \*qchar *h\*q \*qstruct dictionarytable *tab[]\*q
2919 .\" .Ed
2920 .\" .Pp
2921 .\" produces, nudge nudge,
2922 .\" .Fn "struct dictionarytable *dictionarylookup" "char *h" "struct dictionarytable *tab[]" ,
2923 .\" nudge
2924 .\" .Fn "struct dictionarytable *dictionarylookup" "char *h" "struct dictionarytable *tab[]" ,
2925 .\" nudge
2926 .\" .Fn "struct dictionarytable *dictionarylookup" "char *h" "struct dictionarytable *tab[]" .
2927 .\" .Pp
2928 .\" Not a pretty sight...
2929 .\" In a paragraph, a long parameter containing unpaddable spaces as
2930 .\" in the former example will cause
2931 .\" .Xr troff
2932 .\" to break the line and spread
2933 .\" the remaining words out.
2934 .\" The latter example will adjust nicely to
2935 .\" justified margins, but may break in between an argument and its
2936 .\" declaration.
2937 .\" In
2938 .\" .Xr nroff
2939 .\" the right margin adjustment is normally ragged and the problem is
2940 .\" not as severe.
2941 .Sh SEE ALSO
2942 .Xr man 1 ,
2943 .Xr troff 1 ,
2944 .Xr groff_mdoc 7 ,
2945 .Xr mdoc 7
2946 .Sh COLOPHON
2947 This page is part of release 3.32 of the Linux
2948 .Em man-pages
2949 project.
2950 A description of the project,
2951 and information about reporting bugs,
2952 can be found at
2953 http://www.kernel.org/doc/man-pages/.