mandoc(1): Update to 1.9.19.
[dragonfly.git] / usr.bin / mandoc / man.7
1 .\"     $Id: man.7,v 1.60 2010/03/27 10:22:28 kristaps Exp $
2 .\"
3 .\" Copyright (c) 2009 Kristaps Dzonsons <kristaps@kth.se>
4 .\"
5 .\" Permission to use, copy, modify, and distribute this software for any
6 .\" purpose with or without fee is hereby granted, provided that the above
7 .\" copyright notice and this permission notice appear in all copies.
8 .\"
9 .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 .\"
17 .Dd March 27, 2010
18 .Dt MAN 7
19 .Os
20 .
21 .
22 .Sh NAME
23 .Nm man
24 .Nd man language reference
25 .
26 .
27 .Sh DESCRIPTION
28 The
29 .Nm man
30 language was historically used to format
31 .Ux
32 manuals.  This reference document describes its syntax, structure, and
33 usage.
34 .
35 .Pp
36 .Bf -emphasis
37 Do not use
38 .Nm
39 to write your manuals.
40 .Ef
41 Use the
42 .Xr mdoc 7
43 language, instead.
44 .
45 .Pp
46 An
47 .Nm
48 document follows simple rules:  lines beginning with the control
49 character
50 .Sq \&.
51 are parsed for macros.  Other lines are interpreted within the scope of
52 prior macros:
53 .Bd -literal -offset indent
54 \&.SH Macro lines change control state.
55 Other lines are interpreted within the current state.
56 .Ed
57 .
58 .
59 .Sh INPUT ENCODING
60 .Nm
61 documents may contain only graphable 7-bit ASCII characters, the
62 space character, and the tabs character.  All manuals must have
63 .Ux
64 line termination.
65 .
66 .Pp
67 Blank lines are acceptable; where found, the output will assert a
68 vertical space.
69 .
70 .
71 .Ss Comments
72 Text following a
73 .Sq \e\*" ,
74 whether in a macro or free-form text line, is ignored to the end of
75 line.  A macro line with only a control character and comment escape,
76 .Sq \&.\e" ,
77 is also ignored.  Macro lines with only a control character and
78 optionally whitespace are stripped from input.
79 .
80 .
81 .Ss Special Characters
82 Special characters may occur in both macro and free-form lines.
83 Sequences begin with the escape character
84 .Sq \e
85 followed by either an open-parenthesis
86 .Sq \&(
87 for two-character sequences; an open-bracket
88 .Sq \&[
89 for n-character sequences (terminated at a close-bracket
90 .Sq \&] ) ;
91 or a single one-character sequence.  See
92 .Xr mandoc_char 7
93 for a complete list.  Examples include
94 .Sq \e(em
95 .Pq em-dash
96 and
97 .Sq \ee
98 .Pq back-slash .
99 .
100 .
101 .Ss Text Decoration
102 Terms may be text-decorated using the
103 .Sq \ef
104 escape followed by an indicator: B (bold), I, (italic), R (Roman), or P
105 (revert to previous mode):
106 .Pp
107 .D1 \efBbold\efR \efIitalic\efP
108 .Pp
109 A numerical representation 3, 2, or 1 (bold, italic, and Roman,
110 respectively) may be used instead.  A text decoration is only valid, if
111 specified in free-form text, until the next macro invocation; if
112 specified within a macro, it's only valid until the macro closes scope.
113 Note that macros like
114 .Sx \&BR
115 open and close a font scope with each argument.
116 .Pp
117 Text may also be sized with the
118 .Sq \es
119 escape, whose syntax is one of
120 .Sq \es+-n
121 for one-digit numerals;
122 .Sq \es(+-nn
123 or
124 .Sq \es+-(nn
125 for two-digit numerals; and
126 .Sq \es[+-N] ,
127 .Sq \es+-[N] ,
128 .Sq \es'+-N' ,
129 or
130 .Sq \es+-'N'
131 for arbitrary-digit numerals:
132 .Pp
133 .D1 \es+1bigger\es-1
134 .D1 \es[+10]much bigger\es[-10]
135 .D1 \es+(10much bigger\es-(10
136 .D1 \es+'100'much much bigger\es-'100'
137 .Pp
138 Both
139 .Sq \es
140 and
141 .Sq \ef
142 attributes are forgotten when entering or exiting a macro block.
143 .
144 .
145 .Ss Whitespace
146 Unless specifically escaped, consecutive blocks of whitespace are pruned
147 from input.  These are later re-added, if applicable, by a front-end
148 utility such as
149 .Xr mandoc 1 .
150 .
151 .
152 .Ss Dates
153 The
154 .Sx \&TH
155 macro is the only
156 .Nm
157 macro that requires a date.  The form for this date is the ISO-8601
158 standard
159 .Cm YYYY-MM-DD .
160 .
161 .
162 .Ss Scaling Widths
163 Many macros support scaled widths for their arguments, such as
164 stipulating a two-inch paragraph indentation with the following:
165 .Bd -literal -offset indent
166 \&.HP 2i
167 .Ed
168 .
169 .Pp
170 The syntax for scaled widths is
171 .Sq Li [+-]?[0-9]*.[0-9]*[:unit:]? ,
172 where a decimal must be preceded or proceeded by at least one digit.
173 Negative numbers, while accepted, are truncated to zero.  The following
174 scaling units are accepted:
175 .
176 .Pp
177 .Bl -tag -width Ds -offset indent -compact
178 .It c
179 centimetre
180 .It i
181 inch
182 .It P
183 pica (~1/6 inch)
184 .It p
185 point (~1/72 inch)
186 .It f
187 synonym for
188 .Sq u
189 .It v
190 default vertical span
191 .It m
192 width of rendered
193 .Sq m
194 .Pq em
195 character
196 .It n
197 width of rendered
198 .Sq n
199 .Pq en
200 character
201 .It u
202 default horizontal span
203 .It M
204 mini-em (~1/100 em)
205 .El
206 .Pp
207 Using anything other than
208 .Sq m ,
209 .Sq n ,
210 .Sq u ,
211 or
212 .Sq v
213 is necessarily non-portable across output media.
214 .
215 .Pp
216 If a scaling unit is not provided, the numerical value is interpreted
217 under the default rules of
218 .Sq v
219 for vertical spaces and
220 .Sq u
221 for horizontal ones.
222 .Em Note :
223 this differs from
224 .Xr mdoc 7 ,
225 which, if a unit is not provided, will instead interpret the string as
226 literal text.
227 .
228 .
229 .Sh MANUAL STRUCTURE
230 Each
231 .Nm
232 document must contain contains at least the
233 .Sx \&TH
234 macro describing the document's section and title.  It may occur
235 anywhere in the document, although conventionally, it appears as the
236 first macro.
237 .
238 .Pp
239 Beyond
240 .Sx \&TH ,
241 at least one macro or text node must appear in the document.  Documents
242 are generally structured as follows:
243 .Bd -literal -offset indent
244 \&.TH FOO 1 2009-10-10
245 \&.
246 \&.SH NAME
247 \efBfoo\efR \e(en a description goes here
248 \&.\e\*q The next is for sections 2 & 3 only.
249 \&.\e\*q .SH LIBRARY
250 \&.
251 \&.SH SYNOPSIS
252 \efBfoo\efR [\efB\e-options\efR] arguments...
253 \&.
254 \&.SH DESCRIPTION
255 The \efBfoo\efR utility processes files...
256 \&.
257 \&.\e\*q .SH IMPLEMENTATION NOTES
258 \&.\e\*q The next is for sections 1 & 8 only.
259 \&.\e\*q .SH EXIT STATUS
260 \&.\e\*q The next is for sections 2, 3, & 9 only.
261 \&.\e\*q .SH RETURN VALUES
262 \&.\e\*q The next is for sections 1, 6, 7, & 8 only.
263 \&.\e\*q .SH ENVIRONMENT
264 \&.\e\*q .SH FILES
265 \&.\e\*q .SH EXAMPLES
266 \&.\e\*q The next is for sections 1, 4, 6, 7, & 8 only.
267 \&.\e\*q .SH DIAGNOSTICS
268 \&.\e\*q The next is for sections 2, 3, & 9 only.
269 \&.\e\*q .SH ERRORS
270 \&.\e\*q .SH SEE ALSO
271 \&.\e\*q .BR foo ( 1 )
272 \&.\e\*q .SH STANDARDS
273 \&.\e\*q .SH HISTORY
274 \&.\e\*q .SH AUTHORS
275 \&.\e\*q .SH CAVEATS
276 \&.\e\*q .SH BUGS
277 \&.\e\*q .SH SECURITY CONSIDERATIONS
278 .Ed
279 .Pp
280 The sections in a
281 .Nm
282 document are conventionally ordered as they appear above.  Sections
283 should be composed as follows:
284 .Bl -ohang -offset indent
285 .It Em NAME
286 The name(s) and a short description of the documented material.  The
287 syntax for this is generally as follows:
288 .Pp
289 .D1 \efBname\efR \e(en description
290 .It Em LIBRARY
291 The name of the library containing the documented material, which is
292 assumed to be a function in a section 2 or 3 manual.  For functions in
293 the C library, this may be as follows:
294 .Pp
295 .D1 Standard C Library (libc, -lc)
296 .It Em SYNOPSIS
297 Documents the utility invocation syntax, function call syntax, or device
298 configuration.
299 .Pp
300 For the first, utilities (sections 1, 6, and 8), this is
301 generally structured as follows:
302 .Pp
303 .D1 \efBname\efR [-\efBab\efR] [-\efBc\efR\efIarg\efR] \efBpath\efR...
304 .Pp
305 For the second, function calls (sections 2, 3, 9):
306 .Pp
307 .D1 \&.B char *name(char *\efIarg\efR);
308 .Pp
309 And for the third, configurations (section 4):
310 .Pp
311 .D1 \&.B name* at cardbus ? function ?
312 .Pp
313 Manuals not in these sections generally don't need a
314 .Em SYNOPSIS .
315 .It Em DESCRIPTION
316 This expands upon the brief, one-line description in
317 .Em NAME .
318 It usually contains a break-down of the options (if documenting a
319 command).
320 .It Em IMPLEMENTATION NOTES
321 Implementation-specific notes should be kept here.  This is useful when
322 implementing standard functions that may have side effects or notable
323 algorithmic implications.
324 .It Em EXIT STATUS
325 Command exit status for section 1, 6, and 8 manuals.  This section is
326 the dual of
327 .Em RETURN VALUES ,
328 which is used for functions.  Historically, this information was
329 described in
330 .Em DIAGNOSTICS ,
331 a practise that is now discouraged.
332 .
333 .It Em RETURN VALUES
334 This section is the dual of
335 .Em EXIT STATUS ,
336 which is used for commands.  It documents the return values of functions
337 in sections 2, 3, and 9.
338 .
339 .It Em ENVIRONMENT
340 Documents any usages of environment variables, e.g.,
341 .Xr environ 7 .
342 .
343 .It Em FILES
344 Documents files used.  It's helpful to document both the file and a
345 short description of how the file is used (created, modified, etc.).
346 .
347 .It Em EXAMPLES
348 Example usages.  This often contains snippets of well-formed,
349 well-tested invocations.  Make doubly sure that your examples work
350 properly!
351 .
352 .It Em DIAGNOSTICS
353 Documents error conditions.  This is most useful in section 4 manuals.
354 Historically, this section was used in place of
355 .Em EXIT STATUS
356 for manuals in sections 1, 6, and 8; however, this practise is
357 discouraged.
358 .
359 .It Em ERRORS
360 Documents error handling in sections 2, 3, and 9.
361 .
362 .It Em SEE ALSO
363 References other manuals with related topics.  This section should exist
364 for most manuals.
365 .Pp
366 .D1 \&.BR bar \&( 1 \&),
367 .Pp
368 Cross-references should conventionally be ordered
369 first by section, then alphabetically.
370 .
371 .It Em STANDARDS
372 References any standards implemented or used, such as
373 .Pp
374 .D1 IEEE Std 1003.2 (\e(lqPOSIX.2\e(rq)
375 .Pp
376 If not adhering to any standards, the
377 .Em HISTORY
378 section should be used.
379 .
380 .It Em HISTORY
381 The history of any manual without a
382 .Em STANDARDS
383 section should be described in this section.
384 .
385 .It Em AUTHORS
386 Credits to authors, if applicable, should appear in this section.
387 Authors should generally be noted by both name and an e-mail address.
388 .
389 .It Em CAVEATS
390 Explanations of common misuses and misunderstandings should be explained
391 in this section.
392 .
393 .It Em BUGS
394 Extant bugs should be described in this section.
395 .
396 .It Em SECURITY CONSIDERATIONS
397 Documents any security precautions that operators should consider.
398 .
399 .El
400 .
401 .
402 .Sh MACRO SYNTAX
403 Macros are one to three three characters in length and begin with a
404 control character ,
405 .Sq \&. ,
406 at the beginning of the line.  The
407 .Sq \(aq
408 macro control character is also accepted.  An arbitrary amount of
409 whitespace (spaces or tabs) may sit between the control character and
410 the macro name.  Thus, the following are equivalent:
411 .Bd -literal -offset indent
412 \&.PP
413 \&.\ \ \ PP
414 .Ed
415 .
416 .Pp
417 The
418 .Nm
419 macros are classified by scope: line scope or block scope.  Line
420 macros are only scoped to the current line (and, in some situations,
421 the subsequent line).  Block macros are scoped to the current line and
422 subsequent lines until closed by another block macro.
423 .
424 .
425 .Ss Line Macros
426 Line macros are generally scoped to the current line, with the body
427 consisting of zero or more arguments.  If a macro is scoped to the next
428 line and the line arguments are empty, the next line, which must be
429 text, is used instead.  Thus:
430 .Bd -literal -offset indent
431 \&.I
432 foo
433 .Ed
434 .
435 .Pp
436 is equivalent to
437 .Sq \&.I foo .
438 If next-line macros are invoked consecutively, only the last is used.
439 If a next-line macro is followed by a non-next-line macro, an error is
440 raised (unless in the case of
441 .Sx \&br ,
442 .Sx \&sp ,
443 .Sx \&Sp ,
444 or
445 .Sx \&na ) .
446 .Pp
447 The syntax is as follows:
448 .Bd -literal -offset indent
449 \&.YO \(lBbody...\(rB
450 \(lBbody...\(rB
451 .Ed
452 .
453 .Pp
454 .Bl -column -compact -offset indent "MacroX" "ArgumentsX" "ScopeXXXXX" "CompatX"
455 .It Em Macro Ta Em Arguments Ta Em Scope     Ta Em Notes
456 .It Sx \&B   Ta    n         Ta    next-line Ta    \&
457 .It Sx \&BI  Ta    n         Ta    current   Ta    \&
458 .It Sx \&BR  Ta    n         Ta    current   Ta    \&
459 .It Sx \&DT  Ta    0         Ta    current   Ta    \&
460 .It Sx \&I   Ta    n         Ta    next-line Ta    \&
461 .It Sx \&IB  Ta    n         Ta    current   Ta    \&
462 .It Sx \&IR  Ta    n         Ta    current   Ta    \&
463 .\" .It Sx \&PD  Ta    n         Ta    current   Ta    compat
464 .It Sx \&R   Ta    n         Ta    next-line Ta    \&
465 .It Sx \&RB  Ta    n         Ta    current   Ta    \&
466 .It Sx \&RI  Ta    n         Ta    current   Ta    \&
467 .It Sx \&SB  Ta    n         Ta    next-line Ta    \&
468 .It Sx \&SM  Ta    n         Ta    next-line Ta    \&
469 .It Sx \&TH  Ta    >1, <6    Ta    current   Ta    \&
470 .\" .It Sx \&UC  Ta    n         Ta    current   Ta    compat
471 .It Sx \&br  Ta    0         Ta    current   Ta    compat
472 .It Sx \&fi  Ta    0         Ta    current   Ta    compat
473 .It Sx \&i   Ta    n         Ta    current   Ta    compat
474 .It Sx \&na  Ta    0         Ta    current   Ta    compat
475 .It Sx \&nf  Ta    0         Ta    current   Ta    compat
476 .It Sx \&r   Ta    0         Ta    current   Ta    compat
477 .It Sx \&sp  Ta    1         Ta    current   Ta    compat
478 .\" .It Sx \&Sp  Ta    0         Ta    current   Ta    compat
479 .\" .It Sx \&Vb  Ta    <1        Ta    current   Ta    compat
480 .\" .It Sx \&Ve  Ta    0         Ta    current   Ta    compat
481 .El
482 .
483 .Pp
484 Macros marked as
485 .Qq compat
486 are included for compatibility with the significant corpus of existing
487 manuals that mix dialects of roff.  These macros should not be used for
488 portable
489 .Nm
490 manuals.
491 .
492 .
493 .Ss Block Macros
494 Block macros are comprised of a head and body.  Like for in-line macros,
495 the head is scoped to the current line and, in one circumstance, the
496 next line (the next-line stipulations as in
497 .Sx Line Macros
498 apply here as well).
499 .Pp
500 The syntax is as follows:
501 .Bd -literal -offset indent
502 \&.YO \(lBhead...\(rB
503 \(lBhead...\(rB
504 \(lBbody...\(rB
505 .Ed
506 .
507 .Pp
508 The closure of body scope may be to the section, where a macro is closed
509 by
510 .Sx \&SH ;
511 sub-section, closed by a section or
512 .Sx \&SS ;
513 part, closed by a section, sub-section, or
514 .Sx \&RE ;
515 or paragraph, closed by a section, sub-section, part,
516 .Sx \&HP ,
517 .Sx \&IP ,
518 .Sx \&LP ,
519 .Sx \&P ,
520 .Sx \&PP ,
521 or
522 .Sx \&TP .
523 No closure refers to an explicit block closing macro.
524 .
525 .Pp
526 As a rule, block macros may not be nested; thus, calling a block macro
527 while another block macro scope is open, and the open scope is not
528 implicitly closed, is syntactically incorrect.
529 .
530 .Pp
531 .Bl -column -compact -offset indent "MacroX" "ArgumentsX" "Head ScopeX" "sub-sectionX" "compatX"
532 .It Em Macro Ta Em Arguments Ta Em Head Scope Ta Em Body Scope  Ta Em Notes
533 .It Sx \&HP  Ta    <2        Ta    current    Ta    paragraph   Ta    \&
534 .It Sx \&IP  Ta    <3        Ta    current    Ta    paragraph   Ta    \&
535 .It Sx \&LP  Ta    0         Ta    current    Ta    paragraph   Ta    \&
536 .It Sx \&P   Ta    0         Ta    current    Ta    paragraph   Ta    \&
537 .It Sx \&PP  Ta    0         Ta    current    Ta    paragraph   Ta    \&
538 .It Sx \&RE  Ta    0         Ta    current    Ta    none        Ta    compat
539 .It Sx \&RS  Ta    1         Ta    current    Ta    part        Ta    compat
540 .It Sx \&SH  Ta    >0        Ta    next-line  Ta    section     Ta    \&
541 .It Sx \&SS  Ta    >0        Ta    next-line  Ta    sub-section Ta    \&
542 .It Sx \&TP  Ta    n         Ta    next-line  Ta    paragraph   Ta    \&
543 .El
544 .Pp
545 .
546 Macros marked
547 .Qq compat
548 are as mentioned in
549 .Sx Line Macros .
550 .
551 .Pp
552 If a block macro is next-line scoped, it may only be followed by in-line
553 macros for decorating text.
554 .
555 .
556 .Sh REFERENCE
557 This section is a canonical reference to all macros, arranged
558 alphabetically.  For the scoping of individual macros, see
559 .Sx MACRO SYNTAX .
560 .
561 .
562 .Ss \&B
563 Text is rendered in bold face.
564 .Pp
565 See also
566 .Sx \&I ,
567 .Sx \&R ,
568 .Sx \&b ,
569 .Sx \&i ,
570 and
571 .Sx \&r .
572 .
573 .
574 .Ss \&BI
575 Text is rendered alternately in bold face and italic.  Thus,
576 .Sq .BI this word and that
577 causes
578 .Sq this
579 and
580 .Sq and
581 to render in bold face, while
582 .Sq word
583 and
584 .Sq that
585 render in italics.  Whitespace between arguments is omitted in output.
586 .Pp
587 Examples:
588 .Pp
589 .D1 \&.BI bold italic bold italic
590 .Pp
591 The output of this example will be emboldened
592 .Dq bold
593 and italicised
594 .Dq italic ,
595 with spaces stripped between arguments.
596 .Pp
597 See also
598 .Sx \&IB ,
599 .Sx \&BR ,
600 .Sx \&RB ,
601 .Sx \&RI ,
602 and
603 .Sx \&IR .
604 .
605 .
606 .Ss \&BR
607 Text is rendered alternately in bold face and roman (the default font).
608 Whitespace between arguments is omitted in output.
609 .Pp
610 See
611 .Sx \&BI
612 for an equivalent example.
613 .Pp
614 See also
615 .Sx \&BI ,
616 .Sx \&IB ,
617 .Sx \&RB ,
618 .Sx \&RI ,
619 and
620 .Sx \&IR .
621 .
622 .
623 .Ss \&DT
624 Has no effect.  Included for compatibility.
625 .
626 .
627 .Ss \&HP
628 Begin a paragraph whose initial output line is left-justified, but
629 subsequent output lines are indented, with the following syntax:
630 .Bd -filled -offset indent
631 .Pf \. Sx \&HP
632 .Op Cm width
633 .Ed
634 .Pp
635 The
636 .Cm width
637 argument must conform to
638 .Sx Scaling Widths .
639 If specified, it's saved for later paragraph left-margins; if unspecified, the
640 saved or default width is used.
641 .Pp
642 See also
643 .Sx \&IP ,
644 .Sx \&LP ,
645 .Sx \&P ,
646 .Sx \&PP ,
647 and
648 .Sx \&TP .
649 .
650 .
651 .Ss \&I
652 Text is rendered in italics.
653 .Pp
654 See also
655 .Sx \&B ,
656 .Sx \&R ,
657 .Sx \&b ,
658 .Sx \&i ,
659 and
660 .Sx \&r .
661 .
662 .
663 .Ss \&IB
664 Text is rendered alternately in italics and bold face.  Whitespace
665 between arguments is omitted in output.
666 .Pp
667 See
668 .Sx \&BI
669 for an equivalent example.
670 .Pp
671 See also
672 .Sx \&BI ,
673 .Sx \&BR ,
674 .Sx \&RB ,
675 .Sx \&RI ,
676 and
677 .Sx \&IR .
678 .
679 .
680 .Ss \&IP
681 Begin an indented paragraph with the following syntax:
682 .Bd -filled -offset indent
683 .Pf \. Sx \&IP
684 .Op Cm head Op Cm width
685 .Ed
686 .Pp
687 The
688 .Cm width
689 argument defines the width of the left margin and is defined by
690 .Sx Scaling Widths ,
691 It's saved for later paragraph left-margins; if unspecified, the saved or
692 default width is used.
693 .Pp
694 The
695 .Cm head
696 argument is used as a leading term, flushed to the left margin.  This is
697 useful for bulleted paragraphs and so on.
698 .Pp
699 See also
700 .Sx \&HP ,
701 .Sx \&LP ,
702 .Sx \&P ,
703 .Sx \&PP ,
704 and
705 .Sx \&TP .
706 .
707 .
708 .Ss \&IR
709 Text is rendered alternately in italics and roman (the default font).
710 Whitespace between arguments is omitted in output.
711 .Pp
712 See
713 .Sx \&BI
714 for an equivalent example.
715 .Pp
716 See also
717 .Sx \&BI ,
718 .Sx \&IB ,
719 .Sx \&BR ,
720 .Sx \&RB ,
721 and
722 .Sx \&RI .
723 .
724 .
725 .Ss \&LP
726 Begin an undecorated paragraph.  The scope of a paragraph is closed by a
727 subsequent paragraph, sub-section, section, or end of file.  The saved
728 paragraph left-margin width is re-set to the default.
729 .Pp
730 See also
731 .Sx \&HP ,
732 .Sx \&IP ,
733 .Sx \&P ,
734 .Sx \&PP ,
735 and
736 .Sx \&TP .
737 .
738 .
739 .Ss \&P
740 Synonym for
741 .Sx \&LP .
742 .Pp
743 See also
744 .Sx \&HP ,
745 .Sx \&IP ,
746 .Sx \&LP ,
747 .Sx \&PP ,
748 and
749 .Sx \&TP .
750 .
751 .
752 .Ss \&PP
753 Synonym for
754 .Sx \&LP .
755 .Pp
756 See also
757 .Sx \&HP ,
758 .Sx \&IP ,
759 .Sx \&LP ,
760 .Sx \&P ,
761 and
762 .Sx \&TP .
763 .
764 .
765 .Ss \&R
766 Text is rendered in roman (the default font).
767 .Pp
768 See also
769 .Sx \&I ,
770 .Sx \&B ,
771 .Sx \&b ,
772 .Sx \&i ,
773 and
774 .Sx \&r .
775 .
776 .
777 .Ss \&RB
778 Text is rendered alternately in roman (the default font) and bold face.
779 Whitespace between arguments is omitted in output.
780 .Pp
781 See
782 .Sx \&BI
783 for an equivalent example.
784 .Pp
785 See also
786 .Sx \&BI ,
787 .Sx \&IB ,
788 .Sx \&BR ,
789 .Sx \&RI ,
790 and
791 .Sx \&IR .
792 .
793 .
794 .Ss \&RE
795 Explicitly close out the scope of a prior
796 .Sx \&RS .
797 .
798 .
799 .Ss \&RI
800 Text is rendered alternately in roman (the default font) and italics.
801 Whitespace between arguments is omitted in output.
802 .Pp
803 See
804 .Sx \&BI
805 for an equivalent example.
806 .Pp
807 See also
808 .Sx \&BI ,
809 .Sx \&IB ,
810 .Sx \&BR ,
811 .Sx \&RB ,
812 and
813 .Sx \&IR .
814 .
815 .
816 .Ss \&RS
817 Begin a part setting the left margin.  The left margin controls the
818 offset, following an initial indentation, to un-indented text such as
819 that of
820 .Sx \&PP .
821 This has the following syntax:
822 .Bd -filled -offset indent
823 .Pf \. Sx \&Rs
824 .Op Cm width
825 .Ed
826 .Pp
827 The
828 .Cm width
829 argument must conform to
830 .Sx Scaling Widths .
831 If not specified, the saved or default width is used.
832 .
833 .
834 .Ss \&SB
835 Text is rendered in small size (one point smaller than the default font)
836 bold face.
837 .
838 .
839 .Ss \&SH
840 Begin a section.  The scope of a section is only closed by another
841 section or the end of file.  The paragraph left-margin width is re-set
842 to the default.
843 .
844 .
845 .Ss \&SM
846 Text is rendered in small size (one point smaller than the default
847 font).
848 .
849 .
850 .Ss \&SS
851 Begin a sub-section.  The scope of a sub-section is closed by a
852 subsequent sub-section, section, or end of file.  The paragraph
853 left-margin width is re-set to the default.
854 .
855 .
856 .Ss \&TH
857 Sets the title of the manual page with the following syntax:
858 .Bd -filled -offset indent
859 .Pf \. Sx \&TH
860 .Cm title section
861 .Op Cm date Op Cm source Op Cm volume
862 .Ed
863 .Pp
864 At least the upper-case document title
865 .Cm title
866 and numeric manual section
867 .Cm section
868 arguments must be provided.  The
869 .Cm date
870 argument should be formatted as described in
871 .Sx Dates :
872 if it does not conform, the current date is used instead.  The
873 .Cm source
874 string specifies the organisation providing the utility.  The
875 .Cm volume
876 string replaces the default rendered volume, which is dictated by the
877 manual section.
878 .Pp
879 Examples:
880 .Pp
881 .D1 \&.TH CVS 5 "1992-02-12" GNU
882 .
883 .
884 .Ss \&TP
885 Begin a paragraph where the head, if exceeding the indentation width, is
886 followed by a newline; if not, the body follows on the same line after a
887 buffer to the indentation width.  Subsequent output lines are indented.
888 The syntax is as follows:
889 .Bd -filled -offset indent
890 .Pf \. Sx \&TP
891 .Op Cm width
892 .Ed
893 .Pp
894 The
895 .Cm width
896 argument must conform to
897 .Sx Scaling Widths .
898 If specified, it's saved for later paragraph left-margins; if
899 unspecified, the saved or default width is used.
900 .Pp
901 See also
902 .Sx \&HP ,
903 .Sx \&IP ,
904 .Sx \&LP ,
905 .Sx \&P ,
906 and
907 .Sx \&PP .
908 .\" .
909 .\" .
910 .\" .Ss \&PD
911 .\" Has no effect.  Included for compatibility.
912 .\" .
913 .\" .
914 .\" .Ss \&UC
915 .\" Has no effect.  Included for compatibility.
916 .
917 .
918 .Ss \&br
919 Breaks the current line.  Consecutive invocations have no further effect.
920 .Pp
921 See also
922 .Sx \&sp .
923 .
924 .
925 .Ss \&fi
926 End literal mode begun by
927 .Sx \&nf .
928 .
929 .
930 .Ss \&i
931 Italicise arguments.  Synonym for
932 .Sx \&I .
933 .Pp
934 See also
935 .Sx \&B ,
936 .Sx \&I ,
937 .Sx \&R .
938 .Sx \&b ,
939 and
940 .Sx \&r .
941 .
942 .
943 .Ss \&na
944 Don't align to the right margin.
945 .
946 .
947 .Ss \&nf
948 Begin literal mode: all subsequent free-form lines have their end of
949 line boundaries preserved.  May be ended by
950 .Sx \&fi .
951 .
952 .
953 .Ss \&r
954 Fonts and styles (bold face, italics) reset to roman (default font).
955 .Pp
956 See also
957 .Sx \&B ,
958 .Sx \&I ,
959 .Sx \&R ,
960 .Sx \&b ,
961 and
962 .Sx \&i .
963 .
964 .
965 .Ss \&sp
966 Insert vertical spaces into output with the following syntax:
967 .Bd -filled -offset indent
968 .Pf \. Sx \&sp
969 .Op Cm height
970 .Ed
971 .Pp
972 Insert
973 .Cm height
974 spaces, which must conform to
975 .Sx Scaling Widths .
976 If 0, this is equivalent to the
977 .Sx \&br
978 macro.  Defaults to 1, if unspecified.
979 .Pp
980 See also
981 .Sx \&br .
982 .
983 .\" .Ss \&Sp
984 .\" A synonym for
985 .\" .Sx \&sp
986 .\" .Cm 0.5v .
987 .\" .
988 .\" .Ss \&Vb
989 .\" A synonym for
990 .\" .Sx \&nf .
991 .\" Accepts an argument (the height of the formatted space) which is
992 .\" disregarded.
993 .\" .
994 .\" .Ss \&Ve
995 .\" A synonym for
996 .\" .Sx \&fi .
997 .\" .
998 .
999 .Sh COMPATIBILITY
1000 This section documents areas of questionable portability between
1001 implementations of the
1002 .Nm
1003 language.
1004 .
1005 .Pp
1006 .Bl -dash -compact
1007 .It
1008 In quoted literals, GNU troff allowed pair-wise double-quotes to produce
1009 a standalone double-quote in formatted output.  It is not known whether
1010 this behaviour is exhibited by other formatters.
1011 .
1012 .It
1013 Blocks of whitespace are stripped from macro and free-form text lines
1014 (except when in literal mode) in mandoc.  This is not the case for GNU
1015 troff: for maximum portability, whitespace sensitive blocks should be
1016 enclosed in literal contexts.
1017 .
1018 .It
1019 The
1020 .Sx \&sp
1021 macro does not accept negative values in mandoc.  In GNU troff, this
1022 would result in strange behaviour.
1023 .
1024 .It
1025 The
1026 .Sq \(aq
1027 macro control character, in GNU troff (and prior troffs) suppresses a
1028 newline before macro output; in mandoc, it is an alias for the standard
1029 .Sq \&.
1030 control character.
1031 .El
1032 .
1033 .
1034 .Sh SEE ALSO
1035 .Xr mandoc 1 ,
1036 .Xr mandoc_char 7
1037 .
1038 .
1039 .Sh AUTHORS
1040 The
1041 .Nm
1042 reference was written by
1043 .An Kristaps Dzonsons Aq kristaps@kth.se .
1044 .
1045 .
1046 .Sh CAVEATS
1047 Do not use this language.  Use
1048 .Xr mdoc 7 ,
1049 instead.
1050 .