Annotation of src/usr.bin/mandoc/mdoc.7, Revision 1.41
1.41 ! schwarze 1: .\" $Id: mdoc.7,v 1.40 2010/07/15 23:46:58 schwarze Exp $
1.1 kristaps 2: .\"
1.39 schwarze 3: .\" Copyright (c) 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
4: .\" Copyright (c) 2010 Ingo Schwarze <schwarze@openbsd.org>
1.1 kristaps 5: .\"
6: .\" Permission to use, copy, modify, and distribute this software for any
1.2 schwarze 7: .\" purpose with or without fee is hereby granted, provided that the above
8: .\" copyright notice and this permission notice appear in all copies.
1.1 kristaps 9: .\"
1.2 schwarze 10: .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11: .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12: .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13: .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14: .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15: .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16: .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1.9 schwarze 17: .\"
1.41 ! schwarze 18: .Dd $Mdocdate: July 15 2010 $
1.2 schwarze 19: .Dt MDOC 7
1.1 kristaps 20: .Os
21: .Sh NAME
1.15 schwarze 22: .Nm mdoc
23: .Nd mdoc language reference
1.1 kristaps 24: .Sh DESCRIPTION
25: The
1.15 schwarze 26: .Nm mdoc
1.9 schwarze 27: language is used to format
1.15 schwarze 28: .Bx
29: .Ux
1.41 ! schwarze 30: manuals.
! 31: In this reference document, we describe its syntax, structure, and
! 32: usage.
! 33: Our reference implementation is mandoc; the
1.15 schwarze 34: .Sx COMPATIBILITY
1.26 schwarze 35: section describes compatibility with other troff \-mdoc implementations.
1.15 schwarze 36: .Pp
1.1 kristaps 37: An
1.15 schwarze 38: .Nm
1.34 schwarze 39: document follows simple rules: lines beginning with the control
1.9 schwarze 40: character
1.15 schwarze 41: .Sq \.
1.41 ! schwarze 42: are parsed for macros.
! 43: Other lines are interpreted within the scope of
1.1 kristaps 44: prior macros:
1.15 schwarze 45: .Bd -literal -offset indent
1.1 kristaps 46: \&.Sh Macro lines change control state.
47: Other lines are interpreted within the current state.
1.15 schwarze 48: .Ed
1.9 schwarze 49: .Sh LANGUAGE SYNTAX
1.15 schwarze 50: .Nm
1.1 kristaps 51: documents may contain only graphable 7-bit ASCII characters, the space
1.41 ! schwarze 52: character, and, in certain circumstances, the tab character.
! 53: All manuals must have
1.15 schwarze 54: .Ux
1.9 schwarze 55: line terminators.
1.15 schwarze 56: .Ss Comments
1.8 schwarze 57: Text following a
1.41 ! schwarze 58: .Sq \e\*q ,
1.8 schwarze 59: whether in a macro or free-form text line, is ignored to the end of
1.41 ! schwarze 60: line.
! 61: A macro line with only a control character and comment escape,
! 62: .Sq \&.\e\*q ,
! 63: is also ignored.
! 64: Macro lines with only a control character and optionally whitespace are
! 65: stripped from input.
1.15 schwarze 66: .Ss Reserved Characters
1.1 kristaps 67: Within a macro line, the following characters are reserved:
1.17 schwarze 68: .Pp
1.15 schwarze 69: .Bl -tag -width Ds -offset indent -compact
70: .It \&.
71: .Pq period
72: .It \&,
73: .Pq comma
74: .It \&:
75: .Pq colon
76: .It \&;
77: .Pq semicolon
78: .It \&(
79: .Pq left-parenthesis
80: .It \&)
81: .Pq right-parenthesis
82: .It \&[
83: .Pq left-bracket
84: .It \&]
85: .Pq right-bracket
86: .It \&?
87: .Pq question
88: .It \&!
89: .Pq exclamation
90: .It \&|
91: .Pq vertical bar
92: .El
93: .Pp
1.1 kristaps 94: Use of reserved characters is described in
1.15 schwarze 95: .Sx MACRO SYNTAX .
1.8 schwarze 96: For general use in macro lines, these characters must either be escaped
97: with a non-breaking space
1.15 schwarze 98: .Pq Sq \e&
1.9 schwarze 99: or, if applicable, an appropriate escape sequence used.
1.15 schwarze 100: .Ss Special Characters
1.8 schwarze 101: Special characters may occur in both macro and free-form lines.
102: Sequences begin with the escape character
1.15 schwarze 103: .Sq \e
1.9 schwarze 104: followed by either an open-parenthesis
1.15 schwarze 105: .Sq \&(
1.1 kristaps 106: for two-character sequences; an open-bracket
1.15 schwarze 107: .Sq \&[
1.1 kristaps 108: for n-character sequences (terminated at a close-bracket
1.15 schwarze 109: .Sq \&] ) ;
1.27 schwarze 110: or a single one-character sequence.
111: See
1.15 schwarze 112: .Xr mandoc_char 7
1.27 schwarze 113: for a complete list.
114: Examples include
1.15 schwarze 115: .Sq \e(em
116: .Pq em-dash
1.9 schwarze 117: and
1.15 schwarze 118: .Sq \ee
119: .Pq back-slash .
120: .Ss Text Decoration
1.13 schwarze 121: Terms may be text-decorated using the
1.15 schwarze 122: .Sq \ef
1.20 schwarze 123: escape followed by an indicator: B (bold), I, (italic), R (Roman), or P
1.22 schwarze 124: (revert to previous mode):
1.20 schwarze 125: .Pp
126: .D1 \efBbold\efR \efIitalic\efP
127: .Pp
128: A numerical representation 3, 2, or 1 (bold, italic, and Roman,
1.27 schwarze 129: respectively) may be used instead.
130: A text decoration is valid within
1.34 schwarze 131: the current font scope only: if a macro opens a font scope alongside
1.20 schwarze 132: its own scope, such as
133: .Sx \&Bf
134: .Cm \&Sy ,
135: in-scope invocations of
136: .Sq \ef
1.27 schwarze 137: are only valid within the font scope of the macro.
138: If
1.20 schwarze 139: .Sq \ef
140: is specified outside of any font scope, such as in unenclosed, free-form
141: text, it will affect the remainder of the document.
142: .Pp
143: Text may also be sized with the
144: .Sq \es
145: escape, whose syntax is one of
146: .Sq \es+-n
147: for one-digit numerals;
148: .Sq \es(+-nn
149: or
150: .Sq \es+-(nn
151: for two-digit numerals; and
152: .Sq \es[+-N] ,
153: .Sq \es+-[N] ,
154: .Sq \es'+-N' ,
155: or
156: .Sq \es+-'N'
157: for arbitrary-digit numerals:
158: .Pp
159: .D1 \es+1bigger\es-1
160: .D1 \es[+10]much bigger\es[-10]
161: .D1 \es+(10much bigger\es-(10
162: .D1 \es+'100'much much bigger\es-'100'
163: .Pp
1.22 schwarze 164: Note these forms are
1.20 schwarze 165: .Em not
1.22 schwarze 166: recommended for
1.15 schwarze 167: .Nm ,
1.20 schwarze 168: which encourages semantic annotation.
1.15 schwarze 169: .Ss Predefined Strings
1.22 schwarze 170: Historically,
1.15 schwarze 171: .Xr groff 1
1.22 schwarze 172: also defined a set of package-specific
1.15 schwarze 173: .Dq predefined strings ,
1.22 schwarze 174: which, like
1.15 schwarze 175: .Sx Special Characters ,
1.35 schwarze 176: mark special output characters and strings by way of input codes.
1.13 schwarze 177: Predefined strings are escaped with the slash-asterisk,
1.15 schwarze 178: .Sq \e* :
1.13 schwarze 179: single-character
1.15 schwarze 180: .Sq \e*X ,
1.13 schwarze 181: two-character
1.15 schwarze 182: .Sq \e*(XX ,
1.13 schwarze 183: and N-character
1.15 schwarze 184: .Sq \e*[N] .
1.13 schwarze 185: See
1.15 schwarze 186: .Xr mandoc_char 7
1.27 schwarze 187: for a complete list.
188: Examples include
1.15 schwarze 189: .Sq \e*(Am
190: .Pq ampersand
1.13 schwarze 191: and
1.15 schwarze 192: .Sq \e*(Ba
193: .Pq vertical bar .
194: .Ss Whitespace
1.26 schwarze 195: Whitespace consists of the space character.
196: In free-form lines, whitespace is preserved within a line; un-escaped
197: trailing spaces are stripped from input (unless in a literal context).
198: Blank free-form lines, which may include whitespace, are only permitted
199: within literal contexts.
1.15 schwarze 200: .Pp
1.27 schwarze 201: In macro lines, whitespace delimits arguments and is discarded.
202: If arguments are quoted, whitespace within the quotes is retained.
1.15 schwarze 203: .Ss Quotation
1.9 schwarze 204: Macro arguments may be quoted with a double-quote to group
1.27 schwarze 205: space-delimited terms or to retain blocks of whitespace.
206: A quoted argument begins with a double-quote preceded by whitespace.
207: The next double-quote not pair-wise adjacent to another double-quote
208: terminates the literal, regardless of surrounding whitespace.
1.15 schwarze 209: .Pp
1.9 schwarze 210: This produces tokens
1.15 schwarze 211: .Sq a" ,
212: .Sq b c ,
213: .Sq de ,
1.9 schwarze 214: and
1.15 schwarze 215: .Sq fg" .
1.9 schwarze 216: Note that any quoted term, be it argument or macro, is indiscriminately
1.27 schwarze 217: considered literal text.
218: Thus, the following produces
1.15 schwarze 219: .Sq \&Em a :
220: .Bd -literal -offset indent
1.9 schwarze 221: \&.Em "Em a"
1.15 schwarze 222: .Ed
223: .Pp
1.9 schwarze 224: In free-form mode, quotes are regarded as opaque text.
1.17 schwarze 225: .Ss Dates
226: There are several macros in
227: .Nm
1.27 schwarze 228: that require a date argument.
229: The canonical form for dates is the American format:
1.17 schwarze 230: .Pp
231: .D1 Cm Month Day , Year
232: .Pp
233: The
234: .Cm Day
1.27 schwarze 235: value is an optionally zero-padded numeral.
236: The
1.17 schwarze 237: .Cm Month
1.27 schwarze 238: value is the full month name.
239: The
1.17 schwarze 240: .Cm Year
241: value is the full four-digit year.
242: .Pp
1.19 schwarze 243: Reduced form dates are broken-down canonical form dates:
1.17 schwarze 244: .Pp
1.19 schwarze 245: .D1 Cm Month , Year
246: .D1 Cm Year
1.17 schwarze 247: .Pp
248: Some examples of valid dates follow:
249: .Pp
250: .D1 "May, 2009" Pq reduced form
251: .D1 "2009" Pq reduced form
252: .D1 "May 20, 2009" Pq canonical form
253: .Ss Scaling Widths
254: Many macros support scaled widths for their arguments, such as
255: stipulating a two-inch list indentation with the following:
256: .Bd -literal -offset indent
257: \&.Bl -tag -width 2i
258: .Ed
259: .Pp
260: The syntax for scaled widths is
261: .Sq Li [+-]?[0-9]*.[0-9]*[:unit:] ,
262: where a decimal must be preceded or proceeded by at least one digit.
1.27 schwarze 263: Negative numbers, while accepted, are truncated to zero.
264: The following scaling units are accepted:
1.17 schwarze 265: .Pp
266: .Bl -tag -width Ds -offset indent -compact
267: .It c
268: centimetre
269: .It i
270: inch
271: .It P
272: pica (~1/6 inch)
273: .It p
274: point (~1/72 inch)
275: .It f
276: synonym for
277: .Sq u
278: .It v
279: default vertical span
280: .It m
281: width of rendered
282: .Sq m
283: .Pq em
284: character
285: .It n
286: width of rendered
287: .Sq n
288: .Pq en
289: character
290: .It u
291: default horizontal span
292: .It M
293: mini-em (~1/100 em)
294: .El
295: .Pp
296: Using anything other than
297: .Sq m ,
298: .Sq n ,
299: .Sq u ,
300: or
301: .Sq v
1.27 schwarze 302: is necessarily non-portable across output media.
303: See
1.17 schwarze 304: .Sx COMPATIBILITY .
1.28 schwarze 305: .Ss Sentence Spacing
306: When composing a manual, make sure that your sentences end at the end of
307: a line.
308: By doing so, front-ends will be able to apply the proper amount of
309: spacing after the end of sentence (unescaped) period, exclamation mark,
1.29 schwarze 310: or question mark followed by zero or more non-sentence closing
311: delimiters (
312: .Ns Sq \&) ,
313: .Sq \&] ,
314: .Sq \&' ,
315: .Sq \&" ) .
316: .Pp
317: The proper spacing is also intelligently preserved if a sentence ends at
318: the boundary of a macro line, e.g.,
319: .Pp
320: .D1 \&Xr mandoc 1 \.
321: .D1 \&Fl T \&Ns \&Cm ascii \.
1.8 schwarze 322: .Sh MANUAL STRUCTURE
1.17 schwarze 323: A well-formed
1.15 schwarze 324: .Nm
1.17 schwarze 325: document consists of a document prologue followed by one or more
326: sections.
327: .Pp
328: The prologue, which consists of (in order) the
329: .Sx \&Dd ,
330: .Sx \&Dt ,
331: and
332: .Sx \&Os
333: macros, is required for every document.
334: .Pp
1.22 schwarze 335: The first section (sections are denoted by
1.17 schwarze 336: .Sx \&Sh )
337: must be the NAME section, consisting of at least one
338: .Sx \&Nm
1.9 schwarze 339: followed by
1.17 schwarze 340: .Sx \&Nd .
341: .Pp
1.35 schwarze 342: Following that, convention dictates specifying at least the
343: .Em SYNOPSIS
344: and
345: .Em DESCRIPTION
346: sections, although this varies between manual sections.
1.17 schwarze 347: .Pp
348: The following is a well-formed skeleton
349: .Nm
350: file:
1.15 schwarze 351: .Bd -literal -offset indent
1.8 schwarze 352: \&.Dd $\&Mdocdate$
353: \&.Dt mdoc 7
354: \&.Os
355: \&.Sh NAME
1.15 schwarze 356: \&.Nm foo
357: \&.Nd a description goes here
1.31 schwarze 358: \&.\e\*q The next is for sections 2, 3, & 9 only.
1.15 schwarze 359: \&.\e\*q .Sh LIBRARY
360: \&.Sh SYNOPSIS
361: \&.Nm foo
362: \&.Op Fl options
363: \&.Ar
364: \&.Sh DESCRIPTION
365: The
366: \&.Nm
367: utility processes files ...
368: \&.\e\*q .Sh IMPLEMENTATION NOTES
369: \&.\e\*q The next is for sections 2, 3, & 9 only.
370: \&.\e\*q .Sh RETURN VALUES
371: \&.\e\*q The next is for sections 1, 6, 7, & 8 only.
372: \&.\e\*q .Sh ENVIRONMENT
373: \&.\e\*q .Sh FILES
1.27 schwarze 374: \&.\e\*q The next is for sections 1 & 8 only.
375: \&.\e\*q .Sh EXIT STATUS
1.15 schwarze 376: \&.\e\*q .Sh EXAMPLES
377: \&.\e\*q The next is for sections 1, 4, 6, 7, & 8 only.
378: \&.\e\*q .Sh DIAGNOSTICS
379: \&.\e\*q The next is for sections 2, 3, & 9 only.
380: \&.\e\*q .Sh ERRORS
381: \&.\e\*q .Sh SEE ALSO
382: \&.\e\*q .Xr foobar 1
383: \&.\e\*q .Sh STANDARDS
384: \&.\e\*q .Sh HISTORY
385: \&.\e\*q .Sh AUTHORS
386: \&.\e\*q .Sh CAVEATS
387: \&.\e\*q .Sh BUGS
388: \&.\e\*q .Sh SECURITY CONSIDERATIONS
389: .Ed
390: .Pp
1.17 schwarze 391: The sections in a
392: .Nm
1.27 schwarze 393: document are conventionally ordered as they appear above.
394: Sections should be composed as follows:
1.19 schwarze 395: .Bl -ohang -offset Ds
396: .It Em NAME
1.27 schwarze 397: The name(s) and a short description of the documented material.
398: The syntax for this as follows:
1.19 schwarze 399: .Bd -literal -offset indent
400: \&.Nm name0
401: \&.Nm name1
402: \&.Nm name2
403: \&.Nd a short description
404: .Ed
405: .Pp
406: The
1.17 schwarze 407: .Sx \&Nm
1.19 schwarze 408: macro(s) must precede the
409: .Sx \&Nd
410: macro.
1.21 schwarze 411: .Pp
1.22 schwarze 412: See
1.21 schwarze 413: .Sx \&Nm
414: and
415: .Sx \&Nd .
1.19 schwarze 416: .It Em LIBRARY
417: The name of the library containing the documented material, which is
1.31 schwarze 418: assumed to be a function in a section 2, 3, or 9 manual.
1.27 schwarze 419: The syntax for this is as follows:
1.19 schwarze 420: .Bd -literal -offset indent
421: \&.Lb libarm
422: .Ed
423: .Pp
424: See
1.21 schwarze 425: .Sx \&Lb .
1.19 schwarze 426: .It Em SYNOPSIS
427: Documents the utility invocation syntax, function call syntax, or device
1.22 schwarze 428: configuration.
1.19 schwarze 429: .Pp
430: For the first, utilities (sections 1, 6, and 8), this is
431: generally structured as follows:
432: .Bd -literal -offset indent
433: \&.Nm foo
434: \&.Op Fl v
435: \&.Op Fl o Ar file
436: \&.Op Ar
437: \&.Nm bar
438: \&.Op Fl v
439: \&.Op Fl o Ar file
440: \&.Op Ar
441: .Ed
442: .Pp
443: For the second, function calls (sections 2, 3, 9):
444: .Bd -literal -offset indent
445: \&.Vt extern const char *global;
446: \&.In header.h
447: \&.Ft "char *"
448: \&.Fn foo "const char *src"
449: \&.Ft "char *"
450: \&.Fn bar "const char *src"
451: .Ed
452: .Pp
453: And for the third, configurations (section 4):
454: .Bd -literal -offset indent
455: \&.Cd \*qit* at isa? port 0x2e\*q
456: \&.Cd \*qit* at isa? port 0x4e\*q
457: .Ed
458: .Pp
1.22 schwarze 459: Manuals not in these sections generally don't need a
1.19 schwarze 460: .Em SYNOPSIS .
1.21 schwarze 461: .Pp
1.35 schwarze 462: Some macros are displayed differently in the
463: .Em SYNOPSIS
464: section, particularly
465: .Sx \&Nm ,
1.21 schwarze 466: .Sx \&Cd ,
1.35 schwarze 467: .Sx \&Fd ,
1.21 schwarze 468: .Sx \&Fn ,
1.35 schwarze 469: .Sx \&Fo ,
470: .Sx \&In ,
471: .Sx \&Vt ,
472: and
473: .Sx \&Ft .
1.41 ! schwarze 474: All of these macros are output on their own line.
! 475: If two such dissimilar macros are pair-wise invoked (except for
1.35 schwarze 476: .Sx \&Ft
477: before
478: .Sx \&Fo
479: or
480: .Sx \&Fn ) ,
481: they are separated by a vertical space, unless in the case of
482: .Sx \&Fo ,
483: .Sx \&Fn ,
484: and
1.21 schwarze 485: .Sx \&Ft ,
1.35 schwarze 486: which are always separated by vertical space.
1.38 schwarze 487: .Pp
488: When text and macros following an
489: .Sx \&Nm
490: macro starting an input line span multiple output lines,
491: all output lines but the first will be indented to align
492: with the text immediately following the
493: .Sx \&Nm
494: macro, up to the next
495: .Sx \&Nm ,
496: .Sx \&Sx ,
497: or
498: .Sx \&Ss
499: macro or the end of an enclosing block, whichever comes first.
1.19 schwarze 500: .It Em DESCRIPTION
1.22 schwarze 501: This expands upon the brief, one-line description in
1.19 schwarze 502: .Em NAME .
503: It usually contains a break-down of the options (if documenting a
504: command), such as:
505: .Bd -literal -offset indent
506: The arguments are as follows:
507: \&.Bl \-tag \-width Ds
508: \&.It Fl v
509: Print verbose information.
510: \&.El
511: .Ed
1.21 schwarze 512: .Pp
1.19 schwarze 513: Manuals not documenting a command won't include the above fragment.
514: .It Em IMPLEMENTATION NOTES
1.27 schwarze 515: Implementation-specific notes should be kept here.
516: This is useful when implementing standard functions that may have side
517: effects or notable algorithmic implications.
1.19 schwarze 518: .It Em RETURN VALUES
519: This section is the dual of
520: .Em EXIT STATUS ,
1.27 schwarze 521: which is used for commands.
522: It documents the return values of functions in sections 2, 3, and 9.
1.19 schwarze 523: .Pp
524: See
525: .Sx \&Rv .
526: .It Em ENVIRONMENT
527: Documents any usages of environment variables, e.g.,
528: .Xr environ 7 .
529: .Pp
530: See
531: .Sx \&Ev .
532: .It Em FILES
1.27 schwarze 533: Documents files used.
534: It's helpful to document both the file and a short description of how
535: the file is used (created, modified, etc.).
1.19 schwarze 536: .Pp
537: See
538: .Sx \&Pa .
1.27 schwarze 539: .It Em EXIT STATUS
540: Command exit status for section 1, 6, and 8 manuals.
541: This section is the dual of
542: .Em RETURN VALUES ,
543: which is used for functions.
544: Historically, this information was described in
545: .Em DIAGNOSTICS ,
546: a practise that is now discouraged.
547: .Pp
548: See
549: .Sx \&Ex .
1.19 schwarze 550: .It Em EXAMPLES
1.27 schwarze 551: Example usages.
552: This often contains snippets of well-formed, well-tested invocations.
553: Make doubly sure that your examples work properly!
1.19 schwarze 554: .It Em DIAGNOSTICS
1.27 schwarze 555: Documents error conditions.
556: This is most useful in section 4 manuals.
1.19 schwarze 557: Historically, this section was used in place of
558: .Em EXIT STATUS
559: for manuals in sections 1, 6, and 8; however, this practise is
560: discouraged.
561: .Pp
562: See
1.21 schwarze 563: .Sx \&Bl
564: .Fl diag .
1.19 schwarze 565: .It Em ERRORS
566: Documents error handling in sections 2, 3, and 9.
567: .Pp
568: See
569: .Sx \&Er .
570: .It Em SEE ALSO
1.27 schwarze 571: References other manuals with related topics.
572: This section should exist for most manuals.
573: Cross-references should conventionally be ordered first by section, then
574: alphabetically.
1.19 schwarze 575: .Pp
576: See
577: .Sx \&Xr .
578: .It Em STANDARDS
1.27 schwarze 579: References any standards implemented or used.
580: If not adhering to any standards, the
1.19 schwarze 581: .Em HISTORY
582: section should be used instead.
583: .Pp
584: See
585: .Sx \&St .
586: .It Em HISTORY
587: The history of any manual without a
588: .Em STANDARDS
589: section should be described in this section.
590: .It Em AUTHORS
591: Credits to authors, if applicable, should appear in this section.
592: Authors should generally be noted by both name and an e-mail address.
593: .Pp
594: See
595: .Sx \&An .
596: .It Em CAVEATS
597: Explanations of common misuses and misunderstandings should be explained
598: in this section.
599: .It Em BUGS
600: Extant bugs should be described in this section.
601: .It Em SECURITY CONSIDERATIONS
602: Documents any security precautions that operators should consider.
1.17 schwarze 603: .El
1.8 schwarze 604: .Sh MACRO SYNTAX
1.14 schwarze 605: Macros are one to three three characters in length and begin with a
606: control character ,
1.15 schwarze 607: .Sq \&. ,
1.27 schwarze 608: at the beginning of the line.
609: An arbitrary amount of whitespace may sit between the control character
610: and the macro name.
611: Thus, the following are equivalent:
1.17 schwarze 612: .Bd -literal -offset indent
613: \&.Pp
614: \&.\ \ \ \&Pp
615: .Ed
1.15 schwarze 616: .Pp
1.27 schwarze 617: The syntax of a macro depends on its classification.
618: In this section,
1.15 schwarze 619: .Sq \-arg
1.8 schwarze 620: refers to macro arguments, which may be followed by zero or more
1.15 schwarze 621: .Sq parm
1.8 schwarze 622: parameters;
1.15 schwarze 623: .Sq \&Yo
1.8 schwarze 624: opens the scope of a macro; and if specified,
1.15 schwarze 625: .Sq \&Yc
1.8 schwarze 626: closes it out.
1.15 schwarze 627: .Pp
1.8 schwarze 628: The
1.15 schwarze 629: .Em Callable
1.8 schwarze 630: column indicates that the macro may be called subsequent to the initial
1.27 schwarze 631: line-macro.
632: If a macro is not callable, then its invocation after the initial line
633: macro is interpreted as opaque text, such that
1.16 schwarze 634: .Sq \&.Fl \&Sh
1.14 schwarze 635: produces
1.16 schwarze 636: .Sq Fl \&Sh .
1.15 schwarze 637: .Pp
1.14 schwarze 638: The
1.15 schwarze 639: .Em Parsable
1.8 schwarze 640: column indicates whether the macro may be followed by further
1.27 schwarze 641: (ostensibly callable) macros.
642: If a macro is not parsable, subsequent macro invocations on the line
643: will be interpreted as opaque text.
1.15 schwarze 644: .Pp
1.14 schwarze 645: The
1.15 schwarze 646: .Em Scope
1.8 schwarze 647: column, if applicable, describes closure rules.
1.15 schwarze 648: .Ss Block full-explicit
1.27 schwarze 649: Multi-line scope closed by an explicit closing macro.
650: All macros contains bodies; only
1.17 schwarze 651: .Sx \&Bf
1.8 schwarze 652: contains a head.
1.15 schwarze 653: .Bd -literal -offset indent
1.9 schwarze 654: \&.Yo \(lB\-arg \(lBparm...\(rB\(rB \(lBhead...\(rB
655: \(lBbody...\(rB
1.1 kristaps 656: \&.Yc
1.15 schwarze 657: .Ed
658: .Pp
659: .Bl -column -compact -offset indent "MacroX" "CallableX" "ParsableX" "closed by XXX"
660: .It Em Macro Ta Em Callable Ta Em Parsable Ta Em Scope
1.17 schwarze 661: .It Sx \&Bd Ta \&No Ta \&No Ta closed by Sx \&Ed
662: .It Sx \&Bf Ta \&No Ta \&No Ta closed by Sx \&Ef
663: .It Sx \&Bk Ta \&No Ta \&No Ta closed by Sx \&Ek
664: .It Sx \&Bl Ta \&No Ta \&No Ta closed by Sx \&El
665: .It Sx \&Ed Ta \&No Ta \&No Ta opened by Sx \&Bd
666: .It Sx \&Ef Ta \&No Ta \&No Ta opened by Sx \&Bf
667: .It Sx \&Ek Ta \&No Ta \&No Ta opened by Sx \&Bk
668: .It Sx \&El Ta \&No Ta \&No Ta opened by Sx \&Bl
1.15 schwarze 669: .El
670: .Ss Block full-implicit
1.8 schwarze 671: Multi-line scope closed by end-of-file or implicitly by another macro.
1.9 schwarze 672: All macros have bodies; some
1.15 schwarze 673: .Po
1.17 schwarze 674: .Sx \&It Fl bullet ,
675: .Fl hyphen ,
676: .Fl dash ,
677: .Fl enum ,
678: .Fl item
1.15 schwarze 679: .Pc
1.17 schwarze 680: don't have heads; only one
681: .Po
682: .Sx \&It Fl column
1.22 schwarze 683: .Pc
1.17 schwarze 684: has multiple heads.
1.15 schwarze 685: .Bd -literal -offset indent
1.9 schwarze 686: \&.Yo \(lB\-arg \(lBparm...\(rB\(rB \(lBhead... \(lBTa head...\(rB\(rB
687: \(lBbody...\(rB
1.15 schwarze 688: .Ed
689: .Pp
690: .Bl -column -compact -offset indent "MacroX" "CallableX" "ParsableX" "closed by XXXXXXXXXXX"
691: .It Em Macro Ta Em Callable Ta Em Parsable Ta Em Scope
1.17 schwarze 692: .It Sx \&It Ta \&No Ta Yes Ta closed by Sx \&It , Sx \&El
693: .It Sx \&Nd Ta \&No Ta \&No Ta closed by Sx \&Sh
1.38 schwarze 694: .It Sx \&Nm Ta \&No Ta Yes Ta closed by Sx \&Nm , Sx \&Sh , Sx \&Ss
1.17 schwarze 695: .It Sx \&Sh Ta \&No Ta \&No Ta closed by Sx \&Sh
696: .It Sx \&Ss Ta \&No Ta \&No Ta closed by Sx \&Sh , Sx \&Ss
1.15 schwarze 697: .El
1.38 schwarze 698: .Pp
699: Note that the
700: .Sx \&Nm
701: macro is a
702: .Sx Block full-implicit
703: macro only when invoked as the first macro
704: in a
705: .Em SYNOPSIS
706: section line, else it is
707: .Sx In-line .
1.15 schwarze 708: .Ss Block partial-explicit
1.27 schwarze 709: Like block full-explicit, but also with single-line scope.
710: Each has at least a body and, in limited circumstances, a head
1.17 schwarze 711: .Po
712: .Sx \&Fo ,
713: .Sx \&Eo
714: .Pc
1.9 schwarze 715: and/or tail
1.17 schwarze 716: .Pq Sx \&Ec .
1.15 schwarze 717: .Bd -literal -offset indent
1.9 schwarze 718: \&.Yo \(lB\-arg \(lBparm...\(rB\(rB \(lBhead...\(rB
719: \(lBbody...\(rB
720: \&.Yc \(lBtail...\(rB
1.8 schwarze 721:
722: \&.Yo \(lB\-arg \(lBparm...\(rB\(rB \(lBhead...\(rB \
1.9 schwarze 723: \(lBbody...\(rB \&Yc \(lBtail...\(rB
1.15 schwarze 724: .Ed
725: .Pp
726: .Bl -column "MacroX" "CallableX" "ParsableX" "closed by XXXX" -compact -offset indent
727: .It Em Macro Ta Em Callable Ta Em Parsable Ta Em Scope
1.17 schwarze 728: .It Sx \&Ac Ta Yes Ta Yes Ta opened by Sx \&Ao
729: .It Sx \&Ao Ta Yes Ta Yes Ta closed by Sx \&Ac
730: .It Sx \&Bc Ta Yes Ta Yes Ta closed by Sx \&Bo
731: .It Sx \&Bo Ta Yes Ta Yes Ta opened by Sx \&Bc
732: .It Sx \&Brc Ta Yes Ta Yes Ta opened by Sx \&Bro
733: .It Sx \&Bro Ta Yes Ta Yes Ta closed by Sx \&Brc
734: .It Sx \&Dc Ta Yes Ta Yes Ta opened by Sx \&Do
735: .It Sx \&Do Ta Yes Ta Yes Ta closed by Sx \&Dc
736: .It Sx \&Ec Ta Yes Ta Yes Ta opened by Sx \&Eo
737: .It Sx \&Eo Ta Yes Ta Yes Ta closed by Sx \&Ec
738: .It Sx \&Fc Ta Yes Ta Yes Ta opened by Sx \&Fo
739: .It Sx \&Fo Ta \&No Ta \&No Ta closed by Sx \&Fc
740: .It Sx \&Oc Ta Yes Ta Yes Ta closed by Sx \&Oo
741: .It Sx \&Oo Ta Yes Ta Yes Ta opened by Sx \&Oc
742: .It Sx \&Pc Ta Yes Ta Yes Ta closed by Sx \&Po
743: .It Sx \&Po Ta Yes Ta Yes Ta opened by Sx \&Pc
744: .It Sx \&Qc Ta Yes Ta Yes Ta opened by Sx \&Oo
745: .It Sx \&Qo Ta Yes Ta Yes Ta closed by Sx \&Oc
746: .It Sx \&Re Ta \&No Ta \&No Ta opened by Sx \&Rs
747: .It Sx \&Rs Ta \&No Ta \&No Ta closed by Sx \&Re
748: .It Sx \&Sc Ta Yes Ta Yes Ta opened by Sx \&So
749: .It Sx \&So Ta Yes Ta Yes Ta closed by Sx \&Sc
750: .It Sx \&Xc Ta Yes Ta Yes Ta opened by Sx \&Xo
751: .It Sx \&Xo Ta Yes Ta Yes Ta closed by Sx \&Xc
1.15 schwarze 752: .El
753: .Ss Block partial-implicit
1.9 schwarze 754: Like block full-implicit, but with single-line scope closed by
1.15 schwarze 755: .Sx Reserved Characters
1.8 schwarze 756: or end of line.
1.15 schwarze 757: .Bd -literal -offset indent
1.8 schwarze 758: \&.Yo \(lB\-arg \(lBval...\(rB\(rB \(lBbody...\(rB \(lBres...\(rB
1.15 schwarze 759: .Ed
760: .Pp
761: .Bl -column "MacroX" "CallableX" "ParsableX" -compact -offset indent
762: .It Em Macro Ta Em Callable Ta Em Parsable
1.17 schwarze 763: .It Sx \&Aq Ta Yes Ta Yes
764: .It Sx \&Bq Ta Yes Ta Yes
765: .It Sx \&Brq Ta Yes Ta Yes
766: .It Sx \&D1 Ta \&No Ta \&Yes
767: .It Sx \&Dl Ta \&No Ta Yes
768: .It Sx \&Dq Ta Yes Ta Yes
769: .It Sx \&Op Ta Yes Ta Yes
770: .It Sx \&Pq Ta Yes Ta Yes
771: .It Sx \&Ql Ta Yes Ta Yes
772: .It Sx \&Qq Ta Yes Ta Yes
773: .It Sx \&Sq Ta Yes Ta Yes
1.22 schwarze 774: .It Sx \&Vt Ta Yes Ta Yes
1.15 schwarze 775: .El
1.22 schwarze 776: .Pp
777: Note that the
778: .Sx \&Vt
779: macro is a
780: .Sx Block partial-implicit
781: only when invoked as the first macro
1.33 schwarze 782: in a
783: .Em SYNOPSIS
784: section line, else it is
1.22 schwarze 785: .Sx In-line .
1.15 schwarze 786: .Ss In-line
1.9 schwarze 787: Closed by
1.15 schwarze 788: .Sx Reserved Characters ,
1.27 schwarze 789: end of line, fixed argument lengths, and/or subsequent macros.
790: In-line macros have only text children.
791: If a number (or inequality) of arguments is
1.15 schwarze 792: .Pq n ,
1.1 kristaps 793: then the macro accepts an arbitrary number of arguments.
1.15 schwarze 794: .Bd -literal -offset indent
1.8 schwarze 795: \&.Yo \(lB\-arg \(lBval...\(rB\(rB \(lBargs...\(rB \(lbres...\(rb
796:
797: \&.Yo \(lB\-arg \(lBval...\(rB\(rB \(lBargs...\(rB Yc...
798:
799: \&.Yo \(lB\-arg \(lBval...\(rB\(rB arg0 arg1 argN
1.15 schwarze 800: .Ed
801: .Pp
802: .Bl -column "MacroX" "CallableX" "ParsableX" "Arguments" -compact -offset indent
803: .It Em Macro Ta Em Callable Ta Em Parsable Ta Em Arguments
1.17 schwarze 804: .It Sx \&%A Ta \&No Ta \&No Ta >0
805: .It Sx \&%B Ta \&No Ta \&No Ta >0
806: .It Sx \&%C Ta \&No Ta \&No Ta >0
807: .It Sx \&%D Ta \&No Ta \&No Ta >0
808: .It Sx \&%I Ta \&No Ta \&No Ta >0
809: .It Sx \&%J Ta \&No Ta \&No Ta >0
810: .It Sx \&%N Ta \&No Ta \&No Ta >0
811: .It Sx \&%O Ta \&No Ta \&No Ta >0
812: .It Sx \&%P Ta \&No Ta \&No Ta >0
1.18 schwarze 813: .It Sx \&%Q Ta \&No Ta \&No Ta >0
1.17 schwarze 814: .It Sx \&%R Ta \&No Ta \&No Ta >0
815: .It Sx \&%T Ta \&No Ta \&No Ta >0
1.18 schwarze 816: .It Sx \&%U Ta \&No Ta \&No Ta >0
1.17 schwarze 817: .It Sx \&%V Ta \&No Ta \&No Ta >0
818: .It Sx \&Ad Ta Yes Ta Yes Ta n
819: .It Sx \&An Ta Yes Ta Yes Ta n
820: .It Sx \&Ap Ta Yes Ta Yes Ta 0
821: .It Sx \&Ar Ta Yes Ta Yes Ta n
822: .It Sx \&At Ta Yes Ta Yes Ta 1
823: .It Sx \&Bsx Ta Yes Ta Yes Ta n
824: .It Sx \&Bt Ta \&No Ta \&No Ta 0
825: .It Sx \&Bx Ta Yes Ta Yes Ta n
826: .It Sx \&Cd Ta Yes Ta Yes Ta >0
827: .It Sx \&Cm Ta Yes Ta Yes Ta n
828: .It Sx \&Db Ta \&No Ta \&No Ta 1
829: .It Sx \&Dd Ta \&No Ta \&No Ta >0
830: .It Sx \&Dt Ta \&No Ta \&No Ta n
831: .It Sx \&Dv Ta Yes Ta Yes Ta n
832: .It Sx \&Dx Ta Yes Ta Yes Ta n
833: .It Sx \&Em Ta Yes Ta Yes Ta >0
834: .It Sx \&En Ta \&No Ta \&No Ta 0
835: .It Sx \&Er Ta Yes Ta Yes Ta >0
836: .It Sx \&Es Ta \&No Ta \&No Ta 0
837: .It Sx \&Ev Ta Yes Ta Yes Ta n
838: .It Sx \&Ex Ta \&No Ta \&No Ta n
839: .It Sx \&Fa Ta Yes Ta Yes Ta n
840: .It Sx \&Fd Ta \&No Ta \&No Ta >0
841: .It Sx \&Fl Ta Yes Ta Yes Ta n
842: .It Sx \&Fn Ta Yes Ta Yes Ta >0
843: .It Sx \&Fr Ta \&No Ta \&No Ta n
844: .It Sx \&Ft Ta Yes Ta Yes Ta n
845: .It Sx \&Fx Ta Yes Ta Yes Ta n
846: .It Sx \&Hf Ta \&No Ta \&No Ta n
847: .It Sx \&Ic Ta Yes Ta Yes Ta >0
848: .It Sx \&In Ta \&No Ta \&No Ta n
849: .It Sx \&Lb Ta \&No Ta \&No Ta 1
850: .It Sx \&Li Ta Yes Ta Yes Ta n
851: .It Sx \&Lk Ta Yes Ta Yes Ta n
852: .It Sx \&Lp Ta \&No Ta \&No Ta 0
853: .It Sx \&Ms Ta Yes Ta Yes Ta >0
854: .It Sx \&Mt Ta Yes Ta Yes Ta >0
855: .It Sx \&Nm Ta Yes Ta Yes Ta n
856: .It Sx \&No Ta Yes Ta Yes Ta 0
857: .It Sx \&Ns Ta Yes Ta Yes Ta 0
858: .It Sx \&Nx Ta Yes Ta Yes Ta n
859: .It Sx \&Os Ta \&No Ta \&No Ta n
860: .It Sx \&Ot Ta \&No Ta \&No Ta n
861: .It Sx \&Ox Ta Yes Ta Yes Ta n
862: .It Sx \&Pa Ta Yes Ta Yes Ta n
1.25 schwarze 863: .It Sx \&Pf Ta Yes Ta Yes Ta 1
1.17 schwarze 864: .It Sx \&Pp Ta \&No Ta \&No Ta 0
865: .It Sx \&Rv Ta \&No Ta \&No Ta n
866: .It Sx \&Sm Ta \&No Ta \&No Ta 1
867: .It Sx \&St Ta \&No Ta Yes Ta 1
868: .It Sx \&Sx Ta Yes Ta Yes Ta >0
869: .It Sx \&Sy Ta Yes Ta Yes Ta >0
870: .It Sx \&Tn Ta Yes Ta Yes Ta >0
871: .It Sx \&Ud Ta \&No Ta \&No Ta 0
872: .It Sx \&Ux Ta Yes Ta Yes Ta n
873: .It Sx \&Va Ta Yes Ta Yes Ta n
874: .It Sx \&Vt Ta Yes Ta Yes Ta >0
1.22 schwarze 875: .It Sx \&Xr Ta Yes Ta Yes Ta >0
1.17 schwarze 876: .It Sx \&br Ta \&No Ta \&No Ta 0
877: .It Sx \&sp Ta \&No Ta \&No Ta 1
1.22 schwarze 878: .El
1.17 schwarze 879: .Sh REFERENCE
880: This section is a canonical reference of all macros, arranged
1.27 schwarze 881: alphabetically.
882: For the scoping of individual macros, see
1.17 schwarze 883: .Sx MACRO SYNTAX .
884: .Ss \&%A
885: Author name of an
886: .Sx \&Rs
1.41 ! schwarze 887: block.
! 888: Multiple authors should each be accorded their own
1.17 schwarze 889: .Sx \%%A
1.41 ! schwarze 890: line.
! 891: Author names should be ordered with full or abbreviated forename(s)
! 892: first, then full surname.
1.17 schwarze 893: .Ss \&%B
894: Book title of an
895: .Sx \&Rs
1.41 ! schwarze 896: block.
! 897: This macro may also be used in a non-bibliographic context when
1.17 schwarze 898: referring to book titles.
899: .Ss \&%C
900: Publication city or location of an
901: .Sx \&Rs
902: block.
903: .Pp
904: .Em Remarks :
905: this macro is not implemented in
906: .Xr groff 1 .
907: .Ss \&%D
908: Publication date of an
909: .Sx \&Rs
1.41 ! schwarze 910: block.
! 911: This should follow the reduced or canonical form syntax described in
1.17 schwarze 912: .Sx Dates .
913: .Ss \&%I
914: Publisher or issuer name of an
915: .Sx \&Rs
916: block.
917: .Ss \&%J
918: Journal name of an
919: .Sx \&Rs
920: block.
921: .Ss \&%N
922: Issue number (usually for journals) of an
923: .Sx \&Rs
924: block.
925: .Ss \&%O
926: Optional information of an
927: .Sx \&Rs
928: block.
929: .Ss \&%P
930: Book or journal page number of an
931: .Sx \&Rs
932: block.
933: .Ss \&%Q
934: Institutional author (school, government, etc.) of an
935: .Sx \&Rs
1.41 ! schwarze 936: block.
! 937: Multiple institutional authors should each be accorded their own
1.17 schwarze 938: .Sx \&%Q
939: line.
940: .Ss \&%R
941: Technical report name of an
942: .Sx \&Rs
943: block.
944: .Ss \&%T
945: Article title of an
946: .Sx \&Rs
1.41 ! schwarze 947: block.
! 948: This macro may also be used in a non-bibliographical context when
! 949: referring to article titles.
1.18 schwarze 950: .Ss \&%U
951: URI of reference document.
1.17 schwarze 952: .Ss \&%V
953: Volume number of an
954: .Sx \&Rs
955: block.
956: .Ss \&Ac
957: Closes an
958: .Sx \&Ao
1.41 ! schwarze 959: block.
! 960: Does not have any tail arguments.
1.17 schwarze 961: .Ss \&Ad
962: Address construct: usually in the context of an computational address in
963: memory, not a physical (post) address.
964: .Pp
965: Examples:
1.25 schwarze 966: .D1 \&.Ad [0,$]
967: .D1 \&.Ad 0x00000000
1.17 schwarze 968: .Ss \&An
1.27 schwarze 969: Author name.
970: This macro may alternatively accepts the following arguments, although
971: these may not be specified along with a parameter:
1.41 ! schwarze 972: .Pp
! 973: .Bl -tag -width "-nosplitX" -offset indent -compact
1.17 schwarze 974: .It Fl split
975: Renders a line break before each author listing.
976: .It Fl nosplit
977: The opposite of
978: .Fl split .
979: .El
980: .Pp
1.41 ! schwarze 981: In the
! 982: .Em AUTHORS
! 983: section, the default is not to split the first author
1.17 schwarze 984: listing, but all subsequent author listings, whether or not they're
1.27 schwarze 985: interspersed by other macros or text, are split.
986: Thus, specifying
1.17 schwarze 987: .Fl split
1.27 schwarze 988: will cause the first listing also to be split.
1.41 ! schwarze 989: If not in the
! 990: .Em AUTHORS
! 991: section, the default is not to split.
1.17 schwarze 992: .Pp
993: Examples:
1.25 schwarze 994: .D1 \&.An -nosplit
995: .D1 \&.An J. D. Ullman .
1.17 schwarze 996: .Pp
997: .Em Remarks :
998: the effects of
999: .Fl split
1000: or
1001: .Fl nosplit
1.41 ! schwarze 1002: are re-set when entering the
! 1003: .Em AUTHORS
! 1004: section, so if one specifies
1.17 schwarze 1005: .Sx \&An Fl nosplit
1.41 ! schwarze 1006: in the general document body, it must be re-specified in the
! 1007: .Em AUTHORS
1.17 schwarze 1008: section.
1009: .Ss \&Ao
1.27 schwarze 1010: Begins a block enclosed by angled brackets.
1011: Does not have any head arguments.
1.17 schwarze 1012: .Pp
1013: Examples:
1.25 schwarze 1014: .D1 \&.Fl -key= \&Ns \&Ao \&Ar val \&Ac
1.17 schwarze 1015: .Pp
1016: See also
1017: .Sx \&Aq .
1018: .Ss \&Ap
1.41 ! schwarze 1019: Inserts an apostrophe without any surrounding whitespace.
1.35 schwarze 1020: This is generally used as a grammatical device when referring to the verb
1.41 ! schwarze 1021: form of a function.
! 1022: .Pp
! 1023: Examples:
! 1024: .D1 \&.Fn execve \&Ap d
1.17 schwarze 1025: .Ss \&Aq
1.22 schwarze 1026: Encloses its arguments in angled brackets.
1.17 schwarze 1027: .Pp
1028: Examples:
1.25 schwarze 1029: .D1 \&.Fl -key= \&Ns \&Aq \&Ar val
1.17 schwarze 1030: .Pp
1031: .Em Remarks :
1032: this macro is often abused for rendering URIs, which should instead use
1033: .Sx \&Lk
1034: or
1035: .Sx \&Mt ,
1036: or to note pre-processor
1037: .Dq Li #include
1038: statements, which should use
1039: .Sx \&In .
1040: .Pp
1041: See also
1042: .Sx \&Ao .
1043: .Ss \&Ar
1.27 schwarze 1044: Command arguments.
1045: If an argument is not provided, the string
1.17 schwarze 1046: .Dq file ...
1047: is used as a default.
1048: .Pp
1049: Examples:
1.25 schwarze 1050: .D1 \&.Fl o \&Ns \&Ar file1
1051: .D1 \&.Ar
1052: .D1 \&.Ar arg1 , arg2 .
1.17 schwarze 1053: .Ss \&At
1.27 schwarze 1054: Formats an AT&T version.
1055: Accepts at most one parameter:
1.41 ! schwarze 1056: .Pp
! 1057: .Bl -tag -width "v[1-7] | 32vX" -offset indent -compact
1.17 schwarze 1058: .It Cm v[1-7] | 32v
1059: A version of
1060: .At .
1061: .It Cm V[.[1-4]]?
1062: A system version of
1063: .At .
1064: .El
1065: .Pp
1066: Note that these parameters do not begin with a hyphen.
1067: .Pp
1068: Examples:
1.25 schwarze 1069: .D1 \&.At
1070: .D1 \&.At V.1
1.17 schwarze 1071: .Pp
1072: See also
1073: .Sx \&Bsx ,
1074: .Sx \&Bx ,
1075: .Sx \&Dx ,
1076: .Sx \&Fx ,
1077: .Sx \&Nx ,
1078: .Sx \&Ox ,
1079: and
1080: .Sx \&Ux .
1081: .Ss \&Bc
1082: Closes a
1083: .Sx \&Bo
1.41 ! schwarze 1084: block.
! 1085: Does not have any tail arguments.
1.17 schwarze 1086: .Ss \&Bd
1.27 schwarze 1087: Begins a display block.
1.39 schwarze 1088: Its syntax is as follows:
1089: .Bd -ragged -offset indent
1090: .Pf \. Sx \&Bd
1091: .Fl type
1092: .Op Fl offset Ar width
1093: .Op Fl compact
1094: .Ed
1095: .Pp
1.27 schwarze 1096: A display is collection of macros or text which may be collectively
1097: offset or justified in a manner different from that
1098: of the enclosing context.
1099: By default, the block is preceded by a vertical space.
1.17 schwarze 1100: .Pp
1101: Each display is associated with a type, which must be one of the
1102: following arguments:
1103: .Bl -tag -width 12n -offset indent
1104: .It Fl ragged
1105: Only left-justify the block.
1106: .It Fl unfilled
1107: Do not justify the block at all.
1108: .It Fl filled
1109: Left- and right-justify the block.
1110: .It Fl literal
1111: Alias for
1112: .Fl unfilled .
1113: .It Fl centered
1114: Centre-justify each line.
1115: .El
1116: .Pp
1.27 schwarze 1117: The type must be provided first.
1118: Secondary arguments are as follows:
1.17 schwarze 1119: .Bl -tag -width 12n -offset indent
1.39 schwarze 1120: .It Fl offset Ar val
1.17 schwarze 1121: Offset by the value of
1.39 schwarze 1122: .Ar val ,
1.17 schwarze 1123: which is interpreted as one of the following, specified in order:
1124: .Bl -item
1125: .It
1126: As one of the pre-defined strings
1127: .Ar indent ,
1128: the width of standard indentation;
1129: .Ar indent-two ,
1130: twice
1131: .Ar indent ;
1132: .Ar left ,
1.39 schwarze 1133: which has no effect;
1.17 schwarze 1134: .Ar right ,
1135: which justifies to the right margin; and
1136: .Ar center ,
1137: which aligns around an imagined centre axis.
1138: .It
1.27 schwarze 1139: As a precalculated width for a named macro.
1140: The most popular is the imaginary macro
1.18 schwarze 1141: .Ar \&Ds ,
1.17 schwarze 1142: which resolves to
1143: .Ar 6n .
1144: .It
1145: As a scaling unit following the syntax described in
1146: .Sx Scaling Widths .
1147: .It
1148: As the calculated string length of the opaque string.
1149: .El
1150: .Pp
1.36 schwarze 1151: If not provided an argument, it will be ignored.
1.17 schwarze 1152: .It Fl compact
1153: Do not assert a vertical space before the block.
1154: .El
1155: .Pp
1156: Examples:
1157: .Bd -literal -offset indent
1158: \&.Bd \-unfilled \-offset two-indent \-compact
1159: Hello world.
1160: \&.Ed
1161: .Ed
1162: .Pp
1163: See also
1164: .Sx \&D1
1165: and
1166: .Sx \&Dl .
1167: .Ss \&Bf
1.39 schwarze 1168: Change the font mode for a scoped block of text.
1169: Its syntax is as follows:
1170: .Bd -ragged -offset indent
1171: .Pf \. Sx \&Bf
1172: .Oo
1173: .Fl emphasis | literal | symbolic |
1174: .Cm \&Em | \&Li | \&Sy
1175: .Oc
1176: .Ed
1177: .Pp
1178: The
1179: .Fl emphasis
1180: and
1181: .Cm \&Em
1182: argument are equivalent, as are
1183: .Fl symbolic
1184: and
1185: .Cm \&Sy,
1186: and
1187: .Fl literal
1188: and
1189: .Cm \&Li .
1190: Without an argument, this macro does nothing.
1191: The font mode continues until broken by a new font mode in a nested
1192: scope or
1193: .Sx \&Ef
1194: is encountered.
1195: .Pp
1196: See also
1197: .Sx \&Li ,
1198: .Sx \&Ef ,
1199: and
1200: .Sx \&Sy .
1.17 schwarze 1201: .Ss \&Bk
1.39 schwarze 1202: Begins a collection of macros or text not breaking the line.
1203: Its syntax is as follows:
1204: .Pp
1205: .D1 Pf \. Sx \&Bk Fl words
1206: .Pp
1207: Subsequent arguments are ignored.
1208: The
1209: .Fl words
1210: argument is required.
1.37 schwarze 1211: .Pp
1.39 schwarze 1212: Each line within a keep block is kept intact, so the following example
1213: will not break within each
1214: .Sx \&Op
1215: macro line:
1.37 schwarze 1216: .Bd -literal -offset indent
1217: \&.Bk \-words
1.39 schwarze 1218: \&.Op Fl f Ar flags
1219: \&.Op Fl o Ar output
1.37 schwarze 1220: \&.Ek
1221: .Ed
1.39 schwarze 1222: .Pp
1223: Be careful in using over-long lines within a keep block!
1224: Doing so will clobber the right margin.
1.17 schwarze 1225: .Ss \&Bl
1.32 schwarze 1226: Begins a list composed of one or more list entries.
1.39 schwarze 1227: Its syntax is as follows:
1228: .Bd -ragged -offset indent
1229: .Pf \. Sx \&Bl
1230: .Fl type
1231: .Op Fl width Ar val
1232: .Op Fl offset Ar val
1233: .Op Fl compact
1234: .Op HEAD ...
1235: .Ed
1236: .Pp
1.32 schwarze 1237: A list is associated with a type, which is a required argument.
1238: Other arguments are
1239: .Fl width ,
1240: defined per-type as accepting a literal or
1241: .Sx Scaling Widths
1242: value;
1243: .Fl offset ,
1244: also accepting a literal or
1245: .Sx Scaling Widths
1246: value setting the list's global offset; and
1247: .Fl compact ,
1248: suppressing the default vertical space printed before each list entry.
1249: A list entry is specified by the
1250: .Sx \&It
1251: macro, which consists of a head and optional body (depending on the list
1252: type).
1253: A list must specify one of the following list types:
1254: .Bl -tag -width 12n -offset indent
1255: .It Fl bullet
1256: A list offset by a bullet.
1257: The head of list entries must be empty.
1258: List entry bodies are positioned after the bullet.
1259: The
1260: .Fl width
1261: argument varies the width of list bodies' left-margins.
1262: .It Fl column
1263: A columnated list.
1264: The
1265: .Fl width
1266: argument has no effect.
1267: The number of columns is specified as parameters to the
1268: .Sx \&Bl
1269: macro.
1270: These dictate the width of columns either as
1271: .Sx Scaling Widths
1272: or literal text.
1.34 schwarze 1273: If the initial macro of a
1274: .Fl column
1275: list is not an
1276: .Sx \&It ,
1277: an
1278: .Sx \&It
1279: context spanning each line is implied until an
1280: .Sx \&It
1281: line macro is encountered, at which point list bodies are interpreted as
1282: described in the
1283: .Sx \&It
1284: documentation.
1.32 schwarze 1285: .It Fl dash
1286: A list offset by a dash (hyphen).
1287: The head of list entries must be empty.
1288: List entry bodies are positioned past the dash.
1289: The
1290: .Fl width
1291: argument varies the width of list bodies' left-margins.
1292: .It Fl diag
1293: Like
1294: .Fl inset ,
1295: but with additional formatting to the head.
1296: The
1297: .Fl width
1298: argument varies the width of list bodies' left-margins.
1299: .It Fl enum
1300: An enumerated list offset by the enumeration from 1.
1301: The head of list entries must be empty.
1302: List entry bodies are positioned after the enumeration.
1303: The
1304: .Fl width
1305: argument varies the width of list bodies' left-margins.
1306: .It Fl hang
1307: Like
1308: .Fl tag ,
1309: but instead of list bodies positioned after the head, they trail the
1310: head text.
1311: The
1312: .Fl width
1313: argument varies the width of list bodies' left-margins.
1314: .It Fl hyphen
1315: Synonym for
1316: .Fl dash .
1317: .It Fl inset
1318: List bodies follow the list head.
1319: The
1320: .Fl width
1321: argument is ignored.
1322: .It Fl item
1323: This produces blocks of text.
1324: The head of list entries must be empty.
1325: The
1326: .Fl width
1327: argument is ignored.
1328: .It Fl ohang
1329: List bodies are positioned on the line following the head.
1330: The
1331: .Fl width
1332: argument is ignored.
1333: .It Fl tag
1.41 ! schwarze 1334: A list offset by list entry heads.
! 1335: List entry bodies are positioned after the head as specified by the
1.32 schwarze 1336: .Fl width
1337: argument.
1338: .El
1.34 schwarze 1339: .Pp
1340: See also
1341: .Sx \&It .
1.17 schwarze 1342: .Ss \&Bo
1.27 schwarze 1343: Begins a block enclosed by square brackets.
1344: Does not have any head arguments.
1.17 schwarze 1345: .Pp
1346: Examples:
1.41 ! schwarze 1347: .Bd -literal -offset indent -compact
1.17 schwarze 1348: \&.Bo 1 ,
1.25 schwarze 1349: \&.Dv BUFSIZ \&Bc
1.17 schwarze 1350: .Ed
1351: .Pp
1352: See also
1353: .Sx \&Bq .
1354: .Ss \&Bq
1.22 schwarze 1355: Encloses its arguments in square brackets.
1.17 schwarze 1356: .Pp
1357: Examples:
1.25 schwarze 1358: .D1 \&.Bq 1 , \&Dv BUFSIZ
1.17 schwarze 1359: .Pp
1360: .Em Remarks :
1361: this macro is sometimes abused to emulate optional arguments for
1362: commands; the correct macros to use for this purpose are
1363: .Sx \&Op ,
1364: .Sx \&Oo ,
1365: and
1366: .Sx \&Oc .
1367: .Pp
1368: See also
1369: .Sx \&Bo .
1370: .Ss \&Brc
1371: Closes a
1372: .Sx \&Bro
1.41 ! schwarze 1373: block.
! 1374: Does not have any tail arguments.
1.17 schwarze 1375: .Ss \&Bro
1.27 schwarze 1376: Begins a block enclosed by curly braces.
1377: Does not have any head arguments.
1.17 schwarze 1378: .Pp
1379: Examples:
1.41 ! schwarze 1380: .Bd -literal -offset indent -compact
1.17 schwarze 1381: \&.Bro 1 , ... ,
1.25 schwarze 1382: \&.Va n \&Brc
1.17 schwarze 1383: .Ed
1384: .Pp
1385: See also
1386: .Sx \&Brq .
1387: .Ss \&Brq
1388: Encloses its arguments in curly braces.
1389: .Pp
1390: Examples:
1.25 schwarze 1391: .D1 \&.Brq 1 , ... , \&Va n
1.17 schwarze 1392: .Pp
1393: See also
1394: .Sx \&Bro .
1395: .Ss \&Bsx
1396: Format the BSD/OS version provided as an argument, or a default value if
1397: no argument is provided.
1398: .Pp
1399: Examples:
1.25 schwarze 1400: .D1 \&.Bsx 1.0
1401: .D1 \&.Bsx
1.17 schwarze 1402: .Pp
1403: See also
1404: .Sx \&At ,
1405: .Sx \&Bx ,
1406: .Sx \&Dx ,
1407: .Sx \&Fx ,
1408: .Sx \&Nx ,
1409: .Sx \&Ox ,
1410: and
1411: .Sx \&Ux .
1412: .Ss \&Bt
1413: Prints
1414: .Dq is currently in beta test.
1415: .Ss \&Bx
1416: Format the BSD version provided as an argument, or a default value if no
1417: argument is provided.
1418: .Pp
1419: Examples:
1.25 schwarze 1420: .D1 \&.Bx 4.4
1421: .D1 \&.Bx
1.17 schwarze 1422: .Pp
1423: See also
1424: .Sx \&At ,
1425: .Sx \&Bsx ,
1426: .Sx \&Dx ,
1427: .Sx \&Fx ,
1428: .Sx \&Nx ,
1429: .Sx \&Ox ,
1430: and
1431: .Sx \&Ux .
1432: .Ss \&Cd
1.27 schwarze 1433: Configuration declaration.
1434: This denotes strings accepted by
1.17 schwarze 1435: .Xr config 8 .
1436: .Pp
1437: Examples:
1.25 schwarze 1438: .D1 \&.Cd device le0 at scode?
1.17 schwarze 1439: .Pp
1440: .Em Remarks :
1441: this macro is commonly abused by using quoted literals to retain
1.41 ! schwarze 1442: whitespace and align consecutive
1.17 schwarze 1443: .Sx \&Cd
1.27 schwarze 1444: declarations.
1445: This practise is discouraged.
1.17 schwarze 1446: .Ss \&Cm
1.27 schwarze 1447: Command modifiers.
1448: Useful when specifying configuration options or keys.
1.17 schwarze 1449: .Pp
1450: Examples:
1.25 schwarze 1451: .D1 \&.Cm ControlPath
1452: .D1 \&.Cm ControlMaster
1.17 schwarze 1453: .Pp
1454: See also
1455: .Sx \&Fl .
1456: .Ss \&D1
1.27 schwarze 1457: One-line indented display.
1458: This is formatted by the default rules and is useful for simple indented
1459: statements.
1460: It is followed by a newline.
1.17 schwarze 1461: .Pp
1462: Examples:
1.25 schwarze 1463: .D1 \&.D1 \&Fl abcdefgh
1.17 schwarze 1464: .Pp
1465: See also
1466: .Sx \&Bd
1467: and
1468: .Sx \&Dl .
1469: .Ss \&Db
1.34 schwarze 1470: Start a debugging context.
1471: This macro is parsed, but generally ignored.
1472: Its syntax is as follows:
1473: .Pp
1474: .D1 Pf \. Sx \&Db Cm on | off
1.17 schwarze 1475: .Ss \&Dc
1476: Closes a
1477: .Sx \&Do
1.41 ! schwarze 1478: block.
! 1479: Does not have any tail arguments.
1.17 schwarze 1480: .Ss \&Dd
1.27 schwarze 1481: Document date.
1482: This is the mandatory first macro of any
1.17 schwarze 1483: .Nm
1.27 schwarze 1484: manual.
1.34 schwarze 1485: Its syntax is as follows:
1.17 schwarze 1486: .Pp
1.34 schwarze 1487: .D1 Pf \. Sx \&Dd Cm date
1.17 schwarze 1488: .Pp
1.22 schwarze 1489: The
1.17 schwarze 1490: .Cm date
1491: field may be either
1492: .Ar $\&Mdocdate$ ,
1493: which signifies the current manual revision date dictated by
1.19 schwarze 1494: .Xr cvs 1 ,
1.17 schwarze 1495: or instead a valid canonical date as specified by
1496: .Sx Dates .
1.19 schwarze 1497: If a date does not conform, the current date is used instead.
1.17 schwarze 1498: .Pp
1499: Examples:
1.25 schwarze 1500: .D1 \&.Dd $\&Mdocdate$
1501: .D1 \&.Dd $\&Mdocdate: July 21 2007$
1502: .D1 \&.Dd July 21, 2007
1.17 schwarze 1503: .Pp
1504: See also
1505: .Sx \&Dt
1506: and
1507: .Sx \&Os .
1508: .Ss \&Dl
1.27 schwarze 1509: One-line intended display.
1510: This is formatted as literal text and is useful for commands and
1511: invocations.
1512: It is followed by a newline.
1.17 schwarze 1513: .Pp
1514: Examples:
1.41 ! schwarze 1515: .D1 \&.Dl % mandoc mdoc.7 \e(ba less
1.17 schwarze 1516: .Pp
1517: See also
1518: .Sx \&Bd
1519: and
1520: .Sx \&D1 .
1521: .Ss \&Do
1.41 ! schwarze 1522: Begins a block enclosed by double quotes.
! 1523: Does not have any head arguments.
1.17 schwarze 1524: .Pp
1525: Examples:
1.41 ! schwarze 1526: .Bd -literal -offset indent -compact
! 1527: \&.Do
! 1528: April is the cruellest month
! 1529: \&.Dc
! 1530: \e(em T.S. Eliot
! 1531: .Ed
1.17 schwarze 1532: .Pp
1533: See also
1534: .Sx \&Dq .
1535: .Ss \&Dq
1.41 ! schwarze 1536: Encloses its arguments in
! 1537: .Dq typographic
! 1538: double-quotes.
1.17 schwarze 1539: .Pp
1540: Examples:
1.25 schwarze 1541: .Bd -literal -offset indent -compact
1.17 schwarze 1542: \&.Dq April is the cruellest month
1543: \e(em T.S. Eliot
1544: .Ed
1545: .Pp
1546: See also
1.41 ! schwarze 1547: .Sx \&Qq ,
! 1548: .Sx \&Sq ,
! 1549: and
1.17 schwarze 1550: .Sx \&Do .
1551: .Ss \&Dt
1.27 schwarze 1552: Document title.
1553: This is the mandatory second macro of any
1.17 schwarze 1554: .Nm
1.27 schwarze 1555: file.
1.34 schwarze 1556: Its syntax is as follows:
1557: .Bd -ragged -offset indent
1558: .Pf \. Sx \&Dt
1559: .Oo
1560: .Cm title
1561: .Oo
1562: .Cm section
1563: .Op Cm volume | arch
1564: .Oc
1565: .Oc
1566: .Ed
1.17 schwarze 1567: .Pp
1568: Its arguments are as follows:
1569: .Bl -tag -width Ds -offset Ds
1570: .It Cm title
1.34 schwarze 1571: The document's title (name), defaulting to
1.41 ! schwarze 1572: .Dq UNKNOWN
1.34 schwarze 1573: if unspecified.
1574: It should be capitalised.
1.17 schwarze 1575: .It Cm section
1.27 schwarze 1576: The manual section.
1577: This may be one of
1.17 schwarze 1578: .Ar 1
1579: .Pq utilities ,
1580: .Ar 2
1581: .Pq system calls ,
1582: .Ar 3
1583: .Pq libraries ,
1584: .Ar 3p
1585: .Pq Perl libraries ,
1586: .Ar 4
1587: .Pq devices ,
1588: .Ar 5
1589: .Pq file formats ,
1590: .Ar 6
1591: .Pq games ,
1592: .Ar 7
1593: .Pq miscellaneous ,
1594: .Ar 8
1595: .Pq system utilities ,
1596: .Ar 9
1597: .Pq kernel functions ,
1598: .Ar X11
1599: .Pq X Window System ,
1600: .Ar X11R6
1601: .Pq X Window System ,
1602: .Ar unass
1603: .Pq unassociated ,
1604: .Ar local
1605: .Pq local system ,
1606: .Ar draft
1607: .Pq draft manual ,
1608: or
1609: .Ar paper
1610: .Pq paper .
1.34 schwarze 1611: It should correspond to the manual's filename suffix and defaults to
1.41 ! schwarze 1612: .Dq 1
1.34 schwarze 1613: if unspecified.
1.17 schwarze 1614: .It Cm volume
1615: This overrides the volume inferred from
1616: .Ar section .
1617: This field is optional, and if specified, must be one of
1618: .Ar USD
1619: .Pq users' supplementary documents ,
1620: .Ar PS1
1621: .Pq programmers' supplementary documents ,
1622: .Ar AMD
1623: .Pq administrators' supplementary documents ,
1624: .Ar SMM
1625: .Pq system managers' manuals ,
1626: .Ar URM
1627: .Pq users' reference manuals ,
1628: .Ar PRM
1629: .Pq programmers' reference manuals ,
1630: .Ar KM
1631: .Pq kernel manuals ,
1632: .Ar IND
1633: .Pq master index ,
1634: .Ar MMI
1635: .Pq master index ,
1636: .Ar LOCAL
1637: .Pq local manuals ,
1638: .Ar LOC
1639: .Pq local manuals ,
1640: or
1641: .Ar CON
1642: .Pq contributed manuals .
1643: .It Cm arch
1.27 schwarze 1644: This specifies a specific relevant architecture.
1645: If
1.17 schwarze 1646: .Cm volume
1647: is not provided, it may be used in its place, else it may be used
1.27 schwarze 1648: subsequent that.
1649: It, too, is optional.
1650: It must be one of
1.17 schwarze 1651: .Ar alpha ,
1652: .Ar amd64 ,
1653: .Ar amiga ,
1654: .Ar arc ,
1655: .Ar arm ,
1656: .Ar armish ,
1657: .Ar aviion ,
1658: .Ar hp300 ,
1659: .Ar hppa ,
1660: .Ar hppa64 ,
1661: .Ar i386 ,
1662: .Ar landisk ,
1.23 schwarze 1663: .Ar loongson ,
1.17 schwarze 1664: .Ar luna88k ,
1665: .Ar mac68k ,
1666: .Ar macppc ,
1667: .Ar mvme68k ,
1668: .Ar mvme88k ,
1669: .Ar mvmeppc ,
1670: .Ar pmax ,
1671: .Ar sgi ,
1672: .Ar socppc ,
1673: .Ar sparc ,
1674: .Ar sparc64 ,
1675: .Ar sun3 ,
1676: .Ar vax ,
1677: or
1678: .Ar zaurus .
1679: .El
1680: .Pp
1681: Examples:
1.25 schwarze 1682: .D1 \&.Dt FOO 1
1683: .D1 \&.Dt FOO 4 KM
1684: .D1 \&.Dt FOO 9 i386
1.17 schwarze 1685: .Pp
1686: See also
1687: .Sx \&Dd
1688: and
1689: .Sx \&Os .
1690: .Ss \&Dv
1691: Defined variables such as preprocessor constants.
1692: .Pp
1693: Examples:
1.25 schwarze 1694: .D1 \&.Dv BUFSIZ
1695: .D1 \&.Dv STDOUT_FILENO
1.17 schwarze 1696: .Pp
1697: See also
1698: .Sx \&Er .
1699: .Ss \&Dx
1.19 schwarze 1700: Format the DragonFly BSD version provided as an argument, or a default
1.17 schwarze 1701: value if no argument is provided.
1702: .Pp
1703: Examples:
1.25 schwarze 1704: .D1 \&.Dx 2.4.1
1705: .D1 \&.Dx
1.17 schwarze 1706: .Pp
1707: See also
1708: .Sx \&At ,
1709: .Sx \&Bsx ,
1710: .Sx \&Bx ,
1711: .Sx \&Fx ,
1712: .Sx \&Nx ,
1713: .Sx \&Ox ,
1714: and
1715: .Sx \&Ux .
1716: .Ss \&Ec
1.39 schwarze 1717: Close a scope started by
1718: .Sx \&Eo .
1719: Its syntax is as follows:
1720: .Pp
1721: .D1 Pf \. Sx \&Ec Op Cm TERM
1722: .Pp
1723: The
1724: .Cm TERM
1725: argument is used as the enclosure tail, for example, specifying \e(rq
1726: will emulate
1727: .Sx \&Dc .
1.17 schwarze 1728: .Ss \&Ed
1.39 schwarze 1729: End a display context started by
1730: .Sx \&Bd .
1.17 schwarze 1731: .Ss \&Ef
1.39 schwarze 1732: Ends a font mode context started by
1733: .Sx \&Bf .
1.17 schwarze 1734: .Ss \&Ek
1.37 schwarze 1735: Ends a keep context started by
1736: .Sx \&Bk .
1.17 schwarze 1737: .Ss \&El
1.34 schwarze 1738: Ends a list context started by
1739: .Sx \&Bl .
1740: .Pp
1741: See also
1742: .Sx \&Bl
1743: and
1744: .Sx \&It .
1.17 schwarze 1745: .Ss \&Em
1.27 schwarze 1746: Denotes text that should be emphasised.
1747: Note that this is a presentation term and should not be used for
1748: stylistically decorating technical terms.
1.17 schwarze 1749: .Pp
1750: Examples:
1.25 schwarze 1751: .D1 \&.Em Warnings!
1752: .D1 \&.Em Remarks :
1.41 ! schwarze 1753: .Pp
! 1754: See also
! 1755: .Sx \&Bf ,
! 1756: .Sx \&Sy ,
! 1757: and
! 1758: .Sx \&Li .
1.17 schwarze 1759: .Ss \&En
1.39 schwarze 1760: This macro is obsolete and not implemented.
1.17 schwarze 1761: .Ss \&Eo
1.39 schwarze 1762: An arbitrary enclosure.
1763: Its syntax is as follows:
1764: .Pp
1765: .D1 Pf \. Sx \&Eo Op Cm TERM
1766: .Pp
1767: The
1768: .Cm TERM
1769: argument is used as the enclosure head, for example, specifying \e(lq
1770: will emulate
1771: .Sx \&Do .
1.17 schwarze 1772: .Ss \&Er
1.25 schwarze 1773: Display error constants.
1.17 schwarze 1774: .Pp
1775: Examples:
1.25 schwarze 1776: .D1 \&.Er EPERM
1777: .D1 \&.Er ENOENT
1.17 schwarze 1778: .Pp
1779: See also
1780: .Sx \&Dv .
1781: .Ss \&Es
1.39 schwarze 1782: This macro is obsolete and not implemented.
1.17 schwarze 1783: .Ss \&Ev
1784: Environmental variables such as those specified in
1785: .Xr environ 7 .
1786: .Pp
1787: Examples:
1.25 schwarze 1788: .D1 \&.Ev DISPLAY
1789: .D1 \&.Ev PATH
1.17 schwarze 1790: .Ss \&Ex
1.41 ! schwarze 1791: Inserts text regarding a utility's exit value.
! 1792: This macro must consist of the
1.17 schwarze 1793: .Fl std
1.41 ! schwarze 1794: argument followed by an optional
1.17 schwarze 1795: .Ar utility .
1796: If
1797: .Ar utility
1798: is not provided, the document's name as stipulated in
1799: .Sx \&Nm
1800: is provided.
1.41 ! schwarze 1801: .Pp
! 1802: See also
! 1803: .Sx \&Rv .
1.17 schwarze 1804: .Ss \&Fa
1.34 schwarze 1805: Function argument.
1806: Its syntax is as follows:
1807: .Bd -ragged -offset indent
1808: .Pf \. Sx \&Fa
1809: .Op Cm argtype
1810: .Cm argname
1811: .Ed
1812: .Pp
1813: This may be invoked for names with or without the corresponding type.
1814: It is also used to specify the field name of a structure.
1815: Most often, the
1816: .Sx \&Fa
1817: macro is used in the
1818: .Em SYNOPSIS
1819: within
1820: .Sx \&Fo
1821: section when documenting multi-line function prototypes.
1822: If invoked with multiple arguments, the arguments are separated by a
1823: comma.
1824: Furthermore, if the following macro is another
1825: .Sx \&Fa ,
1826: the last argument will also have a trailing comma.
1827: .Pp
1828: Examples:
1829: .D1 \&.Fa \(dqconst char *p\(dq
1830: .D1 \&.Fa \(dqint a\(dq \(dqint b\(dq \(dqint c\(dq
1831: .D1 \&.Fa foo
1832: .Pp
1833: See also
1834: .Sx \&Fo .
1.17 schwarze 1835: .Ss \&Fc
1.39 schwarze 1836: Ends a function context started by
1837: .Sx \&Fo .
1.17 schwarze 1838: .Ss \&Fd
1.34 schwarze 1839: Historically used to document include files.
1840: This usage has been deprecated in favour of
1841: .Sx \&In .
1842: Do not use this macro.
1843: .Pp
1844: See also
1.35 schwarze 1845: .Sx MANUAL STRUCTURE
1846: and
1.34 schwarze 1847: .Sx \&In .
1.17 schwarze 1848: .Ss \&Fl
1.27 schwarze 1849: Command-line flag.
1850: Used when listing arguments to command-line utilities.
1851: Prints a fixed-width hyphen
1.21 schwarze 1852: .Sq \-
1.27 schwarze 1853: directly followed by each argument.
1854: If no arguments are provided, a hyphen is printed followed by a space.
1855: If the argument is a macro, a hyphen is prefixed to the subsequent macro
1856: output.
1.21 schwarze 1857: .Pp
1858: Examples:
1.25 schwarze 1859: .D1 \&.Fl a b c
1860: .D1 \&.Fl \&Pf a b
1861: .D1 \&.Fl
1862: .D1 \&.Op \&Fl o \&Ns \&Ar file
1.21 schwarze 1863: .Pp
1864: See also
1865: .Sx \&Cm .
1.17 schwarze 1866: .Ss \&Fn
1.34 schwarze 1867: A function name.
1868: Its syntax is as follows:
1869: .Bd -ragged -offset indent
1870: .Pf \. Ns Sx \&Fn
1871: .Op Cm functype
1872: .Cm funcname
1873: .Op Oo Cm argtype Oc Cm argname
1874: .Ed
1875: .Pp
1.35 schwarze 1876: Function arguments are surrounded in parenthesis and
1.34 schwarze 1877: are delimited by commas.
1878: If no arguments are specified, blank parenthesis are output.
1879: .Pp
1880: Examples:
1881: .D1 \&.Fn "int funcname" "int arg0" "int arg1"
1882: .D1 \&.Fn funcname "int arg0"
1883: .D1 \&.Fn funcname arg0
1884: .Bd -literal -offset indent -compact
1885: \&.Ft functype
1886: \&.Fn funcname
1887: .Ed
1888: .Pp
1889: See also
1.35 schwarze 1890: .Sx MANUAL STRUCTURE
1.34 schwarze 1891: and
1892: .Sx \&Ft .
1.17 schwarze 1893: .Ss \&Fo
1.34 schwarze 1894: Begin a function block.
1895: This is a multi-line version of
1896: .Sx \&Fn .
1897: Its syntax is as follows:
1898: .Pp
1899: .D1 Pf \. Sx \&Fo Cm funcname
1900: .Pp
1901: Invocations usually occur in the following context:
1902: .Bd -ragged -offset indent
1903: .Pf \. Sx \&Ft Cm functype
1904: .br
1905: .Pf \. Sx \&Fo Cm funcname
1906: .br
1907: .Pf \. Sx \&Fa Oo Cm argtype Oc Cm argname
1908: .br
1909: \.\.\.
1910: .br
1911: .Pf \. Sx \&Fc
1912: .Ed
1913: .Pp
1914: A
1915: .Sx \&Fo
1916: scope is closed by
1917: .Pp
1918: See also
1.35 schwarze 1919: .Sx MANUAL STRUCTURE ,
1.34 schwarze 1920: .Sx \&Fa ,
1921: .Sx \&Fc ,
1922: and
1.41 ! schwarze 1923: .Sx \&Ft .
1.17 schwarze 1924: .Ss \&Ft
1.34 schwarze 1925: A function type.
1926: Its syntax is as follows:
1927: .Pp
1928: .D1 Pf \. Sx \&Ft Cm functype
1929: .Pp
1930: Examples:
1931: .D1 \&.Ft int
1932: .Bd -literal -offset indent -compact
1933: \&.Ft functype
1934: \&.Fn funcname
1935: .Ed
1936: .Pp
1937: See also
1.35 schwarze 1938: .Sx MANUAL STRUCTURE ,
1939: .Sx \&Fn ,
1.34 schwarze 1940: and
1.35 schwarze 1941: .Sx \&Fo .
1.17 schwarze 1942: .Ss \&Fx
1943: Format the FreeBSD version provided as an argument, or a default value
1944: if no argument is provided.
1945: .Pp
1946: Examples:
1.25 schwarze 1947: .D1 \&.Fx 7.1
1948: .D1 \&.Fx
1.17 schwarze 1949: .Pp
1950: See also
1951: .Sx \&At ,
1952: .Sx \&Bsx ,
1953: .Sx \&Bx ,
1954: .Sx \&Dx ,
1955: .Sx \&Nx ,
1956: .Sx \&Ox ,
1957: and
1958: .Sx \&Ux .
1959: .Ss \&Hf
1.39 schwarze 1960: This macro is obsolete and not implemented.
1.17 schwarze 1961: .Ss \&Ic
1.39 schwarze 1962: Designate an internal or interactive command.
1963: This is similar to
1964: .Sx \&Cm
1965: but used for instructions rather than values.
1966: .Pp
1967: Examples:
1968: .D1 \&.Ic hash
1969: .D1 \&.Ic alias
1970: .Pp
1971: Note that using
1972: .Sx \&Bd No Fl literal
1973: or
1974: .Sx \&D1
1975: is preferred for displaying code; the
1976: .Sx \&Ic
1977: macro is used when referring to specific instructions.
1.17 schwarze 1978: .Ss \&In
1.34 schwarze 1979: An
1.41 ! schwarze 1980: .Dq include
1.34 schwarze 1981: file.
1982: In the
1983: .Em SYNOPSIS
1984: section (only if invoked as the line macro), the first argument is
1985: preceded by
1.41 ! schwarze 1986: .Dq #include ,
1.35 schwarze 1987: the arguments is enclosed in angled braces.
1.34 schwarze 1988: .Pp
1.35 schwarze 1989: Examples:
1.34 schwarze 1990: .D1 \&.In sys/types
1.35 schwarze 1991: .Pp
1992: See also
1993: .Sx MANUAL STRUCTURE .
1.17 schwarze 1994: .Ss \&It
1.34 schwarze 1995: A list item.
1996: The syntax of this macro depends on the list type.
1997: .Pp
1998: Lists
1999: of type
2000: .Fl hang ,
2001: .Fl ohang ,
2002: .Fl inset ,
2003: and
2004: .Fl diag
2005: have the following syntax:
2006: .Pp
2007: .D1 Pf \. Sx \&It Cm args
2008: .Pp
2009: Lists of type
2010: .Fl bullet ,
2011: .Fl dash ,
2012: .Fl enum ,
2013: .Fl hyphen
2014: and
2015: .Fl item
2016: have the following syntax:
2017: .Pp
2018: .D1 Pf \. Sx \&It
2019: .Pp
2020: with subsequent lines interpreted within the scope of the
2021: .Sx \&It
2022: until either a closing
2023: .Sx \&El
2024: or another
2025: .Sx \&It .
2026: .Pp
2027: The
2028: .Fl tag
2029: list has the following syntax:
2030: .Pp
2031: .D1 Pf \. Sx \&It Op Cm args
2032: .Pp
2033: Subsequent lines are interpreted as with
2034: .Fl bullet
2035: and family.
2036: The line arguments correspond to the list's left-hand side; body
2037: arguments correspond to the list's contents.
2038: .Pp
2039: The
2040: .Fl column
2041: list is the most complicated.
2042: Its syntax is as follows:
2043: .Pp
2044: .D1 Pf \. Sx \&It Op Cm args
2045: .Pp
2046: The
2047: .Cm args
2048: are phrases, a mix of macros and text corresponding to a line column,
2049: delimited by tabs or the special
2050: .Sq \&Ta
2051: pseudo-macro.
2052: Lines subsequent the
2053: .Sx \&It
2054: are interpreted within the scope of the last phrase.
2055: Calling the pseudo-macro
2056: .Sq \&Ta
2057: will open a new phrase scope (this must occur on a macro line to be
1.41 ! schwarze 2058: interpreted as a macro).
! 2059: Note that the tab phrase delimiter may only be used within the
1.34 schwarze 2060: .Sx \&It
2061: line itself.
2062: Subsequent this, only the
2063: .Sq \&Ta
2064: pseudo-macro may be used to delimit phrases.
1.35 schwarze 2065: Furthermore, note that quoted sections propagate over tab-delimited
1.34 schwarze 2066: phrases on an
2067: .Sx \&It ,
2068: for example,
2069: .Pp
1.35 schwarze 2070: .D1 .It \(dqcol1 ; <TAB> col2 ;\(dq \&;
1.34 schwarze 2071: .Pp
2072: will preserve the semicolon whitespace except for the last.
2073: .Pp
2074: See also
2075: .Sx \&Bl .
1.17 schwarze 2076: .Ss \&Lb
1.33 schwarze 2077: Specify a library.
1.34 schwarze 2078: The syntax is as follows:
1.33 schwarze 2079: .Pp
1.34 schwarze 2080: .D1 Pf \. Sx \&Lb Cm library
1.33 schwarze 2081: .Pp
2082: The
2083: .Cm library
2084: parameter may be a system library, such as
2085: .Cm libz
2086: or
2087: .Cm libpam ,
2088: in which case a small library description is printed next to the linker
2089: invocation; or a custom library, in which case the library name is
2090: printed in quotes.
2091: This is most commonly used in the
2092: .Em SYNOPSIS
2093: section as described in
2094: .Sx MANUAL STRUCTURE .
2095: .Pp
2096: Examples:
2097: .D1 \&.Lb libz
2098: .D1 \&.Lb mdoc
1.17 schwarze 2099: .Ss \&Li
1.39 schwarze 2100: Denotes text that should be in a literal font mode.
2101: Note that this is a presentation term and should not be used for
2102: stylistically decorating technical terms.
1.41 ! schwarze 2103: .Pp
! 2104: See also
! 2105: .Sx \&Bf ,
! 2106: .Sx \&Sy ,
! 2107: and
! 2108: .Sx \&Em .
1.17 schwarze 2109: .Ss \&Lk
1.27 schwarze 2110: Format a hyperlink.
1.34 schwarze 2111: Its syntax is as follows:
1.18 schwarze 2112: .Pp
1.34 schwarze 2113: .D1 Pf \. Sx \&Lk Cm uri Op Cm name
1.18 schwarze 2114: .Pp
2115: Examples:
1.25 schwarze 2116: .D1 \&.Lk http://bsd.lv "The BSD.lv Project"
2117: .D1 \&.Lk http://bsd.lv
1.18 schwarze 2118: .Pp
2119: See also
2120: .Sx \&Mt .
1.17 schwarze 2121: .Ss \&Lp
1.39 schwarze 2122: Synonym for
2123: .Sx \&Pp .
1.17 schwarze 2124: .Ss \&Ms
1.41 ! schwarze 2125: Display a mathematical symbol.
! 2126: Its syntax is as follows:
! 2127: .Pp
! 2128: .D1 Pf \. Sx \&Ms Cm symbol
! 2129: .Pp
! 2130: Examples:
! 2131: .D1 \&.Ms sigma
! 2132: .D1 \&.Ms aleph
1.17 schwarze 2133: .Ss \&Mt
1.34 schwarze 2134: Format a
1.41 ! schwarze 2135: .Dq mailto:
1.34 schwarze 2136: hyperlink.
2137: Its syntax is as follows:
2138: .Pp
2139: .D1 Pf \. Sx \&Mt Cm address
2140: .Pp
2141: Examples:
2142: .D1 \&.Mt discuss@manpages.bsd.lv
1.17 schwarze 2143: .Ss \&Nd
1.39 schwarze 2144: A one-line description of the manual's content.
2145: This may only be invoked in the
2146: .Em SYNOPSIS
2147: section subsequent the
2148: .Sx \&Nm
2149: macro.
2150: .Pp
2151: Examples:
2152: .D1 \&.Sx \&Nd mdoc language reference
2153: .D1 \&.Sx \&Nd format and display UNIX manuals
2154: .Pp
2155: The
2156: .Sx \&Nd
2157: macro technically accepts child macros and terminates with a subsequent
2158: .Sx \&Sh
2159: invocation.
2160: Do not assume this behaviour: some
2161: .Xr whatis 1
2162: database generators are not smart enough to parse more than the line
2163: arguments and will display macros verbatim.
2164: .Pp
2165: See also
2166: .Sx \&Nm .
1.17 schwarze 2167: .Ss \&Nm
1.38 schwarze 2168: The name of the manual page, or \(em in particular in section 1, 6,
2169: and 8 pages \(em of an additional command or feature documented in
2170: the manual page.
2171: When first invoked, the
2172: .Sx \&Nm
2173: macro expects a single argument, the name of the manual page.
2174: Usually, the first invocation happens in the
2175: .Em NAME
2176: section of the page.
2177: The specified name will be remembered and used whenever the macro is
2178: called again without arguments later in the page.
2179: The
2180: .Sx \&Nm
2181: macro uses
2182: .Sx Block full-implicit
2183: semantics when invoked as the first macro on an input line in the
2184: .Em SYNOPSIS
2185: section; otherwise, it uses ordinary
2186: .Sx In-line
2187: semantics.
2188: .Pp
2189: Examples:
2190: .Bd -literal -offset indent
2191: \&.Sh SYNOPSIS
2192: \&.Nm cat
2193: \&.Op Fl benstuv
2194: \&.Op Ar
2195: .Ed
2196: .Pp
2197: In the
2198: .Em SYNOPSIS
2199: of section 2, 3 and 9 manual pages, use the
2200: .Sx \&Fn
2201: macro rather than
2202: .Sx \&Nm
2203: to mark up the name of the manual page.
1.17 schwarze 2204: .Ss \&No
1.39 schwarze 2205: A
1.41 ! schwarze 2206: .Dq noop
1.39 schwarze 2207: macro used to terminate prior macro contexts.
2208: .Pp
2209: Examples:
2210: .D1 \&.Sx \&Fl ab \&No cd \&Fl ef
1.17 schwarze 2211: .Ss \&Ns
1.41 ! schwarze 2212: Suppress a space.
! 2213: Following invocation, text is interpreted as free-form text until a
! 2214: macro is encountered.
! 2215: .Pp
! 2216: Examples:
! 2217: .D1 \&.Fl o \&Ns \&Ar output
! 2218: .Pp
! 2219: See also
! 2220: .Sx \&No
! 2221: and
! 2222: .Sx \&Sm .
1.17 schwarze 2223: .Ss \&Nx
2224: Format the NetBSD version provided as an argument, or a default value if
2225: no argument is provided.
2226: .Pp
2227: Examples:
1.25 schwarze 2228: .D1 \&.Nx 5.01
2229: .D1 \&.Nx
1.17 schwarze 2230: .Pp
2231: See also
2232: .Sx \&At ,
2233: .Sx \&Bsx ,
2234: .Sx \&Bx ,
2235: .Sx \&Dx ,
2236: .Sx \&Fx ,
2237: .Sx \&Ox ,
2238: and
2239: .Sx \&Ux .
2240: .Ss \&Oc
1.39 schwarze 2241: Closes multi-line
2242: .Sx \&Oo
2243: context.
1.17 schwarze 2244: .Ss \&Oo
1.39 schwarze 2245: Multi-line version of
2246: .Sx \&Op .
2247: .Pp
2248: Examples:
1.41 ! schwarze 2249: .Bd -literal -offset indent -compact
1.39 schwarze 2250: \&.Oo
2251: \&.Op Fl flag Ns Ar value
2252: \&.Oc
2253: .Ed
1.17 schwarze 2254: .Ss \&Op
1.39 schwarze 2255: Command-line option.
2256: Used when listing options to command-line utilities.
2257: Prints the argument(s) in brackets.
2258: .Pp
2259: Examples:
2260: .D1 \&.Op \&Fl a \&Ar b
2261: .D1 \&.Op \&Ar a | b
2262: .Pp
2263: See also
2264: .Sx \&Oo .
1.17 schwarze 2265: .Ss \&Os
1.27 schwarze 2266: Document operating system version.
2267: This is the mandatory third macro of
1.17 schwarze 2268: any
2269: .Nm
1.34 schwarze 2270: file.
2271: Its syntax is as follows:
1.17 schwarze 2272: .Pp
1.34 schwarze 2273: .D1 Pf \. Sx \&Os Op Cm system
1.17 schwarze 2274: .Pp
2275: The optional
2276: .Cm system
1.27 schwarze 2277: parameter specifies the relevant operating system or environment.
2278: Left unspecified, it defaults to the local operating system version.
2279: This is the suggested form.
1.17 schwarze 2280: .Pp
2281: Examples:
1.25 schwarze 2282: .D1 \&.Os
2283: .D1 \&.Os KTH/CSC/TCS
2284: .D1 \&.Os BSD 4.3
1.17 schwarze 2285: .Pp
2286: See also
2287: .Sx \&Dd
2288: and
2289: .Sx \&Dt .
2290: .Ss \&Ot
2291: Unknown usage.
2292: .Pp
2293: .Em Remarks :
2294: this macro has been deprecated.
2295: .Ss \&Ox
2296: Format the OpenBSD version provided as an argument, or a default value
2297: if no argument is provided.
2298: .Pp
2299: Examples:
1.25 schwarze 2300: .D1 \&.Ox 4.5
2301: .D1 \&.Ox
1.17 schwarze 2302: .Pp
2303: See also
2304: .Sx \&At ,
2305: .Sx \&Bsx ,
2306: .Sx \&Bx ,
2307: .Sx \&Dx ,
2308: .Sx \&Fx ,
2309: .Sx \&Nx ,
2310: and
2311: .Sx \&Ux .
2312: .Ss \&Pa
1.39 schwarze 2313: A file-system path.
2314: .Pp
2315: Examples:
2316: .D1 \&.Pa /usr/bin/mandoc
2317: .D1 \&.Pa /usr/share/man/man7/mdoc.7
2318: .Pp
2319: See also
2320: .Sx \&Lk .
1.17 schwarze 2321: .Ss \&Pc
1.39 schwarze 2322: Close parenthesised context opened by
2323: .Sx \&Po .
1.17 schwarze 2324: .Ss \&Pf
1.39 schwarze 2325: Removes the space
1.41 ! schwarze 2326: .Pq Dq prefix
1.39 schwarze 2327: between its arguments.
2328: Its syntax is as follows:
2329: .Pp
2330: .D1 Pf \. \&Pf Cm prefix suffix
2331: .Pp
2332: The
2333: .Cm suffix
2334: argument may be a macro.
2335: .Pp
2336: Examples:
2337: .D1 \&.Pf \e. \&Sx \&Pf \&Cm prefix suffix
1.17 schwarze 2338: .Ss \&Po
1.39 schwarze 2339: Multi-line version of
2340: .Sx \&Pq .
1.17 schwarze 2341: .Ss \&Pp
1.39 schwarze 2342: Break a paragraph.
2343: This will assert vertical space between prior and subsequent macros
2344: and/or text.
1.17 schwarze 2345: .Ss \&Pq
1.39 schwarze 2346: Parenthesised enclosure.
2347: .Pp
2348: See also
2349: .Sx \&Po .
1.17 schwarze 2350: .Ss \&Qc
1.41 ! schwarze 2351: Close quoted context opened by
! 2352: .Sx \&Qo .
1.17 schwarze 2353: .Ss \&Ql
1.41 ! schwarze 2354: Format a single-quoted literal.
! 2355: See also
! 2356: .Sx \&Qq
! 2357: and
! 2358: .Sx \&Sq .
1.17 schwarze 2359: .Ss \&Qo
1.41 ! schwarze 2360: Multi-line version of
! 2361: .Sx \&Qq .
1.17 schwarze 2362: .Ss \&Qq
1.41 ! schwarze 2363: Encloses its arguments in
! 2364: .Dq typewriter
! 2365: double-quotes.
! 2366: Consider using
! 2367: .Sx \&Dq .
! 2368: .Pp
! 2369: See also
! 2370: .Sx \&Dq ,
! 2371: .Sx \&Sq ,
! 2372: and
! 2373: .Sx \&Qo .
1.17 schwarze 2374: .Ss \&Re
2375: Closes a
2376: .Sx \&Rs
1.27 schwarze 2377: block.
2378: Does not have any tail arguments.
1.17 schwarze 2379: .Ss \&Rs
2380: Begins a bibliographic
2381: .Pq Dq reference
1.27 schwarze 2382: block.
2383: Does not have any head arguments.
2384: The block macro may only contain
1.17 schwarze 2385: .Sx \&%A ,
2386: .Sx \&%B ,
2387: .Sx \&%C ,
2388: .Sx \&%D ,
2389: .Sx \&%I ,
2390: .Sx \&%J ,
2391: .Sx \&%N ,
2392: .Sx \&%O ,
2393: .Sx \&%P ,
2394: .Sx \&%Q ,
2395: .Sx \&%R ,
2396: .Sx \&%T ,
1.34 schwarze 2397: .Sx \&%U ,
1.17 schwarze 2398: and
2399: .Sx \&%V
2400: child macros (at least one must be specified).
2401: .Pp
2402: Examples:
1.25 schwarze 2403: .Bd -literal -offset indent -compact
1.17 schwarze 2404: \&.Rs
2405: \&.%A J. E. Hopcroft
2406: \&.%A J. D. Ullman
2407: \&.%B Introduction to Automata Theory, Languages, and Computation
2408: \&.%I Addison-Wesley
2409: \&.%C Reading, Massachusettes
2410: \&.%D 1979
2411: \&.Re
2412: .Ed
2413: .Pp
2414: If an
2415: .Sx \&Rs
2416: block is used within a SEE ALSO section, a vertical space is asserted
2417: before the rendered output, else the block continues on the current
2418: line.
2419: .Ss \&Rv
1.41 ! schwarze 2420: Inserts text regarding a function call's return value.
! 2421: This macro must consist of the
! 2422: .Fl std
! 2423: argument followed by an optional
! 2424: .Ar function .
! 2425: If
! 2426: .Ar function
! 2427: is not provided, the document's name as stipulated by the first
! 2428: .Sx \&Nm
! 2429: is provided.
! 2430: .Pp
! 2431: See also
! 2432: .Sx \&Ex .
1.17 schwarze 2433: .Ss \&Sc
1.41 ! schwarze 2434: Close single-quoted context opened by
! 2435: .Sx \&So .
1.17 schwarze 2436: .Ss \&Sh
1.41 ! schwarze 2437: Begin a new section.
! 2438: For a list of conventional manual sections, see
! 2439: .Sx MANUAL STRUCTURE .
! 2440: These sections should be used unless it's absolutely necessary that
! 2441: custom sections be used.
! 2442: .Pp
! 2443: Section names should be unique so that they may be keyed by
! 2444: .Sx \&Sx .
! 2445: .Pp
! 2446: See also
! 2447: .Sx \&Pp ,
! 2448: .Sx \&Ss ,
! 2449: and
! 2450: .Sx \&Sx .
1.17 schwarze 2451: .Ss \&Sm
1.40 schwarze 2452: Switches the spacing mode for output generated from macros.
2453: Its syntax is as follows:
2454: .Pp
2455: .D1 Pf \. Sx \&Sm Cm on | off
2456: .Pp
2457: By default, spacing is
2458: .Cm on .
2459: When switched
2460: .Cm off ,
2461: no white space is inserted between macro arguments and between the
2462: output generated from adjacent macros, but free-form text lines
2463: still get normal spacing between words and sentences.
1.17 schwarze 2464: .Ss \&So
1.41 ! schwarze 2465: Multi-line version of
! 2466: .Sx \&Sq .
1.17 schwarze 2467: .Ss \&Sq
1.41 ! schwarze 2468: Encloses its arguments in
! 2469: .Dq typewriter
! 2470: single-quotes.
! 2471: .Pp
! 2472: See also
! 2473: .Sx \&Dq ,
! 2474: .Sx \&Qq ,
! 2475: and
! 2476: .Sx \&So .
1.17 schwarze 2477: .Ss \&Ss
1.41 ! schwarze 2478: Begin a new sub-section.
! 2479: Unlike with
! 2480: .Sx \&Sh ,
! 2481: there's no convention for sub-sections.
! 2482: Conventional sections, as described in
! 2483: .Sx MANUAL STRUCTURE ,
! 2484: rarely have sub-sections.
! 2485: .Pp
! 2486: Sub-section names should be unique so that they may be keyed by
! 2487: .Sx \&Sx .
! 2488: .Pp
! 2489: See also
! 2490: .Sx \&Pp ,
! 2491: .Sx \&Sh ,
! 2492: and
! 2493: .Sx \&Sx .
1.17 schwarze 2494: .Ss \&St
1.41 ! schwarze 2495: Replace an abbreviation for a standard with the full form.
! 2496: The following standards are recognised:
! 2497: .Pp
! 2498: .Bl -tag -width "-p1003.1g-2000X" -compact
! 2499: .It \-p1003.1-88
! 2500: .St -p1003.1-88
! 2501: .It \-p1003.1-90
! 2502: .St -p1003.1-90
! 2503: .It \-p1003.1-96
! 2504: .St -p1003.1-96
! 2505: .It \-p1003.1-2001
! 2506: .St -p1003.1-2001
! 2507: .It \-p1003.1-2004
! 2508: .St -p1003.1-2004
! 2509: .It \-p1003.1-2008
! 2510: .St -p1003.1-2008
! 2511: .It \-p1003.1
! 2512: .St -p1003.1
! 2513: .It \-p1003.1b
! 2514: .St -p1003.1b
! 2515: .It \-p1003.1b-93
! 2516: .St -p1003.1b-93
! 2517: .It \-p1003.1c-95
! 2518: .St -p1003.1c-95
! 2519: .It \-p1003.1g-2000
! 2520: .St -p1003.1g-2000
! 2521: .It \-p1003.1i-95
! 2522: .St -p1003.1i-95
! 2523: .It \-p1003.2-92
! 2524: .St -p1003.2-92
! 2525: .It \-p1003.2a-92
! 2526: .St -p1003.2a-92
! 2527: .It \-p1387.2-95
! 2528: .St -p1387.2-95
! 2529: .It \-p1003.2
! 2530: .St -p1003.2
! 2531: .It \-p1387.2
! 2532: .St -p1387.2
! 2533: .It \-isoC
! 2534: .St -isoC
! 2535: .It \-isoC-90
! 2536: .St -isoC-90
! 2537: .It \-isoC-amd1
! 2538: .St -isoC-amd1
! 2539: .It \-isoC-tcor1
! 2540: .St -isoC-tcor1
! 2541: .It \-isoC-tcor2
! 2542: .St -isoC-tcor2
! 2543: .It \-isoC-99
! 2544: .St -isoC-99
! 2545: .It \-iso9945-1-90
! 2546: .St -iso9945-1-90
! 2547: .It \-iso9945-1-96
! 2548: .St -iso9945-1-96
! 2549: .It \-iso9945-2-93
! 2550: .St -iso9945-2-93
! 2551: .It \-ansiC
! 2552: .St -ansiC
! 2553: .It \-ansiC-89
! 2554: .St -ansiC-89
! 2555: .It \-ansiC-99
! 2556: .St -ansiC-99
! 2557: .It \-ieee754
! 2558: .St -ieee754
! 2559: .It \-iso8802-3
! 2560: .St -iso8802-3
! 2561: .It \-ieee1275-94
! 2562: .St -ieee1275-94
! 2563: .It \-xpg3
! 2564: .St -xpg3
! 2565: .It \-xpg4
! 2566: .St -xpg4
! 2567: .It \-xpg4.2
! 2568: .St -xpg4.2
! 2569: .St -xpg4.3
! 2570: .It \-xbd5
! 2571: .St -xbd5
! 2572: .It \-xcu5
! 2573: .St -xcu5
! 2574: .It \-xsh5
! 2575: .St -xsh5
! 2576: .It \-xns5
! 2577: .St -xns5
! 2578: .It \-xns5.2
! 2579: .St -xns5.2
! 2580: .It \-xns5.2d2.0
! 2581: .St -xns5.2d2.0
! 2582: .It \-xcurses4.2
! 2583: .St -xcurses4.2
! 2584: .It \-susv2
! 2585: .St -susv2
! 2586: .It \-susv3
! 2587: .St -susv3
! 2588: .It \-svid4
! 2589: .St -svid4
! 2590: .El
1.17 schwarze 2591: .Ss \&Sx
1.41 ! schwarze 2592: Reference a section or sub-section.
! 2593: The referenced section or sub-section name must be identical to the
! 2594: enclosed argument, including whitespace.
! 2595: .Pp
! 2596: Examples:
! 2597: .D1 \&.Sx MANUAL STRUCTURE
1.17 schwarze 2598: .Ss \&Sy
1.41 ! schwarze 2599: Format enclosed arguments in symbolic
! 2600: .Pq Dq boldface .
! 2601: Note that this is a presentation term and should not be used for
! 2602: stylistically decorating technical terms.
! 2603: .Pp
! 2604: See also
! 2605: .Sx \&Bf ,
! 2606: .Sx \&Li ,
! 2607: and
! 2608: .Sx \&Em .
1.17 schwarze 2609: .Ss \&Tn
1.41 ! schwarze 2610: Format a tradename.
! 2611: .Pp
! 2612: Examples:
! 2613: .D1 \&.Tn IBM
1.17 schwarze 2614: .Ss \&Ud
1.33 schwarze 2615: Prints out
2616: .Dq currently under development.
1.17 schwarze 2617: .Ss \&Ux
1.27 schwarze 2618: Format the UNIX name.
2619: Accepts no argument.
1.17 schwarze 2620: .Pp
2621: Examples:
1.25 schwarze 2622: .D1 \&.Ux
1.17 schwarze 2623: .Pp
2624: See also
2625: .Sx \&At ,
2626: .Sx \&Bsx ,
2627: .Sx \&Bx ,
2628: .Sx \&Dx ,
2629: .Sx \&Fx ,
2630: .Sx \&Nx ,
2631: and
2632: .Sx \&Ox .
2633: .Ss \&Va
1.39 schwarze 2634: A variable name.
2635: .Pp
2636: Examples:
2637: .D1 \&.Va foo
2638: .D1 \&.Va const char *bar ;
1.17 schwarze 2639: .Ss \&Vt
1.27 schwarze 2640: A variable type.
1.35 schwarze 2641: This is also used for indicating global variables in the
2642: .Em SYNOPSIS
1.27 schwarze 2643: section, in which case a variable name is also specified.
2644: Note that it accepts
1.22 schwarze 2645: .Sx Block partial-implicit
1.35 schwarze 2646: syntax when invoked as the first macro in the
2647: .Em SYNOPSIS
2648: section, else it accepts ordinary
1.22 schwarze 2649: .Sx In-line
2650: syntax.
2651: .Pp
2652: Note that this should not be confused with
2653: .Sx \&Ft ,
2654: which is used for function return types.
2655: .Pp
2656: Examples:
1.25 schwarze 2657: .D1 \&.Vt unsigned char
1.35 schwarze 2658: .D1 \&.Vt extern const char * const sys_signame[] \&;
1.22 schwarze 2659: .Pp
2660: See also
1.35 schwarze 2661: .Sx MANUAL STRUCTURE
1.22 schwarze 2662: and
2663: .Sx \&Va .
1.17 schwarze 2664: .Ss \&Xc
1.24 schwarze 2665: Close a scope opened by
2666: .Sx \&Xo .
1.17 schwarze 2667: .Ss \&Xo
1.27 schwarze 2668: Open an extension scope.
2669: This macro originally existed to extend the 9-argument limit of troff;
2670: since this limit has been lifted, the macro has been deprecated.
1.17 schwarze 2671: .Ss \&Xr
1.22 schwarze 2672: Link to another manual
2673: .Pq Qq cross-reference .
1.34 schwarze 2674: Its syntax is as follows:
1.22 schwarze 2675: .Pp
1.34 schwarze 2676: .D1 Pf \. Sx \&Xr Cm name section
1.22 schwarze 2677: .Pp
2678: The
2679: .Cm name
2680: and
2681: .Cm section
1.27 schwarze 2682: are the name and section of the linked manual.
2683: If
1.22 schwarze 2684: .Cm section
2685: is followed by non-punctuation, an
2686: .Sx \&Ns
1.27 schwarze 2687: is inserted into the token stream.
2688: This behaviour is for compatibility with
1.22 schwarze 2689: .Xr groff 1 .
2690: .Pp
2691: Examples:
1.25 schwarze 2692: .D1 \&.Xr mandoc 1
1.35 schwarze 2693: .D1 \&.Xr mandoc 1 \&;
1.25 schwarze 2694: .D1 \&.Xr mandoc 1 \&Ns s behaviour
1.17 schwarze 2695: .Ss \&br
1.41 ! schwarze 2696: Emits a line-break.
! 2697: This macro should not be used; it is implemented for compatibility with
! 2698: historical manuals.
! 2699: .Pp
! 2700: Consider using
! 2701: .Sx \&Pp
! 2702: in the event of natural paragraph breaks.
1.17 schwarze 2703: .Ss \&sp
1.41 ! schwarze 2704: Emits vertical space.
! 2705: This macro should not be used; it is implemented for compatibility with
! 2706: historical manuals.
! 2707: Its syntax is as follows:
! 2708: .Pp
! 2709: .D1 Pf \. Sx \&sp Op Cm height
! 2710: .Pp
! 2711: The
! 2712: .Cm height
! 2713: argument must be formatted as described in
! 2714: .Sx Scaling Widths .
! 2715: If unspecified,
! 2716: .Sx \&sp
! 2717: asserts a single vertical space.
1.1 kristaps 2718: .Sh COMPATIBILITY
1.26 schwarze 2719: This section documents compatibility between mandoc and other other
2720: troff implementations, at this time limited to GNU troff
2721: .Pq Qq groff .
1.9 schwarze 2722: The term
1.15 schwarze 2723: .Qq historic groff
1.26 schwarze 2724: refers to groff versions before the
1.15 schwarze 2725: .Pa doc.tmac
1.9 schwarze 2726: file re-write
1.15 schwarze 2727: .Pq somewhere between 1.15 and 1.19 .
1.26 schwarze 2728: .Pp
2729: Heirloom troff, the other significant troff implementation accepting
2730: \-mdoc, is similar to historic groff.
1.15 schwarze 2731: .Pp
2732: .Bl -dash -compact
2733: .It
1.36 schwarze 2734: Old groff fails to assert a newline before
2735: .Sx \&Bd Fl ragged compact .
2736: .It
1.34 schwarze 2737: groff behaves inconsistently when encountering
2738: .Pf non- Sx \&Fa
2739: children of
2740: .Sx \&Fo
2741: regarding spacing between arguments.
2742: In mandoc, this is not the case: each argument is consistently followed
2743: by a single space and the trailing
2744: .Sq \&)
2745: suppresses prior spacing.
2746: .It
2747: groff behaves inconsistently when encountering
2748: .Sx \&Ft
2749: and
2750: .Sx \&Fn
2751: in the
2752: .Em SYNOPSIS :
1.35 schwarze 2753: at times newline(s) are suppressed depending on whether a prior
1.34 schwarze 2754: .Sx \&Fn
2755: has been invoked.
2756: In mandoc, this is not the case.
2757: See
2758: .Sx \&Ft
2759: and
2760: .Sx \&Fn
2761: for the normalised behaviour.
2762: .It
2763: Historic groff does not break before an
2764: .Sx \&Fn
2765: when not invoked as the line macro in the
2766: .Em SYNOPSIS
2767: section.
2768: .It
2769: Historic groff formats the
2770: .Sx \&In
2771: badly: trailing arguments are trashed and
2772: .Em SYNOPSIS
2773: is not specially treated.
2774: .It
2775: groff does not accept the
2776: .Sq \&Ta
2777: pseudo-macro as a line macro.
2778: mandoc does.
2779: .It
1.21 schwarze 2780: The comment syntax
2781: .Sq \e."
2782: is no longer accepted.
2783: .It
1.26 schwarze 2784: In groff, the
1.21 schwarze 2785: .Sx \&Pa
2786: macro does not format its arguments when used in the FILES section under
1.27 schwarze 2787: certain list types.
2788: mandoc does.
1.21 schwarze 2789: .It
1.26 schwarze 2790: Historic groff does not print a dash for empty
1.21 schwarze 2791: .Sx \&Fl
1.27 schwarze 2792: arguments.
2793: mandoc and newer groff implementations do.
1.21 schwarze 2794: .It
1.26 schwarze 2795: groff behaves irregularly when specifying
1.20 schwarze 2796: .Sq \ef
1.26 schwarze 2797: .Sx Text Decoration
1.27 schwarze 2798: within line-macro scopes.
2799: mandoc follows a consistent system.
1.20 schwarze 2800: .It
1.26 schwarze 2801: In mandoc, negative scaling units are truncated to zero; groff would
1.27 schwarze 2802: move to prior lines.
2803: Furthermore, the
1.17 schwarze 2804: .Sq f
2805: scaling unit, while accepted, is rendered as the default unit.
1.15 schwarze 2806: .It
1.9 schwarze 2807: In quoted literals, groff allowed pair-wise double-quotes to produce a
1.27 schwarze 2808: standalone double-quote in formatted output.
2809: This idiosyncratic behaviour is not applicable in mandoc.
1.15 schwarze 2810: .It
1.36 schwarze 2811: Display offsets
1.20 schwarze 2812: .Sx \&Bd
1.36 schwarze 2813: .Fl offset Ar center
1.17 schwarze 2814: and
1.36 schwarze 2815: .Fl offset Ar right
2816: are disregarded in mandoc.
1.39 schwarze 2817: Furthermore, troff specifies a
1.17 schwarze 2818: .Fl file Ar file
1.39 schwarze 2819: argument that is not supported in mandoc.
1.27 schwarze 2820: Lastly, since text is not right-justified in mandoc (or even groff),
1.17 schwarze 2821: .Fl ragged
2822: and
2823: .Fl filled
2824: are aliases, as are
2825: .Fl literal
2826: and
2827: .Fl unfilled .
1.15 schwarze 2828: .It
1.27 schwarze 2829: Historic groff has many un-callable macros.
2830: Most of these (excluding some block-level macros) are now callable.
1.15 schwarze 2831: .It
1.9 schwarze 2832: The vertical bar
1.15 schwarze 2833: .Sq \(ba
1.3 schwarze 2834: made historic groff
1.15 schwarze 2835: .Qq go orbital
1.26 schwarze 2836: but has been a proper delimiter since then.
1.15 schwarze 2837: .It
1.26 schwarze 2838: .Sx \&It Fl nested
1.3 schwarze 2839: is assumed for all lists (it wasn't in historic groff): any list may be
2840: nested and
1.17 schwarze 2841: .Fl enum
1.1 kristaps 2842: lists will restart the sequence only for the sub-list.
1.15 schwarze 2843: .It
1.1 kristaps 2844: Some manuals use
1.17 schwarze 2845: .Sx \&Li
1.1 kristaps 2846: incorrectly by following it with a reserved character and expecting the
1.27 schwarze 2847: delimiter to render.
2848: This is not supported in mandoc.
1.26 schwarze 2849: .It
2850: In groff, the
2851: .Sx \&Cd ,
2852: .Sx \&Er ,
1.30 schwarze 2853: .Sx \&Ex ,
1.26 schwarze 2854: and
1.30 schwarze 2855: .Sx \&Rv
1.27 schwarze 2856: macros were stipulated only to occur in certain manual sections.
2857: mandoc does not have these restrictions.
1.30 schwarze 2858: .It
2859: Newer groff and mandoc print
2860: .Qq AT&T UNIX
2861: prior to unknown arguments of
2862: .Sx \&At ;
2863: older groff did nothing.
1.15 schwarze 2864: .El
1.1 kristaps 2865: .Sh SEE ALSO
1.15 schwarze 2866: .Xr mandoc 1 ,
2867: .Xr mandoc_char 7
1.1 kristaps 2868: .Sh AUTHORS
2869: The
1.15 schwarze 2870: .Nm
1.9 schwarze 2871: reference was written by
1.26 schwarze 2872: .An Kristaps Dzonsons Aq kristaps@bsd.lv .