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

Annotation of mandoc/mdoc.7, Revision 1.141

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

CVSweb