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

Annotation of mandoc/mdoc.7, Revision 1.92

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

CVSweb