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

Annotation of mandoc/mdoc.7, Revision 1.177

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

CVSweb