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