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