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