[BACK]Return to mdoc.7 CVS log [TXT][DIR] Up to [cvsweb.bsd.lv] / mandoc

Annotation of mandoc/mdoc.7, Revision 1.135

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

CVSweb