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