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

Annotation of mandoc/mdoc.7, Revision 1.227

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

CVSweb