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

Annotation of mandoc/mdoc.7, Revision 1.120

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

CVSweb