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

Annotation of mandoc/mdoc.7, Revision 1.129

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

CVSweb