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

Annotation of mandoc/mdoc.7, Revision 1.158

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

CVSweb