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

Annotation of mandoc/mdoc.7, Revision 1.210

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

CVSweb