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

Annotation of mandoc/mdoc.7, Revision 1.189

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

CVSweb