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

Annotation of mandoc/man.7, Revision 1.77

1.77    ! kristaps    1: .\"    $Id: man.7,v 1.76 2010/07/19 09:19:22 kristaps Exp $
1.1       kristaps    2: .\"
1.62      kristaps    3: .\" Copyright (c) 2009 Kristaps Dzonsons <kristaps@bsd.lv>
1.1       kristaps    4: .\"
                      5: .\" Permission to use, copy, modify, and distribute this software for any
1.10      kristaps    6: .\" purpose with or without fee is hereby granted, provided that the above
                      7: .\" copyright notice and this permission notice appear in all copies.
                      8: .\"
                      9: .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
                     10: .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
                     11: .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
                     12: .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
                     13: .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
                     14: .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
                     15: .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1.1       kristaps   16: .\"
1.77    ! kristaps   17: .Dd $Mdocdate: July 19 2010 $
1.9       kristaps   18: .Dt MAN 7
1.1       kristaps   19: .Os
                     20: .Sh NAME
1.32      kristaps   21: .Nm man
                     22: .Nd man language reference
1.1       kristaps   23: .Sh DESCRIPTION
                     24: The
1.32      kristaps   25: .Nm man
1.20      kristaps   26: language was historically used to format
1.32      kristaps   27: .Ux
1.68      kristaps   28: manuals.
                     29: This reference document describes its syntax, structure, and usage.
1.32      kristaps   30: .Pp
                     31: .Bf -emphasis
1.20      kristaps   32: Do not use
1.32      kristaps   33: .Nm
1.20      kristaps   34: to write your manuals.
1.32      kristaps   35: .Ef
1.19      kristaps   36: Use the
1.32      kristaps   37: .Xr mdoc 7
1.1       kristaps   38: language, instead.
1.32      kristaps   39: .Pp
1.1       kristaps   40: An
1.32      kristaps   41: .Nm
1.1       kristaps   42: document follows simple rules:  lines beginning with the control
1.20      kristaps   43: character
1.32      kristaps   44: .Sq \&.
1.68      kristaps   45: are parsed for macros.
                     46: Other lines are interpreted within the scope of
1.1       kristaps   47: prior macros:
1.32      kristaps   48: .Bd -literal -offset indent
1.1       kristaps   49: \&.SH Macro lines change control state.
                     50: Other lines are interpreted within the current state.
1.32      kristaps   51: .Ed
1.1       kristaps   52: .Sh INPUT ENCODING
1.32      kristaps   53: .Nm
1.14      kristaps   54: documents may contain only graphable 7-bit ASCII characters, the
1.68      kristaps   55: space character, and the tabs character.
                     56: All manuals must have
1.32      kristaps   57: .Ux
1.20      kristaps   58: line termination.
1.32      kristaps   59: .Pp
1.5       kristaps   60: Blank lines are acceptable; where found, the output will assert a
1.1       kristaps   61: vertical space.
1.32      kristaps   62: .Ss Comments
1.21      kristaps   63: Text following a
1.75      kristaps   64: .Sq \e\*q ,
1.21      kristaps   65: whether in a macro or free-form text line, is ignored to the end of
1.68      kristaps   66: line.
                     67: A macro line with only a control character and comment escape,
1.75      kristaps   68: .Sq \&.\e\*q ,
1.68      kristaps   69: is also ignored.
                     70: Macro lines with only a control character and optionally whitespace are
                     71: stripped from input.
1.32      kristaps   72: .Ss Special Characters
1.21      kristaps   73: Special characters may occur in both macro and free-form lines.
                     74: Sequences begin with the escape character
1.32      kristaps   75: .Sq \e
1.20      kristaps   76: followed by either an open-parenthesis
1.32      kristaps   77: .Sq \&(
1.1       kristaps   78: for two-character sequences; an open-bracket
1.32      kristaps   79: .Sq \&[
1.1       kristaps   80: for n-character sequences (terminated at a close-bracket
1.32      kristaps   81: .Sq \&] ) ;
1.68      kristaps   82: or a single one-character sequence.
                     83: See
1.32      kristaps   84: .Xr mandoc_char 7
1.68      kristaps   85: for a complete list.
                     86: Examples include
1.32      kristaps   87: .Sq \e(em
                     88: .Pq em-dash
1.21      kristaps   89: and
1.32      kristaps   90: .Sq \ee
                     91: .Pq back-slash .
                     92: .Ss Text Decoration
1.21      kristaps   93: Terms may be text-decorated using the
1.32      kristaps   94: .Sq \ef
1.47      kristaps   95: escape followed by an indicator: B (bold), I, (italic), R (Roman), or P
1.55      kristaps   96: (revert to previous mode):
1.48      kristaps   97: .Pp
                     98: .D1 \efBbold\efR \efIitalic\efP
                     99: .Pp
                    100: A numerical representation 3, 2, or 1 (bold, italic, and Roman,
1.68      kristaps  101: respectively) may be used instead.
                    102: A text decoration is only valid, if specified in free-form text, until
                    103: the next macro invocation; if specified within a macro, it's only valid
                    104: until the macro closes scope.
1.54      kristaps  105: Note that macros like
                    106: .Sx \&BR
                    107: open and close a font scope with each argument.
1.48      kristaps  108: .Pp
1.76      kristaps  109: The
1.49      kristaps  110: .Sq \ef
1.76      kristaps  111: attribute is forgotten when entering or exiting a macro block.
1.32      kristaps  112: .Ss Whitespace
1.66      kristaps  113: Whitespace consists of the space character.
1.64      kristaps  114: In free-form lines, whitespace is preserved within a line; un-escaped
                    115: trailing spaces are stripped from input (unless in a literal context).
                    116: Blank free-form lines, which may include spaces, are permitted and
                    117: rendered as an empty line.
                    118: .Pp
1.68      kristaps  119: In macro lines, whitespace delimits arguments and is discarded.
                    120: If arguments are quoted, whitespace within the quotes is retained.
1.43      kristaps  121: .Ss Dates
                    122: The
                    123: .Sx \&TH
                    124: macro is the only
                    125: .Nm
1.68      kristaps  126: macro that requires a date.
                    127: The form for this date is the ISO-8601
1.43      kristaps  128: standard
                    129: .Cm YYYY-MM-DD .
1.38      kristaps  130: .Ss Scaling Widths
                    131: Many macros support scaled widths for their arguments, such as
                    132: stipulating a two-inch paragraph indentation with the following:
                    133: .Bd -literal -offset indent
                    134: \&.HP 2i
                    135: .Ed
                    136: .Pp
                    137: The syntax for scaled widths is
                    138: .Sq Li [+-]?[0-9]*.[0-9]*[:unit:]? ,
                    139: where a decimal must be preceded or proceeded by at least one digit.
1.68      kristaps  140: Negative numbers, while accepted, are truncated to zero.
                    141: The following scaling units are accepted:
1.38      kristaps  142: .Pp
                    143: .Bl -tag -width Ds -offset indent -compact
                    144: .It c
                    145: centimetre
                    146: .It i
                    147: inch
                    148: .It P
                    149: pica (~1/6 inch)
                    150: .It p
                    151: point (~1/72 inch)
                    152: .It f
                    153: synonym for
                    154: .Sq u
                    155: .It v
                    156: default vertical span
                    157: .It m
                    158: width of rendered
                    159: .Sq m
                    160: .Pq em
                    161: character
                    162: .It n
                    163: width of rendered
                    164: .Sq n
                    165: .Pq en
                    166: character
                    167: .It u
                    168: default horizontal span
                    169: .It M
                    170: mini-em (~1/100 em)
                    171: .El
                    172: .Pp
                    173: Using anything other than
                    174: .Sq m ,
                    175: .Sq n ,
                    176: .Sq u ,
                    177: or
                    178: .Sq v
1.44      kristaps  179: is necessarily non-portable across output media.
1.38      kristaps  180: .Pp
                    181: If a scaling unit is not provided, the numerical value is interpreted
                    182: under the default rules of
                    183: .Sq v
                    184: for vertical spaces and
                    185: .Sq u
                    186: for horizontal ones.
                    187: .Em Note :
                    188: this differs from
                    189: .Xr mdoc 7 ,
                    190: which, if a unit is not provided, will instead interpret the string as
                    191: literal text.
1.69      kristaps  192: .Ss Sentence Spacing
                    193: When composing a manual, make sure that your sentences end at the end of
                    194: a line.
                    195: By doing so, front-ends will be able to apply the proper amount of
1.71      kristaps  196: spacing after the end of sentence (unescaped) period, exclamation mark,
                    197: or question mark followed by zero or more non-sentence closing
                    198: delimiters (
                    199: .Ns Sq \&) ,
                    200: .Sq \&] ,
                    201: .Sq \&' ,
                    202: .Sq \&" ) .
1.22      kristaps  203: .Sh MANUAL STRUCTURE
1.16      kristaps  204: Each
1.32      kristaps  205: .Nm
1.16      kristaps  206: document must contain contains at least the
1.39      kristaps  207: .Sx \&TH
1.68      kristaps  208: macro describing the document's section and title.
                    209: It may occur anywhere in the document, although conventionally, it
                    210: appears as the first macro.
1.32      kristaps  211: .Pp
1.22      kristaps  212: Beyond
1.39      kristaps  213: .Sx \&TH ,
1.68      kristaps  214: at least one macro or text node must appear in the document.
                    215: Documents are generally structured as follows:
1.32      kristaps  216: .Bd -literal -offset indent
1.43      kristaps  217: \&.TH FOO 1 2009-10-10
1.22      kristaps  218: \&.SH NAME
1.29      kristaps  219: \efBfoo\efR \e(en a description goes here
1.33      kristaps  220: \&.\e\*q The next is for sections 2 & 3 only.
                    221: \&.\e\*q .SH LIBRARY
1.22      kristaps  222: \&.SH SYNOPSIS
                    223: \efBfoo\efR [\efB\e-options\efR] arguments...
                    224: \&.SH DESCRIPTION
1.33      kristaps  225: The \efBfoo\efR utility processes files...
                    226: \&.\e\*q .SH IMPLEMENTATION NOTES
                    227: \&.\e\*q The next is for sections 2, 3, & 9 only.
1.22      kristaps  228: \&.\e\*q .SH RETURN VALUES
1.33      kristaps  229: \&.\e\*q The next is for sections 1, 6, 7, & 8 only.
1.22      kristaps  230: \&.\e\*q .SH ENVIRONMENT
                    231: \&.\e\*q .SH FILES
1.67      kristaps  232: \&.\e\*q The next is for sections 1 & 8 only.
                    233: \&.\e\*q .SH EXIT STATUS
1.22      kristaps  234: \&.\e\*q .SH EXAMPLES
1.33      kristaps  235: \&.\e\*q The next is for sections 1, 4, 6, 7, & 8 only.
1.22      kristaps  236: \&.\e\*q .SH DIAGNOSTICS
1.33      kristaps  237: \&.\e\*q The next is for sections 2, 3, & 9 only.
1.22      kristaps  238: \&.\e\*q .SH ERRORS
                    239: \&.\e\*q .SH SEE ALSO
1.42      kristaps  240: \&.\e\*q .BR foo ( 1 )
1.22      kristaps  241: \&.\e\*q .SH STANDARDS
                    242: \&.\e\*q .SH HISTORY
                    243: \&.\e\*q .SH AUTHORS
                    244: \&.\e\*q .SH CAVEATS
                    245: \&.\e\*q .SH BUGS
1.33      kristaps  246: \&.\e\*q .SH SECURITY CONSIDERATIONS
1.32      kristaps  247: .Ed
1.41      kristaps  248: .Pp
                    249: The sections in a
                    250: .Nm
1.68      kristaps  251: document are conventionally ordered as they appear above.
                    252: Sections should be composed as follows:
1.42      kristaps  253: .Bl -ohang -offset indent
                    254: .It Em NAME
1.68      kristaps  255: The name(s) and a short description of the documented material.
                    256: The syntax for this is generally as follows:
1.41      kristaps  257: .Pp
                    258: .D1 \efBname\efR \e(en description
1.42      kristaps  259: .It Em LIBRARY
1.41      kristaps  260: The name of the library containing the documented material, which is
1.68      kristaps  261: assumed to be a function in a section 2 or 3 manual.
                    262: For functions in the C library, this may be as follows:
1.41      kristaps  263: .Pp
                    264: .D1 Standard C Library (libc, -lc)
1.42      kristaps  265: .It Em SYNOPSIS
1.41      kristaps  266: Documents the utility invocation syntax, function call syntax, or device
1.55      kristaps  267: configuration.
1.41      kristaps  268: .Pp
                    269: For the first, utilities (sections 1, 6, and 8), this is
                    270: generally structured as follows:
                    271: .Pp
                    272: .D1 \efBname\efR [-\efBab\efR] [-\efBc\efR\efIarg\efR] \efBpath\efR...
                    273: .Pp
                    274: For the second, function calls (sections 2, 3, 9):
                    275: .Pp
1.44      kristaps  276: .D1 \&.B char *name(char *\efIarg\efR);
1.41      kristaps  277: .Pp
                    278: And for the third, configurations (section 4):
                    279: .Pp
1.44      kristaps  280: .D1 \&.B name* at cardbus ? function ?
1.41      kristaps  281: .Pp
1.55      kristaps  282: Manuals not in these sections generally don't need a
1.42      kristaps  283: .Em SYNOPSIS .
                    284: .It Em DESCRIPTION
1.55      kristaps  285: This expands upon the brief, one-line description in
1.42      kristaps  286: .Em NAME .
                    287: It usually contains a break-down of the options (if documenting a
                    288: command).
                    289: .It Em IMPLEMENTATION NOTES
1.68      kristaps  290: Implementation-specific notes should be kept here.
                    291: This is useful when implementing standard functions that may have side
                    292: effects or notable algorithmic implications.
1.42      kristaps  293: .It Em RETURN VALUES
                    294: This section is the dual of
                    295: .Em EXIT STATUS ,
1.68      kristaps  296: which is used for commands.
                    297: It documents the return values of functions in sections 2, 3, and 9.
1.42      kristaps  298: .It Em ENVIRONMENT
                    299: Documents any usages of environment variables, e.g.,
                    300: .Xr environ 7 .
                    301: .It Em FILES
1.68      kristaps  302: Documents files used.
                    303: It's helpful to document both the file and a short description of how
                    304: the file is used (created, modified, etc.).
1.67      kristaps  305: .It Em EXIT STATUS
1.68      kristaps  306: Command exit status for section 1, 6, and 8 manuals.
                    307: This section is the dual of
1.67      kristaps  308: .Em RETURN VALUES ,
1.68      kristaps  309: which is used for functions.
                    310: Historically, this information was described in
1.67      kristaps  311: .Em DIAGNOSTICS ,
                    312: a practise that is now discouraged.
1.42      kristaps  313: .It Em EXAMPLES
1.68      kristaps  314: Example usages.
                    315: This often contains snippets of well-formed,
                    316: well-tested invocations.
                    317: Make doubly sure that your examples work properly!
1.42      kristaps  318: .It Em DIAGNOSTICS
1.68      kristaps  319: Documents error conditions.
                    320: This is most useful in section 4 manuals.
1.42      kristaps  321: Historically, this section was used in place of
                    322: .Em EXIT STATUS
                    323: for manuals in sections 1, 6, and 8; however, this practise is
                    324: discouraged.
                    325: .It Em ERRORS
                    326: Documents error handling in sections 2, 3, and 9.
                    327: .It Em SEE ALSO
1.68      kristaps  328: References other manuals with related topics.
                    329: This section should exist for most manuals.
1.44      kristaps  330: .Pp
                    331: .D1 \&.BR bar \&( 1 \&),
                    332: .Pp
                    333: Cross-references should conventionally be ordered
1.42      kristaps  334: first by section, then alphabetically.
                    335: .It Em STANDARDS
                    336: References any standards implemented or used, such as
                    337: .Pp
                    338: .D1 IEEE Std 1003.2 (\e(lqPOSIX.2\e(rq)
                    339: .Pp
                    340: If not adhering to any standards, the
                    341: .Em HISTORY
                    342: section should be used.
                    343: .It Em HISTORY
                    344: The history of any manual without a
                    345: .Em STANDARDS
                    346: section should be described in this section.
                    347: .It Em AUTHORS
                    348: Credits to authors, if applicable, should appear in this section.
                    349: Authors should generally be noted by both name and an e-mail address.
                    350: .It Em CAVEATS
                    351: Explanations of common misuses and misunderstandings should be explained
                    352: in this section.
                    353: .It Em BUGS
                    354: Extant bugs should be described in this section.
                    355: .It Em SECURITY CONSIDERATIONS
                    356: Documents any security precautions that operators should consider.
1.41      kristaps  357: .El
1.22      kristaps  358: .Sh MACRO SYNTAX
1.2       kristaps  359: Macros are one to three three characters in length and begin with a
1.4       kristaps  360: control character ,
1.32      kristaps  361: .Sq \&. ,
1.68      kristaps  362: at the beginning of the line.
                    363: The
1.59      kristaps  364: .Sq \(aq
1.68      kristaps  365: macro control character is also accepted.
                    366: An arbitrary amount of whitespace (spaces or tabs) may sit between the
                    367: control character and the macro name.
                    368: Thus, the following are equivalent:
1.39      kristaps  369: .Bd -literal -offset indent
                    370: \&.PP
                    371: \&.\ \ \ PP
                    372: .Ed
1.32      kristaps  373: .Pp
1.1       kristaps  374: The
1.32      kristaps  375: .Nm
1.68      kristaps  376: macros are classified by scope: line scope or block scope.
                    377: Line macros are only scoped to the current line (and, in some
                    378: situations, the subsequent line).
                    379: Block macros are scoped to the current line and subsequent lines until
                    380: closed by another block macro.
1.32      kristaps  381: .Ss Line Macros
1.30      kristaps  382: Line macros are generally scoped to the current line, with the body
1.68      kristaps  383: consisting of zero or more arguments.
                    384: If a macro is scoped to the next line and the line arguments are empty,
                    385: the next line, which must be text, is used instead.
                    386: Thus:
1.32      kristaps  387: .Bd -literal -offset indent
1.30      kristaps  388: \&.I
1.4       kristaps  389: foo
1.32      kristaps  390: .Ed
                    391: .Pp
1.20      kristaps  392: is equivalent to
1.32      kristaps  393: .Sq \&.I foo .
1.56      kristaps  394: If next-line macros are invoked consecutively, only the last is used.
                    395: If a next-line macro is followed by a non-next-line macro, an error is
                    396: raised (unless in the case of
                    397: .Sx \&br ,
                    398: .Sx \&sp ,
                    399: or
                    400: .Sx \&na ) .
                    401: .Pp
                    402: The syntax is as follows:
1.32      kristaps  403: .Bd -literal -offset indent
1.22      kristaps  404: \&.YO \(lBbody...\(rB
                    405: \(lBbody...\(rB
1.32      kristaps  406: .Ed
                    407: .Pp
1.57      kristaps  408: .Bl -column -compact -offset indent "MacroX" "ArgumentsX" "ScopeXXXXX" "CompatX"
                    409: .It Em Macro Ta Em Arguments Ta Em Scope     Ta Em Notes
1.73      kristaps  410: .It Sx \&AT  Ta    <=1       Ta    current   Ta    \&
1.57      kristaps  411: .It Sx \&B   Ta    n         Ta    next-line Ta    \&
                    412: .It Sx \&BI  Ta    n         Ta    current   Ta    \&
                    413: .It Sx \&BR  Ta    n         Ta    current   Ta    \&
                    414: .It Sx \&DT  Ta    0         Ta    current   Ta    \&
                    415: .It Sx \&I   Ta    n         Ta    next-line Ta    \&
                    416: .It Sx \&IB  Ta    n         Ta    current   Ta    \&
                    417: .It Sx \&IR  Ta    n         Ta    current   Ta    \&
1.58      kristaps  418: .\" .It Sx \&PD  Ta    n         Ta    current   Ta    compat
1.57      kristaps  419: .It Sx \&R   Ta    n         Ta    next-line Ta    \&
                    420: .It Sx \&RB  Ta    n         Ta    current   Ta    \&
                    421: .It Sx \&RI  Ta    n         Ta    current   Ta    \&
                    422: .It Sx \&SB  Ta    n         Ta    next-line Ta    \&
                    423: .It Sx \&SM  Ta    n         Ta    next-line Ta    \&
                    424: .It Sx \&TH  Ta    >1, <6    Ta    current   Ta    \&
1.73      kristaps  425: .It Sx \&UC  Ta    <=1       Ta    current   Ta    \&
1.57      kristaps  426: .It Sx \&br  Ta    0         Ta    current   Ta    compat
                    427: .It Sx \&fi  Ta    0         Ta    current   Ta    compat
                    428: .It Sx \&i   Ta    n         Ta    current   Ta    compat
                    429: .It Sx \&na  Ta    0         Ta    current   Ta    compat
                    430: .It Sx \&nf  Ta    0         Ta    current   Ta    compat
                    431: .It Sx \&r   Ta    0         Ta    current   Ta    compat
                    432: .It Sx \&sp  Ta    1         Ta    current   Ta    compat
1.70      kristaps  433: .\" .It Sx \&Sp  Ta    <1        Ta    current   Ta    compat
1.58      kristaps  434: .\" .It Sx \&Vb  Ta    <1        Ta    current   Ta    compat
                    435: .\" .It Sx \&Ve  Ta    0         Ta    current   Ta    compat
1.32      kristaps  436: .El
                    437: .Pp
1.57      kristaps  438: Macros marked as
                    439: .Qq compat
                    440: are included for compatibility with the significant corpus of existing
1.68      kristaps  441: manuals that mix dialects of roff.
                    442: These macros should not be used for portable
1.58      kristaps  443: .Nm
                    444: manuals.
1.32      kristaps  445: .Ss Block Macros
1.68      kristaps  446: Block macros are comprised of a head and body.
                    447: Like for in-line macros, the head is scoped to the current line and, in
                    448: one circumstance, the next line (the next-line stipulations as in
1.57      kristaps  449: .Sx Line Macros
                    450: apply here as well).
1.56      kristaps  451: .Pp
                    452: The syntax is as follows:
1.32      kristaps  453: .Bd -literal -offset indent
1.22      kristaps  454: \&.YO \(lBhead...\(rB
                    455: \(lBhead...\(rB
                    456: \(lBbody...\(rB
1.32      kristaps  457: .Ed
                    458: .Pp
1.30      kristaps  459: The closure of body scope may be to the section, where a macro is closed
                    460: by
1.39      kristaps  461: .Sx \&SH ;
1.30      kristaps  462: sub-section, closed by a section or
1.39      kristaps  463: .Sx \&SS ;
1.30      kristaps  464: part, closed by a section, sub-section, or
1.39      kristaps  465: .Sx \&RE ;
1.55      kristaps  466: or paragraph, closed by a section, sub-section, part,
1.39      kristaps  467: .Sx \&HP ,
                    468: .Sx \&IP ,
                    469: .Sx \&LP ,
                    470: .Sx \&P ,
                    471: .Sx \&PP ,
1.30      kristaps  472: or
1.39      kristaps  473: .Sx \&TP .
1.30      kristaps  474: No closure refers to an explicit block closing macro.
1.32      kristaps  475: .Pp
1.58      kristaps  476: As a rule, block macros may not be nested; thus, calling a block macro
                    477: while another block macro scope is open, and the open scope is not
                    478: implicitly closed, is syntactically incorrect.
                    479: .Pp
1.57      kristaps  480: .Bl -column -compact -offset indent "MacroX" "ArgumentsX" "Head ScopeX" "sub-sectionX" "compatX"
                    481: .It Em Macro Ta Em Arguments Ta Em Head Scope Ta Em Body Scope  Ta Em Notes
                    482: .It Sx \&HP  Ta    <2        Ta    current    Ta    paragraph   Ta    \&
                    483: .It Sx \&IP  Ta    <3        Ta    current    Ta    paragraph   Ta    \&
                    484: .It Sx \&LP  Ta    0         Ta    current    Ta    paragraph   Ta    \&
                    485: .It Sx \&P   Ta    0         Ta    current    Ta    paragraph   Ta    \&
                    486: .It Sx \&PP  Ta    0         Ta    current    Ta    paragraph   Ta    \&
                    487: .It Sx \&RE  Ta    0         Ta    current    Ta    none        Ta    compat
                    488: .It Sx \&RS  Ta    1         Ta    current    Ta    part        Ta    compat
                    489: .It Sx \&SH  Ta    >0        Ta    next-line  Ta    section     Ta    \&
                    490: .It Sx \&SS  Ta    >0        Ta    next-line  Ta    sub-section Ta    \&
                    491: .It Sx \&TP  Ta    n         Ta    next-line  Ta    paragraph   Ta    \&
1.32      kristaps  492: .El
1.57      kristaps  493: .Pp
                    494: Macros marked
                    495: .Qq compat
                    496: are as mentioned in
                    497: .Sx Line Macros .
1.32      kristaps  498: .Pp
1.22      kristaps  499: If a block macro is next-line scoped, it may only be followed by in-line
1.57      kristaps  500: macros for decorating text.
1.22      kristaps  501: .Sh REFERENCE
                    502: This section is a canonical reference to all macros, arranged
1.68      kristaps  503: alphabetically.
                    504: For the scoping of individual macros, see
1.32      kristaps  505: .Sx MACRO SYNTAX .
1.72      joerg     506: .Ss \&AT
                    507: Sets the volume for the footer for compatibility with man pages from
                    508: .Tn AT&T UNIX
                    509: releases.
                    510: The optional arguments specify which release it is from.
1.39      kristaps  511: .Ss \&B
1.22      kristaps  512: Text is rendered in bold face.
1.44      kristaps  513: .Pp
                    514: See also
                    515: .Sx \&I ,
                    516: .Sx \&R ,
                    517: .Sx \&b ,
                    518: .Sx \&i ,
                    519: and
                    520: .Sx \&r .
1.39      kristaps  521: .Ss \&BI
1.68      kristaps  522: Text is rendered alternately in bold face and italic.
                    523: Thus,
1.32      kristaps  524: .Sq .BI this word and that
1.22      kristaps  525: causes
1.32      kristaps  526: .Sq this
1.22      kristaps  527: and
1.32      kristaps  528: .Sq and
1.55      kristaps  529: to render in bold face, while
1.32      kristaps  530: .Sq word
1.22      kristaps  531: and
1.32      kristaps  532: .Sq that
1.68      kristaps  533: render in italics.
                    534: Whitespace between arguments is omitted in output.
1.44      kristaps  535: .Pp
                    536: Examples:
1.46      kristaps  537: .Pp
                    538: .D1 \&.BI bold italic bold italic
1.44      kristaps  539: .Pp
                    540: The output of this example will be emboldened
                    541: .Dq bold
                    542: and italicised
                    543: .Dq italic ,
                    544: with spaces stripped between arguments.
                    545: .Pp
                    546: See also
                    547: .Sx \&IB ,
                    548: .Sx \&BR ,
                    549: .Sx \&RB ,
                    550: .Sx \&RI ,
                    551: and
                    552: .Sx \&IR .
1.39      kristaps  553: .Ss \&BR
1.22      kristaps  554: Text is rendered alternately in bold face and roman (the default font).
                    555: Whitespace between arguments is omitted in output.
1.44      kristaps  556: .Pp
                    557: See
                    558: .Sx \&BI
                    559: for an equivalent example.
                    560: .Pp
                    561: See also
                    562: .Sx \&BI ,
                    563: .Sx \&IB ,
                    564: .Sx \&RB ,
                    565: .Sx \&RI ,
                    566: and
                    567: .Sx \&IR .
1.39      kristaps  568: .Ss \&DT
1.68      kristaps  569: Has no effect.
                    570: Included for compatibility.
1.39      kristaps  571: .Ss \&HP
1.23      kristaps  572: Begin a paragraph whose initial output line is left-justified, but
1.27      kristaps  573: subsequent output lines are indented, with the following syntax:
1.44      kristaps  574: .Bd -filled -offset indent
                    575: .Pf \. Sx \&HP
                    576: .Op Cm width
1.32      kristaps  577: .Ed
1.44      kristaps  578: .Pp
                    579: The
                    580: .Cm width
                    581: argument must conform to
                    582: .Sx Scaling Widths .
                    583: If specified, it's saved for later paragraph left-margins; if unspecified, the
                    584: saved or default width is used.
                    585: .Pp
                    586: See also
1.45      kristaps  587: .Sx \&IP ,
                    588: .Sx \&LP ,
                    589: .Sx \&P ,
                    590: .Sx \&PP ,
1.44      kristaps  591: and
1.45      kristaps  592: .Sx \&TP .
1.39      kristaps  593: .Ss \&I
1.22      kristaps  594: Text is rendered in italics.
1.44      kristaps  595: .Pp
                    596: See also
                    597: .Sx \&B ,
                    598: .Sx \&R ,
                    599: .Sx \&b ,
                    600: .Sx \&i ,
                    601: and
                    602: .Sx \&r .
1.39      kristaps  603: .Ss \&IB
1.22      kristaps  604: Text is rendered alternately in italics and bold face.  Whitespace
                    605: between arguments is omitted in output.
1.44      kristaps  606: .Pp
                    607: See
                    608: .Sx \&BI
                    609: for an equivalent example.
                    610: .Pp
                    611: See also
                    612: .Sx \&BI ,
                    613: .Sx \&BR ,
                    614: .Sx \&RB ,
                    615: .Sx \&RI ,
                    616: and
                    617: .Sx \&IR .
1.39      kristaps  618: .Ss \&IP
1.44      kristaps  619: Begin an indented paragraph with the following syntax:
                    620: .Bd -filled -offset indent
                    621: .Pf \. Sx \&IP
                    622: .Op Cm head Op Cm width
1.32      kristaps  623: .Ed
1.44      kristaps  624: .Pp
                    625: The
                    626: .Cm width
                    627: argument defines the width of the left margin and is defined by
                    628: .Sx Scaling Widths ,
                    629: It's saved for later paragraph left-margins; if unspecified, the saved or
                    630: default width is used.
                    631: .Pp
                    632: The
                    633: .Cm head
1.68      kristaps  634: argument is used as a leading term, flushed to the left margin.
                    635: This is useful for bulleted paragraphs and so on.
1.44      kristaps  636: .Pp
                    637: See also
1.45      kristaps  638: .Sx \&HP ,
                    639: .Sx \&LP ,
                    640: .Sx \&P ,
                    641: .Sx \&PP ,
1.44      kristaps  642: and
1.45      kristaps  643: .Sx \&TP .
1.39      kristaps  644: .Ss \&IR
1.22      kristaps  645: Text is rendered alternately in italics and roman (the default font).
                    646: Whitespace between arguments is omitted in output.
1.44      kristaps  647: .Pp
                    648: See
                    649: .Sx \&BI
                    650: for an equivalent example.
                    651: .Pp
                    652: See also
                    653: .Sx \&BI ,
                    654: .Sx \&IB ,
                    655: .Sx \&BR ,
                    656: .Sx \&RB ,
                    657: and
                    658: .Sx \&RI .
1.39      kristaps  659: .Ss \&LP
1.68      kristaps  660: Begin an undecorated paragraph.
                    661: The scope of a paragraph is closed by a subsequent paragraph,
                    662: sub-section, section, or end of file.
                    663: The saved paragraph left-margin width is re-set to the default.
1.44      kristaps  664: .Pp
                    665: See also
1.45      kristaps  666: .Sx \&HP ,
                    667: .Sx \&IP ,
                    668: .Sx \&P ,
                    669: .Sx \&PP ,
1.44      kristaps  670: and
1.45      kristaps  671: .Sx \&TP .
1.39      kristaps  672: .Ss \&P
                    673: Synonym for
                    674: .Sx \&LP .
1.44      kristaps  675: .Pp
                    676: See also
1.45      kristaps  677: .Sx \&HP ,
                    678: .Sx \&IP ,
                    679: .Sx \&LP ,
                    680: .Sx \&PP ,
1.44      kristaps  681: and
1.45      kristaps  682: .Sx \&TP .
1.39      kristaps  683: .Ss \&PP
                    684: Synonym for
                    685: .Sx \&LP .
1.44      kristaps  686: .Pp
                    687: See also
1.45      kristaps  688: .Sx \&HP ,
                    689: .Sx \&IP ,
                    690: .Sx \&LP ,
                    691: .Sx \&P ,
1.44      kristaps  692: and
1.45      kristaps  693: .Sx \&TP .
1.39      kristaps  694: .Ss \&R
1.22      kristaps  695: Text is rendered in roman (the default font).
1.44      kristaps  696: .Pp
                    697: See also
                    698: .Sx \&I ,
                    699: .Sx \&B ,
                    700: .Sx \&b ,
                    701: .Sx \&i ,
                    702: and
                    703: .Sx \&r .
1.39      kristaps  704: .Ss \&RB
1.22      kristaps  705: Text is rendered alternately in roman (the default font) and bold face.
                    706: Whitespace between arguments is omitted in output.
1.44      kristaps  707: .Pp
                    708: See
                    709: .Sx \&BI
                    710: for an equivalent example.
                    711: .Pp
                    712: See also
                    713: .Sx \&BI ,
                    714: .Sx \&IB ,
                    715: .Sx \&BR ,
                    716: .Sx \&RI ,
                    717: and
                    718: .Sx \&IR .
1.39      kristaps  719: .Ss \&RE
1.30      kristaps  720: Explicitly close out the scope of a prior
1.39      kristaps  721: .Sx \&RS .
                    722: .Ss \&RI
1.22      kristaps  723: Text is rendered alternately in roman (the default font) and italics.
                    724: Whitespace between arguments is omitted in output.
1.44      kristaps  725: .Pp
                    726: See
                    727: .Sx \&BI
                    728: for an equivalent example.
                    729: .Pp
                    730: See also
                    731: .Sx \&BI ,
                    732: .Sx \&IB ,
                    733: .Sx \&BR ,
                    734: .Sx \&RB ,
                    735: and
                    736: .Sx \&IR .
1.39      kristaps  737: .Ss \&RS
1.68      kristaps  738: Begin a part setting the left margin.
                    739: The left margin controls the offset, following an initial indentation,
                    740: to un-indented text such as that of
1.39      kristaps  741: .Sx \&PP .
1.44      kristaps  742: This has the following syntax:
                    743: .Bd -filled -offset indent
                    744: .Pf \. Sx \&Rs
                    745: .Op Cm width
1.32      kristaps  746: .Ed
1.44      kristaps  747: .Pp
                    748: The
                    749: .Cm width
                    750: argument must conform to
                    751: .Sx Scaling Widths .
1.55      kristaps  752: If not specified, the saved or default width is used.
1.39      kristaps  753: .Ss \&SB
1.22      kristaps  754: Text is rendered in small size (one point smaller than the default font)
                    755: bold face.
1.39      kristaps  756: .Ss \&SH
1.68      kristaps  757: Begin a section.
                    758: The scope of a section is only closed by another section or the end of
                    759: file.
                    760: The paragraph left-margin width is re-set to the default.
1.39      kristaps  761: .Ss \&SM
1.22      kristaps  762: Text is rendered in small size (one point smaller than the default
                    763: font).
1.39      kristaps  764: .Ss \&SS
1.68      kristaps  765: Begin a sub-section.
                    766: The scope of a sub-section is closed by a subsequent sub-section,
                    767: section, or end of file.
                    768: The paragraph left-margin width is re-set to the default.
1.39      kristaps  769: .Ss \&TH
1.22      kristaps  770: Sets the title of the manual page with the following syntax:
1.44      kristaps  771: .Bd -filled -offset indent
                    772: .Pf \. Sx \&TH
                    773: .Cm title section
                    774: .Op Cm date Op Cm source Op Cm volume
                    775: .Ed
1.43      kristaps  776: .Pp
                    777: At least the upper-case document title
                    778: .Cm title
                    779: and numeric manual section
1.44      kristaps  780: .Cm section
1.68      kristaps  781: arguments must be provided.
                    782: The
1.43      kristaps  783: .Cm date
                    784: argument should be formatted as described in
1.74      kristaps  785: .Sx Dates ,
                    786: but will be printed verbatim if it is not.
                    787: If the date is not specified, the current date is used.
1.68      kristaps  788: The
1.44      kristaps  789: .Cm source
1.68      kristaps  790: string specifies the organisation providing the utility.
                    791: The
1.44      kristaps  792: .Cm volume
1.43      kristaps  793: string replaces the default rendered volume, which is dictated by the
                    794: manual section.
                    795: .Pp
                    796: Examples:
1.46      kristaps  797: .Pp
                    798: .D1 \&.TH CVS 5 "1992-02-12" GNU
1.39      kristaps  799: .Ss \&TP
1.25      kristaps  800: Begin a paragraph where the head, if exceeding the indentation width, is
1.24      kristaps  801: followed by a newline; if not, the body follows on the same line after a
1.68      kristaps  802: buffer to the indentation width.
                    803: Subsequent output lines are indented.
1.44      kristaps  804: The syntax is as follows:
                    805: .Bd -filled -offset indent
                    806: .Pf \. Sx \&TP
                    807: .Op Cm width
1.32      kristaps  808: .Ed
                    809: .Pp
1.44      kristaps  810: The
                    811: .Cm width
                    812: argument must conform to
                    813: .Sx Scaling Widths .
                    814: If specified, it's saved for later paragraph left-margins; if
1.27      kristaps  815: unspecified, the saved or default width is used.
1.44      kristaps  816: .Pp
                    817: See also
1.45      kristaps  818: .Sx \&HP ,
                    819: .Sx \&IP ,
                    820: .Sx \&LP ,
                    821: .Sx \&P ,
1.44      kristaps  822: and
1.45      kristaps  823: .Sx \&PP .
1.58      kristaps  824: .\" .
                    825: .\" .
                    826: .\" .Ss \&PD
                    827: .\" Has no effect.  Included for compatibility.
                    828: .\" .
                    829: .\" .
1.72      joerg     830: .Ss \&UC
                    831: Sets the volume for the footer for compatibility with man pages from
                    832: BSD releases.
                    833: The optional first argument specifies which release it is from.
1.39      kristaps  834: .Ss \&br
1.68      kristaps  835: Breaks the current line.
                    836: Consecutive invocations have no further effect.
1.44      kristaps  837: .Pp
                    838: See also
                    839: .Sx \&sp .
1.39      kristaps  840: .Ss \&fi
1.22      kristaps  841: End literal mode begun by
1.39      kristaps  842: .Sx \&nf .
                    843: .Ss \&i
1.68      kristaps  844: Italicise arguments.
                    845: Synonym for
1.51      kristaps  846: .Sx \&I .
1.44      kristaps  847: .Pp
                    848: See also
                    849: .Sx \&B ,
                    850: .Sx \&I ,
                    851: .Sx \&R .
                    852: .Sx \&b ,
                    853: and
                    854: .Sx \&r .
1.39      kristaps  855: .Ss \&na
1.36      kristaps  856: Don't align to the right margin.
1.39      kristaps  857: .Ss \&nf
1.22      kristaps  858: Begin literal mode: all subsequent free-form lines have their end of
1.68      kristaps  859: line boundaries preserved.
                    860: May be ended by
1.39      kristaps  861: .Sx \&fi .
                    862: .Ss \&r
1.22      kristaps  863: Fonts and styles (bold face, italics) reset to roman (default font).
1.44      kristaps  864: .Pp
                    865: See also
                    866: .Sx \&B ,
                    867: .Sx \&I ,
                    868: .Sx \&R ,
                    869: .Sx \&b ,
                    870: and
                    871: .Sx \&i .
1.39      kristaps  872: .Ss \&sp
1.44      kristaps  873: Insert vertical spaces into output with the following syntax:
                    874: .Bd -filled -offset indent
                    875: .Pf \. Sx \&sp
                    876: .Op Cm height
                    877: .Ed
                    878: .Pp
1.55      kristaps  879: Insert
1.44      kristaps  880: .Cm height
                    881: spaces, which must conform to
                    882: .Sx Scaling Widths .
                    883: If 0, this is equivalent to the
1.39      kristaps  884: .Sx \&br
1.68      kristaps  885: macro.
                    886: Defaults to 1, if unspecified.
1.44      kristaps  887: .Pp
                    888: See also
                    889: .Sx \&br .
1.58      kristaps  890: .\" .Ss \&Sp
                    891: .\" A synonym for
                    892: .\" .Sx \&sp
                    893: .\" .Cm 0.5v .
                    894: .\" .
                    895: .\" .Ss \&Vb
                    896: .\" A synonym for
                    897: .\" .Sx \&nf .
                    898: .\" Accepts an argument (the height of the formatted space) which is
                    899: .\" disregarded.
                    900: .\" .
                    901: .\" .Ss \&Ve
                    902: .\" A synonym for
                    903: .\" .Sx \&fi .
                    904: .\" .
1.18      kristaps  905: .Sh COMPATIBILITY
1.58      kristaps  906: This section documents areas of questionable portability between
                    907: implementations of the
                    908: .Nm
                    909: language.
1.51      kristaps  910: .Pp
                    911: .Bl -dash -compact
1.77    ! kristaps  912: .It
        !           913: The \es (font size), \em (font colour), and \eM (font filling colour)
        !           914: font decoration escapes are all discarded in mandoc.
1.51      kristaps  915: .It
1.58      kristaps  916: In quoted literals, GNU troff allowed pair-wise double-quotes to produce
1.68      kristaps  917: a standalone double-quote in formatted output.
                    918: It is not known whether this behaviour is exhibited by other formatters.
1.32      kristaps  919: .It
1.23      kristaps  920: The
1.51      kristaps  921: .Sx \&sp
1.68      kristaps  922: macro does not accept negative values in mandoc.
                    923: In GNU troff, this would result in strange behaviour.
1.59      kristaps  924: .It
                    925: The
                    926: .Sq \(aq
                    927: macro control character, in GNU troff (and prior troffs) suppresses a
                    928: newline before macro output; in mandoc, it is an alias for the standard
                    929: .Sq \&.
                    930: control character.
1.32      kristaps  931: .El
1.1       kristaps  932: .Sh SEE ALSO
1.32      kristaps  933: .Xr mandoc 1 ,
                    934: .Xr mandoc_char 7
1.1       kristaps  935: .Sh AUTHORS
                    936: The
1.32      kristaps  937: .Nm
1.23      kristaps  938: reference was written by
1.62      kristaps  939: .An Kristaps Dzonsons Aq kristaps@bsd.lv .
1.1       kristaps  940: .Sh CAVEATS
1.68      kristaps  941: Do not use this language.
                    942: Use
1.32      kristaps  943: .Xr mdoc 7 ,
1.1       kristaps  944: instead.

CVSweb