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