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