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

Annotation of mandoc/mdoc.7, Revision 1.143

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

CVSweb