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