Annotation of mandoc/mandoc.1, Revision 1.223
1.223 ! schwarze 1: .\" $Id: mandoc.1,v 1.222 2018/03/16 15:05:44 schwarze Exp $
1.1 kristaps 2: .\"
1.92 schwarze 3: .\" Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
1.222 schwarze 4: .\" Copyright (c) 2012, 2014-2018 Ingo Schwarze <schwarze@openbsd.org>
1.1 kristaps 5: .\"
6: .\" Permission to use, copy, modify, and distribute this software for any
1.16 kristaps 7: .\" purpose with or without fee is hereby granted, provided that the above
8: .\" copyright notice and this permission notice appear in all copies.
1.1 kristaps 9: .\"
1.16 kristaps 10: .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11: .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12: .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13: .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14: .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15: .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16: .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1.1 kristaps 17: .\"
1.223 ! schwarze 18: .Dd $Mdocdate: March 16 2018 $
1.14 kristaps 19: .Dt MANDOC 1
1.1 kristaps 20: .Os
21: .Sh NAME
22: .Nm mandoc
1.181 schwarze 23: .Nd format manual pages
1.1 kristaps 24: .Sh SYNOPSIS
25: .Nm mandoc
1.184 schwarze 26: .Op Fl ac
1.156 schwarze 27: .Op Fl I Cm os Ns = Ns Ar name
28: .Op Fl K Ar encoding
1.180 schwarze 29: .Op Fl mdoc | man
1.184 schwarze 30: .Op Fl O Ar options
1.156 schwarze 31: .Op Fl T Ar output
32: .Op Fl W Ar level
1.89 kristaps 33: .Op Ar
1.1 kristaps 34: .Sh DESCRIPTION
35: The
36: .Nm
1.26 kristaps 37: utility formats
1.8 kristaps 38: .Ux
1.57 kristaps 39: manual pages for display.
1.100 kristaps 40: .Pp
41: By default,
42: .Nm
43: reads
44: .Xr mdoc 7
45: or
46: .Xr man 7
1.180 schwarze 47: text from stdin and produces
1.156 schwarze 48: .Fl T Cm locale
1.100 kristaps 49: output.
50: .Pp
1.109 schwarze 51: The options are as follows:
1.19 kristaps 52: .Bl -tag -width Ds
1.107 schwarze 53: .It Fl a
54: If the standard output is a terminal device and
55: .Fl c
56: is not specified, use
57: .Xr more 1
58: to paginate the output, just like
59: .Xr man 1
60: would.
61: .It Fl c
62: Copy the formatted manual pages to the standard output without using
63: .Xr more 1
64: to paginate them.
65: This is the default.
66: It can be specified to override
67: .Fl a .
1.156 schwarze 68: .It Fl I Cm os Ns = Ns Ar name
1.101 schwarze 69: Override the default operating system
70: .Ar name
71: for the
72: .Xr mdoc 7
1.180 schwarze 73: .Ic \&Os
1.130 schwarze 74: and for the
75: .Xr man 7
1.180 schwarze 76: .Ic \&TH
1.101 schwarze 77: macro.
1.156 schwarze 78: .It Fl K Ar encoding
1.119 schwarze 79: Specify the input encoding.
80: The supported
81: .Ar encoding
82: arguments are
83: .Cm us-ascii ,
84: .Cm iso-8859-1 ,
85: and
86: .Cm utf-8 .
1.176 schwarze 87: If not specified, autodetection uses the first match in the following
88: list:
89: .Bl -enum
90: .It
91: If the first three bytes of the input file are the UTF-8 byte order
92: mark (BOM, 0xefbbbf), input is interpreted as
93: .Cm utf-8 .
94: .It
95: If the first or second line of the input file matches the
1.119 schwarze 96: .Sy emacs
97: mode line format
98: .Pp
99: .D1 .\e" -*- Oo ...; Oc coding: Ar encoding ; No -*-
1.176 schwarze 100: .Pp
101: then input is interpreted according to
102: .Ar encoding .
103: .It
104: If the first non-ASCII byte in the file introduces a valid UTF-8
105: sequence, input is interpreted as
106: .Cm utf-8 .
107: .It
108: Otherwise, input is interpreted as
109: .Cm iso-8859-1 .
1.119 schwarze 110: .El
1.180 schwarze 111: .It Fl mdoc | man
112: With
113: .Fl mdoc ,
114: all input files are interpreted as
115: .Xr mdoc 7 .
116: With
117: .Fl man ,
118: all input files are interpreted as
119: .Xr man 7 .
120: By default, the input language is automatically detected for each file:
1.221 schwarze 121: if the first macro is
1.180 schwarze 122: .Ic \&Dd
123: or
124: .Ic \&Dt ,
125: the
126: .Xr mdoc 7
127: parser is used; otherwise, the
128: .Xr man 7
129: parser is used.
130: With other arguments,
131: .Fl m
132: is silently ignored.
1.184 schwarze 133: .It Fl O Ar options
1.57 kristaps 134: Comma-separated output options.
1.156 schwarze 135: .It Fl T Ar output
1.57 kristaps 136: Output format.
137: See
1.1 kristaps 138: .Sx Output Formats
1.57 kristaps 139: for available formats.
140: Defaults to
1.156 schwarze 141: .Fl T Cm locale .
142: .It Fl W Ar level
1.77 schwarze 143: Specify the minimum message
144: .Ar level
145: to be reported on the standard error output and to affect the exit status.
146: The
147: .Ar level
148: can be
1.202 schwarze 149: .Cm base ,
1.185 schwarze 150: .Cm style ,
1.133 schwarze 151: .Cm warning ,
152: .Cm error ,
1.77 schwarze 153: or
1.202 schwarze 154: .Cm unsupp .
155: The
156: .Cm base
157: level automatically derives the operating system from the contents of the
158: .Ic \&Os
159: macro, from the
160: .Fl Ios
161: command line option, or from the
162: .Xr uname 3
163: return value.
164: The levels
165: .Cm openbsd
166: and
167: .Cm netbsd
168: are variants of
169: .Cm base
170: that bypass autodetection and request validation of base system
171: conventions for a particular operating system.
172: The level
1.132 schwarze 173: .Cm all
1.77 schwarze 174: is an alias for
1.202 schwarze 175: .Cm base .
1.132 schwarze 176: By default,
177: .Nm
178: is silent.
1.77 schwarze 179: See
180: .Sx EXIT STATUS
181: and
182: .Sx DIAGNOSTICS
183: for details.
184: .Pp
185: The special option
1.156 schwarze 186: .Fl W Cm stop
1.77 schwarze 187: tells
188: .Nm
189: to exit after parsing a file that causes warnings or errors of at least
190: the requested level.
191: No formatted output will be produced from that file.
192: If both a
193: .Ar level
194: and
195: .Cm stop
196: are requested, they can be joined with a comma, for example
1.156 schwarze 197: .Fl W Cm error , Ns Cm stop .
1.58 kristaps 198: .It Ar file
199: Read input from zero or more files.
1.57 kristaps 200: If unspecified, reads from stdin.
201: If multiple files are specified,
1.2 kristaps 202: .Nm
203: will halt with the first failed parse.
1.1 kristaps 204: .El
1.109 schwarze 205: .Pp
1.183 schwarze 206: The options
207: .Fl fhklw
208: are also supported and are documented in man(1).
1.109 schwarze 209: In
210: .Fl f
211: and
212: .Fl k
213: mode,
214: .Nm
215: also supports the options
1.183 schwarze 216: .Fl CMmOSs
1.109 schwarze 217: described in the
218: .Xr apropos 1
219: manual.
1.182 schwarze 220: The options
221: .Fl fkl
222: are mutually exclusive and override each other.
1.1 kristaps 223: .Ss Output Formats
224: The
225: .Nm
226: utility accepts the following
227: .Fl T
1.66 kristaps 228: arguments, which correspond to output modes:
1.175 schwarze 229: .Bl -tag -width "-T markdown"
1.156 schwarze 230: .It Fl T Cm ascii
1.81 kristaps 231: Produce 7-bit ASCII output.
1.57 kristaps 232: See
1.48 kristaps 233: .Sx ASCII Output .
1.156 schwarze 234: .It Fl T Cm html
1.116 kristaps 235: Produce HTML5, CSS1, and MathML output.
1.57 kristaps 236: See
1.48 kristaps 237: .Sx HTML Output .
1.156 schwarze 238: .It Fl T Cm lint
1.58 kristaps 239: Parse only: produce no output.
240: Implies
1.217 schwarze 241: .Fl W Cm all
242: and redirects parser messages, which usually appear
243: on standard error output, to standard output.
1.156 schwarze 244: .It Fl T Cm locale
1.93 schwarze 245: Encode output using the current locale.
1.128 schwarze 246: This is the default.
1.93 schwarze 247: See
248: .Sx Locale Output .
1.156 schwarze 249: .It Fl T Cm man
1.95 kristaps 250: Produce
1.91 schwarze 251: .Xr man 7
1.95 kristaps 252: format output.
253: See
254: .Sx Man Output .
1.175 schwarze 255: .It Fl T Cm markdown
256: Produce output in
257: .Sy markdown
258: format.
259: See
260: .Sx Markdown Output .
1.156 schwarze 261: .It Fl T Cm pdf
1.73 kristaps 262: Produce PDF output.
263: See
264: .Sx PDF Output .
1.156 schwarze 265: .It Fl T Cm ps
1.62 kristaps 266: Produce PostScript output.
267: See
268: .Sx PostScript Output .
1.156 schwarze 269: .It Fl T Cm tree
1.58 kristaps 270: Produce an indented parse tree.
1.161 schwarze 271: See
272: .Sx Syntax tree output .
1.156 schwarze 273: .It Fl T Cm utf8
1.93 schwarze 274: Encode output in the UTF\-8 multi-byte format.
275: See
276: .Sx UTF\-8 Output .
1.1 kristaps 277: .El
1.13 kristaps 278: .Pp
279: If multiple input files are specified, these will be processed by the
280: corresponding filter in-order.
1.66 kristaps 281: .Ss ASCII Output
282: Output produced by
1.156 schwarze 283: .Fl T Cm ascii
1.128 schwarze 284: is rendered in standard 7-bit ASCII documented in
1.66 kristaps 285: .Xr ascii 7 .
286: .Pp
287: Font styles are applied by using back-spaced encoding such that an
288: underlined character
289: .Sq c
290: is rendered as
291: .Sq _ Ns \e[bs] Ns c ,
292: where
293: .Sq \e[bs]
294: is the back-space character number 8.
295: Emboldened characters are rendered as
296: .Sq c Ns \e[bs] Ns c .
297: .Pp
298: The special characters documented in
299: .Xr mandoc_char 7
300: are rendered best-effort in an ASCII equivalent.
301: .Pp
302: The following
303: .Fl O
304: arguments are accepted:
1.19 kristaps 305: .Bl -tag -width Ds
1.98 schwarze 306: .It Cm indent Ns = Ns Ar indent
307: The left margin for normal text is set to
308: .Ar indent
309: blank characters instead of the default of five for
310: .Xr mdoc 7
311: and seven for
312: .Xr man 7 .
313: Increasing this is not recommended; it may result in degraded formatting,
1.99 schwarze 314: for example overfull lines or ugly line breaks.
1.223 ! schwarze 315: When output is to a pager on a terminal that is less than 66 columns
! 316: wide, the default is reduced to three columns.
1.218 schwarze 317: .It Cm mdoc
318: Format
319: .Xr man 7
320: input files in
321: .Xr mdoc 7
322: output style.
323: Specifically, this suppresses the two additional blank lines near the
324: top and the bottom of each page, and it implies
325: .Fl O Cm indent Ns =5 .
326: One useful application is for checking that
327: .Fl T Cm man
328: output formats in the same way as the
329: .Xr mdoc 7
330: source it was generated from.
1.66 kristaps 331: .It Cm width Ns = Ns Ar width
332: The output width is set to
1.223 ! schwarze 333: .Ar width
! 334: instead of the default of 78.
! 335: When output is to a pager on a terminal that is less than 79 columns
! 336: wide, the default is reduced to one less than the terminal width.
! 337: In any case, lines that are output in literal mode are never wrapped
! 338: and may exceed the output width.
1.1 kristaps 339: .El
1.66 kristaps 340: .Ss HTML Output
341: Output produced by
1.156 schwarze 342: .Fl T Cm html
1.114 kristaps 343: conforms to HTML5 using optional self-closing tags.
1.116 kristaps 344: Default styles use only CSS1.
345: Equations rendered from
346: .Xr eqn 7
347: blocks use MathML.
1.66 kristaps 348: .Pp
1.61 kristaps 349: The
1.164 schwarze 350: .Pa mandoc.css
1.83 kristaps 351: file documents style-sheet classes available for customising output.
352: If a style-sheet is not specified with
1.156 schwarze 353: .Fl O Cm style ,
354: .Fl T Cm html
1.114 kristaps 355: defaults to simple output (via an embedded style-sheet)
356: readable in any graphical or text-based web
1.83 kristaps 357: browser.
1.66 kristaps 358: .Pp
1.89 kristaps 359: Special characters are rendered in decimal-encoded UTF\-8.
1.66 kristaps 360: .Pp
361: The following
1.64 kristaps 362: .Fl O
1.66 kristaps 363: arguments are accepted:
1.37 kristaps 364: .Bl -tag -width Ds
1.94 kristaps 365: .It Cm fragment
1.123 schwarze 366: Omit the <!DOCTYPE> declaration and the <html>, <head>, and <body>
367: elements and only emit the subtree below the <body> element.
1.94 kristaps 368: The
369: .Cm style
1.97 schwarze 370: argument will be ignored.
1.94 kristaps 371: This is useful when embedding manual content within existing documents.
1.64 kristaps 372: .It Cm includes Ns = Ns Ar fmt
1.40 kristaps 373: The string
374: .Ar fmt ,
1.49 kristaps 375: for example,
1.40 kristaps 376: .Ar ../src/%I.html ,
377: is used as a template for linked header files (usually via the
1.180 schwarze 378: .Ic \&In
1.57 kristaps 379: macro).
380: Instances of
1.43 kristaps 381: .Sq \&%I
1.57 kristaps 382: are replaced with the include filename.
383: The default is not to present a
1.40 kristaps 384: hyperlink.
1.64 kristaps 385: .It Cm man Ns = Ns Ar fmt
1.39 kristaps 386: The string
387: .Ar fmt ,
1.49 kristaps 388: for example,
1.39 kristaps 389: .Ar ../html%S/%N.%S.html ,
390: is used as a template for linked manuals (usually via the
1.180 schwarze 391: .Ic \&Xr
1.57 kristaps 392: macro).
393: Instances of
1.43 kristaps 394: .Sq \&%N
1.40 kristaps 395: and
396: .Sq %S
397: are replaced with the linked manual's name and section, respectively.
1.57 kristaps 398: If no section is included, section 1 is assumed.
399: The default is not to
1.40 kristaps 400: present a hyperlink.
1.64 kristaps 401: .It Cm style Ns = Ns Ar style.css
1.58 kristaps 402: The file
403: .Ar style.css
404: is used for an external style-sheet.
405: This must be a valid absolute or
406: relative URI.
1.61 kristaps 407: .El
1.93 schwarze 408: .Ss Locale Output
409: Locale-depending output encoding is triggered with
1.156 schwarze 410: .Fl T Cm locale .
1.128 schwarze 411: This is the default.
412: .Pp
1.93 schwarze 413: This option is not available on all systems: systems without locale
414: support, or those whose internal representation is not natively UCS-4,
415: will fall back to
1.156 schwarze 416: .Fl T Cm ascii .
1.93 schwarze 417: See
418: .Sx ASCII Output
419: for font style specification and available command-line arguments.
1.95 kristaps 420: .Ss Man Output
421: Translate input format into
422: .Xr man 7
423: output format.
1.102 schwarze 424: This is useful for distributing manual sources to legacy systems
1.96 kristaps 425: lacking
1.95 kristaps 426: .Xr mdoc 7
427: formatters.
428: .Pp
429: If
430: .Xr mdoc 7
431: is passed as input, it is translated into
1.97 schwarze 432: .Xr man 7 .
433: If the input format is
1.95 kristaps 434: .Xr man 7 ,
1.97 schwarze 435: the input is copied to the output, expanding any
1.95 kristaps 436: .Xr roff 7
1.180 schwarze 437: .Ic so
1.97 schwarze 438: requests.
439: The parser is also run, and as usual, the
440: .Fl W
441: level controls which
442: .Sx DIAGNOSTICS
443: are displayed before copying the input to the output.
1.175 schwarze 444: .Ss Markdown Output
445: Translate
446: .Xr mdoc 7
447: input to the
448: .Sy markdown
449: format conforming to
450: .Lk http://daringfireball.net/projects/markdown/syntax.text\
451: "John Gruber's 2004 specification" .
1.178 schwarze 452: The output also almost conforms to the
453: .Lk http://commonmark.org/ CommonMark
454: specification.
455: .Pp
456: The character set used for the markdown output is ASCII.
457: Non-ASCII characters are encoded as HTML entities.
458: Since that is not possible in literal font contexts, because these
459: are rendered as code spans and code blocks in the markdown output,
460: non-ASCII characters are transliterated to ASCII approximations in
461: these contexts.
1.175 schwarze 462: .Pp
463: Markdown is a very weak markup language, so all semantic markup is
464: lost, and even part of the presentational markup may be lost.
465: Do not use this as an intermediate step in converting to HTML;
466: instead, use
467: .Fl T Cm html
468: directly.
469: .Pp
470: The
471: .Xr man 7 ,
472: .Xr tbl 7 ,
473: and
474: .Xr eqn 7
475: input languages are not supported by
476: .Fl T Cm markdown
477: output mode.
1.93 schwarze 478: .Ss PDF Output
479: PDF-1.1 output may be generated by
1.156 schwarze 480: .Fl T Cm pdf .
1.93 schwarze 481: See
482: .Sx PostScript Output
483: for
484: .Fl O
485: arguments and defaults.
1.62 kristaps 486: .Ss PostScript Output
1.65 kristaps 487: PostScript
488: .Qq Adobe-3.0
489: Level-2 pages may be generated by
1.156 schwarze 490: .Fl T Cm ps .
1.67 kristaps 491: Output pages default to letter sized and are rendered in the Times font
1.70 kristaps 492: family, 11-point.
493: Margins are calculated as 1/9 the page length and width.
1.71 kristaps 494: Line-height is 1.4m.
1.66 kristaps 495: .Pp
496: Special characters are rendered as in
497: .Sx ASCII Output .
498: .Pp
499: The following
500: .Fl O
501: arguments are accepted:
502: .Bl -tag -width Ds
503: .It Cm paper Ns = Ns Ar name
504: The paper size
505: .Ar name
506: may be one of
1.68 kristaps 507: .Ar a3 ,
508: .Ar a4 ,
509: .Ar a5 ,
510: .Ar legal ,
1.66 kristaps 511: or
512: .Ar letter .
1.68 kristaps 513: You may also manually specify dimensions as
514: .Ar NNxNN ,
515: width by height in millimetres.
516: If an unknown value is encountered,
517: .Ar letter
518: is used.
1.66 kristaps 519: .El
1.93 schwarze 520: .Ss UTF\-8 Output
521: Use
1.156 schwarze 522: .Fl T Cm utf8
1.93 schwarze 523: to force a UTF\-8 locale.
1.73 kristaps 524: See
1.93 schwarze 525: .Sx Locale Output
526: for details and options.
1.161 schwarze 527: .Ss Syntax tree output
528: Use
529: .Fl T Cm tree
530: to show a human readable representation of the syntax tree.
531: It is useful for debugging the source code of manual pages.
1.162 schwarze 532: The exact format is subject to change, so don't write parsers for it.
1.170 schwarze 533: .Pp
534: The first paragraph shows meta data found in the
535: .Xr mdoc 7
536: prologue, on the
537: .Xr man 7
538: .Ic \&TH
539: line, or the fallbacks used.
540: .Pp
541: In the tree dump, each output line shows one syntax tree node.
1.161 schwarze 542: Child nodes are indented with respect to their parent node.
543: The columns are:
544: .Pp
545: .Bl -enum -compact
546: .It
547: For macro nodes, the macro name; for text and
548: .Xr tbl 7
1.162 schwarze 549: nodes, the content.
550: There is a special format for
1.161 schwarze 551: .Xr eqn 7
552: nodes.
553: .It
554: Node type (text, elem, block, head, body, body-end, tail, tbl, eqn).
555: .It
556: Flags:
557: .Bl -dash -compact
558: .It
559: An opening parenthesis if the node is an opening delimiter.
560: .It
561: An asterisk if the node starts a new input line.
562: .It
563: The input line number (starting at one).
564: .It
565: A colon.
566: .It
567: The input column number (starting at one).
568: .It
569: A closing parenthesis if the node is a closing delimiter.
570: .It
571: A full stop if the node ends a sentence.
1.169 schwarze 572: .It
1.174 schwarze 573: BROKEN if the node is a block broken by another block.
574: .It
1.169 schwarze 575: NOSRC if the node is not in the input file,
576: but automatically generated from macros.
577: .It
578: NOPRT if the node is not supposed to generate output
579: for any output format.
1.161 schwarze 580: .El
1.174 schwarze 581: .El
582: .Pp
583: The following
584: .Fl O
585: argument is accepted:
586: .Bl -tag -width Ds
587: .It Cm noval
588: Skip validation and show the unvalidated syntax tree.
589: This can help to find out whether a given behaviour is caused by
590: the parser or by the validator.
591: Meta data is not available in this case.
1.161 schwarze 592: .El
1.108 schwarze 593: .Sh ENVIRONMENT
594: .Bl -tag -width MANPAGER
595: .It Ev MANPAGER
596: Any non-empty value of the environment variable
597: .Ev MANPAGER
1.179 schwarze 598: is used instead of the standard pagination program,
599: .Xr more 1 ;
600: see
601: .Xr man 1
602: for details.
603: Only used if
604: .Fl a
605: or
606: .Fl l
607: is specified.
1.108 schwarze 608: .It Ev PAGER
609: Specifies the pagination program to use when
610: .Ev MANPAGER
611: is not defined.
612: If neither PAGER nor MANPAGER is defined,
1.159 schwarze 613: .Xr more 1
614: .Fl s
1.179 schwarze 615: is used.
616: Only used if
617: .Fl a
618: or
619: .Fl l
620: is specified.
1.108 schwarze 621: .El
1.77 schwarze 622: .Sh EXIT STATUS
623: The
624: .Nm
625: utility exits with one of the following values, controlled by the message
626: .Ar level
627: associated with the
628: .Fl W
629: option:
630: .Pp
631: .Bl -tag -width Ds -compact
632: .It 0
1.202 schwarze 633: No base system convention violations, style suggestions, warnings,
634: or errors occurred, or those that did were ignored because they
635: were lower than the requested
1.77 schwarze 636: .Ar level .
1.185 schwarze 637: .It 1
1.202 schwarze 638: At least one base system convention violation or style suggestion
639: occurred, but no warning or error, and
640: .Fl W Cm base
641: or
1.185 schwarze 642: .Fl W Cm style
643: was specified.
1.77 schwarze 644: .It 2
645: At least one warning occurred, but no error, and
1.156 schwarze 646: .Fl W Cm warning
1.202 schwarze 647: or a lower
648: .Ar level
649: was requested.
1.77 schwarze 650: .It 3
1.133 schwarze 651: At least one parsing error occurred,
652: but no unsupported feature was encountered, and
1.156 schwarze 653: .Fl W Cm error
1.185 schwarze 654: or a lower
655: .Ar level
656: was requested.
1.133 schwarze 657: .It 4
1.134 schwarze 658: At least one unsupported feature was encountered, and
1.185 schwarze 659: .Fl W Cm unsupp
660: or a lower
661: .Ar level
662: was requested.
1.77 schwarze 663: .It 5
664: Invalid command line arguments were specified.
665: No input files have been read.
666: .It 6
1.131 schwarze 667: An operating system error occurred, for example exhaustion
668: of memory, file descriptors, or process table entries.
1.77 schwarze 669: Such errors cause
670: .Nm
671: to exit at once, possibly in the middle of parsing or formatting a file.
672: .El
673: .Pp
674: Note that selecting
1.156 schwarze 675: .Fl T Cm lint
1.77 schwarze 676: output mode implies
1.202 schwarze 677: .Fl W Cm all .
1.1 kristaps 678: .Sh EXAMPLES
1.13 kristaps 679: To page manuals to the terminal:
1.1 kristaps 680: .Pp
1.187 schwarze 681: .Dl $ mandoc -l mandoc.1 man.1 apropos.1 makewhatis.8
1.28 kristaps 682: .Pp
1.41 kristaps 683: To produce HTML manuals with
1.164 schwarze 684: .Pa mandoc.css
1.41 kristaps 685: as the style-sheet:
1.38 kristaps 686: .Pp
1.164 schwarze 687: .Dl $ mandoc \-T html -O style=mandoc.css mdoc.7 \*(Gt mdoc.7.html
1.38 kristaps 688: .Pp
1.28 kristaps 689: To check over a large set of manuals:
690: .Pp
1.158 schwarze 691: .Dl $ mandoc \-T lint \(gafind /usr/src -name \e*\e.[1-9]\(ga
1.66 kristaps 692: .Pp
693: To produce a series of PostScript manuals for A4 paper:
694: .Pp
1.156 schwarze 695: .Dl $ mandoc \-T ps \-O paper=a4 mdoc.7 man.7 \*(Gt manuals.ps
1.91 schwarze 696: .Pp
697: Convert a modern
698: .Xr mdoc 7
699: manual to the older
700: .Xr man 7
701: format, for use on systems lacking an
702: .Xr mdoc 7
703: parser:
704: .Pp
1.156 schwarze 705: .Dl $ mandoc \-T man foo.mdoc \*(Gt foo.man
1.77 schwarze 706: .Sh DIAGNOSTICS
1.106 schwarze 707: Messages displayed by
708: .Nm
709: follow this format:
1.202 schwarze 710: .Bd -ragged -offset indent
1.205 schwarze 711: .Nm :
1.202 schwarze 712: .Ar file : Ns Ar line : Ns Ar column : level : message : macro args
713: .Pq Ar os
714: .Ed
1.77 schwarze 715: .Pp
1.106 schwarze 716: Line and column numbers start at 1.
717: Both are omitted for messages referring to an input file as a whole.
718: Macro names and arguments are omitted where meaningless.
1.202 schwarze 719: The
720: .Ar os
721: operating system specifier is omitted for messages that are relevant
722: for all operating systems.
1.106 schwarze 723: Fatal messages about invalid command line arguments
724: or operating system errors, for example when memory is exhausted,
725: may also omit the
726: .Ar file
1.104 schwarze 727: and
1.106 schwarze 728: .Ar level
729: fields.
1.104 schwarze 730: .Pp
1.77 schwarze 731: Message levels have the following meanings:
732: .Bl -tag -width "warning"
1.133 schwarze 733: .It Cm unsupp
734: An input file uses unsupported low-level
735: .Xr roff 7
736: features.
737: The output may be incomplete and/or misformatted,
738: so using GNU troff instead of
739: .Nm
740: to process the file may be preferable.
1.77 schwarze 741: .It Cm error
1.216 schwarze 742: Indicates a risk of information loss or severe misformatting,
743: in most cases caused by serious syntax errors.
1.77 schwarze 744: .It Cm warning
1.216 schwarze 745: Indicates a risk that the information shown or its formatting
746: may mismatch the author's intent in minor ways.
747: Additionally, syntax errors are classified at least as warnings,
748: even if they do not usually cause misformatting.
1.185 schwarze 749: .It Cm style
750: An input file uses dubious or discouraged style.
751: This is not a complaint about the syntax, and probably neither
752: formatting nor portability are in danger.
753: While great care is taken to avoid false positives on the higher
754: message levels, the
755: .Cm style
756: level tries to reduce the probability that issues go unnoticed,
757: so it may occasionally issue bogus suggestions.
758: Please use your good judgement to decide whether any particular
759: .Cm style
760: suggestion really justifies a change to the input file.
1.202 schwarze 761: .It Cm base
1.219 schwarze 762: A convention used in the base system of a specific operating system
1.202 schwarze 763: is not adhered to.
764: These are not markup mistakes, and neither the quality of formatting
765: nor portability are in danger.
1.214 schwarze 766: Messages of the
767: .Cm base
768: level are printed with the more intuitive
769: .Cm style
770: .Ar level
771: tag.
1.77 schwarze 772: .El
773: .Pp
774: Messages of the
1.202 schwarze 775: .Cm base ,
1.185 schwarze 776: .Cm style ,
1.133 schwarze 777: .Cm warning ,
778: .Cm error ,
1.77 schwarze 779: and
1.133 schwarze 780: .Cm unsupp
1.131 schwarze 781: levels except those about non-existent or unreadable input files
782: are hidden unless their level, or a lower level, is requested using a
1.77 schwarze 783: .Fl W
784: option or
1.156 schwarze 785: .Fl T Cm lint
1.77 schwarze 786: output mode.
1.202 schwarze 787: .Pp
788: As indicated below, all
789: .Cm base
790: and some
791: .Cm style
792: checks are only performed if a specific operating system name occurs
793: in the arguments of the
794: .Fl W
795: command line option, of the
1.195 schwarze 796: .Ic \&Os
797: macro, of the
798: .Fl Ios
799: command line option, or, if neither are present, in the return value
800: of the
801: .Xr uname 3
802: function.
1.202 schwarze 803: .Ss Conventions for base system manuals
1.189 schwarze 804: .Bl -ohang
1.200 schwarze 805: .It Sy "Mdocdate found"
806: .Pq mdoc , Nx
807: The
808: .Ic \&Dd
809: macro uses CVS
810: .Ic Mdocdate
811: keyword substitution, which is not supported by the
812: .Nx
813: base system.
814: Consider using the conventional
815: .Dq "Month dd, yyyy"
816: format instead.
817: .It Sy "Mdocdate missing"
818: .Pq mdoc , Ox
819: The
820: .Ic \&Dd
821: macro does not use CVS
822: .Ic Mdocdate
823: keyword substitution, but using it is conventionally expected in the
824: .Ox
825: base system.
1.204 schwarze 826: .It Sy "unknown architecture"
827: .Pq mdoc , Ox , Nx
828: The third argument of the
829: .Ic \&Dt
830: macro does not match any of the architectures this operating system
831: is running on.
1.203 schwarze 832: .It Sy "operating system explicitly specified"
833: .Pq mdoc , Ox , Nx
834: The
835: .Ic \&Os
836: macro has an argument.
837: In the base system, it is conventionally left blank.
1.202 schwarze 838: .It Sy "RCS id missing"
839: .Pq Ox , Nx
840: The manual page lacks the comment line with the RCS identifier
841: generated by CVS
842: .Ic OpenBSD
843: or
844: .Ic NetBSD
845: keyword substitution as conventionally used in these operating systems.
1.210 schwarze 846: .It Sy "referenced manual not found"
847: .Pq mdoc
848: An
849: .Ic \&Xr
850: macro references a manual page that is not found in the base system.
851: The path to look for base system manuals is configurable at compile
852: time and defaults to
853: .Pa /usr/share/man : /usr/X11R6/man .
1.202 schwarze 854: .El
855: .Ss Style suggestions
856: .Bl -ohang
1.200 schwarze 857: .It Sy "legacy man(7) date format"
858: .Pq mdoc
859: The
860: .Ic \&Dd
861: macro uses the legacy
862: .Xr man 7
863: date format
864: .Dq yyyy-dd-mm .
865: Consider using the conventional
866: .Xr mdoc 7
867: date format
868: .Dq "Month dd, yyyy"
869: instead.
1.215 schwarze 870: .It Sy "lower case character in document title"
871: .Pq mdoc , man
872: The title is still used as given in the
873: .Ic \&Dt
874: or
875: .Ic \&TH
876: macro.
1.201 schwarze 877: .It Sy "duplicate RCS id"
878: A single manual page contains two copies of the RCS identifier for
879: the same operating system.
880: Consider deleting the later instance and moving the first one up
881: to the top of the page.
1.220 schwarze 882: .It Sy "possible typo in section name"
1.207 schwarze 883: .Pq mdoc
884: Fuzzy string matching revealed that the argument of an
885: .Ic \&Sh
886: macro is similar, but not identical to a standard section name.
1.215 schwarze 887: .It Sy "unterminated quoted argument"
888: .Pq roff
889: Macro arguments can be enclosed in double quote characters
890: such that space characters and macro names contained in the quoted
891: argument need not be escaped.
892: The closing quote of the last argument of a macro can be omitted.
893: However, omitting it is not recommended because it makes the code
894: harder to read.
1.189 schwarze 895: .It Sy "useless macro"
896: .Pq mdoc
897: A
898: .Ic \&Bt ,
899: .Ic \&Tn ,
900: or
1.190 schwarze 901: .Ic \&Ud
1.189 schwarze 902: macro was found.
1.190 schwarze 903: Simply delete it: it serves no useful purpose.
1.191 schwarze 904: .It Sy "consider using OS macro"
905: .Pq mdoc
906: A string was found in plain text or in a
907: .Ic \&Bx
908: macro that could be represented using
909: .Ic \&Ox ,
910: .Ic \&Nx ,
911: .Ic \&Fx ,
912: or
913: .Ic \&Dx .
1.195 schwarze 914: .It Sy "errnos out of order"
915: .Pq mdoc, Nx
916: The
917: .Ic \&Er
918: items in a
919: .Ic \&Bl
920: list are not in alphabetical order.
921: .It Sy "duplicate errno"
922: .Pq mdoc, Nx
923: A
924: .Ic \&Bl
925: list contains two consecutive
926: .Ic \&It
927: entries describing the same
928: .Ic \&Er
929: number.
1.213 schwarze 930: .It Sy "trailing delimiter"
1.192 schwarze 931: .Pq mdoc
1.213 schwarze 932: The last argument of an
933: .Ic \&Ex , \&Fo , \&Nd , \&Nm , \&Os , \&Sh , \&Ss , \&St ,
934: or
935: .Ic \&Sx
936: macro ends with a trailing delimiter.
937: This is usually bad style and often indicates typos.
938: Most likely, the delimiter can be removed.
1.197 schwarze 939: .It Sy "no blank before trailing delimiter"
1.198 schwarze 940: .Pq mdoc
1.197 schwarze 941: The last argument of a macro that supports trailing delimiter
942: arguments is longer than one byte and ends with a trailing delimiter.
943: Consider inserting a blank such that the delimiter becomes a separate
944: argument, thus moving it out of the scope of the macro.
1.215 schwarze 945: .It Sy "fill mode already enabled, skipping"
946: .Pq man
947: A
948: .Ic \&fi
949: request occurs even though the document is still in fill mode,
950: or already switched back to fill mode.
951: It has no effect.
952: .It Sy "fill mode already disabled, skipping"
953: .Pq man
954: An
955: .Ic \&nf
956: request occurs even though the document already switched to no-fill mode
957: and did not switch back to fill mode yet.
958: It has no effect.
1.222 schwarze 959: .It Sy "verbatim \(dq--\(dq, maybe consider using \e(em"
960: .Pq mdoc
961: Even though the ASCII output device renders an em-dash as
962: .Qq \-\- ,
963: that is not a good way to write it in an input file
964: because it renders poorly on all other output devices.
1.198 schwarze 965: .It Sy "function name without markup"
966: .Pq mdoc
967: A word followed by an empty pair of parentheses occurs on a text line.
968: Consider using an
969: .Ic \&Fn
970: or
971: .Ic \&Xr
972: macro.
1.215 schwarze 973: .It Sy "whitespace at end of input line"
974: .Pq mdoc , man , roff
975: Whitespace at the end of input lines is almost never semantically
976: significant \(em but in the odd case where it might be, it is
977: extremely confusing when reviewing and maintaining documents.
978: .It Sy "bad comment style"
979: .Pq roff
980: Comment lines start with a dot, a backslash, and a double-quote character.
981: The
982: .Nm
983: utility treats the line as a comment line even without the backslash,
984: but leaving out the backslash might not be portable.
1.189 schwarze 985: .El
1.106 schwarze 986: .Ss Warnings related to the document prologue
987: .Bl -ohang
988: .It Sy "missing manual title, using UNTITLED"
989: .Pq mdoc
990: A
991: .Ic \&Dt
992: macro has no arguments, or there is no
993: .Ic \&Dt
994: macro before the first non-prologue macro.
995: .It Sy "missing manual title, using \(dq\(dq"
996: .Pq man
997: There is no
998: .Ic \&TH
999: macro, or it has no arguments.
1000: .It Sy "missing manual section, using \(dq\(dq"
1001: .Pq mdoc , man
1002: A
1003: .Ic \&Dt
1004: or
1005: .Ic \&TH
1006: macro lacks the mandatory section argument.
1007: .It Sy "unknown manual section"
1008: .Pq mdoc
1009: The section number in a
1010: .Ic \&Dt
1011: line is invalid, but still used.
1012: .It Sy "missing date, using today's date"
1013: .Pq mdoc, man
1014: The document was parsed as
1015: .Xr mdoc 7
1016: and it has no
1017: .Ic \&Dd
1018: macro, or the
1019: .Ic \&Dd
1020: macro has no arguments or only empty arguments;
1021: or the document was parsed as
1022: .Xr man 7
1023: and it has no
1024: .Ic \&TH
1025: macro, or the
1026: .Ic \&TH
1027: macro has less than three arguments or its third argument is empty.
1028: .It Sy "cannot parse date, using it verbatim"
1029: .Pq mdoc , man
1030: The date given in a
1031: .Ic \&Dd
1032: or
1033: .Ic \&TH
1034: macro does not follow the conventional format.
1.212 schwarze 1035: .It Sy "date in the future, using it anyway"
1036: .Pq mdoc , man
1037: The date given in a
1038: .Ic \&Dd
1039: or
1040: .Ic \&TH
1041: macro is more than a day ahead of the current system
1042: .Xr time 3 .
1.106 schwarze 1043: .It Sy "missing Os macro, using \(dq\(dq"
1044: .Pq mdoc
1045: The default or current system is not shown in this case.
1046: .It Sy "late prologue macro"
1047: .Pq mdoc
1048: A
1049: .Ic \&Dd
1050: or
1051: .Ic \&Os
1052: macro occurs after some non-prologue macro, but still takes effect.
1053: .It Sy "prologue macros out of order"
1054: .Pq mdoc
1055: The prologue macros are not given in the conventional order
1056: .Ic \&Dd ,
1057: .Ic \&Dt ,
1058: .Ic \&Os .
1059: All three macros are used even when given in another order.
1060: .El
1061: .Ss Warnings regarding document structure
1062: .Bl -ohang
1063: .It Sy ".so is fragile, better use ln(1)"
1064: .Pq roff
1065: Including files only works when the parser program runs with the correct
1066: current working directory.
1067: .It Sy "no document body"
1068: .Pq mdoc , man
1069: The document body contains neither text nor macros.
1070: An empty document is shown, consisting only of a header and a footer line.
1071: .It Sy "content before first section header"
1072: .Pq mdoc , man
1073: Some macros or text precede the first
1074: .Ic \&Sh
1075: or
1076: .Ic \&SH
1077: section header.
1078: The offending macros and text are parsed and added to the top level
1079: of the syntax tree, outside any section block.
1080: .It Sy "first section is not NAME"
1081: .Pq mdoc
1082: The argument of the first
1083: .Ic \&Sh
1084: macro is not
1085: .Sq NAME .
1086: This may confuse
1087: .Xr makewhatis 8
1088: and
1089: .Xr apropos 1 .
1.168 schwarze 1090: .It Sy "NAME section without Nm before Nd"
1.106 schwarze 1091: .Pq mdoc
1.155 schwarze 1092: The NAME section does not contain any
1093: .Ic \&Nm
1.168 schwarze 1094: child macro before the first
1095: .Ic \&Nd
1096: macro.
1.155 schwarze 1097: .It Sy "NAME section without description"
1098: .Pq mdoc
1099: The NAME section lacks the mandatory
1100: .Ic \&Nd
1101: child macro.
1102: .It Sy "description not at the end of NAME"
1103: .Pq mdoc
1104: The NAME section does contain an
1.106 schwarze 1105: .Ic \&Nd
1.155 schwarze 1106: child macro, but other content follows it.
1107: .It Sy "bad NAME section content"
1108: .Pq mdoc
1109: The NAME section contains plain text or macros other than
1110: .Ic \&Nm
1.106 schwarze 1111: and
1.155 schwarze 1112: .Ic \&Nd .
1.168 schwarze 1113: .It Sy "missing comma before name"
1114: .Pq mdoc
1115: The NAME section contains an
1116: .Ic \&Nm
1117: macro that is neither the first one nor preceded by a comma.
1.142 schwarze 1118: .It Sy "missing description line, using \(dq\(dq"
1119: .Pq mdoc
1120: The
1121: .Ic \&Nd
1122: macro lacks the required argument.
1123: The title line of the manual will end after the dash.
1.177 schwarze 1124: .It Sy "description line outside NAME section"
1125: .Pq mdoc
1126: An
1127: .Ic \&Nd
1128: macro appears outside the NAME section.
1129: The arguments are printed anyway and the following text is used for
1130: .Xr apropos 1 ,
1131: but none of that behaviour is portable.
1.106 schwarze 1132: .It Sy "sections out of conventional order"
1133: .Pq mdoc
1134: A standard section occurs after another section it usually precedes.
1135: All section titles are used as given,
1136: and the order of sections is not changed.
1137: .It Sy "duplicate section title"
1138: .Pq mdoc
1139: The same standard section title occurs more than once.
1140: .It Sy "unexpected section"
1141: .Pq mdoc
1142: A standard section header occurs in a section of the manual
1143: where it normally isn't useful.
1.211 schwarze 1144: .It Sy "cross reference to self"
1145: .Pq mdoc
1146: An
1147: .Ic \&Xr
1148: macro refers to a name and section matching the section of the present
1149: manual page and a name mentioned in an
1150: .Ic \&Nm
1151: macro in the NAME or SYNOPSIS section, or in an
1152: .Ic \&Fn
1153: or
1154: .Ic \&Fo
1155: macro in the SYNOPSIS.
1156: Consider using
1157: .Ic \&Nm
1158: or
1159: .Ic \&Fn
1160: instead of
1161: .Ic \&Xr .
1.112 schwarze 1162: .It Sy "unusual Xr order"
1163: .Pq mdoc
1164: In the SEE ALSO section, an
1165: .Ic \&Xr
1166: macro with a lower section number follows one with a higher number,
1167: or two
1168: .Ic \&Xr
1.157 schwarze 1169: macros referring to the same section are out of alphabetical order.
1.112 schwarze 1170: .It Sy "unusual Xr punctuation"
1171: .Pq mdoc
1172: In the SEE ALSO section, punctuation between two
1173: .Ic \&Xr
1174: macros differs from a single comma, or there is trailing punctuation
1175: after the last
1176: .Ic \&Xr
1177: macro.
1.111 schwarze 1178: .It Sy "AUTHORS section without An macro"
1179: .Pq mdoc
1180: An AUTHORS sections contains no
1181: .Ic \&An
1182: macros, or only empty ones.
1183: Probably, there are author names lacking markup.
1.106 schwarze 1184: .El
1185: .Ss "Warnings related to macros and nesting"
1186: .Bl -ohang
1187: .It Sy "obsolete macro"
1188: .Pq mdoc
1189: See the
1190: .Xr mdoc 7
1191: manual for replacements.
1.126 schwarze 1192: .It Sy "macro neither callable nor escaped"
1193: .Pq mdoc
1194: The name of a macro that is not callable appears on a macro line.
1195: It is printed verbatim.
1.152 schwarze 1196: If the intention is to call it, move it to its own input line;
1.126 schwarze 1197: otherwise, escape it by prepending
1198: .Sq \e& .
1.106 schwarze 1199: .It Sy "skipping paragraph macro"
1200: In
1201: .Xr mdoc 7
1202: documents, this happens
1203: .Bl -dash -compact
1204: .It
1205: at the beginning and end of sections and subsections
1206: .It
1207: right before non-compact lists and displays
1208: .It
1209: at the end of items in non-column, non-compact lists
1210: .It
1211: and for multiple consecutive paragraph macros.
1212: .El
1213: In
1214: .Xr man 7
1215: documents, it happens
1216: .Bl -dash -compact
1217: .It
1218: for empty
1219: .Ic \&P ,
1220: .Ic \&PP ,
1221: and
1222: .Ic \&LP
1223: macros
1224: .It
1225: for
1226: .Ic \&IP
1227: macros having neither head nor body arguments
1228: .It
1229: for
1230: .Ic \&br
1231: or
1232: .Ic \&sp
1233: right after
1234: .Ic \&SH
1235: or
1236: .Ic \&SS
1237: .El
1238: .It Sy "moving paragraph macro out of list"
1239: .Pq mdoc
1240: A list item in a
1241: .Ic \&Bl
1242: list contains a trailing paragraph macro.
1243: The paragraph macro is moved after the end of the list.
1244: .It Sy "skipping no-space macro"
1245: .Pq mdoc
1246: An input line begins with an
1247: .Ic \&Ns
1.208 schwarze 1248: macro, or the next argument after an
1249: .Ic \&Ns
1250: macro is an isolated closing delimiter.
1.106 schwarze 1251: The macro is ignored.
1252: .It Sy "blocks badly nested"
1253: .Pq mdoc
1254: If two blocks intersect, one should completely contain the other.
1255: Otherwise, rendered output is likely to look strange in any output
1256: format, and rendering in SGML-based output formats is likely to be
1257: outright wrong because such languages do not support badly nested
1258: blocks at all.
1259: Typical examples of badly nested blocks are
1260: .Qq Ic \&Ao \&Bo \&Ac \&Bc
1261: and
1262: .Qq Ic \&Ao \&Bq \&Ac .
1263: In these examples,
1264: .Ic \&Ac
1265: breaks
1266: .Ic \&Bo
1267: and
1268: .Ic \&Bq ,
1269: respectively.
1270: .It Sy "nested displays are not portable"
1271: .Pq mdoc
1272: A
1273: .Ic \&Bd ,
1274: .Ic \&D1 ,
1275: or
1276: .Ic \&Dl
1277: display occurs nested inside another
1278: .Ic \&Bd
1279: display.
1280: This works with
1281: .Nm ,
1282: but fails with most other implementations.
1283: .It Sy "moving content out of list"
1284: .Pq mdoc
1285: A
1286: .Ic \&Bl
1287: list block contains text or macros before the first
1288: .Ic \&It
1289: macro.
1290: The offending children are moved before the beginning of the list.
1.209 schwarze 1291: .It Sy "first macro on line"
1292: Inside a
1293: .Ic \&Bl Fl column
1294: list, a
1295: .Ic \&Ta
1296: macro occurs as the first macro on a line, which is not portable.
1.106 schwarze 1297: .It Sy "line scope broken"
1298: .Pq man
1299: While parsing the next-line scope of the previous macro,
1300: another macro is found that prematurely terminates the previous one.
1301: The previous, interrupted macro is deleted from the parse tree.
1302: .El
1303: .Ss "Warnings related to missing arguments"
1304: .Bl -ohang
1305: .It Sy "skipping empty request"
1.118 schwarze 1306: .Pq roff , eqn
1307: The macro name is missing from a macro definition request,
1308: or an
1309: .Xr eqn 7
1310: control statement or operation keyword lacks its required argument.
1.106 schwarze 1311: .It Sy "conditional request controls empty scope"
1312: .Pq roff
1313: A conditional request is only useful if any of the following
1314: follows it on the same logical input line:
1315: .Bl -dash -compact
1316: .It
1317: The
1318: .Sq \e{
1319: keyword to open a multi-line scope.
1320: .It
1321: A request or macro or some text, resulting in a single-line scope.
1322: .It
1323: The immediate end of the logical line without any intervening whitespace,
1324: resulting in next-line scope.
1325: .El
1326: Here, a conditional request is followed by trailing whitespace only,
1327: and there is no other content on its logical input line.
1328: Note that it doesn't matter whether the logical input line is split
1329: across multiple physical input lines using
1330: .Sq \e
1331: line continuation characters.
1332: This is one of the rare cases
1333: where trailing whitespace is syntactically significant.
1334: The conditional request controls a scope containing whitespace only,
1335: so it is unlikely to have a significant effect,
1336: except that it may control a following
1337: .Ic \&el
1338: clause.
1339: .It Sy "skipping empty macro"
1340: .Pq mdoc
1.147 schwarze 1341: The indicated macro has no arguments and hence no effect.
1342: .It Sy "empty block"
1343: .Pq mdoc , man
1344: A
1345: .Ic \&Bd ,
1346: .Ic \&Bk ,
1347: .Ic \&Bl ,
1348: .Ic \&D1 ,
1349: .Ic \&Dl ,
1.206 schwarze 1350: .Ic \&MT ,
1.147 schwarze 1351: .Ic \&RS ,
1352: or
1353: .Ic \&UR
1354: block contains nothing in its body and will produce no output.
1.106 schwarze 1355: .It Sy "empty argument, using 0n"
1356: .Pq mdoc
1357: The required width is missing after
1358: .Ic \&Bd
1359: or
1360: .Ic \&Bl
1361: .Fl offset
1362: or
1.186 schwarze 1363: .Fl width .
1.106 schwarze 1364: .It Sy "missing display type, using -ragged"
1365: .Pq mdoc
1366: The
1367: .Ic \&Bd
1368: macro is invoked without the required display type.
1369: .It Sy "list type is not the first argument"
1370: .Pq mdoc
1371: In a
1372: .Ic \&Bl
1373: macro, at least one other argument precedes the type argument.
1374: The
1375: .Nm
1376: utility copes with any argument order, but some other
1377: .Xr mdoc 7
1378: implementations do not.
1379: .It Sy "missing -width in -tag list, using 8n"
1380: .Pq mdoc
1381: Every
1382: .Ic \&Bl
1383: macro having the
1384: .Fl tag
1385: argument requires
1386: .Fl width ,
1387: too.
1388: .It Sy "missing utility name, using \(dq\(dq"
1389: .Pq mdoc
1390: The
1391: .Ic \&Ex Fl std
1392: macro is called without an argument before
1393: .Ic \&Nm
1394: has first been called with an argument.
1.146 schwarze 1395: .It Sy "missing function name, using \(dq\(dq"
1396: .Pq mdoc
1397: The
1398: .Ic \&Fo
1399: macro is called without an argument.
1400: No function name is printed.
1.106 schwarze 1401: .It Sy "empty head in list item"
1402: .Pq mdoc
1403: In a
1404: .Ic \&Bl
1405: .Fl diag ,
1406: .Fl hang ,
1407: .Fl inset ,
1408: .Fl ohang ,
1409: or
1410: .Fl tag
1411: list, an
1412: .Ic \&It
1413: macro lacks the required argument.
1414: The item head is left empty.
1415: .It Sy "empty list item"
1416: .Pq mdoc
1417: In a
1418: .Ic \&Bl
1419: .Fl bullet ,
1420: .Fl dash ,
1421: .Fl enum ,
1422: or
1423: .Fl hyphen
1424: list, an
1425: .Ic \&It
1426: block is empty.
1427: An empty list item is shown.
1.209 schwarze 1428: .It Sy "missing argument, using next line"
1429: .Pq mdoc
1430: An
1431: .Ic \&It
1432: macro in a
1433: .Ic \&Bd Fl column
1434: list has no arguments.
1435: While
1436: .Nm
1437: uses the text or macros of the following line, if any, for the cell,
1438: other formatters may misformat the list.
1.152 schwarze 1439: .It Sy "missing font type, using \efR"
1.106 schwarze 1440: .Pq mdoc
1441: A
1442: .Ic \&Bf
1443: macro has no argument.
1.152 schwarze 1444: It switches to the default font.
1445: .It Sy "unknown font type, using \efR"
1.106 schwarze 1446: .Pq mdoc
1447: The
1448: .Ic \&Bf
1449: argument is invalid.
1.152 schwarze 1450: The default font is used instead.
1.127 schwarze 1451: .It Sy "nothing follows prefix"
1452: .Pq mdoc
1453: A
1454: .Ic \&Pf
1455: macro has no argument, or only one argument and no macro follows
1456: on the same input line.
1457: This defeats its purpose; in particular, spacing is not suppressed
1458: before the text or macros following on the next input line.
1.143 schwarze 1459: .It Sy "empty reference block"
1460: .Pq mdoc
1461: An
1462: .Ic \&Rs
1463: macro is immediately followed by an
1464: .Ic \&Re
1465: macro on the next input line.
1466: Such an empty block does not produce any output.
1.165 schwarze 1467: .It Sy "missing section argument"
1468: .Pq mdoc
1469: An
1470: .Ic \&Xr
1471: macro lacks its second, section number argument.
1472: The first argument, i.e. the name, is printed, but without subsequent
1.166 schwarze 1473: parentheses.
1.106 schwarze 1474: .It Sy "missing -std argument, adding it"
1475: .Pq mdoc
1476: An
1477: .Ic \&Ex
1478: or
1479: .Ic \&Rv
1480: macro lacks the required
1481: .Fl std
1482: argument.
1483: The
1484: .Nm
1485: utility assumes
1486: .Fl std
1487: even when it is not specified, but other implementations may not.
1.150 schwarze 1488: .It Sy "missing option string, using \(dq\(dq"
1489: .Pq man
1490: The
1491: .Ic \&OP
1492: macro is invoked without any argument.
1493: An empty pair of square brackets is shown.
1494: .It Sy "missing resource identifier, using \(dq\(dq"
1495: .Pq man
1496: The
1.206 schwarze 1497: .Ic \&MT
1498: or
1.150 schwarze 1499: .Ic \&UR
1500: macro is invoked without any argument.
1501: An empty pair of angle brackets is shown.
1.118 schwarze 1502: .It Sy "missing eqn box, using \(dq\(dq"
1503: .Pq eqn
1504: A diacritic mark or a binary operator is found,
1505: but there is nothing to the left of it.
1506: An empty box is inserted.
1.106 schwarze 1507: .El
1508: .Ss "Warnings related to bad macro arguments"
1509: .Bl -ohang
1510: .It Sy "duplicate argument"
1511: .Pq mdoc
1512: A
1513: .Ic \&Bd
1514: or
1515: .Ic \&Bl
1516: macro has more than one
1517: .Fl compact ,
1518: more than one
1519: .Fl offset ,
1520: or more than one
1521: .Fl width
1522: argument.
1523: All but the last instances of these arguments are ignored.
1524: .It Sy "skipping duplicate argument"
1525: .Pq mdoc
1526: An
1527: .Ic \&An
1528: macro has more than one
1529: .Fl split
1530: or
1531: .Fl nosplit
1532: argument.
1533: All but the first of these arguments are ignored.
1534: .It Sy "skipping duplicate display type"
1535: .Pq mdoc
1536: A
1537: .Ic \&Bd
1538: macro has more than one type argument; the first one is used.
1539: .It Sy "skipping duplicate list type"
1540: .Pq mdoc
1541: A
1542: .Ic \&Bl
1543: macro has more than one type argument; the first one is used.
1544: .It Sy "skipping -width argument"
1545: .Pq mdoc
1546: A
1547: .Ic \&Bl
1548: .Fl column ,
1549: .Fl diag ,
1550: .Fl ohang ,
1551: .Fl inset ,
1552: or
1553: .Fl item
1554: list has a
1555: .Fl width
1556: argument.
1557: That has no effect.
1.151 schwarze 1558: .It Sy "wrong number of cells"
1559: In a line of a
1560: .Ic \&Bl Fl column
1561: list, the number of tabs or
1562: .Ic \&Ta
1563: macros is less than the number expected from the list header line
1564: or exceeds the expected number by more than one.
1565: Missing cells remain empty, and all cells exceeding the number of
1566: columns are joined into one single cell.
1.106 schwarze 1567: .It Sy "unknown AT&T UNIX version"
1568: .Pq mdoc
1569: An
1570: .Ic \&At
1571: macro has an invalid argument.
1572: It is used verbatim, with
1573: .Qq "AT&T UNIX "
1574: prefixed to it.
1.113 schwarze 1575: .It Sy "comma in function argument"
1576: .Pq mdoc
1577: An argument of an
1578: .Ic \&Fa
1579: or
1580: .Ic \&Fn
1581: macro contains a comma; it should probably be split into two arguments.
1.117 schwarze 1582: .It Sy "parenthesis in function name"
1583: .Pq mdoc
1584: The first argument of an
1585: .Ic \&Fc
1586: or
1587: .Ic \&Fn
1588: macro contains an opening or closing parenthesis; that's probably wrong,
1589: parentheses are added automatically.
1.196 schwarze 1590: .It Sy "unknown library name"
1591: .Pq mdoc, not on Ox
1592: An
1593: .Ic \&Lb
1594: macro has an unknown name argument and will be rendered as
1595: .Qq library Dq Ar name .
1.106 schwarze 1596: .It Sy "invalid content in Rs block"
1597: .Pq mdoc
1598: An
1599: .Ic \&Rs
1600: block contains plain text or non-% macros.
1601: The bogus content is left in the syntax tree.
1602: Formatting may be poor.
1603: .It Sy "invalid Boolean argument"
1604: .Pq mdoc
1605: An
1606: .Ic \&Sm
1607: macro has an argument other than
1608: .Cm on
1609: or
1610: .Cm off .
1611: The invalid argument is moved out of the macro, which leaves the macro
1612: empty, causing it to toggle the spacing mode.
1613: .It Sy "unknown font, skipping request"
1.115 schwarze 1614: .Pq man , tbl
1.106 schwarze 1615: A
1616: .Xr roff 7
1617: .Ic \&ft
1.115 schwarze 1618: request or a
1619: .Xr tbl 7
1620: .Ic \&f
1621: layout modifier has an unknown
1622: .Ar font
1623: argument.
1.151 schwarze 1624: .It Sy "odd number of characters in request"
1625: .Pq roff
1626: A
1627: .Ic \&tr
1628: request contains an odd number of characters.
1629: The last character is mapped to the blank character.
1.106 schwarze 1630: .El
1631: .Ss "Warnings related to plain text"
1632: .Bl -ohang
1633: .It Sy "blank line in fill mode, using .sp"
1634: .Pq mdoc
1635: The meaning of blank input lines is only well-defined in non-fill mode:
1636: In fill mode, line breaks of text input lines are not supposed to be
1637: significant.
1638: However, for compatibility with groff, blank lines in fill mode
1639: are replaced with
1640: .Ic \&sp
1641: requests.
1642: .It Sy "tab in filled text"
1643: .Pq mdoc , man
1644: The meaning of tab characters is only well-defined in non-fill mode:
1645: In fill mode, whitespace is not supposed to be significant
1646: on text input lines.
1647: As an implementation dependent choice, tab characters on text lines
1648: are passed through to the formatters in any case.
1649: Given that the text before the tab character will be filled,
1650: it is hard to predict which tab stop position the tab will advance to.
1.172 schwarze 1651: .It Sy "new sentence, new line"
1652: .Pq mdoc
1653: A new sentence starts in the middle of a text line.
1654: Start it on a new input line to help formatters produce correct spacing.
1.106 schwarze 1655: .It Sy "invalid escape sequence"
1656: .Pq roff
1657: An escape sequence has an invalid opening argument delimiter, lacks the
1658: closing argument delimiter, or the argument has too few characters.
1659: If the argument is incomplete,
1660: .Ic \e*
1661: and
1662: .Ic \en
1663: expand to an empty string,
1664: .Ic \eB
1665: to the digit
1666: .Sq 0 ,
1667: and
1668: .Ic \ew
1669: to the length of the incomplete argument.
1670: All other invalid escape sequences are ignored.
1671: .It Sy "undefined string, using \(dq\(dq"
1672: .Pq roff
1673: If a string is used without being defined before,
1674: its value is implicitly set to the empty string.
1675: However, defining strings explicitly before use
1676: keeps the code more readable.
1677: .El
1.138 schwarze 1678: .Ss "Warnings related to tables"
1679: .Bl -ohang
1680: .It Sy "tbl line starts with span"
1681: .Pq tbl
1682: The first cell in a table layout line is a horizontal span
1683: .Pq Sq Cm s .
1684: Data provided for this cell is ignored, and nothing is printed in the cell.
1685: .It Sy "tbl column starts with span"
1686: .Pq tbl
1687: The first line of a table layout specification
1688: requests a vertical span
1689: .Pq Sq Cm ^ .
1690: Data provided for this cell is ignored, and nothing is printed in the cell.
1691: .It Sy "skipping vertical bar in tbl layout"
1692: .Pq tbl
1693: A table layout specification contains more than two consecutive vertical bars.
1694: A double bar is printed, all additional bars are discarded.
1.106 schwarze 1695: .El
1696: .Ss "Errors related to tables"
1.136 schwarze 1697: .Bl -ohang
1698: .It Sy "non-alphabetic character in tbl options"
1699: .Pq tbl
1700: The table options line contains a character other than a letter,
1701: blank, or comma where the beginning of an option name is expected.
1702: The character is ignored.
1703: .It Sy "skipping unknown tbl option"
1704: .Pq tbl
1705: The table options line contains a string of letters that does not
1706: match any known option name.
1707: The word is ignored.
1708: .It Sy "missing tbl option argument"
1709: .Pq tbl
1710: A table option that requires an argument is not followed by an
1711: opening parenthesis, or the opening parenthesis is immediately
1712: followed by a closing parenthesis.
1713: The option is ignored.
1714: .It Sy "wrong tbl option argument size"
1715: .Pq tbl
1716: A table option argument contains an invalid number of characters.
1717: Both the option and the argument are ignored.
1.138 schwarze 1718: .It Sy "empty tbl layout"
1719: .Pq tbl
1720: A table layout specification is completely empty,
1721: specifying zero lines and zero columns.
1722: As a fallback, a single left-justified column is used.
1723: .It Sy "invalid character in tbl layout"
1724: .Pq tbl
1725: A table layout specification contains a character that can neither
1726: be interpreted as a layout key character nor as a layout modifier,
1727: or a modifier precedes the first key.
1728: The invalid character is discarded.
1729: .It Sy "unmatched parenthesis in tbl layout"
1730: .Pq tbl
1731: A table layout specification contains an opening parenthesis,
1732: but no matching closing parenthesis.
1733: The rest of the input line, starting from the parenthesis, has no effect.
1.139 schwarze 1734: .It Sy "tbl without any data cells"
1735: .Pq tbl
1736: A table does not contain any data cells.
1737: It will probably produce no output.
1738: .It Sy "ignoring data in spanned tbl cell"
1739: .Pq tbl
1740: A table cell is marked as a horizontal span
1741: .Pq Sq Cm s
1742: or vertical span
1743: .Pq Sq Cm ^
1744: in the table layout, but it contains data.
1745: The data is ignored.
1746: .It Sy "ignoring extra tbl data cells"
1747: .Pq tbl
1748: A data line contains more cells than the corresponding layout line.
1749: The data in the extra cells is ignored.
1750: .It Sy "data block open at end of tbl"
1751: .Pq tbl
1752: A data block is opened with
1753: .Cm T{ ,
1754: but never closed with a matching
1755: .Cm T} .
1756: The remaining data lines of the table are all put into one cell,
1757: and any remaining cells stay empty.
1.106 schwarze 1758: .El
1759: .Ss "Errors related to roff, mdoc, and man code"
1760: .Bl -ohang
1.215 schwarze 1761: .It Sy "duplicate prologue macro"
1762: .Pq mdoc
1763: One of the prologue macros occurs more than once.
1764: The last instance overrides all previous ones.
1765: .It Sy "skipping late title macro"
1766: .Pq mdoc
1767: The
1768: .Ic \&Dt
1769: macro appears after the first non-prologue macro.
1770: Traditional formatters cannot handle this because
1771: they write the page header before parsing the document body.
1772: Even though this technical restriction does not apply to
1773: .Nm ,
1774: traditional semantics is preserved.
1775: The late macro is discarded including its arguments.
1.106 schwarze 1776: .It Sy "input stack limit exceeded, infinite loop?"
1777: .Pq roff
1778: Explicit recursion limits are implemented for the following features,
1779: in order to prevent infinite loops:
1780: .Bl -dash -compact
1781: .It
1782: expansion of nested escape sequences
1783: including expansion of strings and number registers,
1784: .It
1785: expansion of nested user-defined macros,
1786: .It
1787: and
1788: .Ic \&so
1789: file inclusion.
1790: .El
1791: When a limit is hit, the output is incorrect, typically losing
1792: some content, but the parser can continue.
1793: .It Sy "skipping bad character"
1794: .Pq mdoc , man , roff
1795: The input file contains a byte that is not a printable
1796: .Xr ascii 7
1797: character.
1798: The message mentions the character number.
1799: The offending byte is replaced with a question mark
1800: .Pq Sq \&? .
1801: Consider editing the input file to replace the byte with an ASCII
1802: transliteration of the intended character.
1803: .It Sy "skipping unknown macro"
1804: .Pq mdoc , man , roff
1805: The first identifier on a request or macro line is neither recognized as a
1806: .Xr roff 7
1807: request, nor as a user-defined macro, nor, respectively, as an
1808: .Xr mdoc 7
1809: or
1810: .Xr man 7
1811: macro.
1812: It may be mistyped or unsupported.
1813: The request or macro is discarded including its arguments.
1.133 schwarze 1814: .It Sy "skipping insecure request"
1815: .Pq roff
1816: An input file attempted to run a shell command
1817: or to read or write an external file.
1818: Such attempts are denied for security reasons.
1.106 schwarze 1819: .It Sy "skipping item outside list"
1.118 schwarze 1820: .Pq mdoc , eqn
1.106 schwarze 1821: An
1822: .Ic \&It
1823: macro occurs outside any
1824: .Ic \&Bl
1.118 schwarze 1825: list, or an
1826: .Xr eqn 7
1827: .Ic above
1828: delimiter occurs outside any pile.
1.106 schwarze 1829: It is discarded including its arguments.
1830: .It Sy "skipping column outside column list"
1831: .Pq mdoc
1832: A
1833: .Ic \&Ta
1834: macro occurs outside any
1835: .Ic \&Bl Fl column
1836: block.
1837: It is discarded including its arguments.
1838: .It Sy "skipping end of block that is not open"
1839: .Pq mdoc , man , eqn , tbl , roff
1840: Various syntax elements can only be used to explicitly close blocks
1841: that have previously been opened.
1842: An
1843: .Xr mdoc 7
1844: block closing macro, a
1845: .Xr man 7
1.206 schwarze 1846: .Ic \&ME , \&RE
1.106 schwarze 1847: or
1848: .Ic \&UE
1.118 schwarze 1849: macro, an
1850: .Xr eqn 7
1851: right delimiter or closing brace, or the end of an equation, table, or
1.106 schwarze 1852: .Xr roff 7
1853: conditional request is encountered but no matching block is open.
1854: The offending request or macro is discarded.
1.135 schwarze 1855: .It Sy "fewer RS blocks open, skipping"
1856: .Pq man
1857: The
1858: .Ic \&RE
1859: macro is invoked with an argument, but less than the specified number of
1860: .Ic \&RS
1861: blocks is open.
1862: The
1863: .Ic \&RE
1864: macro is discarded.
1.106 schwarze 1865: .It Sy "inserting missing end of block"
1866: .Pq mdoc , tbl
1867: Various
1868: .Xr mdoc 7
1869: macros as well as tables require explicit closing by dedicated macros.
1870: A block that doesn't support bad nesting
1871: ends before all of its children are properly closed.
1872: The open child nodes are closed implicitly.
1.152 schwarze 1873: .It Sy "appending missing end of block"
1.106 schwarze 1874: .Pq mdoc , man , eqn , tbl , roff
1875: At the end of the document, an explicit
1876: .Xr mdoc 7
1877: block, a
1878: .Xr man 7
1879: next-line scope or
1.206 schwarze 1880: .Ic \&MT , \&RS
1.106 schwarze 1881: or
1882: .Ic \&UR
1883: block, an equation, table, or
1884: .Xr roff 7
1885: conditional or ignore block is still open.
1886: The open block is closed implicitly.
1887: .It Sy "escaped character not allowed in a name"
1888: .Pq roff
1889: Macro, string and register identifiers consist of printable,
1890: non-whitespace ASCII characters.
1891: Escape sequences and characters and strings expressed in terms of them
1892: cannot form part of a name.
1893: The first argument of an
1894: .Ic \&am ,
1895: .Ic \&as ,
1896: .Ic \&de ,
1897: .Ic \&ds ,
1898: .Ic \&nr ,
1899: or
1900: .Ic \&rr
1901: request, or any argument of an
1902: .Ic \&rm
1903: request, or the name of a request or user defined macro being called,
1904: is terminated by an escape sequence.
1905: In the cases of
1906: .Ic \&as ,
1907: .Ic \&ds ,
1908: and
1909: .Ic \&nr ,
1910: the request has no effect at all.
1911: In the cases of
1912: .Ic \&am ,
1913: .Ic \&de ,
1914: .Ic \&rr ,
1915: and
1916: .Ic \&rm ,
1917: what was parsed up to this point is used as the arguments to the request,
1918: and the rest of the input line is discarded including the escape sequence.
1919: When parsing for a request or a user-defined macro name to be called,
1920: only the escape sequence is discarded.
1921: The characters preceding it are used as the request or macro name,
1922: the characters following it are used as the arguments to the request or macro.
1.124 schwarze 1923: .It Sy "NOT IMPLEMENTED: Bd -file"
1924: .Pq mdoc
1925: For security reasons, the
1926: .Ic \&Bd
1927: macro does not support the
1928: .Fl file
1929: argument.
1930: By requesting the inclusion of a sensitive file, a malicious document
1931: might otherwise trick a privileged user into inadvertently displaying
1932: the file on the screen, revealing the file content to bystanders.
1933: The argument is ignored including the file name following it.
1.163 schwarze 1934: .It Sy "skipping display without arguments"
1935: .Pq mdoc
1936: A
1937: .Ic \&Bd
1938: block macro does not have any arguments.
1939: The block is discarded, and the block content is displayed in
1940: whatever mode was active before the block.
1.106 schwarze 1941: .It Sy "missing list type, using -item"
1942: .Pq mdoc
1943: A
1944: .Ic \&Bl
1945: macro fails to specify the list type.
1.194 schwarze 1946: .It Sy "argument is not numeric, using 1"
1947: .Pq roff
1948: The argument of a
1949: .Ic \&ce
1950: request is not a number.
1.106 schwarze 1951: .It Sy "missing manual name, using \(dq\(dq"
1952: .Pq mdoc
1953: The first call to
1.168 schwarze 1954: .Ic \&Nm ,
1955: or any call in the NAME section, lacks the required argument.
1.106 schwarze 1956: .It Sy "uname(3) system call failed, using UNKNOWN"
1957: .Pq mdoc
1958: The
1959: .Ic \&Os
1960: macro is called without arguments, and the
1961: .Xr uname 3
1962: system call failed.
1963: As a workaround,
1964: .Nm
1965: can be compiled with
1966: .Sm off
1967: .Fl D Cm OSNAME=\(dq\e\(dq Ar string Cm \e\(dq\(dq .
1968: .Sm on
1969: .It Sy "unknown standard specifier"
1970: .Pq mdoc
1971: An
1972: .Ic \&St
1973: macro has an unknown argument and is discarded.
1974: .It Sy "skipping request without numeric argument"
1.118 schwarze 1975: .Pq roff , eqn
1.106 schwarze 1976: An
1977: .Ic \&it
1.118 schwarze 1978: request or an
1979: .Xr eqn 7
1980: .Ic \&size
1981: or
1982: .Ic \&gsize
1983: statement has a non-numeric or negative argument or no argument at all.
1984: The invalid request or statement is ignored.
1.132 schwarze 1985: .It Sy "NOT IMPLEMENTED: .so with absolute path or \(dq..\(dq"
1986: .Pq roff
1987: For security reasons,
1988: .Nm
1989: allows
1990: .Ic \&so
1991: file inclusion requests only with relative paths
1992: and only without ascending to any parent directory.
1993: By requesting the inclusion of a sensitive file, a malicious document
1994: might otherwise trick a privileged user into inadvertently displaying
1995: the file on the screen, revealing the file content to bystanders.
1996: .Nm
1997: only shows the path as it appears behind
1998: .Ic \&so .
1999: .It Sy ".so request failed"
2000: .Pq roff
2001: Servicing a
2002: .Ic \&so
2003: request requires reading an external file, but the file could not be
2004: opened.
2005: .Nm
2006: only shows the path as it appears behind
2007: .Ic \&so .
1.106 schwarze 2008: .It Sy "skipping all arguments"
2009: .Pq mdoc , man , eqn , roff
2010: An
2011: .Xr mdoc 7
2012: .Ic \&Bt ,
2013: .Ic \&Ed ,
2014: .Ic \&Ef ,
2015: .Ic \&Ek ,
2016: .Ic \&El ,
1.144 schwarze 2017: .Ic \&Lp ,
2018: .Ic \&Pp ,
1.106 schwarze 2019: .Ic \&Re ,
1.143 schwarze 2020: .Ic \&Rs ,
1.106 schwarze 2021: or
2022: .Ic \&Ud
2023: macro, an
2024: .Ic \&It
2025: macro in a list that don't support item heads, a
2026: .Xr man 7
2027: .Ic \&LP ,
2028: .Ic \&P ,
2029: or
2030: .Ic \&PP
2031: macro, an
2032: .Xr eqn 7
1.120 schwarze 2033: .Ic \&EQ
2034: or
1.106 schwarze 2035: .Ic \&EN
2036: macro, or a
2037: .Xr roff 7
1.148 schwarze 2038: .Ic \&br ,
2039: .Ic \&fi ,
2040: or
2041: .Ic \&nf
1.144 schwarze 2042: request or
1.106 schwarze 2043: .Sq \&..
2044: block closing request is invoked with at least one argument.
2045: All arguments are ignored.
2046: .It Sy "skipping excess arguments"
1.135 schwarze 2047: .Pq mdoc , man , roff
1.150 schwarze 2048: A macro or request is invoked with too many arguments:
2049: .Bl -dash -offset 2n -width 2n -compact
2050: .It
2051: .Ic \&Fo ,
1.206 schwarze 2052: .Ic \&MT ,
1.150 schwarze 2053: .Ic \&PD ,
2054: .Ic \&RS ,
2055: .Ic \&UR ,
2056: .Ic \&ft ,
2057: or
2058: .Ic \&sp
2059: with more than one argument
2060: .It
1.144 schwarze 2061: .Ic \&An
1.150 schwarze 2062: with another argument after
1.144 schwarze 2063: .Fl split
2064: or
1.150 schwarze 2065: .Fl nosplit
2066: .It
2067: .Ic \&RE
2068: with more than one argument or with a non-integer argument
2069: .It
2070: .Ic \&OP
2071: or a request of the
2072: .Ic \&de
2073: family with more than two arguments
1.154 schwarze 2074: .It
2075: .Ic \&Dt
2076: with more than three arguments
1.150 schwarze 2077: .It
2078: .Ic \&TH
2079: with more than five arguments
2080: .It
1.145 schwarze 2081: .Ic \&Bd ,
2082: .Ic \&Bk ,
2083: or
2084: .Ic \&Bl
1.150 schwarze 2085: with invalid arguments
2086: .El
1.106 schwarze 2087: The excess arguments are ignored.
1.133 schwarze 2088: .El
2089: .Ss Unsupported features
2090: .Bl -ohang
2091: .It Sy "input too large"
2092: .Pq mdoc , man
2093: Currently,
2094: .Nm
2095: cannot handle input files larger than its arbitrary size limit
2096: of 2^31 bytes (2 Gigabytes).
2097: Since useful manuals are always small, this is not a problem in practice.
2098: Parsing is aborted as soon as the condition is detected.
1.136 schwarze 2099: .It Sy "unsupported control character"
2100: .Pq roff
2101: An ASCII control character supported by other
2102: .Xr roff 7
2103: implementations but not by
2104: .Nm
2105: was found in an input file.
2106: It is replaced by a question mark.
1.133 schwarze 2107: .It Sy "unsupported roff request"
2108: .Pq roff
2109: An input file contains a
2110: .Xr roff 7
2111: request supported by GNU troff or Heirloom troff but not by
2112: .Nm ,
2113: and it is likely that this will cause information loss
2114: or considerable misformatting.
1.139 schwarze 2115: .It Sy "eqn delim option in tbl"
2116: .Pq eqn , tbl
2117: The options line of a table defines equation delimiters.
2118: Any equation source code contained in the table will be printed unformatted.
2119: .It Sy "unsupported table layout modifier"
1.138 schwarze 2120: .Pq tbl
2121: A table layout specification contains an
2122: .Sq Cm m
2123: modifier.
2124: The modifier is discarded.
1.133 schwarze 2125: .It Sy "ignoring macro in table"
1.139 schwarze 2126: .Pq tbl , mdoc , man
2127: A table contains an invocation of an
2128: .Xr mdoc 7
2129: or
2130: .Xr man 7
2131: macro or of an undefined macro.
2132: The macro is ignored, and its arguments are handled
2133: as if they were a text line.
1.106 schwarze 2134: .El
1.1 kristaps 2135: .Sh SEE ALSO
1.141 schwarze 2136: .Xr apropos 1 ,
2137: .Xr man 1 ,
1.85 kristaps 2138: .Xr eqn 7 ,
1.57 kristaps 2139: .Xr man 7 ,
1.13 kristaps 2140: .Xr mandoc_char 7 ,
1.84 kristaps 2141: .Xr mdoc 7 ,
2142: .Xr roff 7 ,
2143: .Xr tbl 7
1.173 schwarze 2144: .Sh HISTORY
2145: The
2146: .Nm
2147: utility first appeared in
2148: .Ox 4.8 .
2149: The option
2150: .Fl I
2151: appeared in
2152: .Ox 5.2 ,
2153: and
2154: .Fl aCcfhKklMSsw
2155: in
2156: .Ox 5.7 .
1.1 kristaps 2157: .Sh AUTHORS
1.156 schwarze 2158: .An -nosplit
1.1 kristaps 2159: The
2160: .Nm
1.26 kristaps 2161: utility was written by
1.141 schwarze 2162: .An Kristaps Dzonsons Aq Mt kristaps@bsd.lv
2163: and is maintained by
2164: .An Ingo Schwarze Aq Mt schwarze@openbsd.org .
CVSweb