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