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

Annotation of mandoc/mdoc.7, Revision 1.185

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

CVSweb