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