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

Annotation of mandoc/man.7, Revision 1.140

1.140   ! schwarze    1: .\"    $Id: man.7,v 1.139 2018/08/18 02:08:27 schwarze Exp $
1.1       kristaps    2: .\"
1.115     schwarze    3: .\" Copyright (c) 2009, 2010, 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv>
1.139     schwarze    4: .\" Copyright (c) 2011-2015, 2017, 2018 Ingo Schwarze <schwarze@openbsd.org>
                      5: .\" Copyright (c) 2017 Anthony Bentley <bentley@openbsd.org>
1.122     schwarze    6: .\" Copyright (c) 2010 Joerg Sonnenberger <joerg@netbsd.org>
1.1       kristaps    7: .\"
                      8: .\" Permission to use, copy, modify, and distribute this software for any
1.10      kristaps    9: .\" purpose with or without fee is hereby granted, provided that the above
                     10: .\" copyright notice and this permission notice appear in all copies.
                     11: .\"
                     12: .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
                     13: .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
                     14: .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
                     15: .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
                     16: .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
                     17: .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
                     18: .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1.1       kristaps   19: .\"
1.140   ! schwarze   20: .Dd $Mdocdate: August 18 2018 $
1.9       kristaps   21: .Dt MAN 7
1.1       kristaps   22: .Os
                     23: .Sh NAME
1.32      kristaps   24: .Nm man
1.111     schwarze   25: .Nd legacy formatting language for manual pages
1.1       kristaps   26: .Sh DESCRIPTION
1.140   ! schwarze   27: The
1.32      kristaps   28: .Nm man
1.140   ! schwarze   29: language was the standard formatting language for
        !            30: .At
        !            31: manual pages from 1979 to 1989.
        !            32: Do not use it to write new manual pages: it is a purely presentational
        !            33: language and lacks support for semantic markup.
1.19      kristaps   34: Use the
1.32      kristaps   35: .Xr mdoc 7
1.1       kristaps   36: language, instead.
1.32      kristaps   37: .Pp
1.111     schwarze   38: In a
1.32      kristaps   39: .Nm
1.111     schwarze   40: document, lines beginning with the control character
1.32      kristaps   41: .Sq \&.
1.111     schwarze   42: are called
                     43: .Dq macro lines .
                     44: The first word is the macro name.
                     45: It usually consists of two capital letters.
1.140   ! schwarze   46: For a list of portable macros, see
1.111     schwarze   47: .Sx MACRO OVERVIEW .
                     48: The words following the macro name are arguments to the macro.
                     49: .Pp
                     50: Lines not beginning with the control character are called
                     51: .Dq text lines .
                     52: They provide free-form text to be printed; the formatting of the text
                     53: depends on the respective processing context:
1.32      kristaps   54: .Bd -literal -offset indent
1.1       kristaps   55: \&.SH Macro lines change control state.
1.106     kristaps   56: Text lines are interpreted within the current state.
1.32      kristaps   57: .Ed
1.103     kristaps   58: .Pp
1.111     schwarze   59: Many aspects of the basic syntax of the
1.103     kristaps   60: .Nm
1.111     schwarze   61: language are based on the
                     62: .Xr roff 7
                     63: language; see the
                     64: .Em LANGUAGE SYNTAX
1.106     kristaps   65: and
1.111     schwarze   66: .Em MACRO SYNTAX
                     67: sections in the
                     68: .Xr roff 7
                     69: manual for details, in particular regarding
                     70: comments, escape sequences, whitespace, and quoting.
1.140   ! schwarze   71: .Pp
1.16      kristaps   72: Each
1.32      kristaps   73: .Nm
1.140   ! schwarze   74: document starts with the
1.39      kristaps   75: .Sx \&TH
1.140   ! schwarze   76: macro specifying the document's name and section, followed by the
        !            77: .Sx NAME
        !            78: section formatted as follows:
1.32      kristaps   79: .Bd -literal -offset indent
1.140   ! schwarze   80: \&.TH PROGNAME 1 1979-01-10
1.22      kristaps   81: \&.SH NAME
1.124     schwarze   82: \efBprogname\efR \e(en one line about what it does
1.32      kristaps   83: .Ed
1.110     schwarze   84: .Sh MACRO OVERVIEW
                     85: This overview is sorted such that macros of similar purpose are listed
1.140   ! schwarze   86: together.
        !            87: Deprecated and non-portable macros are not included in the overview,
        !            88: but can be found in the alphabetical reference below.
1.110     schwarze   89: .Ss Page header and footer meta-data
1.140   ! schwarze   90: .Bl -column "RS, RE" description
        !            91: .It Sx TH Ta set the title: Ar name section date Op Ar source Op Ar volume
1.110     schwarze   92: .It Sx AT Ta display AT&T UNIX version in the page footer (<= 1 argument)
                     93: .It Sx UC Ta display BSD version in the page footer (<= 1 argument)
                     94: .El
                     95: .Ss Sections and paragraphs
1.140   ! schwarze   96: .Bl -column "RS, RE" description
1.110     schwarze   97: .It Sx SH Ta section header (one line)
                     98: .It Sx SS Ta subsection header (one line)
1.140   ! schwarze   99: .It Sx PP Ta start an undecorated paragraph (no arguments)
1.110     schwarze  100: .It Sx RS , RE Ta reset the left margin: Op Ar width
                    101: .It Sx IP Ta indented paragraph: Op Ar head Op Ar width
                    102: .It Sx TP Ta tagged paragraph: Op Ar width
                    103: .It Sx HP Ta hanged paragraph: Op Ar width
1.118     schwarze  104: .It Sx PD Ta set vertical paragraph distance: Op Ar height
1.110     schwarze  105: .It Sx fi , nf Ta fill mode and no-fill mode (no arguments)
                    106: .It Sx in Ta additional indent: Op Ar width
                    107: .El
                    108: .Ss Physical markup
1.140   ! schwarze  109: .Bl -column "RS, RE" description
1.110     schwarze  110: .It Sx B Ta boldface font
                    111: .It Sx I Ta italic font
                    112: .It Sx SB Ta small boldface font
                    113: .It Sx SM Ta small roman font
                    114: .It Sx BI Ta alternate between boldface and italic fonts
                    115: .It Sx BR Ta alternate between boldface and roman fonts
                    116: .It Sx IB Ta alternate between italic and boldface fonts
                    117: .It Sx IR Ta alternate between italic and roman fonts
                    118: .It Sx RB Ta alternate between roman and boldface fonts
                    119: .It Sx RI Ta alternate between roman and italic fonts
                    120: .El
1.111     schwarze  121: .Sh MACRO REFERENCE
1.22      kristaps  122: This section is a canonical reference to all macros, arranged
1.68      kristaps  123: alphabetically.
                    124: For the scoping of individual macros, see
1.32      kristaps  125: .Sx MACRO SYNTAX .
1.72      joerg     126: .Ss \&AT
                    127: Sets the volume for the footer for compatibility with man pages from
1.123     schwarze  128: .At
1.72      joerg     129: releases.
                    130: The optional arguments specify which release it is from.
1.39      kristaps  131: .Ss \&B
1.22      kristaps  132: Text is rendered in bold face.
1.39      kristaps  133: .Ss \&BI
1.68      kristaps  134: Text is rendered alternately in bold face and italic.
                    135: Thus,
1.32      kristaps  136: .Sq .BI this word and that
1.22      kristaps  137: causes
1.32      kristaps  138: .Sq this
1.22      kristaps  139: and
1.32      kristaps  140: .Sq and
1.55      kristaps  141: to render in bold face, while
1.32      kristaps  142: .Sq word
1.22      kristaps  143: and
1.32      kristaps  144: .Sq that
1.68      kristaps  145: render in italics.
                    146: Whitespace between arguments is omitted in output.
1.44      kristaps  147: .Pp
1.140   ! schwarze  148: Example:
1.46      kristaps  149: .Pp
1.93      kristaps  150: .Dl \&.BI bold italic bold italic
1.39      kristaps  151: .Ss \&BR
1.22      kristaps  152: Text is rendered alternately in bold face and roman (the default font).
                    153: Whitespace between arguments is omitted in output.
1.44      kristaps  154: See also
1.140   ! schwarze  155: .Sx \&BI .
1.39      kristaps  156: .Ss \&DT
1.135     schwarze  157: Restore the default tabulator positions.
                    158: They are at intervals of 0.5 inches.
                    159: This has no effect unless the tabulator positions were changed with the
                    160: .Xr roff 7
                    161: .Ic \&ta
                    162: request.
1.116     schwarze  163: .Ss \&EE
1.140   ! schwarze  164: This is a non-standard GNU extension.
1.116     schwarze  165: In
                    166: .Xr mandoc 1 ,
                    167: it does the same as
                    168: .Sx \&fi .
                    169: .Ss \&EX
1.140   ! schwarze  170: This is a non-standard GNU extension.
1.116     schwarze  171: In
                    172: .Xr mandoc 1 ,
                    173: it does the same as
                    174: .Sx \&nf .
1.39      kristaps  175: .Ss \&HP
1.23      kristaps  176: Begin a paragraph whose initial output line is left-justified, but
1.27      kristaps  177: subsequent output lines are indented, with the following syntax:
1.44      kristaps  178: .Bd -filled -offset indent
                    179: .Pf \. Sx \&HP
1.130     schwarze  180: .Op Ar width
1.32      kristaps  181: .Ed
1.44      kristaps  182: .Pp
                    183: The
1.130     schwarze  184: .Ar width
1.117     schwarze  185: argument is a
                    186: .Xr roff 7
                    187: scaling width.
1.44      kristaps  188: If specified, it's saved for later paragraph left-margins; if unspecified, the
                    189: saved or default width is used.
1.39      kristaps  190: .Ss \&I
1.22      kristaps  191: Text is rendered in italics.
1.39      kristaps  192: .Ss \&IB
1.80      kristaps  193: Text is rendered alternately in italics and bold face.
                    194: Whitespace between arguments is omitted in output.
1.44      kristaps  195: See also
1.140   ! schwarze  196: .Sx \&BI .
1.39      kristaps  197: .Ss \&IP
1.44      kristaps  198: Begin an indented paragraph with the following syntax:
                    199: .Bd -filled -offset indent
                    200: .Pf \. Sx \&IP
1.130     schwarze  201: .Op Ar head Op Ar width
1.32      kristaps  202: .Ed
1.44      kristaps  203: .Pp
                    204: The
1.130     schwarze  205: .Ar width
1.117     schwarze  206: argument is a
                    207: .Xr roff 7
                    208: scaling width defining the left margin.
1.44      kristaps  209: It's saved for later paragraph left-margins; if unspecified, the saved or
                    210: default width is used.
                    211: .Pp
                    212: The
1.130     schwarze  213: .Ar head
1.68      kristaps  214: argument is used as a leading term, flushed to the left margin.
                    215: This is useful for bulleted paragraphs and so on.
1.39      kristaps  216: .Ss \&IR
1.22      kristaps  217: Text is rendered alternately in italics and roman (the default font).
                    218: Whitespace between arguments is omitted in output.
1.44      kristaps  219: See also
1.140   ! schwarze  220: .Sx \&BI .
1.39      kristaps  221: .Ss \&LP
1.140   ! schwarze  222: A synonym for
        !           223: .Sx \&PP .
1.136     schwarze  224: .Ss \&ME
1.140   ! schwarze  225: End a mailto block started with
1.136     schwarze  226: .Sx \&MT .
1.140   ! schwarze  227: This is a non-standard GNU extension.
1.136     schwarze  228: .Ss \&MT
                    229: Begin a mailto block.
1.140   ! schwarze  230: This is a non-standard GNU extension.
1.136     schwarze  231: It has the following syntax:
                    232: .Bd -literal -offset indent
                    233: .Pf \. Sx \&MT Ar address
                    234: link description to be shown
                    235: .Pf \. Sx ME
                    236: .Ed
1.113     kristaps  237: .Ss \&OP
                    238: Optional command-line argument.
1.140   ! schwarze  239: This is a non-standard GNU extension.
1.114     schwarze  240: It has the following syntax:
1.113     kristaps  241: .Bd -filled -offset indent
                    242: .Pf \. Sx \&OP
1.130     schwarze  243: .Ar key Op Ar value
1.113     kristaps  244: .Ed
                    245: .Pp
                    246: The
1.130     schwarze  247: .Ar key
1.113     kristaps  248: is usually a command-line flag and
1.130     schwarze  249: .Ar value
1.113     kristaps  250: its argument.
1.39      kristaps  251: .Ss \&P
1.140   ! schwarze  252: A synonym for
        !           253: .Sx \&PP .
1.118     schwarze  254: .Ss \&PD
                    255: Specify the vertical space to be inserted before each new paragraph.
                    256: .br
                    257: The syntax is as follows:
                    258: .Bd -filled -offset indent
                    259: .Pf \. Sx \&PD
1.130     schwarze  260: .Op Ar height
1.118     schwarze  261: .Ed
                    262: .Pp
                    263: The
1.130     schwarze  264: .Ar height
1.118     schwarze  265: argument is a
                    266: .Xr roff 7
                    267: scaling width.
                    268: It defaults to
                    269: .Cm 1v .
                    270: If the unit is omitted,
                    271: .Cm v
                    272: is assumed.
                    273: .Pp
                    274: This macro affects the spacing before any subsequent instances of
                    275: .Sx \&HP ,
                    276: .Sx \&IP ,
                    277: .Sx \&LP ,
                    278: .Sx \&P ,
                    279: .Sx \&PP ,
                    280: .Sx \&SH ,
                    281: .Sx \&SS ,
1.140   ! schwarze  282: .Sx \&SY ,
1.44      kristaps  283: and
1.45      kristaps  284: .Sx \&TP .
1.39      kristaps  285: .Ss \&PP
1.140   ! schwarze  286: Begin an undecorated paragraph.
        !           287: The scope of a paragraph is closed by a subsequent paragraph,
        !           288: sub-section, section, or end of file.
        !           289: The saved paragraph left-margin width is reset to the default.
1.39      kristaps  290: .Ss \&RB
1.22      kristaps  291: Text is rendered alternately in roman (the default font) and bold face.
                    292: Whitespace between arguments is omitted in output.
1.44      kristaps  293: See also
1.140   ! schwarze  294: .Sx \&BI .
1.39      kristaps  295: .Ss \&RE
1.30      kristaps  296: Explicitly close out the scope of a prior
1.39      kristaps  297: .Sx \&RS .
1.129     schwarze  298: The default left margin is restored to the state before that
1.102     kristaps  299: .Sx \&RS
                    300: invocation.
1.129     schwarze  301: .Pp
                    302: The syntax is as follows:
                    303: .Bd -filled -offset indent
                    304: .Pf \. Sx \&RE
                    305: .Op Ar level
                    306: .Ed
                    307: .Pp
                    308: Without an argument, the most recent
                    309: .Sx \&RS
                    310: block is closed out.
                    311: If
                    312: .Ar level
                    313: is 1, all open
                    314: .Sx \&RS
                    315: blocks are closed out.
                    316: Otherwise,
                    317: .Ar level No \(mi 1
                    318: nested
                    319: .Sx \&RS
                    320: blocks remain open.
1.39      kristaps  321: .Ss \&RI
1.22      kristaps  322: Text is rendered alternately in roman (the default font) and italics.
                    323: Whitespace between arguments is omitted in output.
1.44      kristaps  324: See also
1.140   ! schwarze  325: .Sx \&BI .
1.39      kristaps  326: .Ss \&RS
1.102     kristaps  327: Temporarily reset the default left margin.
1.44      kristaps  328: This has the following syntax:
                    329: .Bd -filled -offset indent
1.102     kristaps  330: .Pf \. Sx \&RS
1.130     schwarze  331: .Op Ar width
1.32      kristaps  332: .Ed
1.44      kristaps  333: .Pp
                    334: The
1.130     schwarze  335: .Ar width
1.117     schwarze  336: argument is a
                    337: .Xr roff 7
                    338: scaling width.
1.55      kristaps  339: If not specified, the saved or default width is used.
1.102     kristaps  340: .Pp
                    341: See also
                    342: .Sx \&RE .
1.39      kristaps  343: .Ss \&SB
1.22      kristaps  344: Text is rendered in small size (one point smaller than the default font)
                    345: bold face.
1.39      kristaps  346: .Ss \&SH
1.68      kristaps  347: Begin a section.
                    348: The scope of a section is only closed by another section or the end of
                    349: file.
1.78      schwarze  350: The paragraph left-margin width is reset to the default.
1.39      kristaps  351: .Ss \&SM
1.22      kristaps  352: Text is rendered in small size (one point smaller than the default
                    353: font).
1.39      kristaps  354: .Ss \&SS
1.68      kristaps  355: Begin a sub-section.
                    356: The scope of a sub-section is closed by a subsequent sub-section,
                    357: section, or end of file.
1.78      schwarze  358: The paragraph left-margin width is reset to the default.
1.139     schwarze  359: .Ss \&SY
                    360: Begin a synopsis block with the following syntax:
                    361: .Bd -unfilled -offset indent
                    362: .Pf \. Sx \&SY Ar command
                    363: .Ar arguments
                    364: .Pf \. Sx \&YS
                    365: .Ed
                    366: .Pp
                    367: This is a non-standard GNU extension
                    368: and very rarely used even in GNU manual pages.
                    369: Formatting is similar to
                    370: .Sx \&IP .
1.39      kristaps  371: .Ss \&TH
1.140   ! schwarze  372: Set the name of the manual page for use in the page header
1.128     schwarze  373: and footer with the following syntax:
1.44      kristaps  374: .Bd -filled -offset indent
                    375: .Pf \. Sx \&TH
1.140   ! schwarze  376: .Ar name section date
1.99      schwarze  377: .Op Ar source Op Ar volume
1.44      kristaps  378: .Ed
1.43      kristaps  379: .Pp
1.99      schwarze  380: Conventionally, the document
1.140   ! schwarze  381: .Ar name
1.99      schwarze  382: is given in all caps.
                    383: The recommended
                    384: .Ar date
                    385: format is
                    386: .Sy YYYY-MM-DD
                    387: as specified in the ISO-8601 standard;
                    388: if the argument does not conform, it is printed verbatim.
                    389: If the
                    390: .Ar date
                    391: is empty or not specified, the current date is used.
                    392: The optional
                    393: .Ar source
1.68      kristaps  394: string specifies the organisation providing the utility.
1.128     schwarze  395: When unspecified,
                    396: .Xr mandoc 1
                    397: uses its
                    398: .Fl Ios
                    399: argument.
1.68      kristaps  400: The
1.99      schwarze  401: .Ar volume
1.43      kristaps  402: string replaces the default rendered volume, which is dictated by the
                    403: manual section.
                    404: .Pp
                    405: Examples:
1.46      kristaps  406: .Pp
1.93      kristaps  407: .Dl \&.TH CVS 5 "1992-02-12" GNU
1.39      kristaps  408: .Ss \&TP
1.25      kristaps  409: Begin a paragraph where the head, if exceeding the indentation width, is
1.24      kristaps  410: followed by a newline; if not, the body follows on the same line after a
1.68      kristaps  411: buffer to the indentation width.
                    412: Subsequent output lines are indented.
1.44      kristaps  413: The syntax is as follows:
                    414: .Bd -filled -offset indent
                    415: .Pf \. Sx \&TP
1.130     schwarze  416: .Op Ar width
1.32      kristaps  417: .Ed
                    418: .Pp
1.44      kristaps  419: The
1.130     schwarze  420: .Ar width
1.117     schwarze  421: argument is a
                    422: .Xr roff 7
                    423: scaling width.
1.44      kristaps  424: If specified, it's saved for later paragraph left-margins; if
1.27      kristaps  425: unspecified, the saved or default width is used.
1.138     schwarze  426: .Ss \&TQ
                    427: Like
                    428: .Sx \&TP ,
                    429: except that no vertical spacing is inserted before the paragraph.
1.140   ! schwarze  430: This is a non-standard GNU extension
        !           431: and very rarely used even in GNU manual pages.
1.72      joerg     432: .Ss \&UC
                    433: Sets the volume for the footer for compatibility with man pages from
1.120     schwarze  434: .Bx
                    435: releases.
1.72      joerg     436: The optional first argument specifies which release it is from.
1.121     schwarze  437: .Ss \&UE
1.140   ! schwarze  438: End a uniform resource identifier block started with
        !           439: .Sx \&UR .
        !           440: This is a non-standard GNU extension.
1.121     schwarze  441: .Ss \&UR
                    442: Begin a uniform resource identifier block.
1.140   ! schwarze  443: This is a non-standard GNU extension.
1.121     schwarze  444: It has the following syntax:
                    445: .Bd -literal -offset indent
                    446: .Pf \. Sx \&UR Ar uri
                    447: link description to be shown
                    448: .Pf \. Sx UE
                    449: .Ed
1.139     schwarze  450: .Ss \&YS
1.140   ! schwarze  451: End a synopsis block started with
        !           452: .Sx \&SY .
1.139     schwarze  453: This is a non-standard GNU extension.
1.39      kristaps  454: .Ss \&fi
1.140   ! schwarze  455: End literal mode started with
1.39      kristaps  456: .Sx \&nf .
1.79      kristaps  457: .Ss \&in
                    458: Indent relative to the current indentation:
                    459: .Pp
1.130     schwarze  460: .D1 Pf \. Sx \&in Op Ar width
1.79      kristaps  461: .Pp
                    462: If
1.130     schwarze  463: .Ar width
1.79      kristaps  464: is signed, the new offset is relative.
                    465: Otherwise, it is absolute.
                    466: This value is reset upon the next paragraph, section, or sub-section.
1.39      kristaps  467: .Ss \&nf
1.22      kristaps  468: Begin literal mode: all subsequent free-form lines have their end of
1.68      kristaps  469: line boundaries preserved.
                    470: May be ended by
1.39      kristaps  471: .Sx \&fi .
1.101     kristaps  472: Literal mode is implicitly ended by
                    473: .Sx \&SH
                    474: or
                    475: .Sx \&SS .
1.111     schwarze  476: .Sh MACRO SYNTAX
                    477: The
                    478: .Nm
                    479: macros are classified by scope: line scope or block scope.
                    480: Line macros are only scoped to the current line (and, in some
                    481: situations, the subsequent line).
                    482: Block macros are scoped to the current line and subsequent lines until
                    483: closed by another block macro.
                    484: .Ss Line Macros
                    485: Line macros are generally scoped to the current line, with the body
                    486: consisting of zero or more arguments.
                    487: If a macro is scoped to the next line and the line arguments are empty,
                    488: the next line, which must be text, is used instead.
                    489: Thus:
                    490: .Bd -literal -offset indent
                    491: \&.I
                    492: foo
                    493: .Ed
                    494: .Pp
                    495: is equivalent to
                    496: .Sq \&.I foo .
                    497: If next-line macros are invoked consecutively, only the last is used.
                    498: If a next-line macro is followed by a non-next-line macro, an error is
1.134     schwarze  499: raised.
1.111     schwarze  500: .Pp
                    501: The syntax is as follows:
                    502: .Bd -literal -offset indent
                    503: \&.YO \(lBbody...\(rB
                    504: \(lBbody...\(rB
                    505: .Ed
                    506: .Bl -column "MacroX" "ArgumentsX" "ScopeXXXXX" "CompatX" -offset indent
                    507: .It Em Macro Ta Em Arguments Ta Em Scope     Ta Em Notes
                    508: .It Sx \&AT  Ta    <=1       Ta    current   Ta    \&
                    509: .It Sx \&B   Ta    n         Ta    next-line Ta    \&
                    510: .It Sx \&BI  Ta    n         Ta    current   Ta    \&
                    511: .It Sx \&BR  Ta    n         Ta    current   Ta    \&
                    512: .It Sx \&DT  Ta    0         Ta    current   Ta    \&
1.140   ! schwarze  513: .It Sx \&EE  Ta    0         Ta    current   Ta    GNU
        !           514: .It Sx \&EX  Ta    0         Ta    current   Ta    GNU
1.111     schwarze  515: .It Sx \&I   Ta    n         Ta    next-line Ta    \&
                    516: .It Sx \&IB  Ta    n         Ta    current   Ta    \&
                    517: .It Sx \&IR  Ta    n         Ta    current   Ta    \&
1.140   ! schwarze  518: .It Sx \&OP  Ta    >=1       Ta    current   Ta    GNU
1.121     schwarze  519: .It Sx \&PD  Ta    1         Ta    current   Ta    \&
1.111     schwarze  520: .It Sx \&RB  Ta    n         Ta    current   Ta    \&
                    521: .It Sx \&RI  Ta    n         Ta    current   Ta    \&
                    522: .It Sx \&SB  Ta    n         Ta    next-line Ta    \&
                    523: .It Sx \&SM  Ta    n         Ta    next-line Ta    \&
                    524: .It Sx \&TH  Ta    >1, <6    Ta    current   Ta    \&
                    525: .It Sx \&UC  Ta    <=1       Ta    current   Ta    \&
1.140   ! schwarze  526: .It Sx \&fi  Ta    0         Ta    current   Ta    Xr roff 7
        !           527: .It Sx \&in  Ta    1         Ta    current   Ta    Xr roff 7
        !           528: .It Sx \&nf  Ta    0         Ta    current   Ta    Xr roff 7
1.111     schwarze  529: .El
                    530: .Ss Block Macros
                    531: Block macros comprise a head and body.
                    532: As with in-line macros, the head is scoped to the current line and, in
                    533: one circumstance, the next line (the next-line stipulations as in
                    534: .Sx Line Macros
                    535: apply here as well).
                    536: .Pp
                    537: The syntax is as follows:
                    538: .Bd -literal -offset indent
                    539: \&.YO \(lBhead...\(rB
                    540: \(lBhead...\(rB
                    541: \(lBbody...\(rB
                    542: .Ed
                    543: .Pp
                    544: The closure of body scope may be to the section, where a macro is closed
                    545: by
                    546: .Sx \&SH ;
                    547: sub-section, closed by a section or
                    548: .Sx \&SS ;
1.140   ! schwarze  549: or paragraph, closed by a section, sub-section,
1.111     schwarze  550: .Sx \&HP ,
                    551: .Sx \&IP ,
                    552: .Sx \&LP ,
                    553: .Sx \&P ,
                    554: .Sx \&PP ,
1.140   ! schwarze  555: .Sx \&RE ,
        !           556: .Sx \&SY ,
1.111     schwarze  557: or
                    558: .Sx \&TP .
                    559: No closure refers to an explicit block closing macro.
                    560: .Pp
                    561: As a rule, block macros may not be nested; thus, calling a block macro
                    562: while another block macro scope is open, and the open scope is not
                    563: implicitly closed, is syntactically incorrect.
                    564: .Bl -column "MacroX" "ArgumentsX" "Head ScopeX" "sub-sectionX" "compatX" -offset indent
                    565: .It Em Macro Ta Em Arguments Ta Em Head Scope Ta Em Body Scope  Ta Em Notes
                    566: .It Sx \&HP  Ta    <2        Ta    current    Ta    paragraph   Ta    \&
                    567: .It Sx \&IP  Ta    <3        Ta    current    Ta    paragraph   Ta    \&
                    568: .It Sx \&LP  Ta    0         Ta    current    Ta    paragraph   Ta    \&
1.140   ! schwarze  569: .It Sx \&ME  Ta    0         Ta    none       Ta    none        Ta    GNU
        !           570: .It Sx \&MT  Ta    1         Ta    current    Ta    to \&ME     Ta    GNU
1.111     schwarze  571: .It Sx \&P   Ta    0         Ta    current    Ta    paragraph   Ta    \&
                    572: .It Sx \&PP  Ta    0         Ta    current    Ta    paragraph   Ta    \&
1.140   ! schwarze  573: .It Sx \&RE  Ta    <=1       Ta    current    Ta    none        Ta    \&
        !           574: .It Sx \&RS  Ta    1         Ta    current    Ta    to \&RE     Ta    \&
1.111     schwarze  575: .It Sx \&SH  Ta    >0        Ta    next-line  Ta    section     Ta    \&
                    576: .It Sx \&SS  Ta    >0        Ta    next-line  Ta    sub-section Ta    \&
1.140   ! schwarze  577: .It Sx \&SY  Ta    1         Ta    current    Ta    to \&YS     Ta    GNU
1.111     schwarze  578: .It Sx \&TP  Ta    n         Ta    next-line  Ta    paragraph   Ta    \&
1.140   ! schwarze  579: .It Sx \&TQ  Ta    n         Ta    next-line  Ta    paragraph   Ta    GNU
        !           580: .It Sx \&UE  Ta    0         Ta    current    Ta    none        Ta    GNU
        !           581: .It Sx \&UR  Ta    1         Ta    current    Ta    part        Ta    GNU
        !           582: .It Sx \&YS  Ta    0         Ta    none       Ta    none        Ta    GNU
1.111     schwarze  583: .El
                    584: .Pp
                    585: If a block macro is next-line scoped, it may only be followed by in-line
                    586: macros for decorating text.
                    587: .Ss Font handling
                    588: In
                    589: .Nm
                    590: documents, both
                    591: .Sx Physical markup
                    592: macros and
                    593: .Xr roff 7
                    594: .Ql \ef
                    595: font escape sequences can be used to choose fonts.
                    596: In text lines, the effect of manual font selection by escape sequences
                    597: only lasts until the next macro invocation; in macro lines, it only lasts
                    598: until the end of the macro scope.
                    599: Note that macros like
                    600: .Sx \&BR
                    601: open and close a font scope for each argument.
1.1       kristaps  602: .Sh SEE ALSO
1.89      schwarze  603: .Xr man 1 ,
1.32      kristaps  604: .Xr mandoc 1 ,
1.98      kristaps  605: .Xr eqn 7 ,
1.89      schwarze  606: .Xr mandoc_char 7 ,
1.94      kristaps  607: .Xr mdoc 7 ,
                    608: .Xr roff 7 ,
                    609: .Xr tbl 7
1.78      schwarze  610: .Sh HISTORY
                    611: The
                    612: .Nm
                    613: language first appeared as a macro package for the roff typesetting
                    614: system in
                    615: .At v7 .
                    616: It was later rewritten by James Clark as a macro package for groff.
1.113     kristaps  617: Eric S. Raymond wrote the extended
                    618: .Nm
                    619: macros for groff in 2007.
1.78      schwarze  620: The stand-alone implementation that is part of the
                    621: .Xr mandoc 1
                    622: utility written by Kristaps Dzonsons appeared in
1.80      kristaps  623: .Ox 4.6 .
1.1       kristaps  624: .Sh AUTHORS
1.78      schwarze  625: This
1.32      kristaps  626: .Nm
1.23      kristaps  627: reference was written by
1.119     schwarze  628: .An Kristaps Dzonsons Aq Mt kristaps@bsd.lv .

CVSweb