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

Annotation of mandoc/mdoc.7, Revision 1.179

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

CVSweb