Annotation of src/usr.bin/mandoc/man.7, Revision 1.22
1.22 ! schwarze 1: .\" $Id: man.7,v 1.21 2010/05/14 01:54:37 schwarze Exp $
1.1 kristaps 2: .\"
1.21 schwarze 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.2 schwarze 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.22 ! schwarze 17: .Dd $Mdocdate: May 14 2010 $
1.2 schwarze 18: .Dt MAN 7
1.1 kristaps 19: .Os
20: .Sh NAME
1.10 schwarze 21: .Nm man
22: .Nd man language reference
1.1 kristaps 23: .Sh DESCRIPTION
24: The
1.10 schwarze 25: .Nm man
1.7 schwarze 26: language was historically used to format
1.10 schwarze 27: .Ux
1.22 ! schwarze 28: manuals.
! 29: This reference document describes its syntax, structure, and usage.
1.10 schwarze 30: .Pp
31: .Bf -emphasis
1.7 schwarze 32: Do not use
1.10 schwarze 33: .Nm
1.7 schwarze 34: to write your manuals.
1.10 schwarze 35: .Ef
1.6 schwarze 36: Use the
1.10 schwarze 37: .Xr mdoc 7
1.1 kristaps 38: language, instead.
1.10 schwarze 39: .Pp
1.1 kristaps 40: An
1.10 schwarze 41: .Nm
1.1 kristaps 42: document follows simple rules: lines beginning with the control
1.7 schwarze 43: character
1.10 schwarze 44: .Sq \&.
1.22 ! schwarze 45: are parsed for macros.
! 46: Other lines are interpreted within the scope of
1.1 kristaps 47: prior macros:
1.10 schwarze 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.10 schwarze 51: .Ed
1.1 kristaps 52: .Sh INPUT ENCODING
1.10 schwarze 53: .Nm
1.4 schwarze 54: documents may contain only graphable 7-bit ASCII characters, the
1.22 ! schwarze 55: space character, and the tabs character.
! 56: All manuals must have
1.10 schwarze 57: .Ux
1.7 schwarze 58: line termination.
1.10 schwarze 59: .Pp
1.1 kristaps 60: Blank lines are acceptable; where found, the output will assert a
61: vertical space.
1.10 schwarze 62: .Ss Comments
1.8 schwarze 63: Text following a
1.10 schwarze 64: .Sq \e\*" ,
1.8 schwarze 65: whether in a macro or free-form text line, is ignored to the end of
1.22 ! schwarze 66: line.
! 67: A macro line with only a control character and comment escape,
1.10 schwarze 68: .Sq \&.\e" ,
1.22 ! schwarze 69: is also ignored.
! 70: Macro lines with only a control character and optionally whitespace are
! 71: stripped from input.
1.10 schwarze 72: .Ss Special Characters
1.8 schwarze 73: Special characters may occur in both macro and free-form lines.
74: Sequences begin with the escape character
1.10 schwarze 75: .Sq \e
1.7 schwarze 76: followed by either an open-parenthesis
1.10 schwarze 77: .Sq \&(
1.1 kristaps 78: for two-character sequences; an open-bracket
1.10 schwarze 79: .Sq \&[
1.1 kristaps 80: for n-character sequences (terminated at a close-bracket
1.10 schwarze 81: .Sq \&] ) ;
1.22 ! schwarze 82: or a single one-character sequence.
! 83: See
1.10 schwarze 84: .Xr mandoc_char 7
1.22 ! schwarze 85: for a complete list.
! 86: Examples include
1.10 schwarze 87: .Sq \e(em
88: .Pq em-dash
1.8 schwarze 89: and
1.10 schwarze 90: .Sq \ee
91: .Pq back-slash .
92: .Ss Text Decoration
1.8 schwarze 93: Terms may be text-decorated using the
1.10 schwarze 94: .Sq \ef
1.15 schwarze 95: escape followed by an indicator: B (bold), I, (italic), R (Roman), or P
1.16 schwarze 96: (revert to previous mode):
1.15 schwarze 97: .Pp
98: .D1 \efBbold\efR \efIitalic\efP
99: .Pp
100: A numerical representation 3, 2, or 1 (bold, italic, and Roman,
1.22 ! schwarze 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.15 schwarze 105: Note that macros like
106: .Sx \&BR
107: open and close a font scope with each argument.
108: .Pp
109: Text may also be sized with the
110: .Sq \es
111: escape, whose syntax is one of
112: .Sq \es+-n
113: for one-digit numerals;
114: .Sq \es(+-nn
115: or
116: .Sq \es+-(nn
117: for two-digit numerals; and
118: .Sq \es[+-N] ,
119: .Sq \es+-[N] ,
120: .Sq \es'+-N' ,
121: or
122: .Sq \es+-'N'
123: for arbitrary-digit numerals:
124: .Pp
125: .D1 \es+1bigger\es-1
126: .D1 \es[+10]much bigger\es[-10]
127: .D1 \es+(10much bigger\es-(10
128: .D1 \es+'100'much much bigger\es-'100'
129: .Pp
130: Both
131: .Sq \es
132: and
133: .Sq \ef
134: attributes are forgotten when entering or exiting a macro block.
1.10 schwarze 135: .Ss Whitespace
1.21 schwarze 136: Whitespace consists of the space character.
137: In free-form lines, whitespace is preserved within a line; un-escaped
138: trailing spaces are stripped from input (unless in a literal context).
139: Blank free-form lines, which may include spaces, are permitted and
140: rendered as an empty line.
141: .Pp
1.22 ! schwarze 142: In macro lines, whitespace delimits arguments and is discarded.
! 143: If arguments are quoted, whitespace within the quotes is retained.
1.14 schwarze 144: .Ss Dates
145: The
146: .Sx \&TH
147: macro is the only
148: .Nm
1.22 ! schwarze 149: macro that requires a date.
! 150: The form for this date is the ISO-8601
1.14 schwarze 151: standard
152: .Cm YYYY-MM-DD .
1.12 schwarze 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.22 ! schwarze 163: Negative numbers, while accepted, are truncated to zero.
! 164: The following scaling units are accepted:
1.12 schwarze 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.14 schwarze 202: is necessarily non-portable across output media.
1.12 schwarze 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.9 schwarze 215: .Sh MANUAL STRUCTURE
1.5 schwarze 216: Each
1.10 schwarze 217: .Nm
1.5 schwarze 218: document must contain contains at least the
1.12 schwarze 219: .Sx \&TH
1.22 ! schwarze 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.10 schwarze 223: .Pp
1.9 schwarze 224: Beyond
1.12 schwarze 225: .Sx \&TH ,
1.22 ! schwarze 226: at least one macro or text node must appear in the document.
! 227: Documents are generally structured as follows:
1.10 schwarze 228: .Bd -literal -offset indent
1.14 schwarze 229: \&.TH FOO 1 2009-10-10
1.9 schwarze 230: \&.
231: \&.SH NAME
1.10 schwarze 232: \efBfoo\efR \e(en a description goes here
233: \&.\e\*q The next is for sections 2 & 3 only.
234: \&.\e\*q .SH LIBRARY
1.9 schwarze 235: \&.
236: \&.SH SYNOPSIS
237: \efBfoo\efR [\efB\e-options\efR] arguments...
238: \&.
239: \&.SH DESCRIPTION
1.10 schwarze 240: The \efBfoo\efR utility processes files...
1.9 schwarze 241: \&.
1.10 schwarze 242: \&.\e\*q .SH IMPLEMENTATION NOTES
243: \&.\e\*q The next is for sections 2, 3, & 9 only.
1.9 schwarze 244: \&.\e\*q .SH RETURN VALUES
1.10 schwarze 245: \&.\e\*q The next is for sections 1, 6, 7, & 8 only.
1.9 schwarze 246: \&.\e\*q .SH ENVIRONMENT
247: \&.\e\*q .SH FILES
1.22 ! schwarze 248: \&.\e\*q The next is for sections 1 & 8 only.
! 249: \&.\e\*q .SH EXIT STATUS
1.9 schwarze 250: \&.\e\*q .SH EXAMPLES
1.10 schwarze 251: \&.\e\*q The next is for sections 1, 4, 6, 7, & 8 only.
1.9 schwarze 252: \&.\e\*q .SH DIAGNOSTICS
1.10 schwarze 253: \&.\e\*q The next is for sections 2, 3, & 9 only.
1.9 schwarze 254: \&.\e\*q .SH ERRORS
255: \&.\e\*q .SH SEE ALSO
1.14 schwarze 256: \&.\e\*q .BR foo ( 1 )
1.9 schwarze 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.10 schwarze 262: \&.\e\*q .SH SECURITY CONSIDERATIONS
263: .Ed
1.13 schwarze 264: .Pp
265: The sections in a
266: .Nm
1.22 ! schwarze 267: document are conventionally ordered as they appear above.
! 268: Sections should be composed as follows:
1.14 schwarze 269: .Bl -ohang -offset indent
270: .It Em NAME
1.22 ! schwarze 271: The name(s) and a short description of the documented material.
! 272: The syntax for this is generally as follows:
1.13 schwarze 273: .Pp
274: .D1 \efBname\efR \e(en description
1.14 schwarze 275: .It Em LIBRARY
1.13 schwarze 276: The name of the library containing the documented material, which is
1.22 ! schwarze 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.13 schwarze 279: .Pp
280: .D1 Standard C Library (libc, -lc)
1.14 schwarze 281: .It Em SYNOPSIS
1.13 schwarze 282: Documents the utility invocation syntax, function call syntax, or device
1.16 schwarze 283: configuration.
1.13 schwarze 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.14 schwarze 292: .D1 \&.B char *name(char *\efIarg\efR);
1.13 schwarze 293: .Pp
294: And for the third, configurations (section 4):
295: .Pp
1.14 schwarze 296: .D1 \&.B name* at cardbus ? function ?
1.13 schwarze 297: .Pp
1.16 schwarze 298: Manuals not in these sections generally don't need a
1.14 schwarze 299: .Em SYNOPSIS .
300: .It Em DESCRIPTION
1.16 schwarze 301: This expands upon the brief, one-line description in
1.14 schwarze 302: .Em NAME .
303: It usually contains a break-down of the options (if documenting a
304: command).
305: .It Em IMPLEMENTATION NOTES
1.22 ! schwarze 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.14 schwarze 309: .It Em RETURN VALUES
310: This section is the dual of
311: .Em EXIT STATUS ,
1.22 ! schwarze 312: which is used for commands.
! 313: It documents the return values of functions in sections 2, 3, and 9.
1.14 schwarze 314: .It Em ENVIRONMENT
315: Documents any usages of environment variables, e.g.,
316: .Xr environ 7 .
317: .It Em FILES
1.22 ! schwarze 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.).
! 321: .It Em EXIT STATUS
! 322: Command exit status for section 1, 6, and 8 manuals.
! 323: This section is the dual of
! 324: .Em RETURN VALUES ,
! 325: which is used for functions.
! 326: Historically, this information was described in
! 327: .Em DIAGNOSTICS ,
! 328: a practise that is now discouraged.
1.14 schwarze 329: .It Em EXAMPLES
1.22 ! schwarze 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.14 schwarze 334: .It Em DIAGNOSTICS
1.22 ! schwarze 335: Documents error conditions.
! 336: This is most useful in section 4 manuals.
1.14 schwarze 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.22 ! schwarze 344: References other manuals with related topics.
! 345: This section should exist for most manuals.
1.14 schwarze 346: .Pp
347: .D1 \&.BR bar \&( 1 \&),
348: .Pp
349: Cross-references should conventionally be ordered
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.13 schwarze 373: .El
1.9 schwarze 374: .Sh MACRO SYNTAX
1.1 kristaps 375: Macros are one to three three characters in length and begin with a
376: control character ,
1.10 schwarze 377: .Sq \&. ,
1.22 ! schwarze 378: at the beginning of the line.
! 379: The
1.19 schwarze 380: .Sq \(aq
1.22 ! schwarze 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.12 schwarze 385: .Bd -literal -offset indent
386: \&.PP
387: \&.\ \ \ PP
388: .Ed
1.10 schwarze 389: .Pp
1.1 kristaps 390: The
1.10 schwarze 391: .Nm
1.22 ! schwarze 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.10 schwarze 397: .Ss Line Macros
398: Line macros are generally scoped to the current line, with the body
1.22 ! schwarze 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.10 schwarze 403: .Bd -literal -offset indent
404: \&.I
1.1 kristaps 405: foo
1.10 schwarze 406: .Ed
407: .Pp
1.7 schwarze 408: is equivalent to
1.10 schwarze 409: .Sq \&.I foo .
1.17 schwarze 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.10 schwarze 419: .Bd -literal -offset indent
1.9 schwarze 420: \&.YO \(lBbody...\(rB
421: \(lBbody...\(rB
1.10 schwarze 422: .Ed
423: .Pp
1.18 schwarze 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 \&
433: .\" .It Sx \&PD Ta n Ta current Ta compat
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 \&
440: .\" .It Sx \&UC Ta n Ta current Ta compat
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
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.10 schwarze 451: .El
452: .Pp
1.18 schwarze 453: Macros marked as
454: .Qq compat
455: are included for compatibility with the significant corpus of existing
1.22 ! schwarze 456: manuals that mix dialects of roff.
! 457: These macros should not be used for portable
1.18 schwarze 458: .Nm
459: manuals.
1.10 schwarze 460: .Ss Block Macros
1.22 ! schwarze 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.18 schwarze 464: .Sx Line Macros
465: apply here as well).
1.17 schwarze 466: .Pp
467: The syntax is as follows:
1.10 schwarze 468: .Bd -literal -offset indent
1.9 schwarze 469: \&.YO \(lBhead...\(rB
470: \(lBhead...\(rB
471: \(lBbody...\(rB
1.10 schwarze 472: .Ed
473: .Pp
474: The closure of body scope may be to the section, where a macro is closed
475: by
1.12 schwarze 476: .Sx \&SH ;
1.10 schwarze 477: sub-section, closed by a section or
1.12 schwarze 478: .Sx \&SS ;
1.10 schwarze 479: part, closed by a section, sub-section, or
1.12 schwarze 480: .Sx \&RE ;
1.16 schwarze 481: or paragraph, closed by a section, sub-section, part,
1.12 schwarze 482: .Sx \&HP ,
483: .Sx \&IP ,
484: .Sx \&LP ,
485: .Sx \&P ,
486: .Sx \&PP ,
1.10 schwarze 487: or
1.12 schwarze 488: .Sx \&TP .
1.10 schwarze 489: No closure refers to an explicit block closing macro.
490: .Pp
1.18 schwarze 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
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.10 schwarze 507: .El
1.18 schwarze 508: .Pp
509: Macros marked
510: .Qq compat
511: are as mentioned in
512: .Sx Line Macros .
1.10 schwarze 513: .Pp
1.9 schwarze 514: If a block macro is next-line scoped, it may only be followed by in-line
1.18 schwarze 515: macros for decorating text.
1.9 schwarze 516: .Sh REFERENCE
517: This section is a canonical reference to all macros, arranged
1.22 ! schwarze 518: alphabetically.
! 519: For the scoping of individual macros, see
1.10 schwarze 520: .Sx MACRO SYNTAX .
1.12 schwarze 521: .Ss \&B
1.9 schwarze 522: Text is rendered in bold face.
1.14 schwarze 523: .Pp
524: See also
525: .Sx \&I ,
526: .Sx \&R ,
527: .Sx \&b ,
528: .Sx \&i ,
529: and
530: .Sx \&r .
1.12 schwarze 531: .Ss \&BI
1.22 ! schwarze 532: Text is rendered alternately in bold face and italic.
! 533: Thus,
1.10 schwarze 534: .Sq .BI this word and that
1.9 schwarze 535: causes
1.10 schwarze 536: .Sq this
1.9 schwarze 537: and
1.10 schwarze 538: .Sq and
1.16 schwarze 539: to render in bold face, while
1.10 schwarze 540: .Sq word
1.9 schwarze 541: and
1.10 schwarze 542: .Sq that
1.22 ! schwarze 543: render in italics.
! 544: Whitespace between arguments is omitted in output.
1.14 schwarze 545: .Pp
546: Examples:
547: .Pp
548: .D1 \&.BI bold italic bold italic
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.12 schwarze 563: .Ss \&BR
1.9 schwarze 564: Text is rendered alternately in bold face and roman (the default font).
565: Whitespace between arguments is omitted in output.
1.14 schwarze 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.12 schwarze 578: .Ss \&DT
1.22 ! schwarze 579: Has no effect.
! 580: Included for compatibility.
1.12 schwarze 581: .Ss \&HP
1.9 schwarze 582: Begin a paragraph whose initial output line is left-justified, but
583: subsequent output lines are indented, with the following syntax:
1.14 schwarze 584: .Bd -filled -offset indent
585: .Pf \. Sx \&HP
586: .Op Cm width
1.10 schwarze 587: .Ed
1.14 schwarze 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
597: .Sx \&IP ,
598: .Sx \&LP ,
599: .Sx \&P ,
600: .Sx \&PP ,
601: and
602: .Sx \&TP .
1.12 schwarze 603: .Ss \&I
1.9 schwarze 604: Text is rendered in italics.
1.14 schwarze 605: .Pp
606: See also
607: .Sx \&B ,
608: .Sx \&R ,
609: .Sx \&b ,
610: .Sx \&i ,
611: and
612: .Sx \&r .
1.12 schwarze 613: .Ss \&IB
1.9 schwarze 614: Text is rendered alternately in italics and bold face. Whitespace
615: between arguments is omitted in output.
1.14 schwarze 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.12 schwarze 628: .Ss \&IP
1.14 schwarze 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.10 schwarze 633: .Ed
1.14 schwarze 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.22 ! schwarze 644: argument is used as a leading term, flushed to the left margin.
! 645: This is useful for bulleted paragraphs and so on.
1.14 schwarze 646: .Pp
647: See also
648: .Sx \&HP ,
649: .Sx \&LP ,
650: .Sx \&P ,
651: .Sx \&PP ,
652: and
653: .Sx \&TP .
1.12 schwarze 654: .Ss \&IR
1.9 schwarze 655: Text is rendered alternately in italics and roman (the default font).
656: Whitespace between arguments is omitted in output.
1.14 schwarze 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.12 schwarze 669: .Ss \&LP
1.22 ! schwarze 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.14 schwarze 674: .Pp
675: See also
676: .Sx \&HP ,
677: .Sx \&IP ,
678: .Sx \&P ,
679: .Sx \&PP ,
680: and
681: .Sx \&TP .
1.12 schwarze 682: .Ss \&P
683: Synonym for
684: .Sx \&LP .
1.14 schwarze 685: .Pp
686: See also
687: .Sx \&HP ,
688: .Sx \&IP ,
689: .Sx \&LP ,
690: .Sx \&PP ,
691: and
692: .Sx \&TP .
1.12 schwarze 693: .Ss \&PP
694: Synonym for
695: .Sx \&LP .
1.14 schwarze 696: .Pp
697: See also
698: .Sx \&HP ,
699: .Sx \&IP ,
700: .Sx \&LP ,
701: .Sx \&P ,
702: and
703: .Sx \&TP .
1.12 schwarze 704: .Ss \&R
1.9 schwarze 705: Text is rendered in roman (the default font).
1.14 schwarze 706: .Pp
707: See also
708: .Sx \&I ,
709: .Sx \&B ,
710: .Sx \&b ,
711: .Sx \&i ,
712: and
713: .Sx \&r .
1.12 schwarze 714: .Ss \&RB
1.9 schwarze 715: Text is rendered alternately in roman (the default font) and bold face.
716: Whitespace between arguments is omitted in output.
1.14 schwarze 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.12 schwarze 729: .Ss \&RE
1.10 schwarze 730: Explicitly close out the scope of a prior
1.12 schwarze 731: .Sx \&RS .
732: .Ss \&RI
1.9 schwarze 733: Text is rendered alternately in roman (the default font) and italics.
734: Whitespace between arguments is omitted in output.
1.14 schwarze 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.12 schwarze 747: .Ss \&RS
1.22 ! schwarze 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.12 schwarze 751: .Sx \&PP .
1.14 schwarze 752: This has the following syntax:
753: .Bd -filled -offset indent
754: .Pf \. Sx \&Rs
755: .Op Cm width
1.10 schwarze 756: .Ed
1.14 schwarze 757: .Pp
758: The
759: .Cm width
760: argument must conform to
761: .Sx Scaling Widths .
1.16 schwarze 762: If not specified, the saved or default width is used.
1.12 schwarze 763: .Ss \&SB
1.9 schwarze 764: Text is rendered in small size (one point smaller than the default font)
765: bold face.
1.12 schwarze 766: .Ss \&SH
1.22 ! schwarze 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.12 schwarze 771: .Ss \&SM
1.9 schwarze 772: Text is rendered in small size (one point smaller than the default
773: font).
1.12 schwarze 774: .Ss \&SS
1.22 ! schwarze 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.12 schwarze 779: .Ss \&TH
1.9 schwarze 780: Sets the title of the manual page with the following syntax:
1.14 schwarze 781: .Bd -filled -offset indent
782: .Pf \. Sx \&TH
783: .Cm title section
784: .Op Cm date Op Cm source Op Cm volume
1.10 schwarze 785: .Ed
786: .Pp
1.14 schwarze 787: At least the upper-case document title
788: .Cm title
789: and numeric manual section
790: .Cm section
1.22 ! schwarze 791: arguments must be provided.
! 792: The
1.14 schwarze 793: .Cm date
794: argument should be formatted as described in
795: .Sx Dates :
1.22 ! schwarze 796: if it does not conform, the current date is used instead.
! 797: The
1.14 schwarze 798: .Cm source
1.22 ! schwarze 799: string specifies the organisation providing the utility.
! 800: The
1.14 schwarze 801: .Cm volume
802: string replaces the default rendered volume, which is dictated by the
803: manual section.
804: .Pp
805: Examples:
806: .Pp
807: .D1 \&.TH CVS 5 "1992-02-12" GNU
1.12 schwarze 808: .Ss \&TP
1.9 schwarze 809: Begin a paragraph where the head, if exceeding the indentation width, is
810: followed by a newline; if not, the body follows on the same line after a
1.22 ! schwarze 811: buffer to the indentation width.
! 812: Subsequent output lines are indented.
1.14 schwarze 813: The syntax is as follows:
814: .Bd -filled -offset indent
815: .Pf \. Sx \&TP
816: .Op Cm width
1.10 schwarze 817: .Ed
818: .Pp
1.14 schwarze 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.9 schwarze 824: unspecified, the saved or default width is used.
1.14 schwarze 825: .Pp
826: See also
827: .Sx \&HP ,
828: .Sx \&IP ,
829: .Sx \&LP ,
830: .Sx \&P ,
831: and
832: .Sx \&PP .
1.18 schwarze 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.12 schwarze 841: .Ss \&br
1.22 ! schwarze 842: Breaks the current line.
! 843: Consecutive invocations have no further effect.
1.14 schwarze 844: .Pp
845: See also
846: .Sx \&sp .
1.12 schwarze 847: .Ss \&fi
1.9 schwarze 848: End literal mode begun by
1.12 schwarze 849: .Sx \&nf .
850: .Ss \&i
1.22 ! schwarze 851: Italicise arguments.
! 852: Synonym for
1.15 schwarze 853: .Sx \&I .
1.14 schwarze 854: .Pp
855: See also
856: .Sx \&B ,
857: .Sx \&I ,
858: .Sx \&R .
859: .Sx \&b ,
860: and
861: .Sx \&r .
1.12 schwarze 862: .Ss \&na
1.11 schwarze 863: Don't align to the right margin.
1.12 schwarze 864: .Ss \&nf
1.9 schwarze 865: Begin literal mode: all subsequent free-form lines have their end of
1.22 ! schwarze 866: line boundaries preserved.
! 867: May be ended by
1.12 schwarze 868: .Sx \&fi .
869: .Ss \&r
1.9 schwarze 870: Fonts and styles (bold face, italics) reset to roman (default font).
1.14 schwarze 871: .Pp
872: See also
873: .Sx \&B ,
874: .Sx \&I ,
875: .Sx \&R ,
876: .Sx \&b ,
877: and
878: .Sx \&i .
1.12 schwarze 879: .Ss \&sp
1.14 schwarze 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.16 schwarze 886: Insert
1.14 schwarze 887: .Cm height
888: spaces, which must conform to
889: .Sx Scaling Widths .
890: If 0, this is equivalent to the
1.12 schwarze 891: .Sx \&br
1.22 ! schwarze 892: macro.
! 893: Defaults to 1, if unspecified.
1.14 schwarze 894: .Pp
895: See also
896: .Sx \&br .
1.18 schwarze 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.5 schwarze 912: .Sh COMPATIBILITY
1.18 schwarze 913: This section documents areas of questionable portability between
914: implementations of the
915: .Nm
916: language.
1.15 schwarze 917: .Pp
918: .Bl -dash -compact
919: .It
1.18 schwarze 920: In quoted literals, GNU troff allowed pair-wise double-quotes to produce
1.22 ! schwarze 921: a standalone double-quote in formatted output.
! 922: It is not known whether this behaviour is exhibited by other formatters.
1.10 schwarze 923: .It
1.9 schwarze 924: The
1.15 schwarze 925: .Sx \&sp
1.22 ! schwarze 926: macro does not accept negative values in mandoc.
! 927: In GNU troff, this would result in strange behaviour.
1.19 schwarze 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.10 schwarze 935: .El
1.1 kristaps 936: .Sh SEE ALSO
1.10 schwarze 937: .Xr mandoc 1 ,
938: .Xr mandoc_char 7
1.1 kristaps 939: .Sh AUTHORS
940: The
1.10 schwarze 941: .Nm
1.9 schwarze 942: reference was written by
1.21 schwarze 943: .An Kristaps Dzonsons Aq kristaps@bsd.lv .
1.1 kristaps 944: .Sh CAVEATS
1.22 ! schwarze 945: Do not use this language.
! 946: Use
1.10 schwarze 947: .Xr mdoc 7 ,
1.1 kristaps 948: instead.