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