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

Annotation of src/usr.bin/mandoc/mdoc.7, Revision 1.12

1.12    ! schwarze    1: .\"    $Id: mdoc.7,v 1.11 2009/08/09 21:59:41 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.
1.1       kristaps    8: .\"
1.2       schwarze    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.9       schwarze   16: .\"
1.11      schwarze   17: .Dd $Mdocdate: August 9 2009 $
1.2       schwarze   18: .Dt MDOC 7
1.1       kristaps   19: .Os
1.8       schwarze   20: .\" SECTION---------------------------------------------
1.1       kristaps   21: .Sh NAME
                     22: .Nm mdoc
                     23: .Nd mdoc language reference
1.8       schwarze   24: .\" SECTION---------------------------------------------
1.1       kristaps   25: .Sh DESCRIPTION
                     26: The
                     27: .Nm mdoc
1.9       schwarze   28: language is used to format
                     29: .Bx
1.1       kristaps   30: .Ux
1.8       schwarze   31: manuals.  In this reference document, we describe its syntax, structure,
                     32: and usage.  Our reference implementation is
1.3       schwarze   33: .Xr mandoc 1 .
                     34: The
                     35: .Sx COMPATIBILITY
1.9       schwarze   36: section describes compatibility with
1.3       schwarze   37: .Xr groff 1 .
1.8       schwarze   38: .\" PARAGRAPH------------
1.1       kristaps   39: .Pp
                     40: An
                     41: .Nm
                     42: document follows simple rules:  lines beginning with the control
1.9       schwarze   43: character
1.1       kristaps   44: .Sq \.
                     45: are parsed for macros.  Other lines are interpreted within the scope of
                     46: prior macros:
1.8       schwarze   47: .Bd -literal -offset indent
1.1       kristaps   48: \&.Sh Macro lines change control state.
                     49: Other lines are interpreted within the current state.
                     50: .Ed
1.8       schwarze   51: .\" SECTION---------------------------------------------
1.9       schwarze   52: .Sh LANGUAGE SYNTAX
1.1       kristaps   53: .Nm
                     54: documents may contain only graphable 7-bit ASCII characters, the space
1.8       schwarze   55: character, and, in certain circumstances, the tab character.  All
                     56: manuals must have
                     57: .Ux
1.9       schwarze   58: line terminators.
1.8       schwarze   59: .\" SUB-SECTION----------------------
1.4       schwarze   60: .Ss Comments
1.8       schwarze   61: Text following a
                     62: .Sq \e" ,
                     63: whether in a macro or free-form text line, is ignored to the end of
                     64: line.  A macro line with only a control character and comment escape,
                     65: .Sq \&.\e" ,
                     66: is also ignored.
                     67: .\" SUB-SECTION----------------------
1.1       kristaps   68: .Ss Reserved Characters
                     69: Within a macro line, the following characters are reserved:
1.8       schwarze   70: .Bl -tag -width Ds -offset indent -compact
1.1       kristaps   71: .It \&.
                     72: .Pq period
                     73: .It \&,
                     74: .Pq comma
                     75: .It \&:
                     76: .Pq colon
                     77: .It \&;
                     78: .Pq semicolon
                     79: .It \&(
                     80: .Pq left-parenthesis
                     81: .It \&)
                     82: .Pq right-parenthesis
                     83: .It \&[
                     84: .Pq left-bracket
                     85: .It \&]
                     86: .Pq right-bracket
                     87: .It \&?
                     88: .Pq question
                     89: .It \&!
1.9       schwarze   90: .Pq exclamation
1.3       schwarze   91: .It \&|
1.9       schwarze   92: .Pq vertical bar
1.1       kristaps   93: .El
1.8       schwarze   94: .\" PARAGRAPH------------
1.1       kristaps   95: .Pp
                     96: Use of reserved characters is described in
1.8       schwarze   97: .Sx MACRO SYNTAX .
                     98: For general use in macro lines, these characters must either be escaped
                     99: with a non-breaking space
1.1       kristaps  100: .Pq Sq \e&
1.9       schwarze  101: or, if applicable, an appropriate escape sequence used.
1.8       schwarze  102: .\" SUB-SECTION----------------------
1.1       kristaps  103: .Ss Special Characters
1.8       schwarze  104: Special characters may occur in both macro and free-form lines.
                    105: Sequences begin with the escape character
1.1       kristaps  106: .Sq \e
1.9       schwarze  107: followed by either an open-parenthesis
1.1       kristaps  108: .Sq \&(
                    109: for two-character sequences; an open-bracket
                    110: .Sq \&[
                    111: for n-character sequences (terminated at a close-bracket
                    112: .Sq \&] ) ;
1.8       schwarze  113: or a single one-character sequence.  See
                    114: .Xr mandoc_char 1
1.9       schwarze  115: for a complete list.  Examples include
                    116: .Sq \e(em
                    117: .Pq em-dash
                    118: and
1.8       schwarze  119: .Sq \ee
                    120: .Pq back-slash .
                    121: .\" PARAGRAPH------------
1.1       kristaps  122: .Pp
1.8       schwarze  123: An alternative escape sequence is
                    124: the slash-asterisk,
1.1       kristaps  125: .Sq \e* ,
1.8       schwarze  126: but this method is discouraged for compatibility reasons.
                    127: .\" PARAGRAPH------------
1.7       schwarze  128: .Pp
1.8       schwarze  129: Terms may
                    130: also be text-decorated using the
1.7       schwarze  131: .Sq \ef
1.8       schwarze  132: escape followed by an indicator: B (bold), I, (italic), or P and R
                    133: (Roman, or reset).  This form is not recommended.
                    134: .\" SUB-SECTION----------------------
1.7       schwarze  135: .Ss Whitespace
1.9       schwarze  136: In non-literal free-form lines, consecutive blocks of whitespace are
                    137: pruned from input and added later in the output filter, if applicable:
                    138: .Bd -literal -offset indent
                    139: These     spaces   are    pruned       from    input.
                    140: \&.Bd \-literal
                    141: These         are              not.
                    142: \&.Ed
                    143: .Ed
                    144: .\" PARAGRAPH------------
                    145: .Pp
                    146: In macro lines, whitespace delimits arguments and is discarded.  If
                    147: arguments are quoted, whitespace within the quotes is retained.
1.8       schwarze  148: .\" PARAGRAPH------------
                    149: .Pp
1.9       schwarze  150: Blank lines are only permitted within literal contexts, as are lines
                    151: containing only whitespace.  Tab characters are only acceptable when
                    152: delimiting
1.8       schwarze  153: .Sq \&Bl \-column
1.9       schwarze  154: or when in a literal context.
                    155: .\" SUB-SECTION----------------------
                    156: .Ss Quotation
                    157: Macro arguments may be quoted with a double-quote to group
                    158: space-delimited terms or to retain blocks of whitespace.  A quoted
                    159: argument begins with a double-quote preceded by whitespace.  The next
                    160: double-quote not pair-wise adjacent to another double-quote terminates
                    161: the literal, regardless of surrounding whitespace.
                    162: .\" PARAGRAPH------------
                    163: .Pp
                    164: This produces tokens
                    165: .Sq a" ,
                    166: .Sq b c ,
                    167: .Sq de ,
                    168: and
                    169: .Sq fg" .
                    170: Note that any quoted term, be it argument or macro, is indiscriminately
                    171: considered literal text.  Thus, the following produces
                    172: .Sq \&Em a :
                    173: .Bd -literal -offset indent
                    174: \&.Em "Em a"
                    175: .Ed
                    176: .\" PARAGRAPH------------
                    177: .Pp
                    178: In free-form mode, quotes are regarded as opaque text.
1.8       schwarze  179: .\" SECTION---------------------------------------------
                    180: .Sh MANUAL STRUCTURE
1.6       schwarze  181: Each
                    182: .Nm
1.9       schwarze  183: document must begin with a document prologue, containing, in order,
1.8       schwarze  184: .Sq \&Dd ,
                    185: .Sq \&Dt ,
1.6       schwarze  186: and
1.9       schwarze  187: .Sq \&Os ,
                    188: then the NAME section containing at least one
                    189: .Sq \&Nm
                    190: followed by
                    191: .Sq \&Nd :
1.8       schwarze  192: .Bd -literal -offset indent
                    193: \&.Dd $\&Mdocdate$
                    194: \&.Dt mdoc 7
                    195: \&.Os
                    196: \&.Sh NAME
                    197: \&.Nm mdoc
                    198: \&.Nd mdoc language reference
                    199: .Ed
                    200: .\" PARAGRAPH------------
                    201: .Pp
                    202: Subsequent SYNOPSIS and DESCRIPTION sections are strongly encouraged,
1.9       schwarze  203: but non-compulsory.
1.8       schwarze  204: .\" SECTION---------------------------------------------
                    205: .Sh MACRO SYNTAX
1.9       schwarze  206: Every line beginning with the control character
1.8       schwarze  207: .Sq \.
1.9       schwarze  208: is processed for macros, two- or three-character sequences.
1.8       schwarze  209: .\" PARAGRAPH------------
1.6       schwarze  210: .Pp
1.9       schwarze  211: The syntax of a macro depends on its classification.  In this section,
                    212: .Sq \-arg
1.8       schwarze  213: refers to macro arguments, which may be followed by zero or more
                    214: .Sq parm
                    215: parameters;
                    216: .Sq \&Yo
                    217: opens the scope of a macro; and if specified,
                    218: .Sq \&Yc
                    219: closes it out.
                    220: .\" PARAGRAPH------------
1.1       kristaps  221: .Pp
1.8       schwarze  222: The
                    223: .Em Callable
                    224: column indicates that the macro may be called subsequent to the initial
1.9       schwarze  225: line-macro.  The
                    226: .Em Parsable
1.8       schwarze  227: column indicates whether the macro may be followed by further
                    228: (ostensibly callable) macros.  The
                    229: .Em Scope
                    230: column, if applicable, describes closure rules.
                    231: .\" SUB-SECTION----------------------
                    232: .Ss Block full-explicit
                    233: Multi-line scope closed by an explicit closing macro.  All macros
                    234: contains bodies; only
                    235: .Pq Sq \&Bf
                    236: contains a head.
                    237: .Bd -literal -offset indent
1.9       schwarze  238: \&.Yo \(lB\-arg \(lBparm...\(rB\(rB \(lBhead...\(rB
                    239: \(lBbody...\(rB
1.1       kristaps  240: \&.Yc
                    241: .Ed
1.8       schwarze  242: .\" PARAGRAPH------------
1.1       kristaps  243: .Pp
1.8       schwarze  244: .Bl -column -compact -offset indent "MacroX" "CallableX" "ParsableX" "closed by XXX"
                    245: .It Em Macro Ta Em Callable Ta Em Parsable Ta Em Scope
                    246: .It \&Bd     Ta    \&No     Ta    \&No     Ta    closed by \&Ed
1.9       schwarze  247: .It \&Bf     Ta    \&No     Ta    \&No     Ta    closed by \&Ef
                    248: .It \&Bk     Ta    \&No     Ta    \&No     Ta    closed by \&Ek
                    249: .It \&Bl     Ta    \&No     Ta    \&No     Ta    closed by \&El
1.8       schwarze  250: .It \&Ed     Ta    \&No     Ta    \&No     Ta    opened by \&Bd
                    251: .It \&Ef     Ta    \&No     Ta    \&No     Ta    opened by \&Bf
                    252: .It \&Ek     Ta    \&No     Ta    \&No     Ta    opened by \&Bk
1.9       schwarze  253: .It \&El     Ta    \&No     Ta    \&No     Ta    opened by \&Bl
1.8       schwarze  254: .El
                    255: .\" SUB-SECTION----------------------
1.1       kristaps  256: .Ss Block full-implicit
1.8       schwarze  257: Multi-line scope closed by end-of-file or implicitly by another macro.
1.9       schwarze  258: All macros have bodies; some
1.1       kristaps  259: .Po
1.9       schwarze  260: .Sq \&It \-bullet ,
                    261: .Sq \-hyphen ,
1.1       kristaps  262: .Sq \-dash ,
                    263: .Sq \-enum ,
1.9       schwarze  264: .Sq \-item
1.1       kristaps  265: .Pc
1.9       schwarze  266: don't have heads, while
1.8       schwarze  267: .Sq \&It \-column
                    268: may have multiple heads.
                    269: .Bd -literal -offset indent
1.9       schwarze  270: \&.Yo \(lB\-arg \(lBparm...\(rB\(rB \(lBhead... \(lBTa head...\(rB\(rB
                    271: \(lBbody...\(rB
1.8       schwarze  272: .Ed
                    273: .\" PARAGRAPH------------
1.1       kristaps  274: .Pp
1.8       schwarze  275: .Bl -column -compact -offset indent "MacroX" "CallableX" "ParsableX" "closed by XXXXXXXXXXX"
                    276: .It Em Macro Ta Em Callable Ta Em Parsable Ta Em Scope
1.9       schwarze  277: .It \&It     Ta    \&No     Ta    Yes      Ta    closed by \&It, \&El
1.8       schwarze  278: .It \&Nd     Ta    \&No     Ta    \&No     Ta    closed by \&Sh
                    279: .It \&Sh     Ta    \&No     Ta    \&No     Ta    closed by \&Sh
                    280: .It \&Ss     Ta    \&No     Ta    \&No     Ta    closed by \&Sh, \&Ss
1.1       kristaps  281: .El
1.8       schwarze  282: .\" SUB-SECTION----------------------
                    283: .Ss Block partial-explicit
                    284: Like block full-explicit, but also with single-line scope.  Each
1.9       schwarze  285: has at least a body and, in limited circumstances, a head
1.8       schwarze  286: .Pq So \&Fo Sc , So \&Eo Sc
1.9       schwarze  287: and/or tail
1.8       schwarze  288: .Pq So \&Ec Sc .
                    289: .Bd -literal -offset indent
1.9       schwarze  290: \&.Yo \(lB\-arg \(lBparm...\(rB\(rB \(lBhead...\(rB
                    291: \(lBbody...\(rB
                    292: \&.Yc \(lBtail...\(rB
1.8       schwarze  293:
                    294: \&.Yo \(lB\-arg \(lBparm...\(rB\(rB \(lBhead...\(rB \
1.9       schwarze  295: \(lBbody...\(rB \&Yc \(lBtail...\(rB
1.8       schwarze  296: .Ed
                    297: .\" PARAGRAPH------------
1.1       kristaps  298: .Pp
1.8       schwarze  299: .Bl -column "MacroX" "CallableX" "ParsableX" "closed by XXXX" -compact -offset indent
1.1       kristaps  300: .It Em Macro Ta Em Callable Ta Em Parsable Ta Em Scope
1.9       schwarze  301: .It \&Ac     Ta    Yes      Ta    Yes      Ta    opened by \&Ao
1.8       schwarze  302: .It \&Ao     Ta    Yes      Ta    Yes      Ta    closed by \&Ac
                    303: .It \&Bc     Ta    Yes      Ta    Yes      Ta    closed by \&Bo
                    304: .It \&Bo     Ta    Yes      Ta    Yes      Ta    opened by \&Bc
1.9       schwarze  305: .It \&Brc    Ta    Yes      Ta    Yes      Ta    opened by \&Bro
                    306: .It \&Bro    Ta    Yes      Ta    Yes      Ta    closed by \&Brc
                    307: .It \&Dc     Ta    Yes      Ta    Yes      Ta    opened by \&Do
1.8       schwarze  308: .It \&Do     Ta    Yes      Ta    Yes      Ta    closed by \&Dc
1.9       schwarze  309: .It \&Ec     Ta    Yes      Ta    Yes      Ta    opened by \&Eo
                    310: .It \&Eo     Ta    Yes      Ta    Yes      Ta    closed by \&Ec
                    311: .It \&Fc     Ta    Yes      Ta    Yes      Ta    opened by \&Fo
                    312: .It \&Fo     Ta    \&No     Ta    \&No     Ta    closed by \&Fc
1.8       schwarze  313: .It \&Oc     Ta    Yes      Ta    Yes      Ta    closed by \&Oo
                    314: .It \&Oo     Ta    Yes      Ta    Yes      Ta    opened by \&Oc
1.9       schwarze  315: .It \&Pc     Ta    Yes      Ta    Yes      Ta    closed by \&Po
                    316: .It \&Po     Ta    Yes      Ta    Yes      Ta    opened by \&Pc
1.8       schwarze  317: .It \&Qc     Ta    Yes      Ta    Yes      Ta    opened by \&Oo
                    318: .It \&Qo     Ta    Yes      Ta    Yes      Ta    closed by \&Oc
                    319: .It \&Re     Ta    \&No     Ta    \&No     Ta    opened by \&Rs
                    320: .It \&Rs     Ta    \&No     Ta    \&No     Ta    closed by \&Re
1.9       schwarze  321: .It \&Sc     Ta    Yes      Ta    Yes      Ta    opened by \&So
                    322: .It \&So     Ta    Yes      Ta    Yes      Ta    closed by \&Sc
                    323: .It \&Xc     Ta    Yes      Ta    Yes      Ta    opened by \&Xo
                    324: .It \&Xo     Ta    Yes      Ta    Yes      Ta    closed by \&Xc
1.1       kristaps  325: .El
1.8       schwarze  326: .\" SUB-SECTION----------------------
1.1       kristaps  327: .Ss Block partial-implicit
1.9       schwarze  328: Like block full-implicit, but with single-line scope closed by
                    329: .Sx Reserved Characters
1.8       schwarze  330: or end of line.
                    331: .Bd -literal -offset indent
                    332: \&.Yo \(lB\-arg \(lBval...\(rB\(rB \(lBbody...\(rB \(lBres...\(rB
                    333: .Ed
                    334: .\" PARAGRAPH------------
1.1       kristaps  335: .Pp
1.8       schwarze  336: .Bl -column "MacroX" "CallableX" "ParsableX" -compact -offset indent
1.1       kristaps  337: .It Em Macro Ta Em Callable Ta Em Parsable
1.8       schwarze  338: .It \&Aq     Ta    Yes      Ta    Yes
                    339: .It \&Bq     Ta    Yes      Ta    Yes
1.9       schwarze  340: .It \&Brq    Ta    Yes      Ta    Yes
                    341: .It \&D1     Ta    \&No     Ta    \&Yes
                    342: .It \&Dl     Ta    \&No     Ta    Yes
1.8       schwarze  343: .It \&Dq     Ta    Yes      Ta    Yes
1.9       schwarze  344: .It \&Op     Ta    Yes      Ta    Yes
1.8       schwarze  345: .It \&Pq     Ta    Yes      Ta    Yes
1.9       schwarze  346: .It \&Ql     Ta    Yes      Ta    Yes
1.8       schwarze  347: .It \&Qq     Ta    Yes      Ta    Yes
                    348: .It \&Sq     Ta    Yes      Ta    Yes
                    349: .El
                    350: .\" SUB-SECTION----------------------
                    351: .Ss In-line
1.9       schwarze  352: Closed by
1.8       schwarze  353: .Sx Reserved Characters ,
                    354: end of line, fixed argument lengths, and/or subsequent macros.  In-line
                    355: macros have only text children.  If a number (or inequality) of
1.1       kristaps  356: arguments is
1.9       schwarze  357: .Pq n ,
1.1       kristaps  358: then the macro accepts an arbitrary number of arguments.
1.8       schwarze  359: .Bd -literal -offset indent
                    360: \&.Yo \(lB\-arg \(lBval...\(rB\(rB \(lBargs...\(rB \(lbres...\(rb
                    361:
                    362: \&.Yo \(lB\-arg \(lBval...\(rB\(rB \(lBargs...\(rB Yc...
                    363:
                    364: \&.Yo \(lB\-arg \(lBval...\(rB\(rB arg0 arg1 argN
                    365: .Ed
                    366: .\" PARAGRAPH------------
1.1       kristaps  367: .Pp
1.8       schwarze  368: .Bl -column "MacroX" "CallableX" "ParsableX" "Arguments" -compact -offset indent
1.1       kristaps  369: .It Em Macro Ta Em Callable Ta Em Parsable Ta Em Arguments
1.8       schwarze  370: .It \&%A     Ta    \&No     Ta    \&No     Ta    >0
                    371: .It \&%B     Ta    \&No     Ta    \&No     Ta    >0
                    372: .It \&%C     Ta    \&No     Ta    \&No     Ta    >0
                    373: .It \&%D     Ta    \&No     Ta    \&No     Ta    >0
                    374: .It \&%I     Ta    \&No     Ta    \&No     Ta    >0
                    375: .It \&%J     Ta    \&No     Ta    \&No     Ta    >0
                    376: .It \&%N     Ta    \&No     Ta    \&No     Ta    >0
                    377: .It \&%O     Ta    \&No     Ta    \&No     Ta    >0
                    378: .It \&%P     Ta    \&No     Ta    \&No     Ta    >0
                    379: .It \&%R     Ta    \&No     Ta    \&No     Ta    >0
                    380: .It \&%T     Ta    \&No     Ta    \&No     Ta    >0
                    381: .It \&%V     Ta    \&No     Ta    \&No     Ta    >0
1.9       schwarze  382: .It \&Ad     Ta    Yes      Ta    Yes      Ta    n
                    383: .It \&An     Ta    Yes      Ta    Yes      Ta    n
                    384: .It \&Ap     Ta    Yes      Ta    Yes      Ta    0
                    385: .It \&Ar     Ta    Yes      Ta    Yes      Ta    n
1.8       schwarze  386: .It \&At     Ta    Yes      Ta    Yes      Ta    1
                    387: .It \&Bsx    Ta    Yes      Ta    Yes      Ta    n
1.9       schwarze  388: .It \&Bt     Ta    \&No     Ta    \&No     Ta    0
1.8       schwarze  389: .It \&Bx     Ta    Yes      Ta    Yes      Ta    n
1.10      schwarze  390: .It \&Cd     Ta    Yes      Ta    Yes      Ta    >0
1.9       schwarze  391: .It \&Cm     Ta    Yes      Ta    Yes      Ta    n
1.8       schwarze  392: .It \&Db     Ta    \&No     Ta    \&No     Ta    1
1.9       schwarze  393: .It \&Dd     Ta    \&No     Ta    \&No     Ta    >0
                    394: .It \&Dt     Ta    \&No     Ta    \&No     Ta    n
                    395: .It \&Dv     Ta    Yes      Ta    Yes      Ta    n
                    396: .It \&Dx     Ta    Yes      Ta    Yes      Ta    n
1.8       schwarze  397: .It \&Em     Ta    Yes      Ta    Yes      Ta    >0
1.9       schwarze  398: .It \&En     Ta    \&No     Ta    \&No     Ta    0
                    399: .It \&Er     Ta    Yes      Ta    Yes      Ta    >0
                    400: .It \&Es     Ta    \&No     Ta    \&No     Ta    0
                    401: .It \&Ev     Ta    Yes      Ta    Yes      Ta    n
                    402: .It \&Ex     Ta    \&No     Ta    \&No     Ta    0
                    403: .It \&Fa     Ta    Yes      Ta    Yes      Ta    n
                    404: .It \&Fd     Ta    \&No     Ta    \&No     Ta    >0
                    405: .It \&Fl     Ta    Yes      Ta    Yes      Ta    n
                    406: .It \&Fn     Ta    Yes      Ta    Yes      Ta    >0
                    407: .It \&Fr     Ta    \&No     Ta    \&No     Ta    n
                    408: .It \&Ft     Ta    Yes      Ta    Yes      Ta    n
1.8       schwarze  409: .It \&Fx     Ta    Yes      Ta    Yes      Ta    n
1.9       schwarze  410: .It \&Hf     Ta    \&No     Ta    \&No     Ta    n
                    411: .It \&Ic     Ta    Yes      Ta    Yes      Ta    >0
                    412: .It \&In     Ta    \&No     Ta    \&No     Ta    n
                    413: .It \&Lb     Ta    \&No     Ta    \&No     Ta    1
                    414: .It \&Li     Ta    Yes      Ta    Yes      Ta    n
                    415: .It \&Lk     Ta    Yes      Ta    Yes      Ta    n
                    416: .It \&Lp     Ta    \&No     Ta    \&No     Ta    0
1.8       schwarze  417: .It \&Ms     Ta    Yes      Ta    Yes      Ta    >0
1.9       schwarze  418: .It \&Mt     Ta    Yes      Ta    Yes      Ta    >0
                    419: .It \&Nm     Ta    Yes      Ta    Yes      Ta    n
1.8       schwarze  420: .It \&No     Ta    Yes      Ta    Yes      Ta    0
                    421: .It \&Ns     Ta    Yes      Ta    Yes      Ta    0
                    422: .It \&Nx     Ta    Yes      Ta    Yes      Ta    n
1.9       schwarze  423: .It \&Os     Ta    \&No     Ta    \&No     Ta    n
                    424: .It \&Ot     Ta    \&No     Ta    \&No     Ta    n
1.8       schwarze  425: .It \&Ox     Ta    Yes      Ta    Yes      Ta    n
1.9       schwarze  426: .It \&Pa     Ta    Yes      Ta    Yes      Ta    n
1.8       schwarze  427: .It \&Pf     Ta    \&No     Ta    Yes      Ta    1
1.9       schwarze  428: .It \&Pp     Ta    \&No     Ta    \&No     Ta    0
                    429: .It \&Rv     Ta    \&No     Ta    \&No     Ta    0
1.8       schwarze  430: .It \&Sm     Ta    \&No     Ta    \&No     Ta    1
1.9       schwarze  431: .It \&St     Ta    \&No     Ta    Yes      Ta    1
1.8       schwarze  432: .It \&Sx     Ta    Yes      Ta    Yes      Ta    >0
                    433: .It \&Sy     Ta    Yes      Ta    Yes      Ta    >0
                    434: .It \&Tn     Ta    Yes      Ta    Yes      Ta    >0
1.9       schwarze  435: .It \&Ud     Ta    \&No     Ta    \&No     Ta    0
1.8       schwarze  436: .It \&Ux     Ta    Yes      Ta    Yes      Ta    n
1.9       schwarze  437: .It \&Va     Ta    Yes      Ta    Yes      Ta    n
                    438: .It \&Vt     Ta    Yes      Ta    Yes      Ta    >0
                    439: .It \&Xr     Ta    Yes      Ta    Yes      Ta    >0, <3
                    440: .It \&br     Ta    \&No     Ta    \&No     Ta    0
                    441: .It \&sp     Ta    \&No     Ta    \&No     Ta    1
1.1       kristaps  442: .El
1.8       schwarze  443: .\" SECTION---------------------------------------------
1.1       kristaps  444: .Sh COMPATIBILITY
1.3       schwarze  445: This section documents compatibility with other roff implementations, at
1.9       schwarze  446: this time limited to
1.3       schwarze  447: .Xr groff 1 .
1.9       schwarze  448: The term
1.3       schwarze  449: .Qq historic groff
1.9       schwarze  450: refers to those versions before the
1.3       schwarze  451: .Pa doc.tmac
1.9       schwarze  452: file re-write
1.3       schwarze  453: .Pq somewhere between 1.15 and 1.19 .
1.8       schwarze  454: .\" PARAGRAPH------------
1.1       kristaps  455: .Pp
                    456: .Bl -dash -compact
1.12    ! schwarze  457: .\" LIST-ITEM
        !           458: .It
        !           459: The POSIX.1
        !           460: .Sq \&St
        !           461: macro produce
        !           462: .Dq POSIX
        !           463: instead of
        !           464: .Dq POSIX.1 .
1.11      schwarze  465: .\" LIST-ITEM
                    466: .It
                    467: The
                    468: .Sq \-split
                    469: or
                    470: .Sq \-nosplit
                    471: argument to
                    472: .Sq \&An
                    473: applies to the whole document, not just to the current section as it
                    474: does in groff.
1.1       kristaps  475: .\" LIST-ITEM
                    476: .It
1.9       schwarze  477: In quoted literals, groff allowed pair-wise double-quotes to produce a
                    478: standalone double-quote in formatted output.  This idiosyncratic
                    479: behaviour is no longer applicable.
                    480: .\" LIST-ITEM
                    481: .It
                    482: The
                    483: .Sq \&sp
                    484: macro does not accept negative numbers.
                    485: .\" LIST-ITEM
                    486: .It
1.7       schwarze  487: Some character sequences in groff are not handled depending on escape
1.9       schwarze  488: style, e.g.,
1.7       schwarze  489: .Sq \e(ba
                    490: and
                    491: .Sq \e*(Ba
                    492: may not be interchanged.  This is no longer the case: all character
                    493: sequences resolve to the same symbol, regardless the escape style.
                    494: .\" LIST-ITEM
                    495: .It
                    496: Blocks of whitespace are stripped from both macro and free-form text
                    497: lines (except when in literal mode), while groff would retain whitespace
                    498: in free-form text lines.
                    499: .\" LIST-ITEM
                    500: .It
1.3       schwarze  501: Historic groff has many un-callable macros.  Most of these (excluding
                    502: some block-level macros) are now callable, conforming to the
                    503: non-historic groff version.
                    504: .\" LIST-ITEM
                    505: .It
1.9       schwarze  506: The vertical bar
1.7       schwarze  507: .Sq \(ba
1.3       schwarze  508: made historic groff
                    509: .Qq go orbital
                    510: but is a proper delimiter in this implementation.
1.1       kristaps  511: .\" LIST-ITEM
                    512: .It
1.9       schwarze  513: .Sq \&It \-nested
1.3       schwarze  514: is assumed for all lists (it wasn't in historic groff): any list may be
                    515: nested and
1.1       kristaps  516: .Sq \-enum
                    517: lists will restart the sequence only for the sub-list.
                    518: .\" LIST-ITEM
                    519: .It
1.9       schwarze  520: .Sq \&It \-column
1.3       schwarze  521: syntax where column widths may be preceded by other arguments (instead
1.1       kristaps  522: of proceeded) is not supported.
                    523: .\" LIST-ITEM
                    524: .It
1.9       schwarze  525: The
                    526: .Sq \&At
1.1       kristaps  527: macro only accepts a single parameter.
                    528: .\" LIST-ITEM
                    529: .It
                    530: Some manuals use
1.9       schwarze  531: .Sq \&Li
1.1       kristaps  532: incorrectly by following it with a reserved character and expecting the
                    533: delimiter to render.  This is not supported.
                    534: .\" LIST-ITEM
                    535: .It
1.7       schwarze  536: If an special-character control character is escaped
                    537: .Sq \e\e ,
                    538: it will obviously not render the subsequent sequence.  Even newer
                    539: versions of groff seem to dither on this.
1.8       schwarze  540: .\" LIST-ITEM
                    541: .It
1.9       schwarze  542: In groff, the
                    543: .Sq \&Fo
1.8       schwarze  544: macro only produces the first parameter.  This is no longer the case.
1.1       kristaps  545: .El
1.8       schwarze  546: .\" SECTION---------------------------------------------
1.1       kristaps  547: .Sh SEE ALSO
                    548: .Xr mandoc 1 ,
                    549: .Xr mandoc_char 7
1.8       schwarze  550: .\" SECTION---------------------------------------------
1.1       kristaps  551: .Sh AUTHORS
                    552: The
                    553: .Nm
1.9       schwarze  554: reference was written by
1.2       schwarze  555: .An Kristaps Dzonsons Aq kristaps@kth.se .
1.8       schwarze  556: .\" SECTION---------------------------------------------
1.1       kristaps  557: .Sh CAVEATS
1.2       schwarze  558: There are many ambiguous parts of mdoc.
1.8       schwarze  559: .\" PARAGRAPH------------
1.1       kristaps  560: .Pp
                    561: .Bl -dash -compact
                    562: .\" LIST-ITEM
                    563: .It
1.9       schwarze  564: .Sq \&Fa
                    565: should be
                    566: .Sq \&Va
1.1       kristaps  567: as function arguments are variables.
                    568: .\" LIST-ITEM
                    569: .It
1.9       schwarze  570: .Sq \&Ft
1.1       kristaps  571: should be
1.9       schwarze  572: .Sq \&Vt
1.1       kristaps  573: as function return types are still types.  Furthermore, the
1.9       schwarze  574: .Sq \&Ft
1.1       kristaps  575: should be removed and
1.9       schwarze  576: .Sq \&Fo ,
1.1       kristaps  577: which ostensibly follows it, should follow the same convention as
1.9       schwarze  578: .Sq \&Va .
1.1       kristaps  579: .\" LIST-ITEM
                    580: .It
1.9       schwarze  581: .Sq \&Va
1.1       kristaps  582: should formalise that only one or two arguments are acceptable: a
1.2       schwarze  583: variable name and optional, preceding type.
1.1       kristaps  584: .\" LIST-ITEM
                    585: .It
1.9       schwarze  586: .Sq \&Fd
1.1       kristaps  587: is ambiguous.  It's commonly used to indicate an include file in the
1.9       schwarze  588: synopsis section.
                    589: .Sq \&In
1.1       kristaps  590: should be used, instead.
                    591: .\" LIST-ITEM
                    592: .It
                    593: Only the
                    594: .Sq \-literal
                    595: argument to
1.9       schwarze  596: .Sq \&Bd
1.1       kristaps  597: makes sense.  The remaining ones should be removed.
                    598: .\" LIST-ITEM
                    599: .It
1.9       schwarze  600: The
                    601: .Sq \&Xo
1.1       kristaps  602: and
1.9       schwarze  603: .Sq \&Xc
1.1       kristaps  604: macros should be deprecated.
                    605: .\" LIST-ITEM
                    606: .It
                    607: The
1.9       schwarze  608: .Sq \&Dt
1.1       kristaps  609: macro lacks clarity.  It should be absolutely clear which title will
                    610: render when formatting the manual page.
                    611: .\" LIST-ITEM
                    612: .It
                    613: A
1.9       schwarze  614: .Sq \&Lx
                    615: should be provided for Linux (\(`a la
                    616: .Sq \&Ox ,
                    617: .Sq \&Nx
1.1       kristaps  618: etc.).
                    619: .\" LIST-ITEM
                    620: .It
                    621: There's no way to refer to references in
1.9       schwarze  622: .Sq \&Rs/Re
1.1       kristaps  623: blocks.
1.6       schwarze  624: .\" LIST-ITEM
                    625: .It
1.9       schwarze  626: The \-split and \-nosplit arguments to
                    627: .Sq \&An
1.6       schwarze  628: are inane.
1.1       kristaps  629: .El