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