Annotation of mandoc/mandoc.1, Revision 1.229
1.229 ! schwarze 1: .\" $Id: mandoc.1,v 1.228 2018/08/25 16:53:38 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.229 ! schwarze 18: .Dd $Mdocdate: August 25 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.224 schwarze 37: utility formats manual pages for display.
1.100 kristaps 38: .Pp
39: By default,
40: .Nm
41: reads
42: .Xr mdoc 7
43: or
44: .Xr man 7
1.180 schwarze 45: text from stdin and produces
1.156 schwarze 46: .Fl T Cm locale
1.100 kristaps 47: output.
48: .Pp
1.109 schwarze 49: The options are as follows:
1.19 kristaps 50: .Bl -tag -width Ds
1.107 schwarze 51: .It Fl a
52: If the standard output is a terminal device and
53: .Fl c
54: is not specified, use
55: .Xr more 1
56: to paginate the output, just like
57: .Xr man 1
58: would.
59: .It Fl c
60: Copy the formatted manual pages to the standard output without using
61: .Xr more 1
62: to paginate them.
63: This is the default.
64: It can be specified to override
65: .Fl a .
1.156 schwarze 66: .It Fl I Cm os Ns = Ns Ar name
1.101 schwarze 67: Override the default operating system
68: .Ar name
69: for the
70: .Xr mdoc 7
1.180 schwarze 71: .Ic \&Os
1.130 schwarze 72: and for the
73: .Xr man 7
1.180 schwarze 74: .Ic \&TH
1.101 schwarze 75: macro.
1.156 schwarze 76: .It Fl K Ar encoding
1.119 schwarze 77: Specify the input encoding.
78: The supported
79: .Ar encoding
80: arguments are
81: .Cm us-ascii ,
82: .Cm iso-8859-1 ,
83: and
84: .Cm utf-8 .
1.176 schwarze 85: If not specified, autodetection uses the first match in the following
86: list:
87: .Bl -enum
88: .It
89: If the first three bytes of the input file are the UTF-8 byte order
90: mark (BOM, 0xefbbbf), input is interpreted as
91: .Cm utf-8 .
92: .It
93: If the first or second line of the input file matches the
1.119 schwarze 94: .Sy emacs
95: mode line format
96: .Pp
97: .D1 .\e" -*- Oo ...; Oc coding: Ar encoding ; No -*-
1.176 schwarze 98: .Pp
99: then input is interpreted according to
100: .Ar encoding .
101: .It
102: If the first non-ASCII byte in the file introduces a valid UTF-8
103: sequence, input is interpreted as
104: .Cm utf-8 .
105: .It
106: Otherwise, input is interpreted as
107: .Cm iso-8859-1 .
1.119 schwarze 108: .El
1.180 schwarze 109: .It Fl mdoc | man
110: With
111: .Fl mdoc ,
112: all input files are interpreted as
113: .Xr mdoc 7 .
114: With
115: .Fl man ,
116: all input files are interpreted as
117: .Xr man 7 .
118: By default, the input language is automatically detected for each file:
1.221 schwarze 119: if the first macro is
1.180 schwarze 120: .Ic \&Dd
121: or
122: .Ic \&Dt ,
123: the
124: .Xr mdoc 7
125: parser is used; otherwise, the
126: .Xr man 7
127: parser is used.
128: With other arguments,
129: .Fl m
130: is silently ignored.
1.184 schwarze 131: .It Fl O Ar options
1.57 kristaps 132: Comma-separated output options.
1.224 schwarze 133: See the descriptions of the individual output formats for supported
134: .Ar options .
1.156 schwarze 135: .It Fl T Ar output
1.224 schwarze 136: Select the output format.
137: Supported values for the
138: .Ar output
139: argument are
140: .Cm ascii ,
141: .Cm html ,
142: the default of
143: .Cm locale ,
144: .Cm man ,
145: .Cm markdown ,
146: .Cm pdf ,
147: .Cm ps ,
148: .Cm tree ,
149: and
150: .Cm utf8 .
151: .Pp
152: The special
153: .Fl T Cm lint
154: mode only parses the input and produces no output.
155: It implies
156: .Fl W Cm all
157: and redirects parser messages, which usually appear on standard
158: error output, to standard output.
1.156 schwarze 159: .It Fl W Ar level
1.77 schwarze 160: Specify the minimum message
161: .Ar level
162: to be reported on the standard error output and to affect the exit status.
163: The
164: .Ar level
165: can be
1.202 schwarze 166: .Cm base ,
1.185 schwarze 167: .Cm style ,
1.133 schwarze 168: .Cm warning ,
169: .Cm error ,
1.77 schwarze 170: or
1.202 schwarze 171: .Cm unsupp .
172: The
173: .Cm base
174: level automatically derives the operating system from the contents of the
175: .Ic \&Os
176: macro, from the
177: .Fl Ios
178: command line option, or from the
179: .Xr uname 3
180: return value.
181: The levels
182: .Cm openbsd
183: and
184: .Cm netbsd
185: are variants of
186: .Cm base
187: that bypass autodetection and request validation of base system
188: conventions for a particular operating system.
189: The level
1.132 schwarze 190: .Cm all
1.77 schwarze 191: is an alias for
1.202 schwarze 192: .Cm base .
1.132 schwarze 193: By default,
194: .Nm
195: is silent.
1.77 schwarze 196: See
197: .Sx EXIT STATUS
198: and
199: .Sx DIAGNOSTICS
200: for details.
201: .Pp
202: The special option
1.156 schwarze 203: .Fl W Cm stop
1.77 schwarze 204: tells
205: .Nm
206: to exit after parsing a file that causes warnings or errors of at least
207: the requested level.
208: No formatted output will be produced from that file.
209: If both a
210: .Ar level
211: and
212: .Cm stop
213: are requested, they can be joined with a comma, for example
1.156 schwarze 214: .Fl W Cm error , Ns Cm stop .
1.58 kristaps 215: .It Ar file
1.224 schwarze 216: Read from the given input file.
217: If multiple files are specified, they are processed in the given order.
218: If unspecified,
1.2 kristaps 219: .Nm
1.224 schwarze 220: reads from standard input.
1.1 kristaps 221: .El
1.109 schwarze 222: .Pp
1.183 schwarze 223: The options
224: .Fl fhklw
225: are also supported and are documented in man(1).
1.109 schwarze 226: In
227: .Fl f
228: and
229: .Fl k
230: mode,
231: .Nm
232: also supports the options
1.183 schwarze 233: .Fl CMmOSs
1.109 schwarze 234: described in the
235: .Xr apropos 1
236: manual.
1.182 schwarze 237: The options
238: .Fl fkl
239: are mutually exclusive and override each other.
1.66 kristaps 240: .Ss ASCII Output
1.224 schwarze 241: Use
1.156 schwarze 242: .Fl T Cm ascii
1.224 schwarze 243: to force text output in 7-bit ASCII character encoding documented in the
244: .Xr ascii 7
245: manual page, ignoring the
246: .Xr locale 1
247: set in the environment.
1.66 kristaps 248: .Pp
249: Font styles are applied by using back-spaced encoding such that an
250: underlined character
251: .Sq c
252: is rendered as
253: .Sq _ Ns \e[bs] Ns c ,
254: where
255: .Sq \e[bs]
256: is the back-space character number 8.
257: Emboldened characters are rendered as
258: .Sq c Ns \e[bs] Ns c .
259: .Pp
260: The special characters documented in
261: .Xr mandoc_char 7
262: are rendered best-effort in an ASCII equivalent.
263: .Pp
264: The following
265: .Fl O
266: arguments are accepted:
1.19 kristaps 267: .Bl -tag -width Ds
1.98 schwarze 268: .It Cm indent Ns = Ns Ar indent
269: The left margin for normal text is set to
270: .Ar indent
271: blank characters instead of the default of five for
272: .Xr mdoc 7
273: and seven for
274: .Xr man 7 .
275: Increasing this is not recommended; it may result in degraded formatting,
1.99 schwarze 276: for example overfull lines or ugly line breaks.
1.223 schwarze 277: When output is to a pager on a terminal that is less than 66 columns
278: wide, the default is reduced to three columns.
1.218 schwarze 279: .It Cm mdoc
280: Format
281: .Xr man 7
282: input files in
283: .Xr mdoc 7
284: output style.
285: Specifically, this suppresses the two additional blank lines near the
286: top and the bottom of each page, and it implies
287: .Fl O Cm indent Ns =5 .
288: One useful application is for checking that
289: .Fl T Cm man
290: output formats in the same way as the
291: .Xr mdoc 7
292: source it was generated from.
1.66 kristaps 293: .It Cm width Ns = Ns Ar width
294: The output width is set to
1.223 schwarze 295: .Ar width
296: instead of the default of 78.
297: When output is to a pager on a terminal that is less than 79 columns
298: wide, the default is reduced to one less than the terminal width.
299: In any case, lines that are output in literal mode are never wrapped
300: and may exceed the output width.
1.1 kristaps 301: .El
1.66 kristaps 302: .Ss HTML Output
303: Output produced by
1.156 schwarze 304: .Fl T Cm html
1.114 kristaps 305: conforms to HTML5 using optional self-closing tags.
1.116 kristaps 306: Default styles use only CSS1.
307: Equations rendered from
308: .Xr eqn 7
309: blocks use MathML.
1.66 kristaps 310: .Pp
1.61 kristaps 311: The
1.164 schwarze 312: .Pa mandoc.css
1.83 kristaps 313: file documents style-sheet classes available for customising output.
314: If a style-sheet is not specified with
1.156 schwarze 315: .Fl O Cm style ,
316: .Fl T Cm html
1.114 kristaps 317: defaults to simple output (via an embedded style-sheet)
318: readable in any graphical or text-based web
1.83 kristaps 319: browser.
1.66 kristaps 320: .Pp
1.224 schwarze 321: Non-ASCII characters are rendered
1.225 schwarze 322: as hexadecimal Unicode character references.
1.66 kristaps 323: .Pp
324: The following
1.64 kristaps 325: .Fl O
1.66 kristaps 326: arguments are accepted:
1.37 kristaps 327: .Bl -tag -width Ds
1.94 kristaps 328: .It Cm fragment
1.123 schwarze 329: Omit the <!DOCTYPE> declaration and the <html>, <head>, and <body>
330: elements and only emit the subtree below the <body> element.
1.94 kristaps 331: The
332: .Cm style
1.97 schwarze 333: argument will be ignored.
1.94 kristaps 334: This is useful when embedding manual content within existing documents.
1.64 kristaps 335: .It Cm includes Ns = Ns Ar fmt
1.40 kristaps 336: The string
337: .Ar fmt ,
1.49 kristaps 338: for example,
1.40 kristaps 339: .Ar ../src/%I.html ,
340: is used as a template for linked header files (usually via the
1.180 schwarze 341: .Ic \&In
1.57 kristaps 342: macro).
343: Instances of
1.43 kristaps 344: .Sq \&%I
1.57 kristaps 345: are replaced with the include filename.
346: The default is not to present a
1.40 kristaps 347: hyperlink.
1.229 ! schwarze 348: .It Cm man Ns = Ns Ar fmt Ns Op ; Ns Ar fmt
1.39 kristaps 349: The string
350: .Ar fmt ,
1.49 kristaps 351: for example,
1.39 kristaps 352: .Ar ../html%S/%N.%S.html ,
353: is used as a template for linked manuals (usually via the
1.180 schwarze 354: .Ic \&Xr
1.57 kristaps 355: macro).
356: Instances of
1.43 kristaps 357: .Sq \&%N
1.40 kristaps 358: and
359: .Sq %S
360: are replaced with the linked manual's name and section, respectively.
1.57 kristaps 361: If no section is included, section 1 is assumed.
362: The default is not to
1.40 kristaps 363: present a hyperlink.
1.229 ! schwarze 364: If two formats are given and a file
! 365: .Ar %N.%S
! 366: exists in the current directory, the first format is used;
! 367: otherwise, the second format is used.
1.64 kristaps 368: .It Cm style Ns = Ns Ar style.css
1.58 kristaps 369: The file
370: .Ar style.css
371: is used for an external style-sheet.
372: This must be a valid absolute or
373: relative URI.
1.61 kristaps 374: .El
1.93 schwarze 375: .Ss Locale Output
1.224 schwarze 376: By default,
377: .Nm
378: automatically selects UTF-8 or ASCII output according to the current
379: .Xr locale 1 .
380: If any of the environment variables
381: .Ev LC_ALL ,
382: .Ev LC_CTYPE ,
383: or
384: .Ev LANG
385: are set and the first one that is set
386: selects the UTF-8 character encoding, it produces
387: .Sx UTF-8 Output ;
388: otherwise, it falls back to
389: .Sx ASCII Output .
390: This output mode can also be selected explicitly with
1.156 schwarze 391: .Fl T Cm locale .
1.95 kristaps 392: .Ss Man Output
1.224 schwarze 393: Use
394: .Fl T Cm man
395: to translate
396: .Xr mdoc 7
397: input into
1.95 kristaps 398: .Xr man 7
399: output format.
1.102 schwarze 400: This is useful for distributing manual sources to legacy systems
1.96 kristaps 401: lacking
1.95 kristaps 402: .Xr mdoc 7
403: formatters.
404: .Pp
1.224 schwarze 405: If the input format of a file is
1.95 kristaps 406: .Xr man 7 ,
1.97 schwarze 407: the input is copied to the output, expanding any
1.95 kristaps 408: .Xr roff 7
1.180 schwarze 409: .Ic so
1.97 schwarze 410: requests.
411: The parser is also run, and as usual, the
412: .Fl W
413: level controls which
414: .Sx DIAGNOSTICS
415: are displayed before copying the input to the output.
1.175 schwarze 416: .Ss Markdown Output
1.224 schwarze 417: Use
418: .Fl T Cm markdown
419: to translate
1.175 schwarze 420: .Xr mdoc 7
1.224 schwarze 421: input to the markdown format conforming to
1.175 schwarze 422: .Lk http://daringfireball.net/projects/markdown/syntax.text\
423: "John Gruber's 2004 specification" .
1.178 schwarze 424: The output also almost conforms to the
425: .Lk http://commonmark.org/ CommonMark
426: specification.
427: .Pp
428: The character set used for the markdown output is ASCII.
429: Non-ASCII characters are encoded as HTML entities.
430: Since that is not possible in literal font contexts, because these
431: are rendered as code spans and code blocks in the markdown output,
432: non-ASCII characters are transliterated to ASCII approximations in
433: these contexts.
1.175 schwarze 434: .Pp
435: Markdown is a very weak markup language, so all semantic markup is
436: lost, and even part of the presentational markup may be lost.
437: Do not use this as an intermediate step in converting to HTML;
438: instead, use
439: .Fl T Cm html
440: directly.
441: .Pp
442: The
443: .Xr man 7 ,
444: .Xr tbl 7 ,
445: and
446: .Xr eqn 7
447: input languages are not supported by
448: .Fl T Cm markdown
449: output mode.
1.93 schwarze 450: .Ss PDF Output
451: PDF-1.1 output may be generated by
1.156 schwarze 452: .Fl T Cm pdf .
1.93 schwarze 453: See
454: .Sx PostScript Output
455: for
456: .Fl O
457: arguments and defaults.
1.62 kristaps 458: .Ss PostScript Output
1.65 kristaps 459: PostScript
460: .Qq Adobe-3.0
461: Level-2 pages may be generated by
1.156 schwarze 462: .Fl T Cm ps .
1.67 kristaps 463: Output pages default to letter sized and are rendered in the Times font
1.70 kristaps 464: family, 11-point.
465: Margins are calculated as 1/9 the page length and width.
1.71 kristaps 466: Line-height is 1.4m.
1.66 kristaps 467: .Pp
468: Special characters are rendered as in
469: .Sx ASCII Output .
470: .Pp
471: The following
472: .Fl O
473: arguments are accepted:
474: .Bl -tag -width Ds
475: .It Cm paper Ns = Ns Ar name
476: The paper size
477: .Ar name
478: may be one of
1.68 kristaps 479: .Ar a3 ,
480: .Ar a4 ,
481: .Ar a5 ,
482: .Ar legal ,
1.66 kristaps 483: or
484: .Ar letter .
1.68 kristaps 485: You may also manually specify dimensions as
486: .Ar NNxNN ,
487: width by height in millimetres.
488: If an unknown value is encountered,
489: .Ar letter
490: is used.
1.66 kristaps 491: .El
1.224 schwarze 492: .Ss UTF-8 Output
1.93 schwarze 493: Use
1.156 schwarze 494: .Fl T Cm utf8
1.224 schwarze 495: to force text output in UTF-8 multi-byte character encoding,
496: ignoring the
497: .Xr locale 1
498: settings in the environment.
1.73 kristaps 499: See
1.224 schwarze 500: .Sx ASCII Output
501: regarding font styles and
502: .Fl O
503: arguments.
504: .Pp
505: On operating systems lacking locale or wide character support, and
506: on those where the internal character representation is not UCS-4,
507: .Nm
508: always falls back to
509: .Sx ASCII Output .
1.161 schwarze 510: .Ss Syntax tree output
511: Use
512: .Fl T Cm tree
513: to show a human readable representation of the syntax tree.
514: It is useful for debugging the source code of manual pages.
1.162 schwarze 515: The exact format is subject to change, so don't write parsers for it.
1.170 schwarze 516: .Pp
517: The first paragraph shows meta data found in the
518: .Xr mdoc 7
519: prologue, on the
520: .Xr man 7
521: .Ic \&TH
522: line, or the fallbacks used.
523: .Pp
524: In the tree dump, each output line shows one syntax tree node.
1.161 schwarze 525: Child nodes are indented with respect to their parent node.
526: The columns are:
527: .Pp
528: .Bl -enum -compact
529: .It
530: For macro nodes, the macro name; for text and
531: .Xr tbl 7
1.162 schwarze 532: nodes, the content.
533: There is a special format for
1.161 schwarze 534: .Xr eqn 7
535: nodes.
536: .It
537: Node type (text, elem, block, head, body, body-end, tail, tbl, eqn).
538: .It
539: Flags:
540: .Bl -dash -compact
541: .It
542: An opening parenthesis if the node is an opening delimiter.
543: .It
544: An asterisk if the node starts a new input line.
545: .It
546: The input line number (starting at one).
547: .It
548: A colon.
549: .It
550: The input column number (starting at one).
551: .It
552: A closing parenthesis if the node is a closing delimiter.
553: .It
554: A full stop if the node ends a sentence.
1.169 schwarze 555: .It
1.174 schwarze 556: BROKEN if the node is a block broken by another block.
557: .It
1.169 schwarze 558: NOSRC if the node is not in the input file,
559: but automatically generated from macros.
560: .It
561: NOPRT if the node is not supposed to generate output
562: for any output format.
1.161 schwarze 563: .El
1.174 schwarze 564: .El
565: .Pp
566: The following
567: .Fl O
568: argument is accepted:
569: .Bl -tag -width Ds
570: .It Cm noval
571: Skip validation and show the unvalidated syntax tree.
572: This can help to find out whether a given behaviour is caused by
573: the parser or by the validator.
574: Meta data is not available in this case.
1.161 schwarze 575: .El
1.108 schwarze 576: .Sh ENVIRONMENT
577: .Bl -tag -width MANPAGER
1.224 schwarze 578: .It Ev LC_CTYPE
579: The character encoding
580: .Xr locale 1 .
581: When
582: .Sx Locale Output
583: is selected, it decides whether to use ASCII or UTF-8 output format.
584: It never affects the interpretation of input files.
1.108 schwarze 585: .It Ev MANPAGER
586: Any non-empty value of the environment variable
587: .Ev MANPAGER
1.179 schwarze 588: is used instead of the standard pagination program,
589: .Xr more 1 ;
590: see
591: .Xr man 1
592: for details.
593: Only used if
594: .Fl a
595: or
596: .Fl l
597: is specified.
1.108 schwarze 598: .It Ev PAGER
599: Specifies the pagination program to use when
600: .Ev MANPAGER
601: is not defined.
602: If neither PAGER nor MANPAGER is defined,
1.159 schwarze 603: .Xr more 1
604: .Fl s
1.179 schwarze 605: is used.
606: Only used if
607: .Fl a
608: or
609: .Fl l
610: is specified.
1.108 schwarze 611: .El
1.77 schwarze 612: .Sh EXIT STATUS
613: The
614: .Nm
615: utility exits with one of the following values, controlled by the message
616: .Ar level
617: associated with the
618: .Fl W
619: option:
620: .Pp
621: .Bl -tag -width Ds -compact
622: .It 0
1.202 schwarze 623: No base system convention violations, style suggestions, warnings,
624: or errors occurred, or those that did were ignored because they
625: were lower than the requested
1.77 schwarze 626: .Ar level .
1.185 schwarze 627: .It 1
1.202 schwarze 628: At least one base system convention violation or style suggestion
629: occurred, but no warning or error, and
630: .Fl W Cm base
631: or
1.185 schwarze 632: .Fl W Cm style
633: was specified.
1.77 schwarze 634: .It 2
635: At least one warning occurred, but no error, and
1.156 schwarze 636: .Fl W Cm warning
1.202 schwarze 637: or a lower
638: .Ar level
639: was requested.
1.77 schwarze 640: .It 3
1.133 schwarze 641: At least one parsing error occurred,
642: but no unsupported feature was encountered, and
1.156 schwarze 643: .Fl W Cm error
1.185 schwarze 644: or a lower
645: .Ar level
646: was requested.
1.133 schwarze 647: .It 4
1.134 schwarze 648: At least one unsupported feature was encountered, and
1.185 schwarze 649: .Fl W Cm unsupp
650: or a lower
651: .Ar level
652: was requested.
1.77 schwarze 653: .It 5
654: Invalid command line arguments were specified.
655: No input files have been read.
656: .It 6
1.131 schwarze 657: An operating system error occurred, for example exhaustion
658: of memory, file descriptors, or process table entries.
1.77 schwarze 659: Such errors cause
660: .Nm
661: to exit at once, possibly in the middle of parsing or formatting a file.
662: .El
663: .Pp
664: Note that selecting
1.156 schwarze 665: .Fl T Cm lint
1.77 schwarze 666: output mode implies
1.202 schwarze 667: .Fl W Cm all .
1.1 kristaps 668: .Sh EXAMPLES
1.13 kristaps 669: To page manuals to the terminal:
1.1 kristaps 670: .Pp
1.187 schwarze 671: .Dl $ mandoc -l mandoc.1 man.1 apropos.1 makewhatis.8
1.28 kristaps 672: .Pp
1.41 kristaps 673: To produce HTML manuals with
1.164 schwarze 674: .Pa mandoc.css
1.41 kristaps 675: as the style-sheet:
1.38 kristaps 676: .Pp
1.164 schwarze 677: .Dl $ mandoc \-T html -O style=mandoc.css mdoc.7 \*(Gt mdoc.7.html
1.38 kristaps 678: .Pp
1.28 kristaps 679: To check over a large set of manuals:
680: .Pp
1.158 schwarze 681: .Dl $ mandoc \-T lint \(gafind /usr/src -name \e*\e.[1-9]\(ga
1.66 kristaps 682: .Pp
683: To produce a series of PostScript manuals for A4 paper:
684: .Pp
1.156 schwarze 685: .Dl $ mandoc \-T ps \-O paper=a4 mdoc.7 man.7 \*(Gt manuals.ps
1.91 schwarze 686: .Pp
687: Convert a modern
688: .Xr mdoc 7
689: manual to the older
690: .Xr man 7
691: format, for use on systems lacking an
692: .Xr mdoc 7
693: parser:
694: .Pp
1.156 schwarze 695: .Dl $ mandoc \-T man foo.mdoc \*(Gt foo.man
1.77 schwarze 696: .Sh DIAGNOSTICS
1.106 schwarze 697: Messages displayed by
698: .Nm
699: follow this format:
1.202 schwarze 700: .Bd -ragged -offset indent
1.205 schwarze 701: .Nm :
1.202 schwarze 702: .Ar file : Ns Ar line : Ns Ar column : level : message : macro args
703: .Pq Ar os
704: .Ed
1.77 schwarze 705: .Pp
1.106 schwarze 706: Line and column numbers start at 1.
707: Both are omitted for messages referring to an input file as a whole.
708: Macro names and arguments are omitted where meaningless.
1.202 schwarze 709: The
710: .Ar os
711: operating system specifier is omitted for messages that are relevant
712: for all operating systems.
1.106 schwarze 713: Fatal messages about invalid command line arguments
714: or operating system errors, for example when memory is exhausted,
715: may also omit the
716: .Ar file
1.104 schwarze 717: and
1.106 schwarze 718: .Ar level
719: fields.
1.104 schwarze 720: .Pp
1.77 schwarze 721: Message levels have the following meanings:
722: .Bl -tag -width "warning"
1.133 schwarze 723: .It Cm unsupp
724: An input file uses unsupported low-level
725: .Xr roff 7
726: features.
727: The output may be incomplete and/or misformatted,
728: so using GNU troff instead of
729: .Nm
730: to process the file may be preferable.
1.77 schwarze 731: .It Cm error
1.216 schwarze 732: Indicates a risk of information loss or severe misformatting,
733: in most cases caused by serious syntax errors.
1.77 schwarze 734: .It Cm warning
1.216 schwarze 735: Indicates a risk that the information shown or its formatting
736: may mismatch the author's intent in minor ways.
737: Additionally, syntax errors are classified at least as warnings,
738: even if they do not usually cause misformatting.
1.185 schwarze 739: .It Cm style
740: An input file uses dubious or discouraged style.
741: This is not a complaint about the syntax, and probably neither
742: formatting nor portability are in danger.
743: While great care is taken to avoid false positives on the higher
744: message levels, the
745: .Cm style
746: level tries to reduce the probability that issues go unnoticed,
747: so it may occasionally issue bogus suggestions.
748: Please use your good judgement to decide whether any particular
749: .Cm style
750: suggestion really justifies a change to the input file.
1.202 schwarze 751: .It Cm base
1.219 schwarze 752: A convention used in the base system of a specific operating system
1.202 schwarze 753: is not adhered to.
754: These are not markup mistakes, and neither the quality of formatting
755: nor portability are in danger.
1.214 schwarze 756: Messages of the
757: .Cm base
758: level are printed with the more intuitive
759: .Cm style
760: .Ar level
761: tag.
1.77 schwarze 762: .El
763: .Pp
764: Messages of the
1.202 schwarze 765: .Cm base ,
1.185 schwarze 766: .Cm style ,
1.133 schwarze 767: .Cm warning ,
768: .Cm error ,
1.77 schwarze 769: and
1.133 schwarze 770: .Cm unsupp
1.131 schwarze 771: levels except those about non-existent or unreadable input files
772: are hidden unless their level, or a lower level, is requested using a
1.77 schwarze 773: .Fl W
774: option or
1.156 schwarze 775: .Fl T Cm lint
1.77 schwarze 776: output mode.
1.202 schwarze 777: .Pp
778: As indicated below, all
779: .Cm base
780: and some
781: .Cm style
782: checks are only performed if a specific operating system name occurs
783: in the arguments of the
784: .Fl W
785: command line option, of the
1.195 schwarze 786: .Ic \&Os
787: macro, of the
788: .Fl Ios
789: command line option, or, if neither are present, in the return value
790: of the
791: .Xr uname 3
792: function.
1.202 schwarze 793: .Ss Conventions for base system manuals
1.189 schwarze 794: .Bl -ohang
1.200 schwarze 795: .It Sy "Mdocdate found"
796: .Pq mdoc , Nx
797: The
798: .Ic \&Dd
799: macro uses CVS
800: .Ic Mdocdate
801: keyword substitution, which is not supported by the
802: .Nx
803: base system.
804: Consider using the conventional
805: .Dq "Month dd, yyyy"
806: format instead.
807: .It Sy "Mdocdate missing"
808: .Pq mdoc , Ox
809: The
810: .Ic \&Dd
811: macro does not use CVS
812: .Ic Mdocdate
813: keyword substitution, but using it is conventionally expected in the
814: .Ox
815: base system.
1.204 schwarze 816: .It Sy "unknown architecture"
817: .Pq mdoc , Ox , Nx
818: The third argument of the
819: .Ic \&Dt
820: macro does not match any of the architectures this operating system
821: is running on.
1.203 schwarze 822: .It Sy "operating system explicitly specified"
823: .Pq mdoc , Ox , Nx
824: The
825: .Ic \&Os
826: macro has an argument.
827: In the base system, it is conventionally left blank.
1.202 schwarze 828: .It Sy "RCS id missing"
829: .Pq Ox , Nx
830: The manual page lacks the comment line with the RCS identifier
831: generated by CVS
832: .Ic OpenBSD
833: or
834: .Ic NetBSD
835: keyword substitution as conventionally used in these operating systems.
1.210 schwarze 836: .It Sy "referenced manual not found"
837: .Pq mdoc
838: An
839: .Ic \&Xr
840: macro references a manual page that is not found in the base system.
841: The path to look for base system manuals is configurable at compile
842: time and defaults to
843: .Pa /usr/share/man : /usr/X11R6/man .
1.202 schwarze 844: .El
845: .Ss Style suggestions
846: .Bl -ohang
1.200 schwarze 847: .It Sy "legacy man(7) date format"
848: .Pq mdoc
849: The
850: .Ic \&Dd
851: macro uses the legacy
852: .Xr man 7
853: date format
854: .Dq yyyy-dd-mm .
855: Consider using the conventional
856: .Xr mdoc 7
857: date format
858: .Dq "Month dd, yyyy"
859: instead.
1.226 schwarze 860: .It Sy "normalizing date format to" : No ...
861: .Pq mdoc , man
862: The
863: .Ic \&Dd
864: or
865: .Ic \&TH
866: macro provides an abbreviated month name or a day number with a
867: leading zero.
868: In the formatted output, the month name is written out in full
869: and the leading zero is omitted.
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.
1.228 schwarze 1613: .It Sy "argument contains two font escapes"
1614: .Pq roff
1615: The second argument of a
1616: .Ic char
1617: request contains more than one font escape sequence.
1618: A wrong font may remain active after using the character.
1.106 schwarze 1619: .It Sy "unknown font, skipping request"
1.115 schwarze 1620: .Pq man , tbl
1.106 schwarze 1621: A
1622: .Xr roff 7
1623: .Ic \&ft
1.115 schwarze 1624: request or a
1625: .Xr tbl 7
1626: .Ic \&f
1627: layout modifier has an unknown
1628: .Ar font
1629: argument.
1.151 schwarze 1630: .It Sy "odd number of characters in request"
1631: .Pq roff
1632: A
1633: .Ic \&tr
1634: request contains an odd number of characters.
1635: The last character is mapped to the blank character.
1.106 schwarze 1636: .El
1637: .Ss "Warnings related to plain text"
1638: .Bl -ohang
1639: .It Sy "blank line in fill mode, using .sp"
1640: .Pq mdoc
1641: The meaning of blank input lines is only well-defined in non-fill mode:
1642: In fill mode, line breaks of text input lines are not supposed to be
1643: significant.
1644: However, for compatibility with groff, blank lines in fill mode
1645: are replaced with
1646: .Ic \&sp
1647: requests.
1648: .It Sy "tab in filled text"
1649: .Pq mdoc , man
1650: The meaning of tab characters is only well-defined in non-fill mode:
1651: In fill mode, whitespace is not supposed to be significant
1652: on text input lines.
1653: As an implementation dependent choice, tab characters on text lines
1654: are passed through to the formatters in any case.
1655: Given that the text before the tab character will be filled,
1656: it is hard to predict which tab stop position the tab will advance to.
1.172 schwarze 1657: .It Sy "new sentence, new line"
1658: .Pq mdoc
1659: A new sentence starts in the middle of a text line.
1660: Start it on a new input line to help formatters produce correct spacing.
1.106 schwarze 1661: .It Sy "invalid escape sequence"
1662: .Pq roff
1663: An escape sequence has an invalid opening argument delimiter, lacks the
1664: closing argument delimiter, or the argument has too few characters.
1665: If the argument is incomplete,
1666: .Ic \e*
1667: and
1668: .Ic \en
1669: expand to an empty string,
1670: .Ic \eB
1671: to the digit
1672: .Sq 0 ,
1673: and
1674: .Ic \ew
1675: to the length of the incomplete argument.
1676: All other invalid escape sequences are ignored.
1677: .It Sy "undefined string, using \(dq\(dq"
1678: .Pq roff
1679: If a string is used without being defined before,
1680: its value is implicitly set to the empty string.
1681: However, defining strings explicitly before use
1682: keeps the code more readable.
1683: .El
1.138 schwarze 1684: .Ss "Warnings related to tables"
1685: .Bl -ohang
1686: .It Sy "tbl line starts with span"
1687: .Pq tbl
1688: The first cell in a table layout line is a horizontal span
1689: .Pq Sq Cm s .
1690: Data provided for this cell is ignored, and nothing is printed in the cell.
1691: .It Sy "tbl column starts with span"
1692: .Pq tbl
1693: The first line of a table layout specification
1694: requests a vertical span
1695: .Pq Sq Cm ^ .
1696: Data provided for this cell is ignored, and nothing is printed in the cell.
1697: .It Sy "skipping vertical bar in tbl layout"
1698: .Pq tbl
1699: A table layout specification contains more than two consecutive vertical bars.
1700: A double bar is printed, all additional bars are discarded.
1.106 schwarze 1701: .El
1702: .Ss "Errors related to tables"
1.136 schwarze 1703: .Bl -ohang
1704: .It Sy "non-alphabetic character in tbl options"
1705: .Pq tbl
1706: The table options line contains a character other than a letter,
1707: blank, or comma where the beginning of an option name is expected.
1708: The character is ignored.
1709: .It Sy "skipping unknown tbl option"
1710: .Pq tbl
1711: The table options line contains a string of letters that does not
1712: match any known option name.
1713: The word is ignored.
1714: .It Sy "missing tbl option argument"
1715: .Pq tbl
1716: A table option that requires an argument is not followed by an
1717: opening parenthesis, or the opening parenthesis is immediately
1718: followed by a closing parenthesis.
1719: The option is ignored.
1720: .It Sy "wrong tbl option argument size"
1721: .Pq tbl
1722: A table option argument contains an invalid number of characters.
1723: Both the option and the argument are ignored.
1.138 schwarze 1724: .It Sy "empty tbl layout"
1725: .Pq tbl
1726: A table layout specification is completely empty,
1727: specifying zero lines and zero columns.
1728: As a fallback, a single left-justified column is used.
1729: .It Sy "invalid character in tbl layout"
1730: .Pq tbl
1731: A table layout specification contains a character that can neither
1732: be interpreted as a layout key character nor as a layout modifier,
1733: or a modifier precedes the first key.
1734: The invalid character is discarded.
1735: .It Sy "unmatched parenthesis in tbl layout"
1736: .Pq tbl
1737: A table layout specification contains an opening parenthesis,
1738: but no matching closing parenthesis.
1739: The rest of the input line, starting from the parenthesis, has no effect.
1.139 schwarze 1740: .It Sy "tbl without any data cells"
1741: .Pq tbl
1742: A table does not contain any data cells.
1743: It will probably produce no output.
1744: .It Sy "ignoring data in spanned tbl cell"
1745: .Pq tbl
1746: A table cell is marked as a horizontal span
1747: .Pq Sq Cm s
1748: or vertical span
1749: .Pq Sq Cm ^
1750: in the table layout, but it contains data.
1751: The data is ignored.
1752: .It Sy "ignoring extra tbl data cells"
1753: .Pq tbl
1754: A data line contains more cells than the corresponding layout line.
1755: The data in the extra cells is ignored.
1756: .It Sy "data block open at end of tbl"
1757: .Pq tbl
1758: A data block is opened with
1759: .Cm T{ ,
1760: but never closed with a matching
1761: .Cm T} .
1762: The remaining data lines of the table are all put into one cell,
1763: and any remaining cells stay empty.
1.106 schwarze 1764: .El
1765: .Ss "Errors related to roff, mdoc, and man code"
1766: .Bl -ohang
1.215 schwarze 1767: .It Sy "duplicate prologue macro"
1768: .Pq mdoc
1769: One of the prologue macros occurs more than once.
1770: The last instance overrides all previous ones.
1771: .It Sy "skipping late title macro"
1772: .Pq mdoc
1773: The
1774: .Ic \&Dt
1775: macro appears after the first non-prologue macro.
1776: Traditional formatters cannot handle this because
1777: they write the page header before parsing the document body.
1778: Even though this technical restriction does not apply to
1779: .Nm ,
1780: traditional semantics is preserved.
1781: The late macro is discarded including its arguments.
1.106 schwarze 1782: .It Sy "input stack limit exceeded, infinite loop?"
1783: .Pq roff
1784: Explicit recursion limits are implemented for the following features,
1785: in order to prevent infinite loops:
1786: .Bl -dash -compact
1787: .It
1788: expansion of nested escape sequences
1789: including expansion of strings and number registers,
1790: .It
1791: expansion of nested user-defined macros,
1792: .It
1793: and
1794: .Ic \&so
1795: file inclusion.
1796: .El
1797: When a limit is hit, the output is incorrect, typically losing
1798: some content, but the parser can continue.
1799: .It Sy "skipping bad character"
1800: .Pq mdoc , man , roff
1801: The input file contains a byte that is not a printable
1802: .Xr ascii 7
1803: character.
1804: The message mentions the character number.
1805: The offending byte is replaced with a question mark
1806: .Pq Sq \&? .
1807: Consider editing the input file to replace the byte with an ASCII
1808: transliteration of the intended character.
1809: .It Sy "skipping unknown macro"
1810: .Pq mdoc , man , roff
1811: The first identifier on a request or macro line is neither recognized as a
1812: .Xr roff 7
1813: request, nor as a user-defined macro, nor, respectively, as an
1814: .Xr mdoc 7
1815: or
1816: .Xr man 7
1817: macro.
1818: It may be mistyped or unsupported.
1819: The request or macro is discarded including its arguments.
1.227 schwarze 1820: .It Sy "skipping request outside macro"
1821: .Pq roff
1822: A
1823: .Ic shift
1824: or
1825: .Ic return
1826: request occurs outside any macro definition and has no effect.
1.133 schwarze 1827: .It Sy "skipping insecure request"
1828: .Pq roff
1829: An input file attempted to run a shell command
1830: or to read or write an external file.
1831: Such attempts are denied for security reasons.
1.106 schwarze 1832: .It Sy "skipping item outside list"
1.118 schwarze 1833: .Pq mdoc , eqn
1.106 schwarze 1834: An
1835: .Ic \&It
1836: macro occurs outside any
1837: .Ic \&Bl
1.118 schwarze 1838: list, or an
1839: .Xr eqn 7
1840: .Ic above
1841: delimiter occurs outside any pile.
1.106 schwarze 1842: It is discarded including its arguments.
1843: .It Sy "skipping column outside column list"
1844: .Pq mdoc
1845: A
1846: .Ic \&Ta
1847: macro occurs outside any
1848: .Ic \&Bl Fl column
1849: block.
1850: It is discarded including its arguments.
1851: .It Sy "skipping end of block that is not open"
1852: .Pq mdoc , man , eqn , tbl , roff
1853: Various syntax elements can only be used to explicitly close blocks
1854: that have previously been opened.
1855: An
1856: .Xr mdoc 7
1857: block closing macro, a
1858: .Xr man 7
1.206 schwarze 1859: .Ic \&ME , \&RE
1.106 schwarze 1860: or
1861: .Ic \&UE
1.118 schwarze 1862: macro, an
1863: .Xr eqn 7
1864: right delimiter or closing brace, or the end of an equation, table, or
1.106 schwarze 1865: .Xr roff 7
1866: conditional request is encountered but no matching block is open.
1867: The offending request or macro is discarded.
1.135 schwarze 1868: .It Sy "fewer RS blocks open, skipping"
1869: .Pq man
1870: The
1871: .Ic \&RE
1872: macro is invoked with an argument, but less than the specified number of
1873: .Ic \&RS
1874: blocks is open.
1875: The
1876: .Ic \&RE
1877: macro is discarded.
1.106 schwarze 1878: .It Sy "inserting missing end of block"
1879: .Pq mdoc , tbl
1880: Various
1881: .Xr mdoc 7
1882: macros as well as tables require explicit closing by dedicated macros.
1883: A block that doesn't support bad nesting
1884: ends before all of its children are properly closed.
1885: The open child nodes are closed implicitly.
1.152 schwarze 1886: .It Sy "appending missing end of block"
1.106 schwarze 1887: .Pq mdoc , man , eqn , tbl , roff
1888: At the end of the document, an explicit
1889: .Xr mdoc 7
1890: block, a
1891: .Xr man 7
1892: next-line scope or
1.206 schwarze 1893: .Ic \&MT , \&RS
1.106 schwarze 1894: or
1895: .Ic \&UR
1896: block, an equation, table, or
1897: .Xr roff 7
1898: conditional or ignore block is still open.
1899: The open block is closed implicitly.
1900: .It Sy "escaped character not allowed in a name"
1901: .Pq roff
1902: Macro, string and register identifiers consist of printable,
1903: non-whitespace ASCII characters.
1904: Escape sequences and characters and strings expressed in terms of them
1905: cannot form part of a name.
1906: The first argument of an
1907: .Ic \&am ,
1908: .Ic \&as ,
1909: .Ic \&de ,
1910: .Ic \&ds ,
1911: .Ic \&nr ,
1912: or
1913: .Ic \&rr
1914: request, or any argument of an
1915: .Ic \&rm
1916: request, or the name of a request or user defined macro being called,
1917: is terminated by an escape sequence.
1918: In the cases of
1919: .Ic \&as ,
1920: .Ic \&ds ,
1921: and
1922: .Ic \&nr ,
1923: the request has no effect at all.
1924: In the cases of
1925: .Ic \&am ,
1926: .Ic \&de ,
1927: .Ic \&rr ,
1928: and
1929: .Ic \&rm ,
1930: what was parsed up to this point is used as the arguments to the request,
1931: and the rest of the input line is discarded including the escape sequence.
1932: When parsing for a request or a user-defined macro name to be called,
1933: only the escape sequence is discarded.
1934: The characters preceding it are used as the request or macro name,
1935: the characters following it are used as the arguments to the request or macro.
1.227 schwarze 1936: .It Sy "using macro argument outside macro"
1937: .Pq roff
1938: The escape sequence \e$ occurs outside any macro definition
1939: and expands to the empty string.
1940: .It Sy "argument number is not numeric"
1941: .Pq roff
1942: The argument of the escape sequence \e$ is not a digit;
1943: the escape sequence expands to the empty string.
1.124 schwarze 1944: .It Sy "NOT IMPLEMENTED: Bd -file"
1945: .Pq mdoc
1946: For security reasons, the
1947: .Ic \&Bd
1948: macro does not support the
1949: .Fl file
1950: argument.
1951: By requesting the inclusion of a sensitive file, a malicious document
1952: might otherwise trick a privileged user into inadvertently displaying
1953: the file on the screen, revealing the file content to bystanders.
1954: The argument is ignored including the file name following it.
1.163 schwarze 1955: .It Sy "skipping display without arguments"
1956: .Pq mdoc
1957: A
1958: .Ic \&Bd
1959: block macro does not have any arguments.
1960: The block is discarded, and the block content is displayed in
1961: whatever mode was active before the block.
1.106 schwarze 1962: .It Sy "missing list type, using -item"
1963: .Pq mdoc
1964: A
1965: .Ic \&Bl
1966: macro fails to specify the list type.
1.194 schwarze 1967: .It Sy "argument is not numeric, using 1"
1968: .Pq roff
1969: The argument of a
1970: .Ic \&ce
1971: request is not a number.
1.228 schwarze 1972: .It Sy "argument is not a character"
1973: .Pq roff
1974: The first argument of a
1975: .Ic char
1976: request is neither a single ASCII character
1977: nor a single character escape sequence.
1978: The request is ignored including all its arguments.
1.106 schwarze 1979: .It Sy "missing manual name, using \(dq\(dq"
1980: .Pq mdoc
1981: The first call to
1.168 schwarze 1982: .Ic \&Nm ,
1983: or any call in the NAME section, lacks the required argument.
1.106 schwarze 1984: .It Sy "uname(3) system call failed, using UNKNOWN"
1985: .Pq mdoc
1986: The
1987: .Ic \&Os
1988: macro is called without arguments, and the
1989: .Xr uname 3
1990: system call failed.
1991: As a workaround,
1992: .Nm
1993: can be compiled with
1994: .Sm off
1995: .Fl D Cm OSNAME=\(dq\e\(dq Ar string Cm \e\(dq\(dq .
1996: .Sm on
1997: .It Sy "unknown standard specifier"
1998: .Pq mdoc
1999: An
2000: .Ic \&St
2001: macro has an unknown argument and is discarded.
2002: .It Sy "skipping request without numeric argument"
1.118 schwarze 2003: .Pq roff , eqn
1.106 schwarze 2004: An
2005: .Ic \&it
1.118 schwarze 2006: request or an
2007: .Xr eqn 7
2008: .Ic \&size
2009: or
2010: .Ic \&gsize
2011: statement has a non-numeric or negative argument or no argument at all.
2012: The invalid request or statement is ignored.
1.227 schwarze 2013: .It Sy "excessive shift"
2014: .Pq roff
2015: The argument of a
2016: .Ic shift
2017: request is larger than the number of arguments of the macro that is
2018: currently being executed.
2019: All macro arguments are deleted and \en(.$ is set to zero.
1.132 schwarze 2020: .It Sy "NOT IMPLEMENTED: .so with absolute path or \(dq..\(dq"
2021: .Pq roff
2022: For security reasons,
2023: .Nm
2024: allows
2025: .Ic \&so
2026: file inclusion requests only with relative paths
2027: and only without ascending to any parent directory.
2028: By requesting the inclusion of a sensitive file, a malicious document
2029: might otherwise trick a privileged user into inadvertently displaying
2030: the file on the screen, revealing the file content to bystanders.
2031: .Nm
2032: only shows the path as it appears behind
2033: .Ic \&so .
2034: .It Sy ".so request failed"
2035: .Pq roff
2036: Servicing a
2037: .Ic \&so
2038: request requires reading an external file, but the file could not be
2039: opened.
2040: .Nm
2041: only shows the path as it appears behind
2042: .Ic \&so .
1.106 schwarze 2043: .It Sy "skipping all arguments"
2044: .Pq mdoc , man , eqn , roff
2045: An
2046: .Xr mdoc 7
2047: .Ic \&Bt ,
2048: .Ic \&Ed ,
2049: .Ic \&Ef ,
2050: .Ic \&Ek ,
2051: .Ic \&El ,
1.144 schwarze 2052: .Ic \&Lp ,
2053: .Ic \&Pp ,
1.106 schwarze 2054: .Ic \&Re ,
1.143 schwarze 2055: .Ic \&Rs ,
1.106 schwarze 2056: or
2057: .Ic \&Ud
2058: macro, an
2059: .Ic \&It
2060: macro in a list that don't support item heads, a
2061: .Xr man 7
2062: .Ic \&LP ,
2063: .Ic \&P ,
2064: or
2065: .Ic \&PP
2066: macro, an
2067: .Xr eqn 7
1.120 schwarze 2068: .Ic \&EQ
2069: or
1.106 schwarze 2070: .Ic \&EN
2071: macro, or a
2072: .Xr roff 7
1.148 schwarze 2073: .Ic \&br ,
2074: .Ic \&fi ,
2075: or
2076: .Ic \&nf
1.144 schwarze 2077: request or
1.106 schwarze 2078: .Sq \&..
2079: block closing request is invoked with at least one argument.
2080: All arguments are ignored.
2081: .It Sy "skipping excess arguments"
1.135 schwarze 2082: .Pq mdoc , man , roff
1.150 schwarze 2083: A macro or request is invoked with too many arguments:
2084: .Bl -dash -offset 2n -width 2n -compact
2085: .It
2086: .Ic \&Fo ,
1.206 schwarze 2087: .Ic \&MT ,
1.150 schwarze 2088: .Ic \&PD ,
2089: .Ic \&RS ,
2090: .Ic \&UR ,
2091: .Ic \&ft ,
2092: or
2093: .Ic \&sp
2094: with more than one argument
2095: .It
1.144 schwarze 2096: .Ic \&An
1.150 schwarze 2097: with another argument after
1.144 schwarze 2098: .Fl split
2099: or
1.150 schwarze 2100: .Fl nosplit
2101: .It
2102: .Ic \&RE
2103: with more than one argument or with a non-integer argument
2104: .It
2105: .Ic \&OP
2106: or a request of the
2107: .Ic \&de
2108: family with more than two arguments
1.154 schwarze 2109: .It
2110: .Ic \&Dt
2111: with more than three arguments
1.150 schwarze 2112: .It
2113: .Ic \&TH
2114: with more than five arguments
2115: .It
1.145 schwarze 2116: .Ic \&Bd ,
2117: .Ic \&Bk ,
2118: or
2119: .Ic \&Bl
1.150 schwarze 2120: with invalid arguments
2121: .El
1.106 schwarze 2122: The excess arguments are ignored.
1.133 schwarze 2123: .El
2124: .Ss Unsupported features
2125: .Bl -ohang
2126: .It Sy "input too large"
2127: .Pq mdoc , man
2128: Currently,
2129: .Nm
2130: cannot handle input files larger than its arbitrary size limit
2131: of 2^31 bytes (2 Gigabytes).
2132: Since useful manuals are always small, this is not a problem in practice.
2133: Parsing is aborted as soon as the condition is detected.
1.136 schwarze 2134: .It Sy "unsupported control character"
2135: .Pq roff
2136: An ASCII control character supported by other
2137: .Xr roff 7
2138: implementations but not by
2139: .Nm
2140: was found in an input file.
2141: It is replaced by a question mark.
1.133 schwarze 2142: .It Sy "unsupported roff request"
2143: .Pq roff
2144: An input file contains a
2145: .Xr roff 7
2146: request supported by GNU troff or Heirloom troff but not by
2147: .Nm ,
2148: and it is likely that this will cause information loss
2149: or considerable misformatting.
1.139 schwarze 2150: .It Sy "eqn delim option in tbl"
2151: .Pq eqn , tbl
2152: The options line of a table defines equation delimiters.
2153: Any equation source code contained in the table will be printed unformatted.
2154: .It Sy "unsupported table layout modifier"
1.138 schwarze 2155: .Pq tbl
2156: A table layout specification contains an
2157: .Sq Cm m
2158: modifier.
2159: The modifier is discarded.
1.133 schwarze 2160: .It Sy "ignoring macro in table"
1.139 schwarze 2161: .Pq tbl , mdoc , man
2162: A table contains an invocation of an
2163: .Xr mdoc 7
2164: or
2165: .Xr man 7
2166: macro or of an undefined macro.
2167: The macro is ignored, and its arguments are handled
2168: as if they were a text line.
1.106 schwarze 2169: .El
1.1 kristaps 2170: .Sh SEE ALSO
1.141 schwarze 2171: .Xr apropos 1 ,
2172: .Xr man 1 ,
1.85 kristaps 2173: .Xr eqn 7 ,
1.57 kristaps 2174: .Xr man 7 ,
1.13 kristaps 2175: .Xr mandoc_char 7 ,
1.84 kristaps 2176: .Xr mdoc 7 ,
2177: .Xr roff 7 ,
2178: .Xr tbl 7
1.173 schwarze 2179: .Sh HISTORY
2180: The
2181: .Nm
2182: utility first appeared in
2183: .Ox 4.8 .
2184: The option
2185: .Fl I
2186: appeared in
2187: .Ox 5.2 ,
2188: and
2189: .Fl aCcfhKklMSsw
2190: in
2191: .Ox 5.7 .
1.1 kristaps 2192: .Sh AUTHORS
1.156 schwarze 2193: .An -nosplit
1.1 kristaps 2194: The
2195: .Nm
1.26 kristaps 2196: utility was written by
1.141 schwarze 2197: .An Kristaps Dzonsons Aq Mt kristaps@bsd.lv
2198: and is maintained by
2199: .An Ingo Schwarze Aq Mt schwarze@openbsd.org .
CVSweb