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