Annotation of mandoc/man.7, Revision 1.69
1.69 ! kristaps 1: .\" $Id: man.7,v 1.68 2010/05/12 16:52:33 kristaps Exp $
1.1 kristaps 2: .\"
1.62 kristaps 3: .\" Copyright (c) 2009 Kristaps Dzonsons <kristaps@bsd.lv>
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: .\"
1.68 kristaps 17: .Dd $Mdocdate: May 12 2010 $
1.9 kristaps 18: .Dt MAN 7
1.1 kristaps 19: .Os
20: .Sh NAME
1.32 kristaps 21: .Nm man
22: .Nd man language reference
1.1 kristaps 23: .Sh DESCRIPTION
24: The
1.32 kristaps 25: .Nm man
1.20 kristaps 26: language was historically used to format
1.32 kristaps 27: .Ux
1.68 kristaps 28: manuals.
29: This reference document describes its syntax, structure, and usage.
1.32 kristaps 30: .Pp
31: .Bf -emphasis
1.20 kristaps 32: Do not use
1.32 kristaps 33: .Nm
1.20 kristaps 34: to write your manuals.
1.32 kristaps 35: .Ef
1.19 kristaps 36: Use the
1.32 kristaps 37: .Xr mdoc 7
1.1 kristaps 38: language, instead.
1.32 kristaps 39: .Pp
1.1 kristaps 40: An
1.32 kristaps 41: .Nm
1.1 kristaps 42: document follows simple rules: lines beginning with the control
1.20 kristaps 43: character
1.32 kristaps 44: .Sq \&.
1.68 kristaps 45: are parsed for macros.
46: Other lines are interpreted within the scope of
1.1 kristaps 47: prior macros:
1.32 kristaps 48: .Bd -literal -offset indent
1.1 kristaps 49: \&.SH Macro lines change control state.
50: Other lines are interpreted within the current state.
1.32 kristaps 51: .Ed
1.1 kristaps 52: .Sh INPUT ENCODING
1.32 kristaps 53: .Nm
1.14 kristaps 54: documents may contain only graphable 7-bit ASCII characters, the
1.68 kristaps 55: space character, and the tabs character.
56: All manuals must have
1.32 kristaps 57: .Ux
1.20 kristaps 58: line termination.
1.32 kristaps 59: .Pp
1.5 kristaps 60: Blank lines are acceptable; where found, the output will assert a
1.1 kristaps 61: vertical space.
1.32 kristaps 62: .Ss Comments
1.21 kristaps 63: Text following a
1.32 kristaps 64: .Sq \e\*" ,
1.21 kristaps 65: whether in a macro or free-form text line, is ignored to the end of
1.68 kristaps 66: line.
67: A macro line with only a control character and comment escape,
1.32 kristaps 68: .Sq \&.\e" ,
1.68 kristaps 69: is also ignored.
70: Macro lines with only a control character and optionally whitespace are
71: stripped from input.
1.32 kristaps 72: .Ss Special Characters
1.21 kristaps 73: Special characters may occur in both macro and free-form lines.
74: Sequences begin with the escape character
1.32 kristaps 75: .Sq \e
1.20 kristaps 76: followed by either an open-parenthesis
1.32 kristaps 77: .Sq \&(
1.1 kristaps 78: for two-character sequences; an open-bracket
1.32 kristaps 79: .Sq \&[
1.1 kristaps 80: for n-character sequences (terminated at a close-bracket
1.32 kristaps 81: .Sq \&] ) ;
1.68 kristaps 82: or a single one-character sequence.
83: See
1.32 kristaps 84: .Xr mandoc_char 7
1.68 kristaps 85: for a complete list.
86: Examples include
1.32 kristaps 87: .Sq \e(em
88: .Pq em-dash
1.21 kristaps 89: and
1.32 kristaps 90: .Sq \ee
91: .Pq back-slash .
92: .Ss Text Decoration
1.21 kristaps 93: Terms may be text-decorated using the
1.32 kristaps 94: .Sq \ef
1.47 kristaps 95: escape followed by an indicator: B (bold), I, (italic), R (Roman), or P
1.55 kristaps 96: (revert to previous mode):
1.48 kristaps 97: .Pp
98: .D1 \efBbold\efR \efIitalic\efP
99: .Pp
100: A numerical representation 3, 2, or 1 (bold, italic, and Roman,
1.68 kristaps 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.
1.54 kristaps 105: Note that macros like
106: .Sx \&BR
107: open and close a font scope with each argument.
1.48 kristaps 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'
1.49 kristaps 129: .Pp
130: Both
131: .Sq \es
132: and
133: .Sq \ef
1.53 kristaps 134: attributes are forgotten when entering or exiting a macro block.
1.32 kristaps 135: .Ss Whitespace
1.66 kristaps 136: Whitespace consists of the space character.
1.64 kristaps 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
1.68 kristaps 142: In macro lines, whitespace delimits arguments and is discarded.
143: If arguments are quoted, whitespace within the quotes is retained.
1.43 kristaps 144: .Ss Dates
145: The
146: .Sx \&TH
147: macro is the only
148: .Nm
1.68 kristaps 149: macro that requires a date.
150: The form for this date is the ISO-8601
1.43 kristaps 151: standard
152: .Cm YYYY-MM-DD .
1.38 kristaps 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.
1.68 kristaps 163: Negative numbers, while accepted, are truncated to zero.
164: The following scaling units are accepted:
1.38 kristaps 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
1.44 kristaps 202: is necessarily non-portable across output media.
1.38 kristaps 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.
1.69 ! kristaps 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.
1.22 kristaps 221: .Sh MANUAL STRUCTURE
1.16 kristaps 222: Each
1.32 kristaps 223: .Nm
1.16 kristaps 224: document must contain contains at least the
1.39 kristaps 225: .Sx \&TH
1.68 kristaps 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.
1.32 kristaps 229: .Pp
1.22 kristaps 230: Beyond
1.39 kristaps 231: .Sx \&TH ,
1.68 kristaps 232: at least one macro or text node must appear in the document.
233: Documents are generally structured as follows:
1.32 kristaps 234: .Bd -literal -offset indent
1.43 kristaps 235: \&.TH FOO 1 2009-10-10
1.22 kristaps 236: \&.
237: \&.SH NAME
1.29 kristaps 238: \efBfoo\efR \e(en a description goes here
1.33 kristaps 239: \&.\e\*q The next is for sections 2 & 3 only.
240: \&.\e\*q .SH LIBRARY
1.22 kristaps 241: \&.
242: \&.SH SYNOPSIS
243: \efBfoo\efR [\efB\e-options\efR] arguments...
244: \&.
245: \&.SH DESCRIPTION
1.33 kristaps 246: The \efBfoo\efR utility processes files...
1.22 kristaps 247: \&.
1.33 kristaps 248: \&.\e\*q .SH IMPLEMENTATION NOTES
249: \&.\e\*q The next is for sections 2, 3, & 9 only.
1.22 kristaps 250: \&.\e\*q .SH RETURN VALUES
1.33 kristaps 251: \&.\e\*q The next is for sections 1, 6, 7, & 8 only.
1.22 kristaps 252: \&.\e\*q .SH ENVIRONMENT
253: \&.\e\*q .SH FILES
1.67 kristaps 254: \&.\e\*q The next is for sections 1 & 8 only.
255: \&.\e\*q .SH EXIT STATUS
1.22 kristaps 256: \&.\e\*q .SH EXAMPLES
1.33 kristaps 257: \&.\e\*q The next is for sections 1, 4, 6, 7, & 8 only.
1.22 kristaps 258: \&.\e\*q .SH DIAGNOSTICS
1.33 kristaps 259: \&.\e\*q The next is for sections 2, 3, & 9 only.
1.22 kristaps 260: \&.\e\*q .SH ERRORS
261: \&.\e\*q .SH SEE ALSO
1.42 kristaps 262: \&.\e\*q .BR foo ( 1 )
1.22 kristaps 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
1.33 kristaps 268: \&.\e\*q .SH SECURITY CONSIDERATIONS
1.32 kristaps 269: .Ed
1.41 kristaps 270: .Pp
271: The sections in a
272: .Nm
1.68 kristaps 273: document are conventionally ordered as they appear above.
274: Sections should be composed as follows:
1.42 kristaps 275: .Bl -ohang -offset indent
276: .It Em NAME
1.68 kristaps 277: The name(s) and a short description of the documented material.
278: The syntax for this is generally as follows:
1.41 kristaps 279: .Pp
280: .D1 \efBname\efR \e(en description
1.42 kristaps 281: .It Em LIBRARY
1.41 kristaps 282: The name of the library containing the documented material, which is
1.68 kristaps 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:
1.41 kristaps 285: .Pp
286: .D1 Standard C Library (libc, -lc)
1.42 kristaps 287: .It Em SYNOPSIS
1.41 kristaps 288: Documents the utility invocation syntax, function call syntax, or device
1.55 kristaps 289: configuration.
1.41 kristaps 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
1.44 kristaps 298: .D1 \&.B char *name(char *\efIarg\efR);
1.41 kristaps 299: .Pp
300: And for the third, configurations (section 4):
301: .Pp
1.44 kristaps 302: .D1 \&.B name* at cardbus ? function ?
1.41 kristaps 303: .Pp
1.55 kristaps 304: Manuals not in these sections generally don't need a
1.42 kristaps 305: .Em SYNOPSIS .
306: .It Em DESCRIPTION
1.55 kristaps 307: This expands upon the brief, one-line description in
1.42 kristaps 308: .Em NAME .
309: It usually contains a break-down of the options (if documenting a
310: command).
311: .It Em IMPLEMENTATION NOTES
1.68 kristaps 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.
1.42 kristaps 315: .It Em RETURN VALUES
316: This section is the dual of
317: .Em EXIT STATUS ,
1.68 kristaps 318: which is used for commands.
319: It documents the return values of functions in sections 2, 3, and 9.
1.42 kristaps 320: .It Em ENVIRONMENT
321: Documents any usages of environment variables, e.g.,
322: .Xr environ 7 .
323: .It Em FILES
1.68 kristaps 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.).
1.67 kristaps 327: .It Em EXIT STATUS
1.68 kristaps 328: Command exit status for section 1, 6, and 8 manuals.
329: This section is the dual of
1.67 kristaps 330: .Em RETURN VALUES ,
1.68 kristaps 331: which is used for functions.
332: Historically, this information was described in
1.67 kristaps 333: .Em DIAGNOSTICS ,
334: a practise that is now discouraged.
1.42 kristaps 335: .It Em EXAMPLES
1.68 kristaps 336: Example usages.
337: This often contains snippets of well-formed,
338: well-tested invocations.
339: Make doubly sure that your examples work properly!
1.42 kristaps 340: .It Em DIAGNOSTICS
1.68 kristaps 341: Documents error conditions.
342: This is most useful in section 4 manuals.
1.42 kristaps 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
1.68 kristaps 350: References other manuals with related topics.
351: This section should exist for most manuals.
1.44 kristaps 352: .Pp
353: .D1 \&.BR bar \&( 1 \&),
354: .Pp
355: Cross-references should conventionally be ordered
1.42 kristaps 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.
1.41 kristaps 379: .El
1.22 kristaps 380: .Sh MACRO SYNTAX
1.2 kristaps 381: Macros are one to three three characters in length and begin with a
1.4 kristaps 382: control character ,
1.32 kristaps 383: .Sq \&. ,
1.68 kristaps 384: at the beginning of the line.
385: The
1.59 kristaps 386: .Sq \(aq
1.68 kristaps 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:
1.39 kristaps 391: .Bd -literal -offset indent
392: \&.PP
393: \&.\ \ \ PP
394: .Ed
1.32 kristaps 395: .Pp
1.1 kristaps 396: The
1.32 kristaps 397: .Nm
1.68 kristaps 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.
1.32 kristaps 403: .Ss Line Macros
1.30 kristaps 404: Line macros are generally scoped to the current line, with the body
1.68 kristaps 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:
1.32 kristaps 409: .Bd -literal -offset indent
1.30 kristaps 410: \&.I
1.4 kristaps 411: foo
1.32 kristaps 412: .Ed
413: .Pp
1.20 kristaps 414: is equivalent to
1.32 kristaps 415: .Sq \&.I foo .
1.56 kristaps 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:
1.32 kristaps 425: .Bd -literal -offset indent
1.22 kristaps 426: \&.YO \(lBbody...\(rB
427: \(lBbody...\(rB
1.32 kristaps 428: .Ed
429: .Pp
1.57 kristaps 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 \&
1.58 kristaps 439: .\" .It Sx \&PD Ta n Ta current Ta compat
1.57 kristaps 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 \&
1.58 kristaps 446: .\" .It Sx \&UC Ta n Ta current Ta compat
1.57 kristaps 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
1.58 kristaps 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
1.32 kristaps 457: .El
458: .Pp
1.57 kristaps 459: Macros marked as
460: .Qq compat
461: are included for compatibility with the significant corpus of existing
1.68 kristaps 462: manuals that mix dialects of roff.
463: These macros should not be used for portable
1.58 kristaps 464: .Nm
465: manuals.
1.32 kristaps 466: .Ss Block Macros
1.68 kristaps 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
1.57 kristaps 470: .Sx Line Macros
471: apply here as well).
1.56 kristaps 472: .Pp
473: The syntax is as follows:
1.32 kristaps 474: .Bd -literal -offset indent
1.22 kristaps 475: \&.YO \(lBhead...\(rB
476: \(lBhead...\(rB
477: \(lBbody...\(rB
1.32 kristaps 478: .Ed
479: .Pp
1.30 kristaps 480: The closure of body scope may be to the section, where a macro is closed
481: by
1.39 kristaps 482: .Sx \&SH ;
1.30 kristaps 483: sub-section, closed by a section or
1.39 kristaps 484: .Sx \&SS ;
1.30 kristaps 485: part, closed by a section, sub-section, or
1.39 kristaps 486: .Sx \&RE ;
1.55 kristaps 487: or paragraph, closed by a section, sub-section, part,
1.39 kristaps 488: .Sx \&HP ,
489: .Sx \&IP ,
490: .Sx \&LP ,
491: .Sx \&P ,
492: .Sx \&PP ,
1.30 kristaps 493: or
1.39 kristaps 494: .Sx \&TP .
1.30 kristaps 495: No closure refers to an explicit block closing macro.
1.32 kristaps 496: .Pp
1.58 kristaps 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
1.57 kristaps 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 \&
1.32 kristaps 513: .El
1.57 kristaps 514: .Pp
515: Macros marked
516: .Qq compat
517: are as mentioned in
518: .Sx Line Macros .
1.32 kristaps 519: .Pp
1.22 kristaps 520: If a block macro is next-line scoped, it may only be followed by in-line
1.57 kristaps 521: macros for decorating text.
1.22 kristaps 522: .Sh REFERENCE
523: This section is a canonical reference to all macros, arranged
1.68 kristaps 524: alphabetically.
525: For the scoping of individual macros, see
1.32 kristaps 526: .Sx MACRO SYNTAX .
1.39 kristaps 527: .Ss \&B
1.22 kristaps 528: Text is rendered in bold face.
1.44 kristaps 529: .Pp
530: See also
531: .Sx \&I ,
532: .Sx \&R ,
533: .Sx \&b ,
534: .Sx \&i ,
535: and
536: .Sx \&r .
1.39 kristaps 537: .Ss \&BI
1.68 kristaps 538: Text is rendered alternately in bold face and italic.
539: Thus,
1.32 kristaps 540: .Sq .BI this word and that
1.22 kristaps 541: causes
1.32 kristaps 542: .Sq this
1.22 kristaps 543: and
1.32 kristaps 544: .Sq and
1.55 kristaps 545: to render in bold face, while
1.32 kristaps 546: .Sq word
1.22 kristaps 547: and
1.32 kristaps 548: .Sq that
1.68 kristaps 549: render in italics.
550: Whitespace between arguments is omitted in output.
1.44 kristaps 551: .Pp
552: Examples:
1.46 kristaps 553: .Pp
554: .D1 \&.BI bold italic bold italic
1.44 kristaps 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 .
1.39 kristaps 569: .Ss \&BR
1.22 kristaps 570: Text is rendered alternately in bold face and roman (the default font).
571: Whitespace between arguments is omitted in output.
1.44 kristaps 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 .
1.39 kristaps 584: .Ss \&DT
1.68 kristaps 585: Has no effect.
586: Included for compatibility.
1.39 kristaps 587: .Ss \&HP
1.23 kristaps 588: Begin a paragraph whose initial output line is left-justified, but
1.27 kristaps 589: subsequent output lines are indented, with the following syntax:
1.44 kristaps 590: .Bd -filled -offset indent
591: .Pf \. Sx \&HP
592: .Op Cm width
1.32 kristaps 593: .Ed
1.44 kristaps 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
1.45 kristaps 603: .Sx \&IP ,
604: .Sx \&LP ,
605: .Sx \&P ,
606: .Sx \&PP ,
1.44 kristaps 607: and
1.45 kristaps 608: .Sx \&TP .
1.39 kristaps 609: .Ss \&I
1.22 kristaps 610: Text is rendered in italics.
1.44 kristaps 611: .Pp
612: See also
613: .Sx \&B ,
614: .Sx \&R ,
615: .Sx \&b ,
616: .Sx \&i ,
617: and
618: .Sx \&r .
1.39 kristaps 619: .Ss \&IB
1.22 kristaps 620: Text is rendered alternately in italics and bold face. Whitespace
621: between arguments is omitted in output.
1.44 kristaps 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 .
1.39 kristaps 634: .Ss \&IP
1.44 kristaps 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
1.32 kristaps 639: .Ed
1.44 kristaps 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
1.68 kristaps 650: argument is used as a leading term, flushed to the left margin.
651: This is useful for bulleted paragraphs and so on.
1.44 kristaps 652: .Pp
653: See also
1.45 kristaps 654: .Sx \&HP ,
655: .Sx \&LP ,
656: .Sx \&P ,
657: .Sx \&PP ,
1.44 kristaps 658: and
1.45 kristaps 659: .Sx \&TP .
1.39 kristaps 660: .Ss \&IR
1.22 kristaps 661: Text is rendered alternately in italics and roman (the default font).
662: Whitespace between arguments is omitted in output.
1.44 kristaps 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 .
1.39 kristaps 675: .Ss \&LP
1.68 kristaps 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.
1.44 kristaps 680: .Pp
681: See also
1.45 kristaps 682: .Sx \&HP ,
683: .Sx \&IP ,
684: .Sx \&P ,
685: .Sx \&PP ,
1.44 kristaps 686: and
1.45 kristaps 687: .Sx \&TP .
1.39 kristaps 688: .Ss \&P
689: Synonym for
690: .Sx \&LP .
1.44 kristaps 691: .Pp
692: See also
1.45 kristaps 693: .Sx \&HP ,
694: .Sx \&IP ,
695: .Sx \&LP ,
696: .Sx \&PP ,
1.44 kristaps 697: and
1.45 kristaps 698: .Sx \&TP .
1.39 kristaps 699: .Ss \&PP
700: Synonym for
701: .Sx \&LP .
1.44 kristaps 702: .Pp
703: See also
1.45 kristaps 704: .Sx \&HP ,
705: .Sx \&IP ,
706: .Sx \&LP ,
707: .Sx \&P ,
1.44 kristaps 708: and
1.45 kristaps 709: .Sx \&TP .
1.39 kristaps 710: .Ss \&R
1.22 kristaps 711: Text is rendered in roman (the default font).
1.44 kristaps 712: .Pp
713: See also
714: .Sx \&I ,
715: .Sx \&B ,
716: .Sx \&b ,
717: .Sx \&i ,
718: and
719: .Sx \&r .
1.39 kristaps 720: .Ss \&RB
1.22 kristaps 721: Text is rendered alternately in roman (the default font) and bold face.
722: Whitespace between arguments is omitted in output.
1.44 kristaps 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 .
1.39 kristaps 735: .Ss \&RE
1.30 kristaps 736: Explicitly close out the scope of a prior
1.39 kristaps 737: .Sx \&RS .
738: .Ss \&RI
1.22 kristaps 739: Text is rendered alternately in roman (the default font) and italics.
740: Whitespace between arguments is omitted in output.
1.44 kristaps 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 .
1.39 kristaps 753: .Ss \&RS
1.68 kristaps 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
1.39 kristaps 757: .Sx \&PP .
1.44 kristaps 758: This has the following syntax:
759: .Bd -filled -offset indent
760: .Pf \. Sx \&Rs
761: .Op Cm width
1.32 kristaps 762: .Ed
1.44 kristaps 763: .Pp
764: The
765: .Cm width
766: argument must conform to
767: .Sx Scaling Widths .
1.55 kristaps 768: If not specified, the saved or default width is used.
1.39 kristaps 769: .Ss \&SB
1.22 kristaps 770: Text is rendered in small size (one point smaller than the default font)
771: bold face.
1.39 kristaps 772: .Ss \&SH
1.68 kristaps 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.
1.39 kristaps 777: .Ss \&SM
1.22 kristaps 778: Text is rendered in small size (one point smaller than the default
779: font).
1.39 kristaps 780: .Ss \&SS
1.68 kristaps 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.
1.39 kristaps 785: .Ss \&TH
1.22 kristaps 786: Sets the title of the manual page with the following syntax:
1.44 kristaps 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
1.43 kristaps 792: .Pp
793: At least the upper-case document title
794: .Cm title
795: and numeric manual section
1.44 kristaps 796: .Cm section
1.68 kristaps 797: arguments must be provided.
798: The
1.43 kristaps 799: .Cm date
800: argument should be formatted as described in
801: .Sx Dates :
1.68 kristaps 802: if it does not conform, the current date is used instead.
803: The
1.44 kristaps 804: .Cm source
1.68 kristaps 805: string specifies the organisation providing the utility.
806: The
1.44 kristaps 807: .Cm volume
1.43 kristaps 808: string replaces the default rendered volume, which is dictated by the
809: manual section.
810: .Pp
811: Examples:
1.46 kristaps 812: .Pp
813: .D1 \&.TH CVS 5 "1992-02-12" GNU
1.39 kristaps 814: .Ss \&TP
1.25 kristaps 815: Begin a paragraph where the head, if exceeding the indentation width, is
1.24 kristaps 816: followed by a newline; if not, the body follows on the same line after a
1.68 kristaps 817: buffer to the indentation width.
818: Subsequent output lines are indented.
1.44 kristaps 819: The syntax is as follows:
820: .Bd -filled -offset indent
821: .Pf \. Sx \&TP
822: .Op Cm width
1.32 kristaps 823: .Ed
824: .Pp
1.44 kristaps 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
1.27 kristaps 830: unspecified, the saved or default width is used.
1.44 kristaps 831: .Pp
832: See also
1.45 kristaps 833: .Sx \&HP ,
834: .Sx \&IP ,
835: .Sx \&LP ,
836: .Sx \&P ,
1.44 kristaps 837: and
1.45 kristaps 838: .Sx \&PP .
1.58 kristaps 839: .\" .
840: .\" .
841: .\" .Ss \&PD
842: .\" Has no effect. Included for compatibility.
843: .\" .
844: .\" .
845: .\" .Ss \&UC
846: .\" Has no effect. Included for compatibility.
1.39 kristaps 847: .Ss \&br
1.68 kristaps 848: Breaks the current line.
849: Consecutive invocations have no further effect.
1.44 kristaps 850: .Pp
851: See also
852: .Sx \&sp .
1.39 kristaps 853: .Ss \&fi
1.22 kristaps 854: End literal mode begun by
1.39 kristaps 855: .Sx \&nf .
856: .Ss \&i
1.68 kristaps 857: Italicise arguments.
858: Synonym for
1.51 kristaps 859: .Sx \&I .
1.44 kristaps 860: .Pp
861: See also
862: .Sx \&B ,
863: .Sx \&I ,
864: .Sx \&R .
865: .Sx \&b ,
866: and
867: .Sx \&r .
1.39 kristaps 868: .Ss \&na
1.36 kristaps 869: Don't align to the right margin.
1.39 kristaps 870: .Ss \&nf
1.22 kristaps 871: Begin literal mode: all subsequent free-form lines have their end of
1.68 kristaps 872: line boundaries preserved.
873: May be ended by
1.39 kristaps 874: .Sx \&fi .
875: .Ss \&r
1.22 kristaps 876: Fonts and styles (bold face, italics) reset to roman (default font).
1.44 kristaps 877: .Pp
878: See also
879: .Sx \&B ,
880: .Sx \&I ,
881: .Sx \&R ,
882: .Sx \&b ,
883: and
884: .Sx \&i .
1.39 kristaps 885: .Ss \&sp
1.44 kristaps 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
1.55 kristaps 892: Insert
1.44 kristaps 893: .Cm height
894: spaces, which must conform to
895: .Sx Scaling Widths .
896: If 0, this is equivalent to the
1.39 kristaps 897: .Sx \&br
1.68 kristaps 898: macro.
899: Defaults to 1, if unspecified.
1.44 kristaps 900: .Pp
901: See also
902: .Sx \&br .
1.58 kristaps 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: .\" .
1.18 kristaps 918: .Sh COMPATIBILITY
1.58 kristaps 919: This section documents areas of questionable portability between
920: implementations of the
921: .Nm
922: language.
1.51 kristaps 923: .Pp
924: .Bl -dash -compact
925: .It
1.58 kristaps 926: In quoted literals, GNU troff allowed pair-wise double-quotes to produce
1.68 kristaps 927: a standalone double-quote in formatted output.
928: It is not known whether this behaviour is exhibited by other formatters.
1.32 kristaps 929: .It
1.23 kristaps 930: The
1.51 kristaps 931: .Sx \&sp
1.68 kristaps 932: macro does not accept negative values in mandoc.
933: In GNU troff, this would result in strange behaviour.
1.59 kristaps 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.
1.32 kristaps 941: .El
1.1 kristaps 942: .Sh SEE ALSO
1.32 kristaps 943: .Xr mandoc 1 ,
944: .Xr mandoc_char 7
1.1 kristaps 945: .Sh AUTHORS
946: The
1.32 kristaps 947: .Nm
1.23 kristaps 948: reference was written by
1.62 kristaps 949: .An Kristaps Dzonsons Aq kristaps@bsd.lv .
1.1 kristaps 950: .Sh CAVEATS
1.68 kristaps 951: Do not use this language.
952: Use
1.32 kristaps 953: .Xr mdoc 7 ,
1.1 kristaps 954: instead.
CVSweb