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

Annotation of mandoc/man.7, Revision 1.45

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

CVSweb