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

Annotation of mandoc/man.7, Revision 1.42

1.42    ! kristaps    1: .\"    $Id: man.7,v 1.41 2009/10/26 10:36:46 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.22      kristaps   85: is also ignored.  Macro lines with only a control charater and
                     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.38      kristaps  122: .Ss Scaling Widths
                    123: Many macros support scaled widths for their arguments, such as
                    124: stipulating a two-inch paragraph indentation with the following:
                    125: .Bd -literal -offset indent
                    126: \&.HP 2i
                    127: .Ed
                    128: .
                    129: .Pp
                    130: The syntax for scaled widths is
                    131: .Sq Li [+-]?[0-9]*.[0-9]*[:unit:]? ,
                    132: where a decimal must be preceded or proceeded by at least one digit.
                    133: Negative numbers, while accepted, are truncated to zero.  The following
                    134: scaling units are accepted:
                    135: .
                    136: .Pp
                    137: .Bl -tag -width Ds -offset indent -compact
                    138: .It c
                    139: centimetre
                    140: .It i
                    141: inch
                    142: .It P
                    143: pica (~1/6 inch)
                    144: .It p
                    145: point (~1/72 inch)
                    146: .It f
                    147: synonym for
                    148: .Sq u
                    149: .It v
                    150: default vertical span
                    151: .It m
                    152: width of rendered
                    153: .Sq m
                    154: .Pq em
                    155: character
                    156: .It n
                    157: width of rendered
                    158: .Sq n
                    159: .Pq en
                    160: character
                    161: .It u
                    162: default horizontal span
                    163: .It M
                    164: mini-em (~1/100 em)
                    165: .El
                    166: .Pp
                    167: Using anything other than
                    168: .Sq m ,
                    169: .Sq n ,
                    170: .Sq u ,
                    171: or
                    172: .Sq v
                    173: is necessarily non-portable across output media.  See
                    174: .Sx COMPATIBILITY .
                    175: .
                    176: .Pp
                    177: If a scaling unit is not provided, the numerical value is interpreted
                    178: under the default rules of
                    179: .Sq v
                    180: for vertical spaces and
                    181: .Sq u
                    182: for horizontal ones.
                    183: .Em Note :
                    184: this differs from
                    185: .Xr mdoc 7 ,
                    186: which, if a unit is not provided, will instead interpret the string as
                    187: literal text.
                    188: .
1.28      kristaps  189: .
1.22      kristaps  190: .Sh MANUAL STRUCTURE
1.16      kristaps  191: Each
1.32      kristaps  192: .Nm
1.16      kristaps  193: document must contain contains at least the
1.39      kristaps  194: .Sx \&TH
1.16      kristaps  195: macro describing the document's section and title.  It may occur
                    196: anywhere in the document, although conventionally, it appears as the
                    197: first macro.
1.32      kristaps  198: .
                    199: .Pp
1.22      kristaps  200: Beyond
1.39      kristaps  201: .Sx \&TH ,
1.22      kristaps  202: at least one macro or text node must appear in the document.  Documents
                    203: are generally structured as follows:
1.32      kristaps  204: .Bd -literal -offset indent
1.22      kristaps  205: \&.TH FOO 1 "13 Aug 2009"
                    206: \&.
                    207: \&.SH NAME
1.29      kristaps  208: \efBfoo\efR \e(en a description goes here
1.33      kristaps  209: \&.\e\*q The next is for sections 2 & 3 only.
                    210: \&.\e\*q .SH LIBRARY
1.22      kristaps  211: \&.
                    212: \&.SH SYNOPSIS
                    213: \efBfoo\efR [\efB\e-options\efR] arguments...
                    214: \&.
                    215: \&.SH DESCRIPTION
1.33      kristaps  216: The \efBfoo\efR utility processes files...
1.22      kristaps  217: \&.
1.33      kristaps  218: \&.\e\*q .SH IMPLEMENTATION NOTES
                    219: \&.\e\*q The next is for sections 1 & 8 only.
                    220: \&.\e\*q .SH EXIT STATUS
                    221: \&.\e\*q The next is for sections 2, 3, & 9 only.
1.22      kristaps  222: \&.\e\*q .SH RETURN VALUES
1.33      kristaps  223: \&.\e\*q The next is for sections 1, 6, 7, & 8 only.
1.22      kristaps  224: \&.\e\*q .SH ENVIRONMENT
                    225: \&.\e\*q .SH FILES
                    226: \&.\e\*q .SH EXAMPLES
1.33      kristaps  227: \&.\e\*q The next is for sections 1, 4, 6, 7, & 8 only.
1.22      kristaps  228: \&.\e\*q .SH DIAGNOSTICS
1.33      kristaps  229: \&.\e\*q The next is for sections 2, 3, & 9 only.
1.22      kristaps  230: \&.\e\*q .SH ERRORS
                    231: \&.\e\*q .SH SEE ALSO
1.42    ! kristaps  232: \&.\e\*q .BR foo ( 1 )
1.22      kristaps  233: \&.\e\*q .SH STANDARDS
                    234: \&.\e\*q .SH HISTORY
                    235: \&.\e\*q .SH AUTHORS
                    236: \&.\e\*q .SH CAVEATS
                    237: \&.\e\*q .SH BUGS
1.33      kristaps  238: \&.\e\*q .SH SECURITY CONSIDERATIONS
1.32      kristaps  239: .Ed
1.41      kristaps  240: .Pp
                    241: The sections in a
                    242: .Nm
                    243: document are conventionally ordered as they appear above.  Sections
                    244: should be composed as follows:
1.42    ! kristaps  245: .Bl -ohang -offset indent
        !           246: .It Em NAME
1.41      kristaps  247: The name(s) and a short description of the documented material.  The
                    248: syntax for this is generally as follows:
                    249: .Pp
                    250: .D1 \efBname\efR \e(en description
1.42    ! kristaps  251: .It Em LIBRARY
1.41      kristaps  252: The name of the library containing the documented material, which is
                    253: assumed to be a function in a section 2 or 3 manual.  For functions in
                    254: the C library, this may be as follows:
                    255: .Pp
                    256: .D1 Standard C Library (libc, -lc)
1.42    ! kristaps  257: .It Em SYNOPSIS
1.41      kristaps  258: Documents the utility invocation syntax, function call syntax, or device
                    259: configuration.
                    260: .Pp
                    261: For the first, utilities (sections 1, 6, and 8), this is
                    262: generally structured as follows:
                    263: .Pp
                    264: .D1 \efBname\efR [-\efBab\efR] [-\efBc\efR\efIarg\efR] \efBpath\efR...
                    265: .Pp
                    266: For the second, function calls (sections 2, 3, 9):
                    267: .Pp
                    268: .D1 \. Ns Sx \&B No char *name(char *\efIarg\efR);
                    269: .Pp
                    270: And for the third, configurations (section 4):
                    271: .Pp
                    272: .D1 \. Ns Sx \&B No name* at cardbus ? function ?
                    273: .Pp
1.42    ! kristaps  274: Manuals not in these sections generally don't need a
        !           275: .Em SYNOPSIS .
        !           276: .It Em DESCRIPTION
        !           277: This expands upon the brief, one-line description in
        !           278: .Em NAME .
        !           279: It usually contains a break-down of the options (if documenting a
        !           280: command).
        !           281: .It Em IMPLEMENTATION NOTES
1.41      kristaps  282: Implementation-specific notes should be kept here.  This is useful when
                    283: implementing standard functions that may have side effects or notable
                    284: algorithmic implications.
1.42    ! kristaps  285: .It Em EXIT STATUS
        !           286: Command exit status for section 1, 6, and 8 manuals.  This section is
        !           287: the dual of
        !           288: .Em RETURN VALUES ,
        !           289: which is used for functions.  Historically, this information was
        !           290: described in
        !           291: .Em DIAGNOSTICS ,
        !           292: a practise that is now discouraged.
        !           293: .
        !           294: .It Em RETURN VALUES
        !           295: This section is the dual of
        !           296: .Em EXIT STATUS ,
        !           297: which is used for commands.  It documents the return values of functions
        !           298: in sections 2, 3, and 9.
        !           299: .
        !           300: .It Em ENVIRONMENT
        !           301: Documents any usages of environment variables, e.g.,
        !           302: .Xr environ 7 .
        !           303: .
        !           304: .It Em FILES
        !           305: Documents files used.  It's helpful to document both the file and a
        !           306: short description of how the file is used (created, modified, etc.).
        !           307: .
        !           308: .It Em EXAMPLES
        !           309: Example usages.  This often contains snippets of well-formed,
        !           310: well-tested invocations.  Make doubly sure that your examples work
        !           311: properly!  Assume that users will skip to this section and use your
        !           312: example verbatim.
        !           313: .
        !           314: .It Em DIAGNOSTICS
        !           315: Documents error conditions.  This is most useful in section 4 manuals.
        !           316: Historically, this section was used in place of
        !           317: .Em EXIT STATUS
        !           318: for manuals in sections 1, 6, and 8; however, this practise is
        !           319: discouraged.
        !           320: .
        !           321: .It Em ERRORS
        !           322: Documents error handling in sections 2, 3, and 9.
        !           323: .
        !           324: .It Em SEE ALSO
        !           325: References other manuals with related topics.  This section should exist
        !           326: for most manuals.  Cross-references should conventionally be ordered
        !           327: first by section, then alphabetically.
        !           328: .Pp
        !           329: .D1 \. Ns Sx \&BR No bar \&( 1 \&),
        !           330: .D1 \. Ns Sx \&BR No foo \&( 1 \&),
        !           331: .D1 \. Ns Sx \&BR No baz \&( 2 \&).
        !           332: .
        !           333: .It Em STANDARDS
        !           334: References any standards implemented or used, such as
        !           335: .Pp
        !           336: .D1 IEEE Std 1003.2 (\e(lqPOSIX.2\e(rq)
        !           337: .Pp
        !           338: If not adhering to any standards, the
        !           339: .Em HISTORY
        !           340: section should be used.
        !           341: .
        !           342: .It Em HISTORY
        !           343: The history of any manual without a
        !           344: .Em STANDARDS
        !           345: section should be described in this section.
        !           346: .
        !           347: .It Em AUTHORS
        !           348: Credits to authors, if applicable, should appear in this section.
        !           349: Authors should generally be noted by both name and an e-mail address.
        !           350: .
        !           351: .It Em CAVEATS
        !           352: Explanations of common misuses and misunderstandings should be explained
        !           353: in this section.
        !           354: .
        !           355: .It Em BUGS
        !           356: Extant bugs should be described in this section.
        !           357: .
        !           358: .It Em SECURITY CONSIDERATIONS
        !           359: Documents any security precautions that operators should consider.
        !           360: .
1.41      kristaps  361: .El
1.28      kristaps  362: .
                    363: .
1.22      kristaps  364: .Sh MACRO SYNTAX
1.2       kristaps  365: Macros are one to three three characters in length and begin with a
1.4       kristaps  366: control character ,
1.32      kristaps  367: .Sq \&. ,
1.2       kristaps  368: at the beginning of the line.  An arbitrary amount of whitespace may
1.39      kristaps  369: sit between the control character and the macro name.  Thus, the
                    370: following are equivalent:
                    371: .Bd -literal -offset indent
                    372: \&.PP
                    373: \&.\ \ \ PP
                    374: .Ed
1.32      kristaps  375: .
                    376: .Pp
1.1       kristaps  377: The
1.32      kristaps  378: .Nm
1.30      kristaps  379: macros are classified by scope: line scope or block scope.  Line
1.22      kristaps  380: macros are only scoped to the current line (and, in some situations,
                    381: the subsequent line).  Block macros are scoped to the current line and
                    382: subsequent lines until closed by another block macro.
1.28      kristaps  383: .
                    384: .
1.32      kristaps  385: .Ss Line Macros
1.30      kristaps  386: Line macros are generally scoped to the current line, with the body
                    387: consisting of zero or more arguments.  If a macro is scoped to the next
                    388: line and the line arguments are empty, the next line is used instead,
                    389: else the general syntax is used.  Thus:
1.32      kristaps  390: .Bd -literal -offset indent
1.30      kristaps  391: \&.I
1.4       kristaps  392: foo
1.32      kristaps  393: .Ed
                    394: .
                    395: .Pp
1.20      kristaps  396: is equivalent to
1.32      kristaps  397: .Sq \&.I foo .
1.35      kristaps  398: If next-line macros are invoked consecutively, only the last is used.
                    399: If a next-line macro is proceded by a block macro, it is ignored.
1.32      kristaps  400: .Bd -literal -offset indent
1.22      kristaps  401: \&.YO \(lBbody...\(rB
                    402: \(lBbody...\(rB
1.32      kristaps  403: .Ed
                    404: .
                    405: .Pp
                    406: .Bl -column -compact -offset indent "MacroX" "ArgumentsX" "ScopeXXXXX"
                    407: .It Em Macro Ta Em Arguments Ta Em Scope
1.39      kristaps  408: .It Sx \&B   Ta    n         Ta    next-line
                    409: .It Sx \&BI  Ta    n         Ta    current
                    410: .It Sx \&BR  Ta    n         Ta    current
                    411: .It Sx \&DT  Ta    0         Ta    current
                    412: .It Sx \&I   Ta    n         Ta    next-line
                    413: .It Sx \&IB  Ta    n         Ta    current
                    414: .It Sx \&IR  Ta    n         Ta    current
1.40      kristaps  415: .It Sx \&PD  Ta    n         Ta    current
1.39      kristaps  416: .It Sx \&R   Ta    n         Ta    next-line
                    417: .It Sx \&RB  Ta    n         Ta    current
                    418: .It Sx \&RI  Ta    n         Ta    current
                    419: .It Sx \&SB  Ta    n         Ta    next-line
                    420: .It Sx \&SM  Ta    n         Ta    next-line
                    421: .It Sx \&TH  Ta    >1, <6    Ta    current
                    422: .It Sx \&UC  Ta    n         Ta    current
                    423: .It Sx \&br  Ta    0         Ta    current
                    424: .It Sx \&fi  Ta    0         Ta    current
                    425: .It Sx \&i   Ta    n         Ta    current
                    426: .It Sx \&na  Ta    0         Ta    current
                    427: .It Sx \&nf  Ta    0         Ta    current
                    428: .It Sx \&r   Ta    0         Ta    current
                    429: .It Sx \&sp  Ta    1         Ta    current
1.32      kristaps  430: .El
                    431: .
                    432: .Pp
1.31      kristaps  433: The
1.40      kristaps  434: .Sx \&PD ,
1.39      kristaps  435: .Sx \&RS ,
                    436: .Sx \&RE ,
                    437: .Sx \&UC ,
                    438: .Sx \&br ,
                    439: .Sx \&fi ,
                    440: .Sx \&i ,
                    441: .Sx \&na ,
                    442: .Sx \&nf ,
                    443: .Sx \&r ,
1.22      kristaps  444: and
1.39      kristaps  445: .Sx \&sp
1.36      kristaps  446: macros should not be used.  They're included for compatibility.
1.28      kristaps  447: .
                    448: .
1.32      kristaps  449: .Ss Block Macros
1.30      kristaps  450: Block macros are comprised of a head and body.  Like for in-line macros,
                    451: the head is scoped to the current line and, in one circumstance, the
                    452: next line; the body is scoped to subsequent lines and is closed out by a
                    453: subsequent block macro invocation.
1.32      kristaps  454: .Bd -literal -offset indent
1.22      kristaps  455: \&.YO \(lBhead...\(rB
                    456: \(lBhead...\(rB
                    457: \(lBbody...\(rB
1.32      kristaps  458: .Ed
                    459: .
                    460: .Pp
1.30      kristaps  461: The closure of body scope may be to the section, where a macro is closed
                    462: by
1.39      kristaps  463: .Sx \&SH ;
1.30      kristaps  464: sub-section, closed by a section or
1.39      kristaps  465: .Sx \&SS ;
1.30      kristaps  466: part, closed by a section, sub-section, or
1.39      kristaps  467: .Sx \&RE ;
1.30      kristaps  468: or paragraph, closed by a section, sub-section, part,
1.39      kristaps  469: .Sx \&HP ,
                    470: .Sx \&IP ,
                    471: .Sx \&LP ,
                    472: .Sx \&P ,
                    473: .Sx \&PP ,
1.30      kristaps  474: or
1.39      kristaps  475: .Sx \&TP .
1.30      kristaps  476: No closure refers to an explicit block closing macro.
1.32      kristaps  477: .
                    478: .Pp
                    479: .Bl -column "MacroX" "ArgumentsX" "Head ScopeX" "sub-sectionX" -compact -offset indent
                    480: .It Em Macro Ta Em Arguments Ta Em Head Scope Ta Em Body Scope
1.39      kristaps  481: .It Sx \&HP  Ta    <2        Ta    current    Ta    paragraph
                    482: .It Sx \&IP  Ta    <3        Ta    current    Ta    paragraph
                    483: .It Sx \&LP  Ta    0         Ta    current    Ta    paragraph
                    484: .It Sx \&P   Ta    0         Ta    current    Ta    paragraph
                    485: .It Sx \&PP  Ta    0         Ta    current    Ta    paragraph
                    486: .It Sx \&RE  Ta    0         Ta    current    Ta    none
                    487: .It Sx \&RS  Ta    1         Ta    current    Ta    part
                    488: .It Sx \&SH  Ta    >0        Ta    next-line  Ta    section
                    489: .It Sx \&SS  Ta    >0        Ta    next-line  Ta    sub-section
                    490: .It Sx \&TP  Ta    n         Ta    next-line  Ta    paragraph
1.32      kristaps  491: .El
                    492: .
                    493: .Pp
1.22      kristaps  494: If a block macro is next-line scoped, it may only be followed by in-line
                    495: macros (excluding
1.39      kristaps  496: .Sx \&DT ,
1.40      kristaps  497: .Sx \&PD ,
1.39      kristaps  498: .Sx \&TH ,
                    499: .Sx \&UC ,
                    500: .Sx \&br ,
                    501: .Sx \&na ,
                    502: .Sx \&sp ,
                    503: .Sx \&nf ,
1.22      kristaps  504: and
1.39      kristaps  505: .Sx \&fi ) .
1.28      kristaps  506: .
                    507: .
1.22      kristaps  508: .Sh REFERENCE
                    509: This section is a canonical reference to all macros, arranged
                    510: alphabetically.  For the scoping of individual macros, see
1.32      kristaps  511: .Sx MACRO SYNTAX .
1.28      kristaps  512: .
1.39      kristaps  513: .Ss \&B
1.22      kristaps  514: Text is rendered in bold face.
1.39      kristaps  515: .Ss \&BI
1.22      kristaps  516: Text is rendered alternately in bold face and italic.  Thus,
1.32      kristaps  517: .Sq .BI this word and that
1.22      kristaps  518: causes
1.32      kristaps  519: .Sq this
1.22      kristaps  520: and
1.32      kristaps  521: .Sq and
1.22      kristaps  522: to render in bold face, while
1.32      kristaps  523: .Sq word
1.22      kristaps  524: and
1.32      kristaps  525: .Sq that
1.22      kristaps  526: render in italics.  Whitespace between arguments is omitted in output.
1.39      kristaps  527: .Ss \&BR
1.22      kristaps  528: Text is rendered alternately in bold face and roman (the default font).
                    529: Whitespace between arguments is omitted in output.
1.39      kristaps  530: .Ss \&DT
1.36      kristaps  531: Has no effect.  Included for compatibility.
1.39      kristaps  532: .Ss \&HP
1.23      kristaps  533: Begin a paragraph whose initial output line is left-justified, but
1.27      kristaps  534: subsequent output lines are indented, with the following syntax:
1.32      kristaps  535: .Bd -literal -offset indent
1.27      kristaps  536: \&.HP [width]
1.32      kristaps  537: .Ed
                    538: .
                    539: .Pp
1.38      kristaps  540: If scaling width
1.32      kristaps  541: .Va width
1.27      kristaps  542: is specified, it's saved for later paragraph left-margins; if
                    543: unspecified, the saved or default width is used.
1.39      kristaps  544: .Ss \&I
1.22      kristaps  545: Text is rendered in italics.
1.39      kristaps  546: .Ss \&IB
1.22      kristaps  547: Text is rendered alternately in italics and bold face.  Whitespace
                    548: between arguments is omitted in output.
1.39      kristaps  549: .Ss \&IP
1.25      kristaps  550: Begin a paragraph with the following syntax:
1.32      kristaps  551: .Bd -literal -offset indent
1.25      kristaps  552: \&.IP [head [width]]
1.32      kristaps  553: .Ed
                    554: .
                    555: .Pp
1.25      kristaps  556: This follows the behaviour of the
1.39      kristaps  557: .Sx \&TP
1.26      kristaps  558: except for the macro syntax (all arguments on the line, instead of
1.27      kristaps  559: having next-line scope).  If
1.32      kristaps  560: .Va width
1.27      kristaps  561: is specified, it's saved for later paragraph left-margins; if
                    562: unspecified, the saved or default width is used.
1.39      kristaps  563: .Ss \&IR
1.22      kristaps  564: Text is rendered alternately in italics and roman (the default font).
                    565: Whitespace between arguments is omitted in output.
1.39      kristaps  566: .Ss \&LP
1.22      kristaps  567: Begin an undecorated paragraph.  The scope of a paragraph is closed by a
1.27      kristaps  568: subsequent paragraph, sub-section, section, or end of file.  The saved
                    569: paragraph left-margin width is re-set to the default.
1.39      kristaps  570: .Ss \&P
                    571: Synonym for
                    572: .Sx \&LP .
                    573: .Ss \&PP
                    574: Synonym for
                    575: .Sx \&LP .
                    576: .Ss \&R
1.22      kristaps  577: Text is rendered in roman (the default font).
1.39      kristaps  578: .Ss \&RB
1.22      kristaps  579: Text is rendered alternately in roman (the default font) and bold face.
                    580: Whitespace between arguments is omitted in output.
1.39      kristaps  581: .Ss \&RE
1.30      kristaps  582: Explicitly close out the scope of a prior
1.39      kristaps  583: .Sx \&RS .
                    584: .Ss \&RI
1.22      kristaps  585: Text is rendered alternately in roman (the default font) and italics.
                    586: Whitespace between arguments is omitted in output.
1.39      kristaps  587: .Ss \&RS
1.30      kristaps  588: Begin a part setting the left margin.  The left margin controls the
                    589: offset, following an initial indentation, to un-indented text such as
                    590: that of
1.39      kristaps  591: .Sx \&PP .
1.38      kristaps  592: A scaling width may be specified as following:
1.32      kristaps  593: .Bd -literal -offset indent
1.30      kristaps  594: \&.RS [width]
1.32      kristaps  595: .Ed
                    596: .
                    597: .Pp
1.30      kristaps  598: If
1.32      kristaps  599: .Va width
1.30      kristaps  600: is not specified, the saved or default width is used.
1.39      kristaps  601: .Ss \&SB
1.22      kristaps  602: Text is rendered in small size (one point smaller than the default font)
                    603: bold face.
1.39      kristaps  604: .Ss \&SH
1.22      kristaps  605: Begin a section.  The scope of a section is only closed by another
1.27      kristaps  606: section or the end of file.  The paragraph left-margin width is re-set
                    607: to the default.
1.39      kristaps  608: .Ss \&SM
1.22      kristaps  609: Text is rendered in small size (one point smaller than the default
                    610: font).
1.39      kristaps  611: .Ss \&SS
1.22      kristaps  612: Begin a sub-section.  The scope of a sub-section is closed by a
1.27      kristaps  613: subsequent sub-section, section, or end of file.  The paragraph
                    614: left-margin width is re-set to the default.
1.39      kristaps  615: .Ss \&TH
1.22      kristaps  616: Sets the title of the manual page with the following syntax:
1.32      kristaps  617: .Bd -literal -offset indent
1.30      kristaps  618: \&.TH title section [date [source [volume]]]
1.32      kristaps  619: .Ed
                    620: .
                    621: .Pp
1.22      kristaps  622: At least the
1.32      kristaps  623: .Va title
1.22      kristaps  624: and
1.32      kristaps  625: .Va section
1.22      kristaps  626: arguments must be provided.  The
1.32      kristaps  627: .Va date
1.22      kristaps  628: argument should be formatted as
1.32      kristaps  629: .Qq %b [%d] %Y
1.22      kristaps  630: format, described in
1.32      kristaps  631: .Xr strptime 3 .
1.22      kristaps  632: The
1.32      kristaps  633: .Va source
1.22      kristaps  634: string specifies the organisation providing the utility.  The
1.32      kristaps  635: .Va volume
1.22      kristaps  636: replaces the default rendered volume as dictated by the manual section.
1.39      kristaps  637: .Ss \&TP
1.25      kristaps  638: Begin a paragraph where the head, if exceeding the indentation width, is
1.24      kristaps  639: followed by a newline; if not, the body follows on the same line after a
1.25      kristaps  640: buffer to the indentation width.  Subsequent output lines are indented.
1.32      kristaps  641: .
                    642: .Pp
1.38      kristaps  643: The indentation scaling width may be set as follows:
1.32      kristaps  644: .Bd -literal -offset indent
1.26      kristaps  645: \&.TP [width]
1.32      kristaps  646: .Ed
                    647: .
                    648: .Pp
1.38      kristaps  649: If
1.32      kristaps  650: .Va width
1.27      kristaps  651: is specified, it's saved for later paragraph left-margins; if
                    652: unspecified, the saved or default width is used.
1.40      kristaps  653: .Ss \&PD
                    654: Has no effect.  Included for compatibility.
1.39      kristaps  655: .Ss \&UC
1.37      kristaps  656: Has no effect.  Included for compatibility.
1.39      kristaps  657: .Ss \&br
1.22      kristaps  658: Breaks the current line.  Consecutive invocations have no further effect.
1.39      kristaps  659: .Ss \&fi
1.22      kristaps  660: End literal mode begun by
1.39      kristaps  661: .Sx \&nf .
                    662: .Ss \&i
1.22      kristaps  663: Italicise arguments.  If no arguments are specified, all subsequent text
                    664: is italicised.
1.39      kristaps  665: .Ss \&na
1.36      kristaps  666: Don't align to the right margin.
1.39      kristaps  667: .Ss \&nf
1.22      kristaps  668: Begin literal mode: all subsequent free-form lines have their end of
                    669: line boundaries preserved.  May be ended by
1.39      kristaps  670: .Sx \&fi .
                    671: .Ss \&r
1.22      kristaps  672: Fonts and styles (bold face, italics) reset to roman (default font).
1.39      kristaps  673: .Ss \&sp
1.22      kristaps  674: Insert n spaces, where n is the macro's positive numeric argument.  If
                    675: 0, this is equivalent to the
1.39      kristaps  676: .Sx \&br
1.22      kristaps  677: macro.
1.28      kristaps  678: .
                    679: .
1.18      kristaps  680: .Sh COMPATIBILITY
1.23      kristaps  681: This section documents compatibility with other roff implementations, at
                    682: this time limited to
1.32      kristaps  683: .Xr groff 1 .
                    684: .Bl -hyphen
                    685: .It
1.23      kristaps  686: In quoted literals, groff allowed pair-wise double-quotes to produce a
                    687: standalone double-quote in formatted output.  This idiosyncratic
                    688: behaviour is no longer applicable.
1.32      kristaps  689: .It
1.23      kristaps  690: The
1.32      kristaps  691: .Sq sp
1.23      kristaps  692: macro does not accept negative numbers.
1.32      kristaps  693: .It
1.23      kristaps  694: Blocks of whitespace are stripped from both macro and free-form text
                    695: lines (except when in literal mode), while groff would retain whitespace
                    696: in free-form text lines.
1.32      kristaps  697: .El
1.28      kristaps  698: .
                    699: .
1.1       kristaps  700: .Sh SEE ALSO
1.32      kristaps  701: .Xr mandoc 1 ,
                    702: .Xr mandoc_char 7
1.28      kristaps  703: .
                    704: .
1.1       kristaps  705: .Sh AUTHORS
                    706: The
1.32      kristaps  707: .Nm
1.23      kristaps  708: reference was written by
1.32      kristaps  709: .An Kristaps Dzonsons Aq kristaps@kth.se .
1.28      kristaps  710: .
                    711: .
1.1       kristaps  712: .Sh CAVEATS
                    713: Do not use this language.  Use
1.32      kristaps  714: .Xr mdoc 7 ,
1.1       kristaps  715: instead.
1.28      kristaps  716: .

CVSweb