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

Annotation of mandoc/mdoc.7, Revision 1.187

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

CVSweb