]> git.cameronkatri.com Git - mandoc.git/blob - man.7
Fixed bug in -Thtml -mdoc where `Lb' would line-break in LIBRARY section.
[mandoc.git] / man.7
1 .\" $Id: man.7,v 1.69 2010/05/12 17:08:03 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 12 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, or question
220 mark.
221 .Sh MANUAL STRUCTURE
222 Each
223 .Nm
224 document must contain contains at least the
225 .Sx \&TH
226 macro describing the document's section and title.
227 It may occur anywhere in the document, although conventionally, it
228 appears as the first macro.
229 .Pp
230 Beyond
231 .Sx \&TH ,
232 at least one macro or text node must appear in the document.
233 Documents are generally structured as follows:
234 .Bd -literal -offset indent
235 \&.TH FOO 1 2009-10-10
236 \&.
237 \&.SH NAME
238 \efBfoo\efR \e(en a description goes here
239 \&.\e\*q The next is for sections 2 & 3 only.
240 \&.\e\*q .SH LIBRARY
241 \&.
242 \&.SH SYNOPSIS
243 \efBfoo\efR [\efB\e-options\efR] arguments...
244 \&.
245 \&.SH DESCRIPTION
246 The \efBfoo\efR utility processes files...
247 \&.
248 \&.\e\*q .SH IMPLEMENTATION NOTES
249 \&.\e\*q The next is for sections 2, 3, & 9 only.
250 \&.\e\*q .SH RETURN VALUES
251 \&.\e\*q The next is for sections 1, 6, 7, & 8 only.
252 \&.\e\*q .SH ENVIRONMENT
253 \&.\e\*q .SH FILES
254 \&.\e\*q The next is for sections 1 & 8 only.
255 \&.\e\*q .SH EXIT STATUS
256 \&.\e\*q .SH EXAMPLES
257 \&.\e\*q The next is for sections 1, 4, 6, 7, & 8 only.
258 \&.\e\*q .SH DIAGNOSTICS
259 \&.\e\*q The next is for sections 2, 3, & 9 only.
260 \&.\e\*q .SH ERRORS
261 \&.\e\*q .SH SEE ALSO
262 \&.\e\*q .BR foo ( 1 )
263 \&.\e\*q .SH STANDARDS
264 \&.\e\*q .SH HISTORY
265 \&.\e\*q .SH AUTHORS
266 \&.\e\*q .SH CAVEATS
267 \&.\e\*q .SH BUGS
268 \&.\e\*q .SH SECURITY CONSIDERATIONS
269 .Ed
270 .Pp
271 The sections in a
272 .Nm
273 document are conventionally ordered as they appear above.
274 Sections should be composed as follows:
275 .Bl -ohang -offset indent
276 .It Em NAME
277 The name(s) and a short description of the documented material.
278 The syntax for this is generally as follows:
279 .Pp
280 .D1 \efBname\efR \e(en description
281 .It Em LIBRARY
282 The name of the library containing the documented material, which is
283 assumed to be a function in a section 2 or 3 manual.
284 For functions in the C library, this may be as follows:
285 .Pp
286 .D1 Standard C Library (libc, -lc)
287 .It Em SYNOPSIS
288 Documents the utility invocation syntax, function call syntax, or device
289 configuration.
290 .Pp
291 For the first, utilities (sections 1, 6, and 8), this is
292 generally structured as follows:
293 .Pp
294 .D1 \efBname\efR [-\efBab\efR] [-\efBc\efR\efIarg\efR] \efBpath\efR...
295 .Pp
296 For the second, function calls (sections 2, 3, 9):
297 .Pp
298 .D1 \&.B char *name(char *\efIarg\efR);
299 .Pp
300 And for the third, configurations (section 4):
301 .Pp
302 .D1 \&.B name* at cardbus ? function ?
303 .Pp
304 Manuals not in these sections generally don't need a
305 .Em SYNOPSIS .
306 .It Em DESCRIPTION
307 This expands upon the brief, one-line description in
308 .Em NAME .
309 It usually contains a break-down of the options (if documenting a
310 command).
311 .It Em IMPLEMENTATION NOTES
312 Implementation-specific notes should be kept here.
313 This is useful when implementing standard functions that may have side
314 effects or notable algorithmic implications.
315 .It Em RETURN VALUES
316 This section is the dual of
317 .Em EXIT STATUS ,
318 which is used for commands.
319 It documents the return values of functions in sections 2, 3, and 9.
320 .It Em ENVIRONMENT
321 Documents any usages of environment variables, e.g.,
322 .Xr environ 7 .
323 .It Em FILES
324 Documents files used.
325 It's helpful to document both the file and a short description of how
326 the file is used (created, modified, etc.).
327 .It Em EXIT STATUS
328 Command exit status for section 1, 6, and 8 manuals.
329 This section is the dual of
330 .Em RETURN VALUES ,
331 which is used for functions.
332 Historically, this information was described in
333 .Em DIAGNOSTICS ,
334 a practise that is now discouraged.
335 .It Em EXAMPLES
336 Example usages.
337 This often contains snippets of well-formed,
338 well-tested invocations.
339 Make doubly sure that your examples work properly!
340 .It Em DIAGNOSTICS
341 Documents error conditions.
342 This is most useful in section 4 manuals.
343 Historically, this section was used in place of
344 .Em EXIT STATUS
345 for manuals in sections 1, 6, and 8; however, this practise is
346 discouraged.
347 .It Em ERRORS
348 Documents error handling in sections 2, 3, and 9.
349 .It Em SEE ALSO
350 References other manuals with related topics.
351 This section should exist for most manuals.
352 .Pp
353 .D1 \&.BR bar \&( 1 \&),
354 .Pp
355 Cross-references should conventionally be ordered
356 first by section, then alphabetically.
357 .It Em STANDARDS
358 References any standards implemented or used, such as
359 .Pp
360 .D1 IEEE Std 1003.2 (\e(lqPOSIX.2\e(rq)
361 .Pp
362 If not adhering to any standards, the
363 .Em HISTORY
364 section should be used.
365 .It Em HISTORY
366 The history of any manual without a
367 .Em STANDARDS
368 section should be described in this section.
369 .It Em AUTHORS
370 Credits to authors, if applicable, should appear in this section.
371 Authors should generally be noted by both name and an e-mail address.
372 .It Em CAVEATS
373 Explanations of common misuses and misunderstandings should be explained
374 in this section.
375 .It Em BUGS
376 Extant bugs should be described in this section.
377 .It Em SECURITY CONSIDERATIONS
378 Documents any security precautions that operators should consider.
379 .El
380 .Sh MACRO SYNTAX
381 Macros are one to three three characters in length and begin with a
382 control character ,
383 .Sq \&. ,
384 at the beginning of the line.
385 The
386 .Sq \(aq
387 macro control character is also accepted.
388 An arbitrary amount of whitespace (spaces or tabs) may sit between the
389 control character and the macro name.
390 Thus, the following are equivalent:
391 .Bd -literal -offset indent
392 \&.PP
393 \&.\ \ \ PP
394 .Ed
395 .Pp
396 The
397 .Nm
398 macros are classified by scope: line scope or block scope.
399 Line macros are only scoped to the current line (and, in some
400 situations, the subsequent line).
401 Block macros are scoped to the current line and subsequent lines until
402 closed by another block macro.
403 .Ss Line Macros
404 Line macros are generally scoped to the current line, with the body
405 consisting of zero or more arguments.
406 If a macro is scoped to the next line and the line arguments are empty,
407 the next line, which must be text, is used instead.
408 Thus:
409 .Bd -literal -offset indent
410 \&.I
411 foo
412 .Ed
413 .Pp
414 is equivalent to
415 .Sq \&.I foo .
416 If next-line macros are invoked consecutively, only the last is used.
417 If a next-line macro is followed by a non-next-line macro, an error is
418 raised (unless in the case of
419 .Sx \&br ,
420 .Sx \&sp ,
421 or
422 .Sx \&na ) .
423 .Pp
424 The syntax is as follows:
425 .Bd -literal -offset indent
426 \&.YO \(lBbody...\(rB
427 \(lBbody...\(rB
428 .Ed
429 .Pp
430 .Bl -column -compact -offset indent "MacroX" "ArgumentsX" "ScopeXXXXX" "CompatX"
431 .It Em Macro Ta Em Arguments Ta Em Scope Ta Em Notes
432 .It Sx \&B Ta n Ta next-line Ta \&
433 .It Sx \&BI Ta n Ta current Ta \&
434 .It Sx \&BR Ta n Ta current Ta \&
435 .It Sx \&DT Ta 0 Ta current Ta \&
436 .It Sx \&I Ta n Ta next-line Ta \&
437 .It Sx \&IB Ta n Ta current Ta \&
438 .It Sx \&IR Ta n Ta current Ta \&
439 .\" .It Sx \&PD Ta n Ta current Ta compat
440 .It Sx \&R Ta n Ta next-line Ta \&
441 .It Sx \&RB Ta n Ta current Ta \&
442 .It Sx \&RI Ta n Ta current Ta \&
443 .It Sx \&SB Ta n Ta next-line Ta \&
444 .It Sx \&SM Ta n Ta next-line Ta \&
445 .It Sx \&TH Ta >1, <6 Ta current Ta \&
446 .\" .It Sx \&UC Ta n Ta current Ta compat
447 .It Sx \&br Ta 0 Ta current Ta compat
448 .It Sx \&fi Ta 0 Ta current Ta compat
449 .It Sx \&i Ta n Ta current Ta compat
450 .It Sx \&na Ta 0 Ta current Ta compat
451 .It Sx \&nf Ta 0 Ta current Ta compat
452 .It Sx \&r Ta 0 Ta current Ta compat
453 .It Sx \&sp Ta 1 Ta current Ta compat
454 .\" .It Sx \&Sp Ta 0 Ta current Ta compat
455 .\" .It Sx \&Vb Ta <1 Ta current Ta compat
456 .\" .It Sx \&Ve Ta 0 Ta current Ta compat
457 .El
458 .Pp
459 Macros marked as
460 .Qq compat
461 are included for compatibility with the significant corpus of existing
462 manuals that mix dialects of roff.
463 These macros should not be used for portable
464 .Nm
465 manuals.
466 .Ss Block Macros
467 Block macros are comprised of a head and body.
468 Like for in-line macros, the head is scoped to the current line and, in
469 one circumstance, the next line (the next-line stipulations as in
470 .Sx Line Macros
471 apply here as well).
472 .Pp
473 The syntax is as follows:
474 .Bd -literal -offset indent
475 \&.YO \(lBhead...\(rB
476 \(lBhead...\(rB
477 \(lBbody...\(rB
478 .Ed
479 .Pp
480 The closure of body scope may be to the section, where a macro is closed
481 by
482 .Sx \&SH ;
483 sub-section, closed by a section or
484 .Sx \&SS ;
485 part, closed by a section, sub-section, or
486 .Sx \&RE ;
487 or paragraph, closed by a section, sub-section, part,
488 .Sx \&HP ,
489 .Sx \&IP ,
490 .Sx \&LP ,
491 .Sx \&P ,
492 .Sx \&PP ,
493 or
494 .Sx \&TP .
495 No closure refers to an explicit block closing macro.
496 .Pp
497 As a rule, block macros may not be nested; thus, calling a block macro
498 while another block macro scope is open, and the open scope is not
499 implicitly closed, is syntactically incorrect.
500 .Pp
501 .Bl -column -compact -offset indent "MacroX" "ArgumentsX" "Head ScopeX" "sub-sectionX" "compatX"
502 .It Em Macro Ta Em Arguments Ta Em Head Scope Ta Em Body Scope Ta Em Notes
503 .It Sx \&HP Ta <2 Ta current Ta paragraph Ta \&
504 .It Sx \&IP Ta <3 Ta current Ta paragraph Ta \&
505 .It Sx \&LP Ta 0 Ta current Ta paragraph Ta \&
506 .It Sx \&P Ta 0 Ta current Ta paragraph Ta \&
507 .It Sx \&PP Ta 0 Ta current Ta paragraph Ta \&
508 .It Sx \&RE Ta 0 Ta current Ta none Ta compat
509 .It Sx \&RS Ta 1 Ta current Ta part Ta compat
510 .It Sx \&SH Ta >0 Ta next-line Ta section Ta \&
511 .It Sx \&SS Ta >0 Ta next-line Ta sub-section Ta \&
512 .It Sx \&TP Ta n Ta next-line Ta paragraph Ta \&
513 .El
514 .Pp
515 Macros marked
516 .Qq compat
517 are as mentioned in
518 .Sx Line Macros .
519 .Pp
520 If a block macro is next-line scoped, it may only be followed by in-line
521 macros for decorating text.
522 .Sh REFERENCE
523 This section is a canonical reference to all macros, arranged
524 alphabetically.
525 For the scoping of individual macros, see
526 .Sx MACRO SYNTAX .
527 .Ss \&B
528 Text is rendered in bold face.
529 .Pp
530 See also
531 .Sx \&I ,
532 .Sx \&R ,
533 .Sx \&b ,
534 .Sx \&i ,
535 and
536 .Sx \&r .
537 .Ss \&BI
538 Text is rendered alternately in bold face and italic.
539 Thus,
540 .Sq .BI this word and that
541 causes
542 .Sq this
543 and
544 .Sq and
545 to render in bold face, while
546 .Sq word
547 and
548 .Sq that
549 render in italics.
550 Whitespace between arguments is omitted in output.
551 .Pp
552 Examples:
553 .Pp
554 .D1 \&.BI bold italic bold italic
555 .Pp
556 The output of this example will be emboldened
557 .Dq bold
558 and italicised
559 .Dq italic ,
560 with spaces stripped between arguments.
561 .Pp
562 See also
563 .Sx \&IB ,
564 .Sx \&BR ,
565 .Sx \&RB ,
566 .Sx \&RI ,
567 and
568 .Sx \&IR .
569 .Ss \&BR
570 Text is rendered alternately in bold face and roman (the default font).
571 Whitespace between arguments is omitted in output.
572 .Pp
573 See
574 .Sx \&BI
575 for an equivalent example.
576 .Pp
577 See also
578 .Sx \&BI ,
579 .Sx \&IB ,
580 .Sx \&RB ,
581 .Sx \&RI ,
582 and
583 .Sx \&IR .
584 .Ss \&DT
585 Has no effect.
586 Included for compatibility.
587 .Ss \&HP
588 Begin a paragraph whose initial output line is left-justified, but
589 subsequent output lines are indented, with the following syntax:
590 .Bd -filled -offset indent
591 .Pf \. Sx \&HP
592 .Op Cm width
593 .Ed
594 .Pp
595 The
596 .Cm width
597 argument must conform to
598 .Sx Scaling Widths .
599 If specified, it's saved for later paragraph left-margins; if unspecified, the
600 saved or default width is used.
601 .Pp
602 See also
603 .Sx \&IP ,
604 .Sx \&LP ,
605 .Sx \&P ,
606 .Sx \&PP ,
607 and
608 .Sx \&TP .
609 .Ss \&I
610 Text is rendered in italics.
611 .Pp
612 See also
613 .Sx \&B ,
614 .Sx \&R ,
615 .Sx \&b ,
616 .Sx \&i ,
617 and
618 .Sx \&r .
619 .Ss \&IB
620 Text is rendered alternately in italics and bold face. Whitespace
621 between arguments is omitted in output.
622 .Pp
623 See
624 .Sx \&BI
625 for an equivalent example.
626 .Pp
627 See also
628 .Sx \&BI ,
629 .Sx \&BR ,
630 .Sx \&RB ,
631 .Sx \&RI ,
632 and
633 .Sx \&IR .
634 .Ss \&IP
635 Begin an indented paragraph with the following syntax:
636 .Bd -filled -offset indent
637 .Pf \. Sx \&IP
638 .Op Cm head Op Cm width
639 .Ed
640 .Pp
641 The
642 .Cm width
643 argument defines the width of the left margin and is defined by
644 .Sx Scaling Widths ,
645 It's saved for later paragraph left-margins; if unspecified, the saved or
646 default width is used.
647 .Pp
648 The
649 .Cm head
650 argument is used as a leading term, flushed to the left margin.
651 This is useful for bulleted paragraphs and so on.
652 .Pp
653 See also
654 .Sx \&HP ,
655 .Sx \&LP ,
656 .Sx \&P ,
657 .Sx \&PP ,
658 and
659 .Sx \&TP .
660 .Ss \&IR
661 Text is rendered alternately in italics and roman (the default font).
662 Whitespace between arguments is omitted in output.
663 .Pp
664 See
665 .Sx \&BI
666 for an equivalent example.
667 .Pp
668 See also
669 .Sx \&BI ,
670 .Sx \&IB ,
671 .Sx \&BR ,
672 .Sx \&RB ,
673 and
674 .Sx \&RI .
675 .Ss \&LP
676 Begin an undecorated paragraph.
677 The scope of a paragraph is closed by a subsequent paragraph,
678 sub-section, section, or end of file.
679 The saved paragraph left-margin width is re-set to the default.
680 .Pp
681 See also
682 .Sx \&HP ,
683 .Sx \&IP ,
684 .Sx \&P ,
685 .Sx \&PP ,
686 and
687 .Sx \&TP .
688 .Ss \&P
689 Synonym for
690 .Sx \&LP .
691 .Pp
692 See also
693 .Sx \&HP ,
694 .Sx \&IP ,
695 .Sx \&LP ,
696 .Sx \&PP ,
697 and
698 .Sx \&TP .
699 .Ss \&PP
700 Synonym for
701 .Sx \&LP .
702 .Pp
703 See also
704 .Sx \&HP ,
705 .Sx \&IP ,
706 .Sx \&LP ,
707 .Sx \&P ,
708 and
709 .Sx \&TP .
710 .Ss \&R
711 Text is rendered in roman (the default font).
712 .Pp
713 See also
714 .Sx \&I ,
715 .Sx \&B ,
716 .Sx \&b ,
717 .Sx \&i ,
718 and
719 .Sx \&r .
720 .Ss \&RB
721 Text is rendered alternately in roman (the default font) and bold face.
722 Whitespace between arguments is omitted in output.
723 .Pp
724 See
725 .Sx \&BI
726 for an equivalent example.
727 .Pp
728 See also
729 .Sx \&BI ,
730 .Sx \&IB ,
731 .Sx \&BR ,
732 .Sx \&RI ,
733 and
734 .Sx \&IR .
735 .Ss \&RE
736 Explicitly close out the scope of a prior
737 .Sx \&RS .
738 .Ss \&RI
739 Text is rendered alternately in roman (the default font) and italics.
740 Whitespace between arguments is omitted in output.
741 .Pp
742 See
743 .Sx \&BI
744 for an equivalent example.
745 .Pp
746 See also
747 .Sx \&BI ,
748 .Sx \&IB ,
749 .Sx \&BR ,
750 .Sx \&RB ,
751 and
752 .Sx \&IR .
753 .Ss \&RS
754 Begin a part setting the left margin.
755 The left margin controls the offset, following an initial indentation,
756 to un-indented text such as that of
757 .Sx \&PP .
758 This has the following syntax:
759 .Bd -filled -offset indent
760 .Pf \. Sx \&Rs
761 .Op Cm width
762 .Ed
763 .Pp
764 The
765 .Cm width
766 argument must conform to
767 .Sx Scaling Widths .
768 If not specified, the saved or default width is used.
769 .Ss \&SB
770 Text is rendered in small size (one point smaller than the default font)
771 bold face.
772 .Ss \&SH
773 Begin a section.
774 The scope of a section is only closed by another section or the end of
775 file.
776 The paragraph left-margin width is re-set to the default.
777 .Ss \&SM
778 Text is rendered in small size (one point smaller than the default
779 font).
780 .Ss \&SS
781 Begin a sub-section.
782 The scope of a sub-section is closed by a subsequent sub-section,
783 section, or end of file.
784 The paragraph left-margin width is re-set to the default.
785 .Ss \&TH
786 Sets the title of the manual page with the following syntax:
787 .Bd -filled -offset indent
788 .Pf \. Sx \&TH
789 .Cm title section
790 .Op Cm date Op Cm source Op Cm volume
791 .Ed
792 .Pp
793 At least the upper-case document title
794 .Cm title
795 and numeric manual section
796 .Cm section
797 arguments must be provided.
798 The
799 .Cm date
800 argument should be formatted as described in
801 .Sx Dates :
802 if it does not conform, the current date is used instead.
803 The
804 .Cm source
805 string specifies the organisation providing the utility.
806 The
807 .Cm volume
808 string replaces the default rendered volume, which is dictated by the
809 manual section.
810 .Pp
811 Examples:
812 .Pp
813 .D1 \&.TH CVS 5 "1992-02-12" GNU
814 .Ss \&TP
815 Begin a paragraph where the head, if exceeding the indentation width, is
816 followed by a newline; if not, the body follows on the same line after a
817 buffer to the indentation width.
818 Subsequent output lines are indented.
819 The syntax is as follows:
820 .Bd -filled -offset indent
821 .Pf \. Sx \&TP
822 .Op Cm width
823 .Ed
824 .Pp
825 The
826 .Cm width
827 argument must conform to
828 .Sx Scaling Widths .
829 If specified, it's saved for later paragraph left-margins; if
830 unspecified, the saved or default width is used.
831 .Pp
832 See also
833 .Sx \&HP ,
834 .Sx \&IP ,
835 .Sx \&LP ,
836 .Sx \&P ,
837 and
838 .Sx \&PP .
839 .\" .
840 .\" .
841 .\" .Ss \&PD
842 .\" Has no effect. Included for compatibility.
843 .\" .
844 .\" .
845 .\" .Ss \&UC
846 .\" Has no effect. Included for compatibility.
847 .Ss \&br
848 Breaks the current line.
849 Consecutive invocations have no further effect.
850 .Pp
851 See also
852 .Sx \&sp .
853 .Ss \&fi
854 End literal mode begun by
855 .Sx \&nf .
856 .Ss \&i
857 Italicise arguments.
858 Synonym for
859 .Sx \&I .
860 .Pp
861 See also
862 .Sx \&B ,
863 .Sx \&I ,
864 .Sx \&R .
865 .Sx \&b ,
866 and
867 .Sx \&r .
868 .Ss \&na
869 Don't align to the right margin.
870 .Ss \&nf
871 Begin literal mode: all subsequent free-form lines have their end of
872 line boundaries preserved.
873 May be ended by
874 .Sx \&fi .
875 .Ss \&r
876 Fonts and styles (bold face, italics) reset to roman (default font).
877 .Pp
878 See also
879 .Sx \&B ,
880 .Sx \&I ,
881 .Sx \&R ,
882 .Sx \&b ,
883 and
884 .Sx \&i .
885 .Ss \&sp
886 Insert vertical spaces into output with the following syntax:
887 .Bd -filled -offset indent
888 .Pf \. Sx \&sp
889 .Op Cm height
890 .Ed
891 .Pp
892 Insert
893 .Cm height
894 spaces, which must conform to
895 .Sx Scaling Widths .
896 If 0, this is equivalent to the
897 .Sx \&br
898 macro.
899 Defaults to 1, if unspecified.
900 .Pp
901 See also
902 .Sx \&br .
903 .\" .Ss \&Sp
904 .\" A synonym for
905 .\" .Sx \&sp
906 .\" .Cm 0.5v .
907 .\" .
908 .\" .Ss \&Vb
909 .\" A synonym for
910 .\" .Sx \&nf .
911 .\" Accepts an argument (the height of the formatted space) which is
912 .\" disregarded.
913 .\" .
914 .\" .Ss \&Ve
915 .\" A synonym for
916 .\" .Sx \&fi .
917 .\" .
918 .Sh COMPATIBILITY
919 This section documents areas of questionable portability between
920 implementations of the
921 .Nm
922 language.
923 .Pp
924 .Bl -dash -compact
925 .It
926 In quoted literals, GNU troff allowed pair-wise double-quotes to produce
927 a standalone double-quote in formatted output.
928 It is not known whether this behaviour is exhibited by other formatters.
929 .It
930 The
931 .Sx \&sp
932 macro does not accept negative values in mandoc.
933 In GNU troff, this would result in strange behaviour.
934 .It
935 The
936 .Sq \(aq
937 macro control character, in GNU troff (and prior troffs) suppresses a
938 newline before macro output; in mandoc, it is an alias for the standard
939 .Sq \&.
940 control character.
941 .El
942 .Sh SEE ALSO
943 .Xr mandoc 1 ,
944 .Xr mandoc_char 7
945 .Sh AUTHORS
946 The
947 .Nm
948 reference was written by
949 .An Kristaps Dzonsons Aq kristaps@bsd.lv .
950 .Sh CAVEATS
951 Do not use this language.
952 Use
953 .Xr mdoc 7 ,
954 instead.