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

Annotation of mandoc/mdoc.7, Revision 1.96

1.96    ! kristaps    1: .\"    $Id: mdoc.7,v 1.95 2010/05/07 15:49:36 kristaps 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.96    ! kristaps   17: .Dd $Mdocdate: May 7 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.1       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.58      kristaps   58: is also ignored.  Macro lines with only a control charater and optionally
                     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.43      kristaps  104: or a single one-character sequence.  See
1.57      kristaps  105: .Xr mandoc_char 7
1.50      kristaps  106: for a complete list.  Examples include
1.57      kristaps  107: .Sq \e(em
                    108: .Pq em-dash
1.50      kristaps  109: and
1.57      kristaps  110: .Sq \ee
                    111: .Pq back-slash .
                    112: .Ss Text Decoration
1.54      kristaps  113: Terms may be text-decorated using the
1.57      kristaps  114: .Sq \ef
1.74      kristaps  115: escape followed by an indicator: B (bold), I, (italic), R (Roman), or P
1.82      kristaps  116: (revert to previous mode):
1.75      kristaps  117: .Pp
1.76      kristaps  118: .D1 \efBbold\efR \efIitalic\efP
                    119: .Pp
                    120: A numerical representation 3, 2, or 1 (bold, italic, and Roman,
1.77      kristaps  121: respectively) may be used instead.  A text decoration is valid within
                    122: the current font scope only:  if a macro opens a font scope alongside
                    123: its own scope, such as
1.78      kristaps  124: .Sx \&Bf
1.77      kristaps  125: .Cm \&Sy ,
                    126: in-scope invocations of
                    127: .Sq \ef
                    128: are only valid within the font scope of the macro.  If
                    129: .Sq \ef
                    130: is specified outside of any font scope, such as in unenclosed, free-form
                    131: text, it will affect the remainder of the document.
1.76      kristaps  132: .Pp
                    133: Text may also be sized with the
                    134: .Sq \es
                    135: escape, whose syntax is one of
                    136: .Sq \es+-n
                    137: for one-digit numerals;
                    138: .Sq \es(+-nn
                    139: or
                    140: .Sq \es+-(nn
                    141: for two-digit numerals; and
                    142: .Sq \es[+-N] ,
                    143: .Sq \es+-[N] ,
                    144: .Sq \es'+-N' ,
                    145: or
                    146: .Sq \es+-'N'
                    147: for arbitrary-digit numerals:
                    148: .Pp
                    149: .D1 \es+1bigger\es-1
                    150: .D1 \es[+10]much bigger\es[-10]
                    151: .D1 \es+(10much bigger\es-(10
                    152: .D1 \es+'100'much much bigger\es-'100'
                    153: .Pp
1.82      kristaps  154: Note these forms are
1.76      kristaps  155: .Em not
1.82      kristaps  156: recommended for
1.57      kristaps  157: .Nm ,
1.74      kristaps  158: which encourages semantic annotation.
1.57      kristaps  159: .Ss Predefined Strings
1.82      kristaps  160: Historically,
1.57      kristaps  161: .Xr groff 1
1.82      kristaps  162: also defined a set of package-specific
1.57      kristaps  163: .Dq predefined strings ,
1.82      kristaps  164: which, like
1.57      kristaps  165: .Sx Special Characters ,
1.54      kristaps  166: demark special output characters and strings by way of input codes.
                    167: Predefined strings are escaped with the slash-asterisk,
1.57      kristaps  168: .Sq \e* :
1.54      kristaps  169: single-character
1.57      kristaps  170: .Sq \e*X ,
1.54      kristaps  171: two-character
1.57      kristaps  172: .Sq \e*(XX ,
1.54      kristaps  173: and N-character
1.57      kristaps  174: .Sq \e*[N] .
1.54      kristaps  175: See
1.57      kristaps  176: .Xr mandoc_char 7
1.54      kristaps  177: for a complete list.  Examples include
1.57      kristaps  178: .Sq \e*(Am
                    179: .Pq ampersand
1.54      kristaps  180: and
1.57      kristaps  181: .Sq \e*(Ba
                    182: .Pq vertical bar .
                    183: .Ss Whitespace
1.96    ! kristaps  184: In free-form lines, whitespace is preserved within a line; un-escaped
        !           185: trailing spaces are stripped from input (unless in a literal context).
        !           186: Blank free-form lines, which may include spaces, are only permitted
        !           187: within literal contexts.
1.57      kristaps  188: .Pp
1.46      kristaps  189: In macro lines, whitespace delimits arguments and is discarded.  If
1.47      kristaps  190: arguments are quoted, whitespace within the quotes is retained.
1.57      kristaps  191: .Ss Quotation
1.46      kristaps  192: Macro arguments may be quoted with a double-quote to group
                    193: space-delimited terms or to retain blocks of whitespace.  A quoted
                    194: argument begins with a double-quote preceded by whitespace.  The next
1.48      kristaps  195: double-quote not pair-wise adjacent to another double-quote terminates
1.50      kristaps  196: the literal, regardless of surrounding whitespace.
1.57      kristaps  197: .Pp
1.50      kristaps  198: This produces tokens
1.57      kristaps  199: .Sq a" ,
                    200: .Sq b c ,
                    201: .Sq de ,
1.47      kristaps  202: and
1.57      kristaps  203: .Sq fg" .
1.47      kristaps  204: Note that any quoted term, be it argument or macro, is indiscriminately
1.50      kristaps  205: considered literal text.  Thus, the following produces
1.57      kristaps  206: .Sq \&Em a :
                    207: .Bd -literal -offset indent
1.47      kristaps  208: \&.Em "Em a"
1.57      kristaps  209: .Ed
                    210: .Pp
1.46      kristaps  211: In free-form mode, quotes are regarded as opaque text.
1.63      kristaps  212: .Ss Dates
1.66      kristaps  213: There are several macros in
                    214: .Nm
1.72      kristaps  215: that require a date argument.  The canonical form for dates is the
                    216: American format:
1.66      kristaps  217: .Pp
                    218: .D1 Cm Month Day , Year
                    219: .Pp
                    220: The
                    221: .Cm Day
                    222: value is an optionally zero-padded numeral.  The
                    223: .Cm Month
                    224: value is the full month name.  The
                    225: .Cm Year
                    226: value is the full four-digit year.
                    227: .Pp
1.72      kristaps  228: Reduced form dates are broken-down canonical form dates:
1.66      kristaps  229: .Pp
1.72      kristaps  230: .D1 Cm Month , Year
                    231: .D1 Cm Year
1.66      kristaps  232: .Pp
                    233: Some examples of valid dates follow:
                    234: .Pp
                    235: .D1 "May, 2009" Pq reduced form
                    236: .D1 "2009" Pq reduced form
                    237: .D1 "May 20, 2009" Pq canonical form
1.61      kristaps  238: .Ss Scaling Widths
                    239: Many macros support scaled widths for their arguments, such as
                    240: stipulating a two-inch list indentation with the following:
                    241: .Bd -literal -offset indent
                    242: \&.Bl -tag -width 2i
                    243: .Ed
                    244: .Pp
                    245: The syntax for scaled widths is
1.62      kristaps  246: .Sq Li [+-]?[0-9]*.[0-9]*[:unit:] ,
1.61      kristaps  247: where a decimal must be preceded or proceeded by at least one digit.
                    248: Negative numbers, while accepted, are truncated to zero.  The following
                    249: scaling units are accepted:
                    250: .Pp
                    251: .Bl -tag -width Ds -offset indent -compact
                    252: .It c
                    253: centimetre
                    254: .It i
                    255: inch
                    256: .It P
                    257: pica (~1/6 inch)
                    258: .It p
                    259: point (~1/72 inch)
                    260: .It f
                    261: synonym for
                    262: .Sq u
                    263: .It v
                    264: default vertical span
                    265: .It m
                    266: width of rendered
                    267: .Sq m
                    268: .Pq em
                    269: character
                    270: .It n
                    271: width of rendered
                    272: .Sq n
                    273: .Pq en
                    274: character
                    275: .It u
                    276: default horizontal span
                    277: .It M
                    278: mini-em (~1/100 em)
                    279: .El
                    280: .Pp
                    281: Using anything other than
                    282: .Sq m ,
                    283: .Sq n ,
                    284: .Sq u ,
                    285: or
                    286: .Sq v
                    287: is necessarily non-portable across output media.  See
                    288: .Sx COMPATIBILITY .
1.43      kristaps  289: .Sh MANUAL STRUCTURE
1.66      kristaps  290: A well-formed
1.57      kristaps  291: .Nm
1.66      kristaps  292: document consists of a document prologue followed by one or more
                    293: sections.
                    294: .Pp
                    295: The prologue, which consists of (in order) the
1.64      kristaps  296: .Sx \&Dd ,
                    297: .Sx \&Dt ,
1.33      kristaps  298: and
1.66      kristaps  299: .Sx \&Os
                    300: macros, is required for every document.
                    301: .Pp
1.82      kristaps  302: The first section (sections are denoted by
1.66      kristaps  303: .Sx \&Sh )
                    304: must be the NAME section, consisting of at least one
1.64      kristaps  305: .Sx \&Nm
1.50      kristaps  306: followed by
1.66      kristaps  307: .Sx \&Nd .
                    308: .Pp
                    309: Following that, convention dictates specifying at least the SYNOPSIS and
                    310: DESCRIPTION sections, although this varies between manual sections.
                    311: .Pp
                    312: The following is a well-formed skeleton
                    313: .Nm
                    314: file:
1.57      kristaps  315: .Bd -literal -offset indent
1.43      kristaps  316: \&.Dd $\&Mdocdate$
                    317: \&.Dt mdoc 7
                    318: \&.Os
1.58      kristaps  319: \&.
1.43      kristaps  320: \&.Sh NAME
1.58      kristaps  321: \&.Nm foo
                    322: \&.Nd a description goes here
                    323: \&.\e\*q The next is for sections 2 & 3 only.
                    324: \&.\e\*q .Sh LIBRARY
                    325: \&.
                    326: \&.Sh SYNOPSIS
                    327: \&.Nm foo
                    328: \&.Op Fl options
                    329: \&.Ar
                    330: \&.
                    331: \&.Sh DESCRIPTION
                    332: The
                    333: \&.Nm
                    334: utility processes files ...
1.59      kristaps  335: \&.\e\*q .Sh IMPLEMENTATION NOTES
1.58      kristaps  336: \&.\e\*q The next is for sections 1 & 8 only.
                    337: \&.\e\*q .Sh EXIT STATUS
                    338: \&.\e\*q The next is for sections 2, 3, & 9 only.
                    339: \&.\e\*q .Sh RETURN VALUES
                    340: \&.\e\*q The next is for sections 1, 6, 7, & 8 only.
                    341: \&.\e\*q .Sh ENVIRONMENT
                    342: \&.\e\*q .Sh FILES
                    343: \&.\e\*q .Sh EXAMPLES
                    344: \&.\e\*q The next is for sections 1, 4, 6, 7, & 8 only.
                    345: \&.\e\*q .Sh DIAGNOSTICS
                    346: \&.\e\*q The next is for sections 2, 3, & 9 only.
                    347: \&.\e\*q .Sh ERRORS
                    348: \&.\e\*q .Sh SEE ALSO
                    349: \&.\e\*q .Xr foobar 1
                    350: \&.\e\*q .Sh STANDARDS
                    351: \&.\e\*q .Sh HISTORY
                    352: \&.\e\*q .Sh AUTHORS
                    353: \&.\e\*q .Sh CAVEATS
                    354: \&.\e\*q .Sh BUGS
                    355: \&.\e\*q .Sh SECURITY CONSIDERATIONS
1.57      kristaps  356: .Ed
                    357: .Pp
1.66      kristaps  358: The sections in a
                    359: .Nm
                    360: document are conventionally ordered as they appear above.  Sections
                    361: should be composed as follows:
1.73      kristaps  362: .Bl -ohang -offset Ds
                    363: .It Em NAME
                    364: The name(s) and a short description of the documented material.  The
                    365: syntax for this as follows:
                    366: .Bd -literal -offset indent
                    367: \&.Nm name0
                    368: \&.Nm name1
                    369: \&.Nm name2
                    370: \&.Nd a short description
                    371: .Ed
                    372: .Pp
                    373: The
1.66      kristaps  374: .Sx \&Nm
1.73      kristaps  375: macro(s) must precede the
                    376: .Sx \&Nd
                    377: macro.
1.80      kristaps  378: .Pp
1.82      kristaps  379: See
1.80      kristaps  380: .Sx \&Nm
                    381: and
                    382: .Sx \&Nd .
1.73      kristaps  383: .It Em LIBRARY
                    384: The name of the library containing the documented material, which is
                    385: assumed to be a function in a section 2 or 3 manual.  The syntax for
                    386: this is as follows:
                    387: .Bd -literal -offset indent
                    388: \&.Lb libarm
                    389: .Ed
                    390: .Pp
                    391: See
1.80      kristaps  392: .Sx \&Lb .
1.73      kristaps  393: .It Em SYNOPSIS
                    394: Documents the utility invocation syntax, function call syntax, or device
1.82      kristaps  395: configuration.
1.73      kristaps  396: .Pp
                    397: For the first, utilities (sections 1, 6, and 8), this is
                    398: generally structured as follows:
                    399: .Bd -literal -offset indent
                    400: \&.Nm foo
                    401: \&.Op Fl v
                    402: \&.Op Fl o Ar file
                    403: \&.Op Ar
                    404: \&.Nm bar
                    405: \&.Op Fl v
                    406: \&.Op Fl o Ar file
                    407: \&.Op Ar
                    408: .Ed
                    409: .Pp
                    410: For the second, function calls (sections 2, 3, 9):
                    411: .Bd -literal -offset indent
                    412: \&.Vt extern const char *global;
                    413: \&.In header.h
                    414: \&.Ft "char *"
                    415: \&.Fn foo "const char *src"
                    416: \&.Ft "char *"
                    417: \&.Fn bar "const char *src"
                    418: .Ed
                    419: .Pp
                    420: And for the third, configurations (section 4):
                    421: .Bd -literal -offset indent
                    422: \&.Cd \*qit* at isa? port 0x2e\*q
                    423: \&.Cd \*qit* at isa? port 0x4e\*q
                    424: .Ed
                    425: .Pp
1.82      kristaps  426: Manuals not in these sections generally don't need a
1.73      kristaps  427: .Em SYNOPSIS .
1.80      kristaps  428: .Pp
1.82      kristaps  429: See
1.80      kristaps  430: .Sx \&Op ,
                    431: .Sx \&Cd ,
                    432: .Sx \&Fn ,
                    433: .Sx \&Ft ,
                    434: and
                    435: .Sx \&Vt .
1.73      kristaps  436: .It Em DESCRIPTION
1.82      kristaps  437: This expands upon the brief, one-line description in
1.73      kristaps  438: .Em NAME .
                    439: It usually contains a break-down of the options (if documenting a
                    440: command), such as:
                    441: .Bd -literal -offset indent
                    442: The arguments are as follows:
                    443: \&.Bl \-tag \-width Ds
                    444: \&.It Fl v
                    445: Print verbose information.
                    446: \&.El
                    447: .Ed
1.80      kristaps  448: .Pp
1.73      kristaps  449: Manuals not documenting a command won't include the above fragment.
                    450: .It Em IMPLEMENTATION NOTES
                    451: Implementation-specific notes should be kept here.  This is useful when
                    452: implementing standard functions that may have side effects or notable
                    453: algorithmic implications.
                    454: .It Em EXIT STATUS
                    455: Command exit status for section 1, 6, and 8 manuals.  This section is
                    456: the dual of
                    457: .Em RETURN VALUES ,
                    458: which is used for functions.  Historically, this information was
                    459: described in
                    460: .Em DIAGNOSTICS ,
                    461: a practise that is now discouraged.
                    462: .Pp
                    463: See
                    464: .Sx \&Ex .
                    465: .It Em RETURN VALUES
                    466: This section is the dual of
                    467: .Em EXIT STATUS ,
                    468: which is used for commands.  It documents the return values of functions
                    469: in sections 2, 3, and 9.
                    470: .Pp
                    471: See
                    472: .Sx \&Rv .
                    473: .It Em ENVIRONMENT
                    474: Documents any usages of environment variables, e.g.,
                    475: .Xr environ 7 .
                    476: .Pp
                    477: See
                    478: .Sx \&Ev .
                    479: .It Em FILES
                    480: Documents files used.  It's helpful to document both the file and a
                    481: short description of how the file is used (created, modified, etc.).
                    482: .Pp
                    483: See
                    484: .Sx \&Pa .
                    485: .It Em EXAMPLES
                    486: Example usages.  This often contains snippets of well-formed,
                    487: well-tested invocations.  Make doubly sure that your examples work
                    488: properly!
                    489: .It Em DIAGNOSTICS
                    490: Documents error conditions.  This is most useful in section 4 manuals.
                    491: Historically, this section was used in place of
                    492: .Em EXIT STATUS
                    493: for manuals in sections 1, 6, and 8; however, this practise is
                    494: discouraged.
                    495: .Pp
                    496: See
1.80      kristaps  497: .Sx \&Bl
                    498: .Fl diag .
1.73      kristaps  499: .It Em ERRORS
                    500: Documents error handling in sections 2, 3, and 9.
                    501: .Pp
                    502: See
                    503: .Sx \&Er .
                    504: .It Em SEE ALSO
                    505: References other manuals with related topics.  This section should exist
                    506: for most manuals.  Cross-references should conventionally be ordered
                    507: first by section, then alphabetically.
                    508: .Pp
                    509: See
                    510: .Sx \&Xr .
                    511: .It Em STANDARDS
                    512: References any standards implemented or used.  If not adhering to any
                    513: standards, the
                    514: .Em HISTORY
                    515: section should be used instead.
                    516: .Pp
                    517: See
                    518: .Sx \&St .
                    519: .It Em HISTORY
                    520: The history of any manual without a
                    521: .Em STANDARDS
                    522: section should be described in this section.
                    523: .It Em AUTHORS
                    524: Credits to authors, if applicable, should appear in this section.
                    525: Authors should generally be noted by both name and an e-mail address.
                    526: .Pp
                    527: See
                    528: .Sx \&An .
                    529: .It Em CAVEATS
                    530: Explanations of common misuses and misunderstandings should be explained
                    531: in this section.
                    532: .It Em BUGS
                    533: Extant bugs should be described in this section.
                    534: .It Em SECURITY CONSIDERATIONS
                    535: Documents any security precautions that operators should consider.
1.66      kristaps  536: .El
1.43      kristaps  537: .Sh MACRO SYNTAX
1.56      kristaps  538: Macros are one to three three characters in length and begin with a
                    539: control character ,
1.57      kristaps  540: .Sq \&. ,
1.56      kristaps  541: at the beginning of the line.  An arbitrary amount of whitespace may
1.64      kristaps  542: sit between the control character and the macro name.  Thus, the
                    543: following are equivalent:
                    544: .Bd -literal -offset indent
                    545: \&.Pp
                    546: \&.\ \ \ \&Pp
                    547: .Ed
1.57      kristaps  548: .Pp
1.46      kristaps  549: The syntax of a macro depends on its classification.  In this section,
1.57      kristaps  550: .Sq \-arg
1.43      kristaps  551: refers to macro arguments, which may be followed by zero or more
1.57      kristaps  552: .Sq parm
1.43      kristaps  553: parameters;
1.57      kristaps  554: .Sq \&Yo
1.43      kristaps  555: opens the scope of a macro; and if specified,
1.57      kristaps  556: .Sq \&Yc
1.43      kristaps  557: closes it out.
1.57      kristaps  558: .Pp
1.43      kristaps  559: The
1.57      kristaps  560: .Em Callable
1.43      kristaps  561: column indicates that the macro may be called subsequent to the initial
1.55      kristaps  562: line-macro.  If a macro is not callable, then its invocation after the
                    563: initial line macro is interpreted as opaque text, such that
1.60      kristaps  564: .Sq \&.Fl \&Sh
1.55      kristaps  565: produces
1.60      kristaps  566: .Sq Fl \&Sh .
1.57      kristaps  567: .Pp
1.55      kristaps  568: The
1.57      kristaps  569: .Em Parsable
1.43      kristaps  570: column indicates whether the macro may be followed by further
1.55      kristaps  571: (ostensibly callable) macros.  If a macro is not parsable, subsequent
                    572: macro invocations on the line will be interpreted as opaque text.
1.57      kristaps  573: .Pp
1.55      kristaps  574: The
1.57      kristaps  575: .Em Scope
1.43      kristaps  576: column, if applicable, describes closure rules.
1.57      kristaps  577: .Ss Block full-explicit
1.43      kristaps  578: Multi-line scope closed by an explicit closing macro.  All macros
                    579: contains bodies; only
1.64      kristaps  580: .Sx \&Bf
1.43      kristaps  581: contains a head.
1.57      kristaps  582: .Bd -literal -offset indent
1.50      kristaps  583: \&.Yo \(lB\-arg \(lBparm...\(rB\(rB \(lBhead...\(rB
                    584: \(lBbody...\(rB
1.43      kristaps  585: \&.Yc
1.57      kristaps  586: .Ed
                    587: .Pp
                    588: .Bl -column -compact -offset indent "MacroX" "CallableX" "ParsableX" "closed by XXX"
                    589: .It Em Macro Ta Em Callable Ta Em Parsable Ta Em Scope
1.64      kristaps  590: .It Sx \&Bd  Ta    \&No     Ta    \&No     Ta    closed by Sx \&Ed
                    591: .It Sx \&Bf  Ta    \&No     Ta    \&No     Ta    closed by Sx \&Ef
                    592: .It Sx \&Bk  Ta    \&No     Ta    \&No     Ta    closed by Sx \&Ek
                    593: .It Sx \&Bl  Ta    \&No     Ta    \&No     Ta    closed by Sx \&El
                    594: .It Sx \&Ed  Ta    \&No     Ta    \&No     Ta    opened by Sx \&Bd
                    595: .It Sx \&Ef  Ta    \&No     Ta    \&No     Ta    opened by Sx \&Bf
                    596: .It Sx \&Ek  Ta    \&No     Ta    \&No     Ta    opened by Sx \&Bk
                    597: .It Sx \&El  Ta    \&No     Ta    \&No     Ta    opened by Sx \&Bl
1.57      kristaps  598: .El
                    599: .Ss Block full-implicit
1.43      kristaps  600: Multi-line scope closed by end-of-file or implicitly by another macro.
1.50      kristaps  601: All macros have bodies; some
1.57      kristaps  602: .Po
1.64      kristaps  603: .Sx \&It Fl bullet ,
                    604: .Fl hyphen ,
                    605: .Fl dash ,
                    606: .Fl enum ,
                    607: .Fl item
1.57      kristaps  608: .Pc
1.64      kristaps  609: don't have heads; only one
                    610: .Po
                    611: .Sx \&It Fl column
1.82      kristaps  612: .Pc
1.64      kristaps  613: has multiple heads.
1.57      kristaps  614: .Bd -literal -offset indent
1.50      kristaps  615: \&.Yo \(lB\-arg \(lBparm...\(rB\(rB \(lBhead... \(lBTa head...\(rB\(rB
                    616: \(lBbody...\(rB
1.57      kristaps  617: .Ed
                    618: .Pp
                    619: .Bl -column -compact -offset indent "MacroX" "CallableX" "ParsableX" "closed by XXXXXXXXXXX"
                    620: .It Em Macro Ta Em Callable Ta Em Parsable Ta Em Scope
1.64      kristaps  621: .It Sx \&It  Ta    \&No     Ta    Yes      Ta    closed by Sx \&It , Sx \&El
                    622: .It Sx \&Nd  Ta    \&No     Ta    \&No     Ta    closed by Sx \&Sh
                    623: .It Sx \&Sh  Ta    \&No     Ta    \&No     Ta    closed by Sx \&Sh
                    624: .It Sx \&Ss  Ta    \&No     Ta    \&No     Ta    closed by Sx \&Sh , Sx \&Ss
1.57      kristaps  625: .El
                    626: .Ss Block partial-explicit
1.43      kristaps  627: Like block full-explicit, but also with single-line scope.  Each
1.50      kristaps  628: has at least a body and, in limited circumstances, a head
1.64      kristaps  629: .Po
                    630: .Sx \&Fo ,
                    631: .Sx \&Eo
                    632: .Pc
1.50      kristaps  633: and/or tail
1.64      kristaps  634: .Pq Sx \&Ec .
1.57      kristaps  635: .Bd -literal -offset indent
1.50      kristaps  636: \&.Yo \(lB\-arg \(lBparm...\(rB\(rB \(lBhead...\(rB
                    637: \(lBbody...\(rB
                    638: \&.Yc \(lBtail...\(rB
1.2       kristaps  639:
1.43      kristaps  640: \&.Yo \(lB\-arg \(lBparm...\(rB\(rB \(lBhead...\(rB \
1.50      kristaps  641: \(lBbody...\(rB \&Yc \(lBtail...\(rB
1.57      kristaps  642: .Ed
                    643: .Pp
                    644: .Bl -column "MacroX" "CallableX" "ParsableX" "closed by XXXX" -compact -offset indent
                    645: .It Em Macro Ta Em Callable Ta Em Parsable Ta Em Scope
1.64      kristaps  646: .It Sx \&Ac  Ta    Yes      Ta    Yes      Ta    opened by Sx \&Ao
1.63      kristaps  647: .It Sx \&Ao  Ta    Yes      Ta    Yes      Ta    closed by Sx \&Ac
1.64      kristaps  648: .It Sx \&Bc  Ta    Yes      Ta    Yes      Ta    closed by Sx \&Bo
                    649: .It Sx \&Bo  Ta    Yes      Ta    Yes      Ta    opened by Sx \&Bc
                    650: .It Sx \&Brc Ta    Yes      Ta    Yes      Ta    opened by Sx \&Bro
                    651: .It Sx \&Bro Ta    Yes      Ta    Yes      Ta    closed by Sx \&Brc
                    652: .It Sx \&Dc  Ta    Yes      Ta    Yes      Ta    opened by Sx \&Do
                    653: .It Sx \&Do  Ta    Yes      Ta    Yes      Ta    closed by Sx \&Dc
                    654: .It Sx \&Ec  Ta    Yes      Ta    Yes      Ta    opened by Sx \&Eo
                    655: .It Sx \&Eo  Ta    Yes      Ta    Yes      Ta    closed by Sx \&Ec
                    656: .It Sx \&Fc  Ta    Yes      Ta    Yes      Ta    opened by Sx \&Fo
                    657: .It Sx \&Fo  Ta    \&No     Ta    \&No     Ta    closed by Sx \&Fc
                    658: .It Sx \&Oc  Ta    Yes      Ta    Yes      Ta    closed by Sx \&Oo
                    659: .It Sx \&Oo  Ta    Yes      Ta    Yes      Ta    opened by Sx \&Oc
                    660: .It Sx \&Pc  Ta    Yes      Ta    Yes      Ta    closed by Sx \&Po
                    661: .It Sx \&Po  Ta    Yes      Ta    Yes      Ta    opened by Sx \&Pc
                    662: .It Sx \&Qc  Ta    Yes      Ta    Yes      Ta    opened by Sx \&Oo
                    663: .It Sx \&Qo  Ta    Yes      Ta    Yes      Ta    closed by Sx \&Oc
1.63      kristaps  664: .It Sx \&Re  Ta    \&No     Ta    \&No     Ta    opened by Sx \&Rs
                    665: .It Sx \&Rs  Ta    \&No     Ta    \&No     Ta    closed by Sx \&Re
1.64      kristaps  666: .It Sx \&Sc  Ta    Yes      Ta    Yes      Ta    opened by Sx \&So
                    667: .It Sx \&So  Ta    Yes      Ta    Yes      Ta    closed by Sx \&Sc
                    668: .It Sx \&Xc  Ta    Yes      Ta    Yes      Ta    opened by Sx \&Xo
                    669: .It Sx \&Xo  Ta    Yes      Ta    Yes      Ta    closed by Sx \&Xc
1.57      kristaps  670: .El
                    671: .Ss Block partial-implicit
1.50      kristaps  672: Like block full-implicit, but with single-line scope closed by
1.57      kristaps  673: .Sx Reserved Characters
1.43      kristaps  674: or end of line.
1.57      kristaps  675: .Bd -literal -offset indent
1.43      kristaps  676: \&.Yo \(lB\-arg \(lBval...\(rB\(rB \(lBbody...\(rB \(lBres...\(rB
1.57      kristaps  677: .Ed
                    678: .Pp
                    679: .Bl -column "MacroX" "CallableX" "ParsableX" -compact -offset indent
                    680: .It Em Macro Ta Em Callable Ta Em Parsable
1.64      kristaps  681: .It Sx \&Aq  Ta    Yes      Ta    Yes
                    682: .It Sx \&Bq  Ta    Yes      Ta    Yes
                    683: .It Sx \&Brq Ta    Yes      Ta    Yes
                    684: .It Sx \&D1  Ta    \&No     Ta    \&Yes
                    685: .It Sx \&Dl  Ta    \&No     Ta    Yes
                    686: .It Sx \&Dq  Ta    Yes      Ta    Yes
                    687: .It Sx \&Op  Ta    Yes      Ta    Yes
                    688: .It Sx \&Pq  Ta    Yes      Ta    Yes
                    689: .It Sx \&Ql  Ta    Yes      Ta    Yes
                    690: .It Sx \&Qq  Ta    Yes      Ta    Yes
                    691: .It Sx \&Sq  Ta    Yes      Ta    Yes
1.83      kristaps  692: .It Sx \&Vt  Ta    Yes      Ta    Yes
1.57      kristaps  693: .El
1.83      kristaps  694: .Pp
                    695: Note that the
                    696: .Sx \&Vt
                    697: macro is a
                    698: .Sx Block partial-implicit
                    699: only when invoked as the first macro
                    700: in a SYNOPSIS section line, else it is
                    701: .Sx In-line .
1.57      kristaps  702: .Ss In-line
1.50      kristaps  703: Closed by
1.57      kristaps  704: .Sx Reserved Characters ,
1.43      kristaps  705: end of line, fixed argument lengths, and/or subsequent macros.  In-line
                    706: macros have only text children.  If a number (or inequality) of
1.3       kristaps  707: arguments is
1.57      kristaps  708: .Pq n ,
1.3       kristaps  709: then the macro accepts an arbitrary number of arguments.
1.57      kristaps  710: .Bd -literal -offset indent
1.43      kristaps  711: \&.Yo \(lB\-arg \(lBval...\(rB\(rB \(lBargs...\(rB \(lbres...\(rb
                    712:
                    713: \&.Yo \(lB\-arg \(lBval...\(rB\(rB \(lBargs...\(rB Yc...
                    714:
                    715: \&.Yo \(lB\-arg \(lBval...\(rB\(rB arg0 arg1 argN
1.57      kristaps  716: .Ed
                    717: .Pp
                    718: .Bl -column "MacroX" "CallableX" "ParsableX" "Arguments" -compact -offset indent
                    719: .It Em Macro Ta Em Callable Ta Em Parsable Ta Em Arguments
1.63      kristaps  720: .It Sx \&%A  Ta    \&No     Ta    \&No     Ta    >0
                    721: .It Sx \&%B  Ta    \&No     Ta    \&No     Ta    >0
                    722: .It Sx \&%C  Ta    \&No     Ta    \&No     Ta    >0
                    723: .It Sx \&%D  Ta    \&No     Ta    \&No     Ta    >0
                    724: .It Sx \&%I  Ta    \&No     Ta    \&No     Ta    >0
                    725: .It Sx \&%J  Ta    \&No     Ta    \&No     Ta    >0
                    726: .It Sx \&%N  Ta    \&No     Ta    \&No     Ta    >0
                    727: .It Sx \&%O  Ta    \&No     Ta    \&No     Ta    >0
                    728: .It Sx \&%P  Ta    \&No     Ta    \&No     Ta    >0
1.69      kristaps  729: .It Sx \&%Q  Ta    \&No     Ta    \&No     Ta    >0
1.63      kristaps  730: .It Sx \&%R  Ta    \&No     Ta    \&No     Ta    >0
                    731: .It Sx \&%T  Ta    \&No     Ta    \&No     Ta    >0
1.69      kristaps  732: .It Sx \&%U  Ta    \&No     Ta    \&No     Ta    >0
1.63      kristaps  733: .It Sx \&%V  Ta    \&No     Ta    \&No     Ta    >0
1.64      kristaps  734: .It Sx \&Ad  Ta    Yes      Ta    Yes      Ta    n
                    735: .It Sx \&An  Ta    Yes      Ta    Yes      Ta    n
                    736: .It Sx \&Ap  Ta    Yes      Ta    Yes      Ta    0
                    737: .It Sx \&Ar  Ta    Yes      Ta    Yes      Ta    n
                    738: .It Sx \&At  Ta    Yes      Ta    Yes      Ta    1
                    739: .It Sx \&Bsx Ta    Yes      Ta    Yes      Ta    n
                    740: .It Sx \&Bt  Ta    \&No     Ta    \&No     Ta    0
                    741: .It Sx \&Bx  Ta    Yes      Ta    Yes      Ta    n
                    742: .It Sx \&Cd  Ta    Yes      Ta    Yes      Ta    >0
                    743: .It Sx \&Cm  Ta    Yes      Ta    Yes      Ta    n
                    744: .It Sx \&Db  Ta    \&No     Ta    \&No     Ta    1
                    745: .It Sx \&Dd  Ta    \&No     Ta    \&No     Ta    >0
                    746: .It Sx \&Dt  Ta    \&No     Ta    \&No     Ta    n
                    747: .It Sx \&Dv  Ta    Yes      Ta    Yes      Ta    n
                    748: .It Sx \&Dx  Ta    Yes      Ta    Yes      Ta    n
                    749: .It Sx \&Em  Ta    Yes      Ta    Yes      Ta    >0
                    750: .It Sx \&En  Ta    \&No     Ta    \&No     Ta    0
                    751: .It Sx \&Er  Ta    Yes      Ta    Yes      Ta    >0
                    752: .It Sx \&Es  Ta    \&No     Ta    \&No     Ta    0
                    753: .It Sx \&Ev  Ta    Yes      Ta    Yes      Ta    n
                    754: .It Sx \&Ex  Ta    \&No     Ta    \&No     Ta    n
                    755: .It Sx \&Fa  Ta    Yes      Ta    Yes      Ta    n
                    756: .It Sx \&Fd  Ta    \&No     Ta    \&No     Ta    >0
                    757: .It Sx \&Fl  Ta    Yes      Ta    Yes      Ta    n
                    758: .It Sx \&Fn  Ta    Yes      Ta    Yes      Ta    >0
                    759: .It Sx \&Fr  Ta    \&No     Ta    \&No     Ta    n
                    760: .It Sx \&Ft  Ta    Yes      Ta    Yes      Ta    n
                    761: .It Sx \&Fx  Ta    Yes      Ta    Yes      Ta    n
                    762: .It Sx \&Hf  Ta    \&No     Ta    \&No     Ta    n
                    763: .It Sx \&Ic  Ta    Yes      Ta    Yes      Ta    >0
                    764: .It Sx \&In  Ta    \&No     Ta    \&No     Ta    n
                    765: .It Sx \&Lb  Ta    \&No     Ta    \&No     Ta    1
                    766: .It Sx \&Li  Ta    Yes      Ta    Yes      Ta    n
                    767: .It Sx \&Lk  Ta    Yes      Ta    Yes      Ta    n
                    768: .It Sx \&Lp  Ta    \&No     Ta    \&No     Ta    0
                    769: .It Sx \&Ms  Ta    Yes      Ta    Yes      Ta    >0
                    770: .It Sx \&Mt  Ta    Yes      Ta    Yes      Ta    >0
                    771: .It Sx \&Nm  Ta    Yes      Ta    Yes      Ta    n
                    772: .It Sx \&No  Ta    Yes      Ta    Yes      Ta    0
                    773: .It Sx \&Ns  Ta    Yes      Ta    Yes      Ta    0
                    774: .It Sx \&Nx  Ta    Yes      Ta    Yes      Ta    n
                    775: .It Sx \&Os  Ta    \&No     Ta    \&No     Ta    n
                    776: .It Sx \&Ot  Ta    \&No     Ta    \&No     Ta    n
                    777: .It Sx \&Ox  Ta    Yes      Ta    Yes      Ta    n
                    778: .It Sx \&Pa  Ta    Yes      Ta    Yes      Ta    n
1.88      kristaps  779: .It Sx \&Pf  Ta    Yes      Ta    Yes      Ta    1
1.64      kristaps  780: .It Sx \&Pp  Ta    \&No     Ta    \&No     Ta    0
                    781: .It Sx \&Rv  Ta    \&No     Ta    \&No     Ta    n
                    782: .It Sx \&Sm  Ta    \&No     Ta    \&No     Ta    1
                    783: .It Sx \&St  Ta    \&No     Ta    Yes      Ta    1
                    784: .It Sx \&Sx  Ta    Yes      Ta    Yes      Ta    >0
                    785: .It Sx \&Sy  Ta    Yes      Ta    Yes      Ta    >0
                    786: .It Sx \&Tn  Ta    Yes      Ta    Yes      Ta    >0
                    787: .It Sx \&Ud  Ta    \&No     Ta    \&No     Ta    0
                    788: .It Sx \&Ux  Ta    Yes      Ta    Yes      Ta    n
                    789: .It Sx \&Va  Ta    Yes      Ta    Yes      Ta    n
                    790: .It Sx \&Vt  Ta    Yes      Ta    Yes      Ta    >0
1.84      kristaps  791: .It Sx \&Xr  Ta    Yes      Ta    Yes      Ta    >0
1.64      kristaps  792: .It Sx \&br  Ta    \&No     Ta    \&No     Ta    0
                    793: .It Sx \&sp  Ta    \&No     Ta    \&No     Ta    1
1.82      kristaps  794: .El
1.63      kristaps  795: .Sh REFERENCE
                    796: This section is a canonical reference of all macros, arranged
                    797: alphabetically.  For the scoping of individual macros, see
                    798: .Sx MACRO SYNTAX .
                    799: .Ss \&%A
                    800: Author name of an
                    801: .Sx \&Rs
                    802: block.  Multiple authors should each be accorded their own
1.64      kristaps  803: .Sx \%%A
1.66      kristaps  804: line.  Author names should be ordered with full or abbreviated
                    805: forename(s) first, then full surname.
1.63      kristaps  806: .Ss \&%B
                    807: Book title of an
                    808: .Sx \&Rs
                    809: block.  This macro may also be used in a non-bibliographic context when
                    810: referring to book titles.
                    811: .Ss \&%C
                    812: Publication city or location of an
                    813: .Sx \&Rs
                    814: block.
                    815: .Pp
1.65      kristaps  816: .Em Remarks :
1.63      kristaps  817: this macro is not implemented in
                    818: .Xr groff 1 .
                    819: .Ss \&%D
                    820: Publication date of an
                    821: .Sx \&Rs
1.72      kristaps  822: block.  This should follow the reduced or canonical form syntax
                    823: described in
1.63      kristaps  824: .Sx Dates .
                    825: .Ss \&%I
                    826: Publisher or issuer name of an
                    827: .Sx \&Rs
                    828: block.
                    829: .Ss \&%J
                    830: Journal name of an
                    831: .Sx \&Rs
                    832: block.
                    833: .Ss \&%N
                    834: Issue number (usually for journals) of an
                    835: .Sx \&Rs
                    836: block.
                    837: .Ss \&%O
                    838: Optional information of an
                    839: .Sx \&Rs
                    840: block.
                    841: .Ss \&%P
                    842: Book or journal page number of an
                    843: .Sx \&Rs
                    844: block.
                    845: .Ss \&%Q
                    846: Institutional author (school, government, etc.) of an
                    847: .Sx \&Rs
                    848: block.  Multiple institutional authors should each be accorded their own
1.64      kristaps  849: .Sx \&%Q
1.63      kristaps  850: line.
                    851: .Ss \&%R
                    852: Technical report name of an
                    853: .Sx \&Rs
                    854: block.
                    855: .Ss \&%T
                    856: Article title of an
                    857: .Sx \&Rs
                    858: block.  This macro may also be used in a non-bibliographical context
                    859: when referring to article titles.
1.69      kristaps  860: .Ss \&%U
1.70      kristaps  861: URI of reference document.
1.63      kristaps  862: .Ss \&%V
                    863: Volume number of an
                    864: .Sx \&Rs
                    865: block.
                    866: .Ss \&Ac
                    867: Closes an
                    868: .Sx \&Ao
                    869: block.  Does not have any tail arguments.
                    870: .Ss \&Ad
                    871: Address construct: usually in the context of an computational address in
                    872: memory, not a physical (post) address.
                    873: .Pp
1.64      kristaps  874: Examples:
1.91      kristaps  875: .D1 \&.Ad [0,$]
                    876: .D1 \&.Ad 0x00000000
1.63      kristaps  877: .Ss \&An
1.64      kristaps  878: Author name.  This macro may alternatively accepts the following
                    879: arguments, although these may not be specified along with a parameter:
                    880: .Bl -tag -width 12n -offset indent
                    881: .It Fl split
1.66      kristaps  882: Renders a line break before each author listing.
1.64      kristaps  883: .It Fl nosplit
                    884: The opposite of
                    885: .Fl split .
                    886: .El
                    887: .Pp
                    888: In the AUTHORS section, the default is not to split the first author
                    889: listing, but all subsequent author listings, whether or not they're
                    890: interspersed by other macros or text, are split.  Thus, specifying
                    891: .Fl split
                    892: will cause the first listing also to be split.  If not in the AUTHORS
                    893: section, the default is not to split.
                    894: .Pp
                    895: Examples:
1.91      kristaps  896: .D1 \&.An -nosplit
                    897: .D1 \&.An J. D. Ullman .
1.64      kristaps  898: .Pp
                    899: .Em Remarks :
                    900: the effects of
                    901: .Fl split
                    902: or
                    903: .Fl nosplit
                    904: are re-set when entering the AUTHORS section, so if one specifies
                    905: .Sx \&An Fl nosplit
                    906: in the general document body, it must be re-specified in the AUTHORS
                    907: section.
1.63      kristaps  908: .Ss \&Ao
                    909: Begins a block enclosed by angled brackets.  Does not have any head
                    910: arguments.
                    911: .Pp
1.64      kristaps  912: Examples:
1.91      kristaps  913: .D1 \&.Fl -key= \&Ns \&Ao \&Ar val \&Ac
1.63      kristaps  914: .Pp
1.64      kristaps  915: See also
                    916: .Sx \&Aq .
1.63      kristaps  917: .Ss \&Ap
1.64      kristaps  918: Inserts an apostrophe without any surrounding white-space.  This is
                    919: generally used as a grammatic device when referring to the verb form of
                    920: a function:
                    921: .Bd -literal -offset indent
                    922: \&.Fn execve Ap d
                    923: .Ed
1.63      kristaps  924: .Ss \&Aq
1.82      kristaps  925: Encloses its arguments in angled brackets.
1.64      kristaps  926: .Pp
                    927: Examples:
1.91      kristaps  928: .D1 \&.Fl -key= \&Ns \&Aq \&Ar val
1.64      kristaps  929: .Pp
                    930: .Em Remarks :
                    931: this macro is often abused for rendering URIs, which should instead use
                    932: .Sx \&Lk
                    933: or
                    934: .Sx \&Mt ,
                    935: or to note pre-processor
                    936: .Dq Li #include
                    937: statements, which should use
                    938: .Sx \&In .
                    939: .Pp
                    940: See also
                    941: .Sx \&Ao .
1.63      kristaps  942: .Ss \&Ar
1.66      kristaps  943: Command arguments.  If an argument is not provided, the string
1.64      kristaps  944: .Dq file ...
1.66      kristaps  945: is used as a default.
1.64      kristaps  946: .Pp
                    947: Examples:
1.91      kristaps  948: .D1 \&.Fl o \&Ns \&Ar file1
                    949: .D1 \&.Ar
                    950: .D1 \&.Ar arg1 , arg2 .
1.63      kristaps  951: .Ss \&At
1.64      kristaps  952: Formats an AT&T version.  Accepts at most one parameter:
                    953: .Bl -tag -width 12n -offset indent
                    954: .It Cm v[1-7] | 32v
                    955: A version of
                    956: .At .
                    957: .It Cm V[.[1-4]]?
                    958: A system version of
                    959: .At .
                    960: .El
                    961: .Pp
                    962: Note that these parameters do not begin with a hyphen.
                    963: .Pp
                    964: Examples:
1.91      kristaps  965: .D1 \&.At
                    966: .D1 \&.At V.1
1.65      kristaps  967: .Pp
                    968: See also
1.66      kristaps  969: .Sx \&Bsx ,
1.65      kristaps  970: .Sx \&Bx ,
1.66      kristaps  971: .Sx \&Dx ,
1.65      kristaps  972: .Sx \&Fx ,
                    973: .Sx \&Nx ,
                    974: .Sx \&Ox ,
                    975: and
                    976: .Sx \&Ux .
1.63      kristaps  977: .Ss \&Bc
1.64      kristaps  978: Closes a
                    979: .Sx \&Bo
                    980: block.  Does not have any tail arguments.
1.63      kristaps  981: .Ss \&Bd
1.64      kristaps  982: Begins a display block.  A display is collection of macros or text which
                    983: may be collectively offset or justified in a manner different from that
                    984: of the enclosing context.  By default, the block is preceded by a
                    985: vertical space.
                    986: .Pp
                    987: Each display is associated with a type, which must be one of the
                    988: following arguments:
                    989: .Bl -tag -width 12n -offset indent
                    990: .It Fl ragged
                    991: Only left-justify the block.
                    992: .It Fl unfilled
                    993: Do not justify the block at all.
                    994: .It Fl filled
                    995: Left- and right-justify the block.
                    996: .It Fl literal
                    997: Alias for
                    998: .Fl unfilled .
                    999: .It Fl centered
                   1000: Centre-justify each line.
                   1001: .El
                   1002: .Pp
                   1003: The type must be provided first.  Secondary arguments are as follows:
                   1004: .Bl -tag -width 12n -offset indent
                   1005: .It Fl offset Ar width
                   1006: Offset by the value of
                   1007: .Ar width ,
                   1008: which is interpreted as one of the following, specified in order:
                   1009: .Bl -item
                   1010: .It
                   1011: As one of the pre-defined strings
                   1012: .Ar indent ,
                   1013: the width of standard indentation;
                   1014: .Ar indent-two ,
                   1015: twice
                   1016: .Ar indent ;
                   1017: .Ar left ,
                   1018: which has no effect ;
                   1019: .Ar right ,
                   1020: which justifies to the right margin; and
                   1021: .Ar center ,
                   1022: which aligns around an imagined centre axis.
                   1023: .It
                   1024: As a precalculated width for a named macro.  The most popular is the
                   1025: imaginary macro
1.67      kristaps 1026: .Ar \&Ds ,
1.64      kristaps 1027: which resolves to
                   1028: .Ar 6n .
                   1029: .It
                   1030: As a scaling unit following the syntax described in
                   1031: .Sx Scaling Widths .
                   1032: .It
                   1033: As the calculated string length of the opaque string.
                   1034: .El
                   1035: .Pp
                   1036: If unset, it will revert to the value of
                   1037: .Ar 8n
                   1038: as described in
                   1039: .Sx Scaling Widths .
                   1040: .It Fl compact
                   1041: Do not assert a vertical space before the block.
                   1042: .It Fl file Ar file
                   1043: Prepend the file
                   1044: .Ar file
                   1045: before any text or macros within the block.
                   1046: .El
                   1047: .Pp
                   1048: Examples:
                   1049: .Bd -literal -offset indent
                   1050: \&.Bd \-unfilled \-offset two-indent \-compact
1.65      kristaps 1051:    Hello       world.
1.64      kristaps 1052: \&.Ed
                   1053: .Ed
1.66      kristaps 1054: .Pp
                   1055: See also
                   1056: .Sx \&D1
                   1057: and
                   1058: .Sx \&Dl .
1.63      kristaps 1059: .Ss \&Bf
                   1060: .Ss \&Bk
                   1061: .Ss \&Bl
1.80      kristaps 1062: .\" Begins a list composed of one or more list entries.  A list entry is
                   1063: .\" specified by the
                   1064: .\" .Sx \&It
                   1065: .\" macro, which consists of a head and optional body.  By default, a list
                   1066: .\" is preceded by a blank line.  A list must specify one of the following
                   1067: .\" list types:
                   1068: .\" .Bl -tag -width 12n
                   1069: .\" .It Fl bullet
                   1070: .\" A list offset by a bullet.  The head of list entries must be empty.
                   1071: .\" List entry bodies are justified after the bullet.
                   1072: .\" .It Fl column
                   1073: .\" A columnated list.  The number of columns is specified as arguments to
                   1074: .\" the
                   1075: .\" .Sx \&Bl
                   1076: .\" macro (the deprecated form of following the invocation of
                   1077: .\" .Fl column
                   1078: .\" is also accepted).  Arguments dictate the width of columns specified in
                   1079: .\" list entries.  List entry bodies must be left empty.  Columns specified
                   1080: .\" in the list entry head are justified to their position in the sequence
                   1081: .\" of columns.
                   1082: .\" .It Fl dash
                   1083: .\" A list offset by a dash (hyphen).  The head of list entries must be
                   1084: .\" empty.  List entry bodies are justified past the dash.
                   1085: .\" .It Fl diag
                   1086: .\" Like
                   1087: .\" .Fl inset
                   1088: .\" lists, but with additional formatting to the head.
                   1089: .\" .It Fl enum
                   1090: .\" A list offset by a number indicating list entry position.  The head of
                   1091: .\" list entries must be empty.  List entry bodies are justified past the
                   1092: .\" enumeration.
                   1093: .\" .It Fl hang
                   1094: .\" Like
                   1095: .\" .Fl tag ,
                   1096: .\" but instead of list bodies justifying to the head on the first line,
                   1097: .\" they trail the head text.
                   1098: .\" .It Fl hyphen
                   1099: .\" Synonym for
                   1100: .\" .Fl dash .
                   1101: .\" .It Fl inset
                   1102: .\" Like
                   1103: .\" .Fl tag ,
                   1104: .\" but list entry bodies aren't justified.
                   1105: .\" .It Fl item
                   1106: .\" An un-justified list.  This produces blocks of text.
                   1107: .\" .It Fl ohang
                   1108: .\" List bodies are placed on the line following the head.
                   1109: .\" .It Fl tag
                   1110: .\" A list offset by list entry heads.  List entry bodies are justified
                   1111: .\" after the head.
                   1112: .\" .El
                   1113: .\" .Pp
                   1114: .\" More...
                   1115: .\" .
1.63      kristaps 1116: .Ss \&Bo
1.65      kristaps 1117: Begins a block enclosed by square brackets.  Does not have any head
                   1118: arguments.
                   1119: .Pp
                   1120: Examples:
                   1121: .Bd -literal -offset indent
                   1122: \&.Bo 1 ,
1.91      kristaps 1123: \&.Dv BUFSIZ \&Bc
1.65      kristaps 1124: .Ed
                   1125: .Pp
                   1126: See also
                   1127: .Sx \&Bq .
1.63      kristaps 1128: .Ss \&Bq
1.82      kristaps 1129: Encloses its arguments in square brackets.
1.65      kristaps 1130: .Pp
                   1131: Examples:
1.91      kristaps 1132: .D1 \&.Bq 1 , \&Dv BUFSIZ
1.65      kristaps 1133: .Pp
                   1134: .Em Remarks :
                   1135: this macro is sometimes abused to emulate optional arguments for
                   1136: commands; the correct macros to use for this purpose are
                   1137: .Sx \&Op ,
                   1138: .Sx \&Oo ,
                   1139: and
                   1140: .Sx \&Oc .
                   1141: .Pp
                   1142: See also
                   1143: .Sx \&Bo .
1.63      kristaps 1144: .Ss \&Brc
1.65      kristaps 1145: Closes a
                   1146: .Sx \&Bro
                   1147: block.  Does not have any tail arguments.
1.63      kristaps 1148: .Ss \&Bro
1.65      kristaps 1149: Begins a block enclosed by curly braces.  Does not have any head
                   1150: arguments.
                   1151: .Pp
                   1152: Examples:
                   1153: .Bd -literal -offset indent
                   1154: \&.Bro 1 , ... ,
1.91      kristaps 1155: \&.Va n \&Brc
1.65      kristaps 1156: .Ed
                   1157: .Pp
                   1158: See also
                   1159: .Sx \&Brq .
1.63      kristaps 1160: .Ss \&Brq
1.65      kristaps 1161: Encloses its arguments in curly braces.
                   1162: .Pp
                   1163: Examples:
1.91      kristaps 1164: .D1 \&.Brq 1 , ... , \&Va n
1.65      kristaps 1165: .Pp
                   1166: See also
                   1167: .Sx \&Bro .
1.63      kristaps 1168: .Ss \&Bsx
1.65      kristaps 1169: Format the BSD/OS version provided as an argument, or a default value if
                   1170: no argument is provided.
                   1171: .Pp
                   1172: Examples:
1.91      kristaps 1173: .D1 \&.Bsx 1.0
                   1174: .D1 \&.Bsx
1.65      kristaps 1175: .Pp
                   1176: See also
                   1177: .Sx \&At ,
                   1178: .Sx \&Bx ,
1.66      kristaps 1179: .Sx \&Dx ,
1.65      kristaps 1180: .Sx \&Fx ,
                   1181: .Sx \&Nx ,
                   1182: .Sx \&Ox ,
                   1183: and
                   1184: .Sx \&Ux .
1.63      kristaps 1185: .Ss \&Bt
1.66      kristaps 1186: Prints
                   1187: .Dq is currently in beta test.
1.63      kristaps 1188: .Ss \&Bx
1.65      kristaps 1189: Format the BSD version provided as an argument, or a default value if no
                   1190: argument is provided.
                   1191: .Pp
                   1192: Examples:
1.91      kristaps 1193: .D1 \&.Bx 4.4
                   1194: .D1 \&.Bx
1.65      kristaps 1195: .Pp
                   1196: See also
                   1197: .Sx \&At ,
                   1198: .Sx \&Bsx ,
1.66      kristaps 1199: .Sx \&Dx ,
1.65      kristaps 1200: .Sx \&Fx ,
                   1201: .Sx \&Nx ,
                   1202: .Sx \&Ox ,
                   1203: and
                   1204: .Sx \&Ux .
1.63      kristaps 1205: .Ss \&Cd
1.93      kristaps 1206: Configuration declaration.  This denotes strings accepted by
1.66      kristaps 1207: .Xr config 8 .
                   1208: .Pp
                   1209: Examples:
1.91      kristaps 1210: .D1 \&.Cd device le0 at scode?
1.66      kristaps 1211: .Pp
                   1212: .Em Remarks :
                   1213: this macro is commonly abused by using quoted literals to retain
                   1214: white-space and align consecutive
                   1215: .Sx \&Cd
                   1216: declarations.  This practise is discouraged.
1.63      kristaps 1217: .Ss \&Cm
1.66      kristaps 1218: Command modifiers.  Useful when specifying configuration options or
                   1219: keys.
                   1220: .Pp
                   1221: Examples:
1.91      kristaps 1222: .D1 \&.Cm ControlPath
                   1223: .D1 \&.Cm ControlMaster
1.66      kristaps 1224: .Pp
                   1225: See also
                   1226: .Sx \&Fl .
1.63      kristaps 1227: .Ss \&D1
1.66      kristaps 1228: One-line indented display.  This is formatted by the default rules and
                   1229: is useful for simple indented statements.  It is followed by a newline.
                   1230: .Pp
                   1231: Examples:
1.91      kristaps 1232: .D1 \&.D1 \&Fl abcdefgh
1.66      kristaps 1233: .Pp
                   1234: See also
                   1235: .Sx \&Bd
                   1236: and
                   1237: .Sx \&Dl .
1.63      kristaps 1238: .Ss \&Db
                   1239: .Ss \&Dc
1.66      kristaps 1240: Closes a
                   1241: .Sx \&Do
                   1242: block.  Does not have any tail arguments.
1.63      kristaps 1243: .Ss \&Dd
1.66      kristaps 1244: Document date.  This is the mandatory first macro of any
                   1245: .Nm
                   1246: manual.  Its calling syntax is as follows:
                   1247: .Pp
                   1248: .D1 \. Ns Sx \&Dd Cm date
                   1249: .Pp
1.82      kristaps 1250: The
1.66      kristaps 1251: .Cm date
                   1252: field may be either
                   1253: .Ar $\&Mdocdate$ ,
                   1254: which signifies the current manual revision date dictated by
1.72      kristaps 1255: .Xr cvs 1 ,
1.66      kristaps 1256: or instead a valid canonical date as specified by
                   1257: .Sx Dates .
1.72      kristaps 1258: If a date does not conform, the current date is used instead.
1.66      kristaps 1259: .Pp
                   1260: Examples:
1.91      kristaps 1261: .D1 \&.Dd $\&Mdocdate$
                   1262: .D1 \&.Dd $\&Mdocdate: July 21 2007$
                   1263: .D1 \&.Dd July 21, 2007
1.66      kristaps 1264: .Pp
                   1265: See also
                   1266: .Sx \&Dt
                   1267: and
                   1268: .Sx \&Os .
1.63      kristaps 1269: .Ss \&Dl
1.66      kristaps 1270: One-line intended display.  This is formatted as literal text and is
                   1271: useful for commands and invocations.  It is followed by a newline.
                   1272: .Pp
                   1273: Examples:
1.91      kristaps 1274: .D1 \&.Dl % mandoc mdoc.7 | less
1.66      kristaps 1275: .Pp
                   1276: See also
                   1277: .Sx \&Bd
                   1278: and
                   1279: .Sx \&D1 .
1.63      kristaps 1280: .Ss \&Do
1.66      kristaps 1281: Begins a block enclosed by double quotes.  Does not have any head
                   1282: arguments.
                   1283: .Pp
                   1284: Examples:
1.91      kristaps 1285: .D1 \&.D1 \&Do April is the cruellest month \&Dc \e(em T.S. Eliot
1.66      kristaps 1286: .Pp
                   1287: See also
                   1288: .Sx \&Dq .
1.63      kristaps 1289: .Ss \&Dq
1.82      kristaps 1290: Encloses its arguments in double quotes.
1.66      kristaps 1291: .Pp
                   1292: Examples:
1.91      kristaps 1293: .Bd -literal -offset indent -compact
1.66      kristaps 1294: \&.Dq April is the cruellest month
                   1295: \e(em T.S. Eliot
                   1296: .Ed
                   1297: .Pp
                   1298: See also
                   1299: .Sx \&Do .
1.63      kristaps 1300: .Ss \&Dt
1.66      kristaps 1301: Document title.  This is the mandatory second macro of any
                   1302: .Nm
                   1303: file.  Its calling syntax is as follows:
                   1304: .Pp
                   1305: .D1 \. Ns Sx \&Dt Cm title section Op Cm volume | arch
                   1306: .Pp
                   1307: Its arguments are as follows:
                   1308: .Bl -tag -width Ds -offset Ds
                   1309: .It Cm title
                   1310: The document's title (name).  This should be capitalised and is
                   1311: required.
                   1312: .It Cm section
                   1313: The manual section.  This may be one of
                   1314: .Ar 1
                   1315: .Pq utilities ,
                   1316: .Ar 2
                   1317: .Pq system calls ,
                   1318: .Ar 3
                   1319: .Pq libraries ,
                   1320: .Ar 3p
                   1321: .Pq Perl libraries ,
                   1322: .Ar 4
                   1323: .Pq devices ,
                   1324: .Ar 5
                   1325: .Pq file formats ,
                   1326: .Ar 6
                   1327: .Pq games ,
                   1328: .Ar 7
                   1329: .Pq miscellaneous ,
                   1330: .Ar 8
                   1331: .Pq system utilities ,
                   1332: .Ar 9
                   1333: .Pq kernel functions ,
                   1334: .Ar X11
                   1335: .Pq X Window System ,
                   1336: .Ar X11R6
                   1337: .Pq X Window System ,
                   1338: .Ar unass
                   1339: .Pq unassociated ,
                   1340: .Ar local
                   1341: .Pq local system ,
                   1342: .Ar draft
                   1343: .Pq draft manual ,
                   1344: or
                   1345: .Ar paper
                   1346: .Pq paper .
                   1347: It is also required and should correspond to the manual's filename
                   1348: suffix.
                   1349: .It Cm volume
                   1350: This overrides the volume inferred from
                   1351: .Ar section .
                   1352: This field is optional, and if specified, must be one of
                   1353: .Ar USD
                   1354: .Pq users' supplementary documents ,
                   1355: .Ar PS1
                   1356: .Pq programmers' supplementary documents ,
                   1357: .Ar AMD
                   1358: .Pq administrators' supplementary documents ,
                   1359: .Ar SMM
                   1360: .Pq system managers' manuals ,
                   1361: .Ar URM
                   1362: .Pq users' reference manuals ,
                   1363: .Ar PRM
                   1364: .Pq programmers' reference manuals ,
                   1365: .Ar KM
                   1366: .Pq kernel manuals ,
                   1367: .Ar IND
                   1368: .Pq master index ,
                   1369: .Ar MMI
                   1370: .Pq master index ,
                   1371: .Ar LOCAL
                   1372: .Pq local manuals ,
                   1373: .Ar LOC
                   1374: .Pq local manuals ,
                   1375: or
                   1376: .Ar CON
                   1377: .Pq contributed manuals .
                   1378: .It Cm arch
                   1379: This specifies a specific relevant architecture.  If
                   1380: .Cm volume
                   1381: is not provided, it may be used in its place, else it may be used
                   1382: subsequent that.  It, too, is optional.  It must be one of
                   1383: .Ar alpha ,
                   1384: .Ar amd64 ,
                   1385: .Ar amiga ,
                   1386: .Ar arc ,
                   1387: .Ar arm ,
                   1388: .Ar armish ,
                   1389: .Ar aviion ,
                   1390: .Ar hp300 ,
                   1391: .Ar hppa ,
                   1392: .Ar hppa64 ,
                   1393: .Ar i386 ,
                   1394: .Ar landisk ,
1.86      kristaps 1395: .Ar loongson ,
1.66      kristaps 1396: .Ar luna88k ,
                   1397: .Ar mac68k ,
                   1398: .Ar macppc ,
                   1399: .Ar mvme68k ,
                   1400: .Ar mvme88k ,
                   1401: .Ar mvmeppc ,
                   1402: .Ar pmax ,
                   1403: .Ar sgi ,
                   1404: .Ar socppc ,
                   1405: .Ar sparc ,
                   1406: .Ar sparc64 ,
                   1407: .Ar sun3 ,
                   1408: .Ar vax ,
                   1409: or
                   1410: .Ar zaurus .
                   1411: .El
                   1412: .Pp
                   1413: Examples:
1.91      kristaps 1414: .D1 \&.Dt FOO 1
                   1415: .D1 \&.Dt FOO 4 KM
                   1416: .D1 \&.Dt FOO 9 i386
                   1417: .D1 \&.Dt FOO 9 KM i386
1.66      kristaps 1418: .Pp
                   1419: See also
                   1420: .Sx \&Dd
                   1421: and
                   1422: .Sx \&Os .
1.63      kristaps 1423: .Ss \&Dv
1.66      kristaps 1424: Defined variables such as preprocessor constants.
                   1425: .Pp
                   1426: Examples:
1.91      kristaps 1427: .D1 \&.Dv BUFSIZ
                   1428: .D1 \&.Dv STDOUT_FILENO
1.66      kristaps 1429: .Pp
                   1430: See also
                   1431: .Sx \&Er .
1.63      kristaps 1432: .Ss \&Dx
1.71      kristaps 1433: Format the DragonFly BSD version provided as an argument, or a default
1.66      kristaps 1434: value if no argument is provided.
                   1435: .Pp
                   1436: Examples:
1.91      kristaps 1437: .D1 \&.Dx 2.4.1
                   1438: .D1 \&.Dx
1.66      kristaps 1439: .Pp
                   1440: See also
                   1441: .Sx \&At ,
                   1442: .Sx \&Bsx ,
                   1443: .Sx \&Bx ,
                   1444: .Sx \&Fx ,
                   1445: .Sx \&Nx ,
                   1446: .Sx \&Ox ,
                   1447: and
                   1448: .Sx \&Ux .
1.63      kristaps 1449: .Ss \&Ec
                   1450: .Ss \&Ed
                   1451: .Ss \&Ef
                   1452: .Ss \&Ek
                   1453: .Ss \&El
                   1454: .Ss \&Em
1.66      kristaps 1455: Denotes text that should be emphasised.  Note that this is a
                   1456: presentation term and should not be used for stylistically decorating
                   1457: technical terms.
                   1458: .Pp
                   1459: Examples:
1.91      kristaps 1460: .D1 \&.Em Warnings!
                   1461: .D1 \&.Em Remarks :
1.63      kristaps 1462: .Ss \&En
                   1463: .Ss \&Eo
                   1464: .Ss \&Er
1.90      kristaps 1465: Display error constants.
1.66      kristaps 1466: .Pp
                   1467: Examples:
1.91      kristaps 1468: .D1 \&.Er EPERM
                   1469: .D1 \&.Er ENOENT
1.66      kristaps 1470: .Pp
                   1471: See also
                   1472: .Sx \&Dv .
1.63      kristaps 1473: .Ss \&Es
                   1474: .Ss \&Ev
1.66      kristaps 1475: Environmental variables such as those specified in
                   1476: .Xr environ 7 .
                   1477: .Pp
                   1478: Examples:
1.91      kristaps 1479: .D1 \&.Ev DISPLAY
                   1480: .D1 \&.Ev PATH
1.63      kristaps 1481: .Ss \&Ex
1.66      kristaps 1482: Inserts text regarding a utility's exit values.  This macro must have
                   1483: first the
                   1484: .Fl std
                   1485: argument specified, then an optional
                   1486: .Ar utility .
                   1487: If
                   1488: .Ar utility
                   1489: is not provided, the document's name as stipulated in
                   1490: .Sx \&Nm
                   1491: is provided.
1.63      kristaps 1492: .Ss \&Fa
                   1493: .Ss \&Fc
                   1494: .Ss \&Fd
                   1495: .Ss \&Fl
1.79      kristaps 1496: Command-line flag.  Used when listing arguments to command-line
                   1497: utilities.  Prints a fixed-width hyphen
                   1498: .Sq \-
1.89      kristaps 1499: directly followed by each argument.  If no arguments are provided, a hyphen is
                   1500: printed followed by a space.  If the argument is a macro, a hyphen is
                   1501: prefixed to the subsequent macro output.
1.79      kristaps 1502: .Pp
                   1503: Examples:
1.91      kristaps 1504: .D1 \&.Fl a b c
                   1505: .D1 \&.Fl \&Pf a b
                   1506: .D1 \&.Fl
                   1507: .D1 \&.Op \&Fl o \&Ns \&Ar file
1.79      kristaps 1508: .Pp
                   1509: See also
                   1510: .Sx \&Cm .
1.63      kristaps 1511: .Ss \&Fn
                   1512: .Ss \&Fo
                   1513: .Ss \&Fr
                   1514: .Ss \&Ft
                   1515: .Ss \&Fx
1.65      kristaps 1516: Format the FreeBSD version provided as an argument, or a default value
                   1517: if no argument is provided.
                   1518: .Pp
                   1519: Examples:
1.91      kristaps 1520: .D1 \&.Fx 7.1
                   1521: .D1 \&.Fx
1.65      kristaps 1522: .Pp
                   1523: See also
                   1524: .Sx \&At ,
1.66      kristaps 1525: .Sx \&Bsx ,
1.65      kristaps 1526: .Sx \&Bx ,
1.66      kristaps 1527: .Sx \&Dx ,
1.65      kristaps 1528: .Sx \&Nx ,
                   1529: .Sx \&Ox ,
                   1530: and
                   1531: .Sx \&Ux .
1.63      kristaps 1532: .Ss \&Hf
                   1533: .Ss \&Ic
                   1534: .Ss \&In
                   1535: .Ss \&It
                   1536: .Ss \&Lb
                   1537: .Ss \&Li
                   1538: .Ss \&Lk
1.70      kristaps 1539: Format a hyperlink.  The calling syntax is as follows:
                   1540: .Pp
                   1541: .D1 \. Ns Sx \&Lk Cm uri Op Cm name
                   1542: .Pp
                   1543: Examples:
1.91      kristaps 1544: .D1 \&.Lk http://bsd.lv "The BSD.lv Project"
                   1545: .D1 \&.Lk http://bsd.lv
1.70      kristaps 1546: .Pp
                   1547: See also
                   1548: .Sx \&Mt .
1.63      kristaps 1549: .Ss \&Lp
                   1550: .Ss \&Ms
                   1551: .Ss \&Mt
                   1552: .Ss \&Nd
                   1553: .Ss \&Nm
                   1554: .Ss \&No
                   1555: .Ss \&Ns
                   1556: .Ss \&Nx
1.65      kristaps 1557: Format the NetBSD version provided as an argument, or a default value if
                   1558: no argument is provided.
                   1559: .Pp
                   1560: Examples:
1.91      kristaps 1561: .D1 \&.Nx 5.01
                   1562: .D1 \&.Nx
1.65      kristaps 1563: .Pp
                   1564: See also
                   1565: .Sx \&At ,
1.66      kristaps 1566: .Sx \&Bsx ,
1.65      kristaps 1567: .Sx \&Bx ,
1.66      kristaps 1568: .Sx \&Dx ,
1.65      kristaps 1569: .Sx \&Fx ,
                   1570: .Sx \&Ox ,
                   1571: and
                   1572: .Sx \&Ux .
1.63      kristaps 1573: .Ss \&Oc
                   1574: .Ss \&Oo
                   1575: .Ss \&Op
                   1576: .Ss \&Os
1.66      kristaps 1577: Document operating system version.  This is the mandatory third macro of
                   1578: any
                   1579: .Nm
                   1580: file.  Its calling syntax is as follows:
                   1581: .Pp
                   1582: .D1 \. Ns Sx \&Os Op Cm system
                   1583: .Pp
                   1584: The optional
                   1585: .Cm system
                   1586: parameter specifies the relevant operating system or environment.  Left
                   1587: unspecified, it defaults to the local operating system version.  This is
                   1588: the suggested form.
                   1589: .Pp
                   1590: Examples:
1.91      kristaps 1591: .D1 \&.Os
                   1592: .D1 \&.Os KTH/CSC/TCS
                   1593: .D1 \&.Os BSD 4.3
1.66      kristaps 1594: .Pp
                   1595: See also
                   1596: .Sx \&Dd
                   1597: and
                   1598: .Sx \&Dt .
1.63      kristaps 1599: .Ss \&Ot
1.66      kristaps 1600: Unknown usage.
                   1601: .Pp
                   1602: .Em Remarks :
                   1603: this macro has been deprecated.
1.63      kristaps 1604: .Ss \&Ox
1.65      kristaps 1605: Format the OpenBSD version provided as an argument, or a default value
                   1606: if no argument is provided.
                   1607: .Pp
                   1608: Examples:
1.91      kristaps 1609: .D1 \&.Ox 4.5
                   1610: .D1 \&.Ox
1.65      kristaps 1611: .Pp
                   1612: See also
                   1613: .Sx \&At ,
                   1614: .Sx \&Bsx ,
                   1615: .Sx \&Bx ,
1.66      kristaps 1616: .Sx \&Dx ,
1.65      kristaps 1617: .Sx \&Fx ,
                   1618: .Sx \&Nx ,
                   1619: and
                   1620: .Sx \&Ux .
1.63      kristaps 1621: .Ss \&Pa
                   1622: .Ss \&Pc
                   1623: .Ss \&Pf
                   1624: .Ss \&Po
                   1625: .Ss \&Pp
                   1626: .Ss \&Pq
                   1627: .Ss \&Qc
                   1628: .Ss \&Ql
                   1629: .Ss \&Qo
                   1630: .Ss \&Qq
                   1631: .Ss \&Re
                   1632: Closes a
                   1633: .Sx \&Rs
                   1634: block.  Does not have any tail arguments.
                   1635: .Ss \&Rs
                   1636: Begins a bibliographic
                   1637: .Pq Dq reference
1.68      kristaps 1638: block.  Does not have any head arguments.  The block macro may only
1.63      kristaps 1639: contain
                   1640: .Sx \&%A ,
                   1641: .Sx \&%B ,
                   1642: .Sx \&%C ,
                   1643: .Sx \&%D ,
                   1644: .Sx \&%I ,
                   1645: .Sx \&%J ,
                   1646: .Sx \&%N ,
                   1647: .Sx \&%O ,
                   1648: .Sx \&%P ,
                   1649: .Sx \&%Q ,
                   1650: .Sx \&%R ,
                   1651: .Sx \&%T ,
                   1652: and
                   1653: .Sx \&%V
                   1654: child macros (at least one must be specified).
                   1655: .Pp
1.64      kristaps 1656: Examples:
1.91      kristaps 1657: .Bd -literal -offset indent -compact
1.63      kristaps 1658: \&.Rs
                   1659: \&.%A J. E. Hopcroft
                   1660: \&.%A J. D. Ullman
                   1661: \&.%B Introduction to Automata Theory, Languages, and Computation
                   1662: \&.%I Addison-Wesley
                   1663: \&.%C Reading, Massachusettes
                   1664: \&.%D 1979
                   1665: \&.Re
                   1666: .Ed
                   1667: .Pp
                   1668: If an
                   1669: .Sx \&Rs
                   1670: block is used within a SEE ALSO section, a vertical space is asserted
                   1671: before the rendered output, else the block continues on the current
                   1672: line.
                   1673: .Ss \&Rv
                   1674: .Ss \&Sc
                   1675: .Ss \&Sh
                   1676: .Ss \&Sm
                   1677: .Ss \&So
                   1678: .Ss \&Sq
                   1679: .Ss \&Ss
                   1680: .Ss \&St
                   1681: .Ss \&Sx
                   1682: .Ss \&Sy
                   1683: .Ss \&Tn
                   1684: .Ss \&Ud
                   1685: .Ss \&Ux
1.65      kristaps 1686: Format the UNIX name.  Accepts no argument.
                   1687: .Pp
                   1688: Examples:
1.91      kristaps 1689: .D1 \&.Ux
1.65      kristaps 1690: .Pp
                   1691: See also
                   1692: .Sx \&At ,
1.66      kristaps 1693: .Sx \&Bsx ,
1.65      kristaps 1694: .Sx \&Bx ,
1.66      kristaps 1695: .Sx \&Dx ,
1.65      kristaps 1696: .Sx \&Fx ,
                   1697: .Sx \&Nx ,
                   1698: and
                   1699: .Sx \&Ox .
1.63      kristaps 1700: .Ss \&Va
                   1701: .Ss \&Vt
1.83      kristaps 1702: A variable type.  This is also used for indicating global variables in the
                   1703: SYNOPSIS section, in which case a variable name is also specified.  Note that
                   1704: it accepts
                   1705: .Sx Block partial-implicit
                   1706: syntax when invoked as the first macro in the SYNOPSIS section, else it
                   1707: accepts ordinary
                   1708: .Sx In-line
                   1709: syntax.
                   1710: .Pp
                   1711: Note that this should not be confused with
                   1712: .Sx \&Ft ,
                   1713: which is used for function return types.
                   1714: .Pp
                   1715: Examples:
1.91      kristaps 1716: .D1 \&.Vt unsigned char
                   1717: .D1 \&.Vt extern const char * const sys_signame[] ;
1.83      kristaps 1718: .Pp
                   1719: See also
                   1720: .Sx \&Ft
                   1721: and
                   1722: .Sx \&Va .
1.84      kristaps 1723: .Ss \&Xc
1.87      kristaps 1724: Close a scope opened by
                   1725: .Sx \&Xo .
1.84      kristaps 1726: .Ss \&Xo
1.87      kristaps 1727: Open an extension scope.  This macro originally existed to extend the
                   1728: 9-argument limit of troff; since this limit has been lifted, the macro
                   1729: has been deprecated.
1.84      kristaps 1730: .Ss \&Xr
                   1731: Link to another manual
                   1732: .Pq Qq cross-reference .
                   1733: Its calling syntax is
                   1734: .Pp
                   1735: .D1 \. Ns Sx \&Xr Cm name section
                   1736: .Pp
                   1737: The
                   1738: .Cm name
                   1739: and
                   1740: .Cm section
                   1741: are the name and section of the linked manual.  If
                   1742: .Cm section
                   1743: is followed by non-punctuation, an
                   1744: .Sx \&Ns
                   1745: is inserted into the token stream.  This behaviour is for compatibility
                   1746: with
                   1747: .Xr groff 1 .
                   1748: .Pp
                   1749: Examples:
1.91      kristaps 1750: .D1 \&.Xr mandoc 1
                   1751: .D1 \&.Xr mandoc 1 ;
                   1752: .D1 \&.Xr mandoc 1 \&Ns s behaviour
1.84      kristaps 1753: .Ss \&br
                   1754: .Ss \&sp
1.4       kristaps 1755: .Sh COMPATIBILITY
1.93      kristaps 1756: This section documents compatibility between mandoc and other other
                   1757: troff implementations, at this time limited to GNU troff
                   1758: .Pq Qq groff .
1.50      kristaps 1759: The term
1.57      kristaps 1760: .Qq historic groff
1.93      kristaps 1761: refers to groff versions before the
1.57      kristaps 1762: .Pa doc.tmac
1.50      kristaps 1763: file re-write
1.57      kristaps 1764: .Pq somewhere between 1.15 and 1.19 .
                   1765: .Pp
1.93      kristaps 1766: Heirloom troff, the other significant troff implementation accepting
                   1767: \-mdoc, is similar to historic groff.
                   1768: .Pp
1.57      kristaps 1769: .Bl -dash -compact
                   1770: .It
1.81      kristaps 1771: The comment syntax
                   1772: .Sq \e."
                   1773: is no longer accepted.
                   1774: .It
1.93      kristaps 1775: In groff, the
1.80      kristaps 1776: .Sx \&Pa
                   1777: macro does not format its arguments when used in the FILES section under
1.93      kristaps 1778: certain list types.  mandoc does.
1.80      kristaps 1779: .It
1.93      kristaps 1780: Historic groff does not print a dash for empty
1.79      kristaps 1781: .Sx \&Fl
1.93      kristaps 1782: arguments.  mandoc and newer groff implementations do.
1.79      kristaps 1783: .It
1.93      kristaps 1784: groff behaves irregularly when specifying
1.77      kristaps 1785: .Sq \ef
1.93      kristaps 1786: .Sx Text Decoration
                   1787: within line-macro scopes.  mandoc follows a consistent system.
1.77      kristaps 1788: .It
1.93      kristaps 1789: In mandoc, negative scaling units are truncated to zero; groff would
                   1790: move to prior lines.  Furthermore, the
1.61      kristaps 1791: .Sq f
                   1792: scaling unit, while accepted, is rendered as the default unit.
                   1793: .It
1.48      kristaps 1794: In quoted literals, groff allowed pair-wise double-quotes to produce a
                   1795: standalone double-quote in formatted output.  This idiosyncratic
1.93      kristaps 1796: behaviour is not applicable in mandoc.
1.57      kristaps 1797: .It
1.64      kristaps 1798: Display types
1.78      kristaps 1799: .Sx \&Bd
1.77      kristaps 1800: .Fl center
1.64      kristaps 1801: and
                   1802: .Fl right
                   1803: are aliases for
1.93      kristaps 1804: .Fl left
                   1805: in manodc.  Furthermore, the
1.64      kristaps 1806: .Fl file Ar file
1.93      kristaps 1807: argument is ignored.  Lastly, since text is not right-justified in
                   1808: mandoc (or even groff),
1.64      kristaps 1809: .Fl ragged
                   1810: and
                   1811: .Fl filled
                   1812: are aliases, as are
                   1813: .Fl literal
                   1814: and
                   1815: .Fl unfilled .
1.57      kristaps 1816: .It
1.28      kristaps 1817: Historic groff has many un-callable macros.  Most of these (excluding
1.93      kristaps 1818: some block-level macros) are now callable.
1.57      kristaps 1819: .It
1.50      kristaps 1820: The vertical bar
1.57      kristaps 1821: .Sq \(ba
1.28      kristaps 1822: made historic groff
1.57      kristaps 1823: .Qq go orbital
1.93      kristaps 1824: but has been a proper delimiter since then.
1.57      kristaps 1825: .It
1.93      kristaps 1826: .Sx \&It Fl nested
1.28      kristaps 1827: is assumed for all lists (it wasn't in historic groff): any list may be
                   1828: nested and
1.64      kristaps 1829: .Fl enum
1.4       kristaps 1830: lists will restart the sequence only for the sub-list.
1.57      kristaps 1831: .It
1.4       kristaps 1832: Some manuals use
1.64      kristaps 1833: .Sx \&Li
1.4       kristaps 1834: incorrectly by following it with a reserved character and expecting the
1.93      kristaps 1835: delimiter to render.  This is not supported in mandoc.
1.57      kristaps 1836: .It
1.50      kristaps 1837: In groff, the
1.64      kristaps 1838: .Sx \&Fo
1.93      kristaps 1839: macro only produces the first parameter.  This is not the case in
                   1840: mandoc.
                   1841: .It
                   1842: In groff, the
                   1843: .Sx \&Cd ,
                   1844: .Sx \&Er ,
                   1845: and
                   1846: .Sx \&Ex
                   1847: macros were stipulated only to occur in certain manual sections.  mandoc
                   1848: does not have these restrictions.
1.57      kristaps 1849: .El
1.2       kristaps 1850: .Sh SEE ALSO
1.57      kristaps 1851: .Xr mandoc 1 ,
                   1852: .Xr mandoc_char 7
1.2       kristaps 1853: .Sh AUTHORS
                   1854: The
1.57      kristaps 1855: .Nm
1.50      kristaps 1856: reference was written by
1.94      kristaps 1857: .An Kristaps Dzonsons Aq kristaps@bsd.lv .
1.64      kristaps 1858: .\"
                   1859: .\" XXX: this really isn't the place for these caveats.
                   1860: .\" .
                   1861: .\" .
                   1862: .\" .Sh CAVEATS
                   1863: .\" There are many ambiguous parts of mdoc.
                   1864: .\" .
                   1865: .\" .Pp
                   1866: .\" .Bl -dash -compact
                   1867: .\" .It
                   1868: .\" .Sq \&Fa
                   1869: .\" should be
                   1870: .\" .Sq \&Va
                   1871: .\" as function arguments are variables.
                   1872: .\" .It
                   1873: .\" .Sq \&Ft
                   1874: .\" should be
                   1875: .\" .Sq \&Vt
                   1876: .\" as function return types are still types.  Furthermore, the
                   1877: .\" .Sq \&Ft
                   1878: .\" should be removed and
                   1879: .\" .Sq \&Fo ,
                   1880: .\" which ostensibly follows it, should follow the same convention as
                   1881: .\" .Sq \&Va .
                   1882: .\" .It
                   1883: .\" .Sq \&Va
                   1884: .\" should formalise that only one or two arguments are acceptable: a
                   1885: .\" variable name and optional, preceding type.
                   1886: .\" .It
                   1887: .\" .Sq \&Fd
                   1888: .\" is ambiguous.  It's commonly used to indicate an include file in the
                   1889: .\" synopsis section.
                   1890: .\" .Sq \&In
                   1891: .\" should be used, instead.
                   1892: .\" .It
                   1893: .\" Only the
                   1894: .\" .Sq \-literal
                   1895: .\" argument to
                   1896: .\" .Sq \&Bd
                   1897: .\" makes sense.  The remaining ones should be removed.
                   1898: .\" .It
                   1899: .\" The
                   1900: .\" .Sq \&Xo
                   1901: .\" and
                   1902: .\" .Sq \&Xc
                   1903: .\" macros should be deprecated.
                   1904: .\" .It
                   1905: .\" The
                   1906: .\" .Sq \&Dt
                   1907: .\" macro lacks clarity.  It should be absolutely clear which title will
                   1908: .\" render when formatting the manual page.
                   1909: .\" .It
                   1910: .\" A
                   1911: .\" .Sq \&Lx
                   1912: .\" should be provided for Linux (\(`a la
                   1913: .\" .Sq \&Ox ,
                   1914: .\" .Sq \&Nx
                   1915: .\" etc.).
                   1916: .\" .It
                   1917: .\" There's no way to refer to references in
                   1918: .\" .Sq \&Rs/Re
                   1919: .\" blocks.
                   1920: .\" .It
                   1921: .\" The \-split and \-nosplit dictates via
                   1922: .\" .Sq \&An
                   1923: .\" are re-set when entering and leaving the AUTHORS section.
                   1924: .\" .El
                   1925: .\" .

CVSweb