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

Annotation of mandoc/man.7, Revision 1.47

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

CVSweb