Annotation of mandoc/man.7, Revision 1.43
1.43 ! kristaps 1: .\" $Id: man.7,v 1.42 2009/10/31 08:37:26 kristaps Exp $
1.1 kristaps 2: .\"
1.11 kristaps 3: .\" Copyright (c) 2009 Kristaps Dzonsons <kristaps@kth.se>
1.1 kristaps 4: .\"
5: .\" Permission to use, copy, modify, and distribute this software for any
1.10 kristaps 6: .\" purpose with or without fee is hereby granted, provided that the above
7: .\" copyright notice and this permission notice appear in all copies.
8: .\"
9: .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10: .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11: .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12: .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13: .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14: .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15: .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1.1 kristaps 16: .\"
17: .Dd $Mdocdate$
1.9 kristaps 18: .Dt MAN 7
1.1 kristaps 19: .Os
1.28 kristaps 20: .
21: .
1.1 kristaps 22: .Sh NAME
1.32 kristaps 23: .Nm man
24: .Nd man language reference
1.28 kristaps 25: .
26: .
1.1 kristaps 27: .Sh DESCRIPTION
28: The
1.32 kristaps 29: .Nm man
1.20 kristaps 30: language was historically used to format
1.32 kristaps 31: .Ux
1.19 kristaps 32: manuals. This reference document describes its syntax, structure, and
33: usage.
1.32 kristaps 34: .
35: .Pp
36: .Bf -emphasis
1.20 kristaps 37: Do not use
1.32 kristaps 38: .Nm
1.20 kristaps 39: to write your manuals.
1.32 kristaps 40: .Ef
1.19 kristaps 41: Use the
1.32 kristaps 42: .Xr mdoc 7
1.1 kristaps 43: language, instead.
1.32 kristaps 44: .
45: .Pp
1.1 kristaps 46: An
1.32 kristaps 47: .Nm
1.1 kristaps 48: document follows simple rules: lines beginning with the control
1.20 kristaps 49: character
1.32 kristaps 50: .Sq \&.
1.1 kristaps 51: are parsed for macros. Other lines are interpreted within the scope of
52: prior macros:
1.32 kristaps 53: .Bd -literal -offset indent
1.1 kristaps 54: \&.SH Macro lines change control state.
55: Other lines are interpreted within the current state.
1.32 kristaps 56: .Ed
1.28 kristaps 57: .
58: .
1.1 kristaps 59: .Sh INPUT ENCODING
1.32 kristaps 60: .Nm
1.14 kristaps 61: documents may contain only graphable 7-bit ASCII characters, the
1.19 kristaps 62: space character, and the tabs character. All manuals must have
1.32 kristaps 63: .Ux
1.20 kristaps 64: line termination.
1.32 kristaps 65: .
66: .Pp
1.5 kristaps 67: Blank lines are acceptable; where found, the output will assert a
1.1 kristaps 68: vertical space.
1.32 kristaps 69: .
70: .Pp
1.4 kristaps 71: The
1.32 kristaps 72: .Sq \ec
1.4 kristaps 73: escape is common in historical
1.32 kristaps 74: .Nm
1.4 kristaps 75: documents; if encountered at the end of a word, it ensures that the
76: subsequent word isn't off-set by whitespace.
1.28 kristaps 77: .
78: .
1.32 kristaps 79: .Ss Comments
1.21 kristaps 80: Text following a
1.32 kristaps 81: .Sq \e\*" ,
1.21 kristaps 82: whether in a macro or free-form text line, is ignored to the end of
83: line. A macro line with only a control character and comment escape,
1.32 kristaps 84: .Sq \&.\e" ,
1.22 kristaps 85: is also ignored. Macro lines with only a control charater and
86: optionally whitespace are stripped from input.
1.28 kristaps 87: .
88: .
1.32 kristaps 89: .Ss Special Characters
1.21 kristaps 90: Special characters may occur in both macro and free-form lines.
91: Sequences begin with the escape character
1.32 kristaps 92: .Sq \e
1.20 kristaps 93: followed by either an open-parenthesis
1.32 kristaps 94: .Sq \&(
1.1 kristaps 95: for two-character sequences; an open-bracket
1.32 kristaps 96: .Sq \&[
1.1 kristaps 97: for n-character sequences (terminated at a close-bracket
1.32 kristaps 98: .Sq \&] ) ;
1.21 kristaps 99: or a single one-character sequence. See
1.32 kristaps 100: .Xr mandoc_char 7
1.21 kristaps 101: for a complete list. Examples include
1.32 kristaps 102: .Sq \e(em
103: .Pq em-dash
1.21 kristaps 104: and
1.32 kristaps 105: .Sq \ee
106: .Pq back-slash .
1.28 kristaps 107: .
108: .
1.32 kristaps 109: .Ss Text Decoration
1.21 kristaps 110: Terms may be text-decorated using the
1.32 kristaps 111: .Sq \ef
1.21 kristaps 112: escape followed by an indicator: B (bold), I, (italic), or P and R
113: (Roman, or reset).
1.28 kristaps 114: .
115: .
1.32 kristaps 116: .Ss Whitespace
1.17 kristaps 117: Unless specifically escaped, consecutive blocks of whitespace are pruned
118: from input. These are later re-added, if applicable, by a front-end
119: utility such as
1.32 kristaps 120: .Xr mandoc 1 .
1.28 kristaps 121: .
1.43 ! kristaps 122: .Ss Dates
! 123: The
! 124: .Sx \&TH
! 125: macro is the only
! 126: .Nm
! 127: macro that requires a date. The form for this date is the ISO-8601
! 128: standard
! 129: .Cm YYYY-MM-DD .
! 130: .
! 131: .Ss Scaling Widths
! 132: Many macros support scaled widths for their arguments, such as
! 133: stipulating a two-inch list indentation with the following:
! 134: .Bd -literal -offset indent
! 135: \&.Bl -tag -width 2i
! 136: .Ed
! 137: .
! 138: .
1.38 kristaps 139: .Ss Scaling Widths
140: Many macros support scaled widths for their arguments, such as
141: stipulating a two-inch paragraph indentation with the following:
142: .Bd -literal -offset indent
143: \&.HP 2i
144: .Ed
145: .
146: .Pp
147: The syntax for scaled widths is
148: .Sq Li [+-]?[0-9]*.[0-9]*[:unit:]? ,
149: where a decimal must be preceded or proceeded by at least one digit.
150: Negative numbers, while accepted, are truncated to zero. The following
151: scaling units are accepted:
152: .
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
190: is necessarily non-portable across output media. See
191: .Sx COMPATIBILITY .
192: .
193: .Pp
194: If a scaling unit is not provided, the numerical value is interpreted
195: under the default rules of
196: .Sq v
197: for vertical spaces and
198: .Sq u
199: for horizontal ones.
200: .Em Note :
201: this differs from
202: .Xr mdoc 7 ,
203: which, if a unit is not provided, will instead interpret the string as
204: literal text.
205: .
1.28 kristaps 206: .
1.22 kristaps 207: .Sh MANUAL STRUCTURE
1.16 kristaps 208: Each
1.32 kristaps 209: .Nm
1.16 kristaps 210: document must contain contains at least the
1.39 kristaps 211: .Sx \&TH
1.16 kristaps 212: macro describing the document's section and title. It may occur
213: anywhere in the document, although conventionally, it appears as the
214: first macro.
1.32 kristaps 215: .
216: .Pp
1.22 kristaps 217: Beyond
1.39 kristaps 218: .Sx \&TH ,
1.22 kristaps 219: at least one macro or text node must appear in the document. Documents
220: are generally structured as follows:
1.32 kristaps 221: .Bd -literal -offset indent
1.43 ! kristaps 222: \&.TH FOO 1 2009-10-10
1.22 kristaps 223: \&.
224: \&.SH NAME
1.29 kristaps 225: \efBfoo\efR \e(en a description goes here
1.33 kristaps 226: \&.\e\*q The next is for sections 2 & 3 only.
227: \&.\e\*q .SH LIBRARY
1.22 kristaps 228: \&.
229: \&.SH SYNOPSIS
230: \efBfoo\efR [\efB\e-options\efR] arguments...
231: \&.
232: \&.SH DESCRIPTION
1.33 kristaps 233: The \efBfoo\efR utility processes files...
1.22 kristaps 234: \&.
1.33 kristaps 235: \&.\e\*q .SH IMPLEMENTATION NOTES
236: \&.\e\*q The next is for sections 1 & 8 only.
237: \&.\e\*q .SH EXIT STATUS
238: \&.\e\*q The next is for sections 2, 3, & 9 only.
1.22 kristaps 239: \&.\e\*q .SH RETURN VALUES
1.33 kristaps 240: \&.\e\*q The next is for sections 1, 6, 7, & 8 only.
1.22 kristaps 241: \&.\e\*q .SH ENVIRONMENT
242: \&.\e\*q .SH FILES
243: \&.\e\*q .SH EXAMPLES
1.33 kristaps 244: \&.\e\*q The next is for sections 1, 4, 6, 7, & 8 only.
1.22 kristaps 245: \&.\e\*q .SH DIAGNOSTICS
1.33 kristaps 246: \&.\e\*q The next is for sections 2, 3, & 9 only.
1.22 kristaps 247: \&.\e\*q .SH ERRORS
248: \&.\e\*q .SH SEE ALSO
1.42 kristaps 249: \&.\e\*q .BR foo ( 1 )
1.22 kristaps 250: \&.\e\*q .SH STANDARDS
251: \&.\e\*q .SH HISTORY
252: \&.\e\*q .SH AUTHORS
253: \&.\e\*q .SH CAVEATS
254: \&.\e\*q .SH BUGS
1.33 kristaps 255: \&.\e\*q .SH SECURITY CONSIDERATIONS
1.32 kristaps 256: .Ed
1.41 kristaps 257: .Pp
258: The sections in a
259: .Nm
260: document are conventionally ordered as they appear above. Sections
261: should be composed as follows:
1.42 kristaps 262: .Bl -ohang -offset indent
263: .It Em NAME
1.41 kristaps 264: The name(s) and a short description of the documented material. The
265: syntax for this is generally as follows:
266: .Pp
267: .D1 \efBname\efR \e(en description
1.42 kristaps 268: .It Em LIBRARY
1.41 kristaps 269: The name of the library containing the documented material, which is
270: assumed to be a function in a section 2 or 3 manual. For functions in
271: the C library, this may be as follows:
272: .Pp
273: .D1 Standard C Library (libc, -lc)
1.42 kristaps 274: .It Em SYNOPSIS
1.41 kristaps 275: Documents the utility invocation syntax, function call syntax, or device
276: configuration.
277: .Pp
278: For the first, utilities (sections 1, 6, and 8), this is
279: generally structured as follows:
280: .Pp
281: .D1 \efBname\efR [-\efBab\efR] [-\efBc\efR\efIarg\efR] \efBpath\efR...
282: .Pp
283: For the second, function calls (sections 2, 3, 9):
284: .Pp
285: .D1 \. Ns Sx \&B No char *name(char *\efIarg\efR);
286: .Pp
287: And for the third, configurations (section 4):
288: .Pp
289: .D1 \. Ns Sx \&B No name* at cardbus ? function ?
290: .Pp
1.42 kristaps 291: Manuals not in these sections generally don't need a
292: .Em SYNOPSIS .
293: .It Em DESCRIPTION
294: This expands upon the brief, one-line description in
295: .Em NAME .
296: It usually contains a break-down of the options (if documenting a
297: command).
298: .It Em IMPLEMENTATION NOTES
1.41 kristaps 299: Implementation-specific notes should be kept here. This is useful when
300: implementing standard functions that may have side effects or notable
301: algorithmic implications.
1.42 kristaps 302: .It Em EXIT STATUS
303: Command exit status for section 1, 6, and 8 manuals. This section is
304: the dual of
305: .Em RETURN VALUES ,
306: which is used for functions. Historically, this information was
307: described in
308: .Em DIAGNOSTICS ,
309: a practise that is now discouraged.
310: .
311: .It Em RETURN VALUES
312: This section is the dual of
313: .Em EXIT STATUS ,
314: which is used for commands. It documents the return values of functions
315: in sections 2, 3, and 9.
316: .
317: .It Em ENVIRONMENT
318: Documents any usages of environment variables, e.g.,
319: .Xr environ 7 .
320: .
321: .It Em FILES
322: Documents files used. It's helpful to document both the file and a
323: short description of how the file is used (created, modified, etc.).
324: .
325: .It Em EXAMPLES
326: Example usages. This often contains snippets of well-formed,
327: well-tested invocations. Make doubly sure that your examples work
328: properly! Assume that users will skip to this section and use your
329: example verbatim.
330: .
331: .It Em DIAGNOSTICS
332: Documents error conditions. This is most useful in section 4 manuals.
333: Historically, this section was used in place of
334: .Em EXIT STATUS
335: for manuals in sections 1, 6, and 8; however, this practise is
336: discouraged.
337: .
338: .It Em ERRORS
339: Documents error handling in sections 2, 3, and 9.
340: .
341: .It Em SEE ALSO
342: References other manuals with related topics. This section should exist
343: for most manuals. Cross-references should conventionally be ordered
344: first by section, then alphabetically.
345: .Pp
346: .D1 \. Ns Sx \&BR No bar \&( 1 \&),
347: .D1 \. Ns Sx \&BR No foo \&( 1 \&),
348: .D1 \. Ns Sx \&BR No baz \&( 2 \&).
349: .
350: .It Em STANDARDS
351: References any standards implemented or used, such as
352: .Pp
353: .D1 IEEE Std 1003.2 (\e(lqPOSIX.2\e(rq)
354: .Pp
355: If not adhering to any standards, the
356: .Em HISTORY
357: section should be used.
358: .
359: .It Em HISTORY
360: The history of any manual without a
361: .Em STANDARDS
362: section should be described in this section.
363: .
364: .It Em AUTHORS
365: Credits to authors, if applicable, should appear in this section.
366: Authors should generally be noted by both name and an e-mail address.
367: .
368: .It Em CAVEATS
369: Explanations of common misuses and misunderstandings should be explained
370: in this section.
371: .
372: .It Em BUGS
373: Extant bugs should be described in this section.
374: .
375: .It Em SECURITY CONSIDERATIONS
376: Documents any security precautions that operators should consider.
377: .
1.41 kristaps 378: .El
1.28 kristaps 379: .
380: .
1.22 kristaps 381: .Sh MACRO SYNTAX
1.2 kristaps 382: Macros are one to three three characters in length and begin with a
1.4 kristaps 383: control character ,
1.32 kristaps 384: .Sq \&. ,
1.2 kristaps 385: at the beginning of the line. An arbitrary amount of whitespace may
1.39 kristaps 386: sit between the control character and the macro name. Thus, the
387: following are equivalent:
388: .Bd -literal -offset indent
389: \&.PP
390: \&.\ \ \ PP
391: .Ed
1.32 kristaps 392: .
393: .Pp
1.1 kristaps 394: The
1.32 kristaps 395: .Nm
1.30 kristaps 396: macros are classified by scope: line scope or block scope. Line
1.22 kristaps 397: macros are only scoped to the current line (and, in some situations,
398: the subsequent line). Block macros are scoped to the current line and
399: subsequent lines until closed by another block macro.
1.28 kristaps 400: .
401: .
1.32 kristaps 402: .Ss Line Macros
1.30 kristaps 403: Line macros are generally scoped to the current line, with the body
404: consisting of zero or more arguments. If a macro is scoped to the next
405: line and the line arguments are empty, the next line is used instead,
406: else the general syntax is used. Thus:
1.32 kristaps 407: .Bd -literal -offset indent
1.30 kristaps 408: \&.I
1.4 kristaps 409: foo
1.32 kristaps 410: .Ed
411: .
412: .Pp
1.20 kristaps 413: is equivalent to
1.32 kristaps 414: .Sq \&.I foo .
1.35 kristaps 415: If next-line macros are invoked consecutively, only the last is used.
416: If a next-line macro is proceded by a block macro, it is ignored.
1.32 kristaps 417: .Bd -literal -offset indent
1.22 kristaps 418: \&.YO \(lBbody...\(rB
419: \(lBbody...\(rB
1.32 kristaps 420: .Ed
421: .
422: .Pp
423: .Bl -column -compact -offset indent "MacroX" "ArgumentsX" "ScopeXXXXX"
424: .It Em Macro Ta Em Arguments Ta Em Scope
1.39 kristaps 425: .It Sx \&B Ta n Ta next-line
426: .It Sx \&BI Ta n Ta current
427: .It Sx \&BR Ta n Ta current
428: .It Sx \&DT Ta 0 Ta current
429: .It Sx \&I Ta n Ta next-line
430: .It Sx \&IB Ta n Ta current
431: .It Sx \&IR Ta n Ta current
1.40 kristaps 432: .It Sx \&PD Ta n Ta current
1.39 kristaps 433: .It Sx \&R Ta n Ta next-line
434: .It Sx \&RB Ta n Ta current
435: .It Sx \&RI Ta n Ta current
436: .It Sx \&SB Ta n Ta next-line
437: .It Sx \&SM Ta n Ta next-line
438: .It Sx \&TH Ta >1, <6 Ta current
439: .It Sx \&UC Ta n Ta current
440: .It Sx \&br Ta 0 Ta current
441: .It Sx \&fi Ta 0 Ta current
442: .It Sx \&i Ta n Ta current
443: .It Sx \&na Ta 0 Ta current
444: .It Sx \&nf Ta 0 Ta current
445: .It Sx \&r Ta 0 Ta current
446: .It Sx \&sp Ta 1 Ta current
1.32 kristaps 447: .El
448: .
449: .Pp
1.31 kristaps 450: The
1.40 kristaps 451: .Sx \&PD ,
1.39 kristaps 452: .Sx \&RS ,
453: .Sx \&RE ,
454: .Sx \&UC ,
455: .Sx \&br ,
456: .Sx \&fi ,
457: .Sx \&i ,
458: .Sx \&na ,
459: .Sx \&nf ,
460: .Sx \&r ,
1.22 kristaps 461: and
1.39 kristaps 462: .Sx \&sp
1.36 kristaps 463: macros should not be used. They're included for compatibility.
1.28 kristaps 464: .
465: .
1.32 kristaps 466: .Ss Block Macros
1.30 kristaps 467: Block macros are comprised of a head and body. Like for in-line macros,
468: the head is scoped to the current line and, in one circumstance, the
469: next line; the body is scoped to subsequent lines and is closed out by a
470: subsequent block macro invocation.
1.32 kristaps 471: .Bd -literal -offset indent
1.22 kristaps 472: \&.YO \(lBhead...\(rB
473: \(lBhead...\(rB
474: \(lBbody...\(rB
1.32 kristaps 475: .Ed
476: .
477: .Pp
1.30 kristaps 478: The closure of body scope may be to the section, where a macro is closed
479: by
1.39 kristaps 480: .Sx \&SH ;
1.30 kristaps 481: sub-section, closed by a section or
1.39 kristaps 482: .Sx \&SS ;
1.30 kristaps 483: part, closed by a section, sub-section, or
1.39 kristaps 484: .Sx \&RE ;
1.30 kristaps 485: or paragraph, closed by a section, sub-section, part,
1.39 kristaps 486: .Sx \&HP ,
487: .Sx \&IP ,
488: .Sx \&LP ,
489: .Sx \&P ,
490: .Sx \&PP ,
1.30 kristaps 491: or
1.39 kristaps 492: .Sx \&TP .
1.30 kristaps 493: No closure refers to an explicit block closing macro.
1.32 kristaps 494: .
495: .Pp
496: .Bl -column "MacroX" "ArgumentsX" "Head ScopeX" "sub-sectionX" -compact -offset indent
497: .It Em Macro Ta Em Arguments Ta Em Head Scope Ta Em Body Scope
1.39 kristaps 498: .It Sx \&HP Ta <2 Ta current Ta paragraph
499: .It Sx \&IP Ta <3 Ta current Ta paragraph
500: .It Sx \&LP Ta 0 Ta current Ta paragraph
501: .It Sx \&P Ta 0 Ta current Ta paragraph
502: .It Sx \&PP Ta 0 Ta current Ta paragraph
503: .It Sx \&RE Ta 0 Ta current Ta none
504: .It Sx \&RS Ta 1 Ta current Ta part
505: .It Sx \&SH Ta >0 Ta next-line Ta section
506: .It Sx \&SS Ta >0 Ta next-line Ta sub-section
507: .It Sx \&TP Ta n Ta next-line Ta paragraph
1.32 kristaps 508: .El
509: .
510: .Pp
1.22 kristaps 511: If a block macro is next-line scoped, it may only be followed by in-line
512: macros (excluding
1.39 kristaps 513: .Sx \&DT ,
1.40 kristaps 514: .Sx \&PD ,
1.39 kristaps 515: .Sx \&TH ,
516: .Sx \&UC ,
517: .Sx \&br ,
518: .Sx \&na ,
519: .Sx \&sp ,
520: .Sx \&nf ,
1.22 kristaps 521: and
1.39 kristaps 522: .Sx \&fi ) .
1.28 kristaps 523: .
524: .
1.22 kristaps 525: .Sh REFERENCE
526: This section is a canonical reference to all macros, arranged
527: alphabetically. For the scoping of individual macros, see
1.32 kristaps 528: .Sx MACRO SYNTAX .
1.28 kristaps 529: .
1.39 kristaps 530: .Ss \&B
1.22 kristaps 531: Text is rendered in bold face.
1.39 kristaps 532: .Ss \&BI
1.22 kristaps 533: Text is rendered alternately in bold face and italic. Thus,
1.32 kristaps 534: .Sq .BI this word and that
1.22 kristaps 535: causes
1.32 kristaps 536: .Sq this
1.22 kristaps 537: and
1.32 kristaps 538: .Sq and
1.22 kristaps 539: to render in bold face, while
1.32 kristaps 540: .Sq word
1.22 kristaps 541: and
1.32 kristaps 542: .Sq that
1.22 kristaps 543: render in italics. Whitespace between arguments is omitted in output.
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.39 kristaps 547: .Ss \&DT
1.36 kristaps 548: Has no effect. Included for compatibility.
1.39 kristaps 549: .Ss \&HP
1.23 kristaps 550: Begin a paragraph whose initial output line is left-justified, but
1.27 kristaps 551: subsequent output lines are indented, with the following syntax:
1.32 kristaps 552: .Bd -literal -offset indent
1.27 kristaps 553: \&.HP [width]
1.32 kristaps 554: .Ed
555: .
556: .Pp
1.38 kristaps 557: If scaling width
1.32 kristaps 558: .Va width
1.27 kristaps 559: is specified, it's saved for later paragraph left-margins; if
560: unspecified, the saved or default width is used.
1.39 kristaps 561: .Ss \&I
1.22 kristaps 562: Text is rendered in italics.
1.39 kristaps 563: .Ss \&IB
1.22 kristaps 564: Text is rendered alternately in italics and bold face. Whitespace
565: between arguments is omitted in output.
1.39 kristaps 566: .Ss \&IP
1.25 kristaps 567: Begin a paragraph with the following syntax:
1.32 kristaps 568: .Bd -literal -offset indent
1.25 kristaps 569: \&.IP [head [width]]
1.32 kristaps 570: .Ed
571: .
572: .Pp
1.25 kristaps 573: This follows the behaviour of the
1.39 kristaps 574: .Sx \&TP
1.26 kristaps 575: except for the macro syntax (all arguments on the line, instead of
1.27 kristaps 576: having next-line scope). If
1.32 kristaps 577: .Va width
1.27 kristaps 578: is specified, it's saved for later paragraph left-margins; if
579: unspecified, the saved or default width is used.
1.39 kristaps 580: .Ss \&IR
1.22 kristaps 581: Text is rendered alternately in italics and roman (the default font).
582: Whitespace between arguments is omitted in output.
1.39 kristaps 583: .Ss \&LP
1.22 kristaps 584: Begin an undecorated paragraph. The scope of a paragraph is closed by a
1.27 kristaps 585: subsequent paragraph, sub-section, section, or end of file. The saved
586: paragraph left-margin width is re-set to the default.
1.39 kristaps 587: .Ss \&P
588: Synonym for
589: .Sx \&LP .
590: .Ss \&PP
591: Synonym for
592: .Sx \&LP .
593: .Ss \&R
1.22 kristaps 594: Text is rendered in roman (the default font).
1.39 kristaps 595: .Ss \&RB
1.22 kristaps 596: Text is rendered alternately in roman (the default font) and bold face.
597: Whitespace between arguments is omitted in output.
1.39 kristaps 598: .Ss \&RE
1.30 kristaps 599: Explicitly close out the scope of a prior
1.39 kristaps 600: .Sx \&RS .
601: .Ss \&RI
1.22 kristaps 602: Text is rendered alternately in roman (the default font) and italics.
603: Whitespace between arguments is omitted in output.
1.39 kristaps 604: .Ss \&RS
1.30 kristaps 605: Begin a part setting the left margin. The left margin controls the
606: offset, following an initial indentation, to un-indented text such as
607: that of
1.39 kristaps 608: .Sx \&PP .
1.38 kristaps 609: A scaling width may be specified as following:
1.32 kristaps 610: .Bd -literal -offset indent
1.30 kristaps 611: \&.RS [width]
1.32 kristaps 612: .Ed
613: .
614: .Pp
1.30 kristaps 615: If
1.32 kristaps 616: .Va width
1.30 kristaps 617: is not specified, the saved or default width is used.
1.39 kristaps 618: .Ss \&SB
1.22 kristaps 619: Text is rendered in small size (one point smaller than the default font)
620: bold face.
1.39 kristaps 621: .Ss \&SH
1.22 kristaps 622: Begin a section. The scope of a section is only closed by another
1.27 kristaps 623: section or the end of file. The paragraph left-margin width is re-set
624: to the default.
1.39 kristaps 625: .Ss \&SM
1.22 kristaps 626: Text is rendered in small size (one point smaller than the default
627: font).
1.39 kristaps 628: .Ss \&SS
1.22 kristaps 629: Begin a sub-section. The scope of a sub-section is closed by a
1.27 kristaps 630: subsequent sub-section, section, or end of file. The paragraph
631: left-margin width is re-set to the default.
1.39 kristaps 632: .Ss \&TH
1.22 kristaps 633: Sets the title of the manual page with the following syntax:
1.43 ! kristaps 634: .Pp
! 635: .D1 \. Ns Sx \&TH No Cm title msec Op Cm date Op Cm src Op Cm vol
! 636: .Pp
! 637: At least the upper-case document title
! 638: .Cm title
! 639: and numeric manual section
! 640: .Cm msec
! 641: arguments must be provided. The
! 642: .Cm date
! 643: argument should be formatted as described in
! 644: .Sx Dates :
! 645: if it does not conform, the current date is used instead. The
! 646: .Cm src
! 647: string specifies the organisation providing the utility. The
! 648: .Cm vol
! 649: string replaces the default rendered volume, which is dictated by the
! 650: manual section.
! 651: .Pp
! 652: Examples:
1.32 kristaps 653: .Bd -literal -offset indent
1.43 ! kristaps 654: \&.TH CVS 5 "1992-02-12" GNU
1.32 kristaps 655: .Ed
656: .
1.39 kristaps 657: .Ss \&TP
1.25 kristaps 658: Begin a paragraph where the head, if exceeding the indentation width, is
1.24 kristaps 659: followed by a newline; if not, the body follows on the same line after a
1.25 kristaps 660: buffer to the indentation width. Subsequent output lines are indented.
1.32 kristaps 661: .
662: .Pp
1.38 kristaps 663: The indentation scaling width may be set as follows:
1.32 kristaps 664: .Bd -literal -offset indent
1.26 kristaps 665: \&.TP [width]
1.32 kristaps 666: .Ed
667: .
668: .Pp
1.38 kristaps 669: If
1.32 kristaps 670: .Va width
1.27 kristaps 671: is specified, it's saved for later paragraph left-margins; if
672: unspecified, the saved or default width is used.
1.40 kristaps 673: .Ss \&PD
674: Has no effect. Included for compatibility.
1.39 kristaps 675: .Ss \&UC
1.37 kristaps 676: Has no effect. Included for compatibility.
1.39 kristaps 677: .Ss \&br
1.22 kristaps 678: Breaks the current line. Consecutive invocations have no further effect.
1.39 kristaps 679: .Ss \&fi
1.22 kristaps 680: End literal mode begun by
1.39 kristaps 681: .Sx \&nf .
682: .Ss \&i
1.22 kristaps 683: Italicise arguments. If no arguments are specified, all subsequent text
684: is italicised.
1.39 kristaps 685: .Ss \&na
1.36 kristaps 686: Don't align to the right margin.
1.39 kristaps 687: .Ss \&nf
1.22 kristaps 688: Begin literal mode: all subsequent free-form lines have their end of
689: line boundaries preserved. May be ended by
1.39 kristaps 690: .Sx \&fi .
691: .Ss \&r
1.22 kristaps 692: Fonts and styles (bold face, italics) reset to roman (default font).
1.39 kristaps 693: .Ss \&sp
1.22 kristaps 694: Insert n spaces, where n is the macro's positive numeric argument. If
695: 0, this is equivalent to the
1.39 kristaps 696: .Sx \&br
1.22 kristaps 697: macro.
1.28 kristaps 698: .
699: .
1.18 kristaps 700: .Sh COMPATIBILITY
1.23 kristaps 701: This section documents compatibility with other roff implementations, at
702: this time limited to
1.32 kristaps 703: .Xr groff 1 .
704: .Bl -hyphen
705: .It
1.23 kristaps 706: In quoted literals, groff allowed pair-wise double-quotes to produce a
707: standalone double-quote in formatted output. This idiosyncratic
708: behaviour is no longer applicable.
1.32 kristaps 709: .It
1.23 kristaps 710: The
1.32 kristaps 711: .Sq sp
1.23 kristaps 712: macro does not accept negative numbers.
1.32 kristaps 713: .It
1.23 kristaps 714: Blocks of whitespace are stripped from both macro and free-form text
715: lines (except when in literal mode), while groff would retain whitespace
716: in free-form text lines.
1.32 kristaps 717: .El
1.28 kristaps 718: .
719: .
1.1 kristaps 720: .Sh SEE ALSO
1.32 kristaps 721: .Xr mandoc 1 ,
722: .Xr mandoc_char 7
1.28 kristaps 723: .
724: .
1.1 kristaps 725: .Sh AUTHORS
726: The
1.32 kristaps 727: .Nm
1.23 kristaps 728: reference was written by
1.32 kristaps 729: .An Kristaps Dzonsons Aq kristaps@kth.se .
1.28 kristaps 730: .
731: .
1.1 kristaps 732: .Sh CAVEATS
733: Do not use this language. Use
1.32 kristaps 734: .Xr mdoc 7 ,
1.1 kristaps 735: instead.
1.28 kristaps 736: .
CVSweb