[BACK]Return to man.7 CVS log [TXT][DIR] Up to [local] / src / usr.bin / mandoc

Annotation of src/usr.bin/mandoc/man.7, Revision 1.17

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