[BACK]Return to mandoc.1 CVS log [TXT][DIR] Up to [cvsweb.bsd.lv] / mandoc

Annotation of mandoc/mandoc.1, Revision 1.272

1.272   ! schwarze    1: .\" $Id: mandoc.1,v 1.271 2025/06/26 17:26:23 schwarze Exp $
1.1       kristaps    2: .\"
1.268     schwarze    3: .\" Copyright (c) 2012, 2014-2023, 2025 Ingo Schwarze <schwarze@openbsd.org>
1.92      schwarze    4: .\" Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
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.272   ! schwarze   18: .Dd $Mdocdate: June 26 2025 $
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
1.245     schwarze   55: .Xr less 1
1.107     schwarze   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
1.245     schwarze   61: .Xr less 1
1.107     schwarze   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
1.239     schwarze  225: are also supported and are documented in
                    226: .Xr man 1 .
1.109     schwarze  227: In
                    228: .Fl f
                    229: and
                    230: .Fl k
                    231: mode,
                    232: .Nm
                    233: also supports the options
1.183     schwarze  234: .Fl CMmOSs
1.109     schwarze  235: described in the
                    236: .Xr apropos 1
                    237: manual.
1.182     schwarze  238: The options
                    239: .Fl fkl
                    240: are mutually exclusive and override each other.
1.66      kristaps  241: .Ss ASCII Output
1.224     schwarze  242: Use
1.156     schwarze  243: .Fl T Cm ascii
1.224     schwarze  244: to force text output in 7-bit ASCII character encoding documented in the
                    245: .Xr ascii 7
                    246: manual page, ignoring the
                    247: .Xr locale 1
                    248: set in the environment.
1.66      kristaps  249: .Pp
                    250: Font styles are applied by using back-spaced encoding such that an
                    251: underlined character
                    252: .Sq c
                    253: is rendered as
                    254: .Sq _ Ns \e[bs] Ns c ,
                    255: where
                    256: .Sq \e[bs]
                    257: is the back-space character number 8.
                    258: Emboldened characters are rendered as
                    259: .Sq c Ns \e[bs] Ns c .
1.235     schwarze  260: This markup is typically converted to appropriate terminal sequences by
                    261: the pager or
                    262: .Xr ul 1 .
                    263: To remove the markup, pipe the output to
                    264: .Xr col 1
                    265: .Fl b
                    266: instead.
1.66      kristaps  267: .Pp
                    268: The special characters documented in
                    269: .Xr mandoc_char 7
                    270: are rendered best-effort in an ASCII equivalent.
1.237     schwarze  271: In particular, opening and closing
                    272: .Sq single quotes
                    273: are represented as characters number 0x60 and 0x27, respectively,
                    274: which agrees with all ASCII standards from 1965 to the latest
                    275: revision (2012) and which matches the traditional way in which
                    276: .Xr roff 7
                    277: formatters represent single quotes in ASCII output.
                    278: This correct ASCII rendering may look strange with modern
                    279: Unicode-compatible fonts because contrary to ASCII, Unicode uses
                    280: the code point U+0060 for the grave accent only, never for an opening
                    281: quote.
1.66      kristaps  282: .Pp
                    283: The following
                    284: .Fl O
                    285: arguments are accepted:
1.19      kristaps  286: .Bl -tag -width Ds
1.98      schwarze  287: .It Cm indent Ns = Ns Ar indent
                    288: The left margin for normal text is set to
                    289: .Ar indent
1.267     schwarze  290: blank characters instead of the default of five.
1.98      schwarze  291: Increasing this is not recommended; it may result in degraded formatting,
1.99      schwarze  292: for example overfull lines or ugly line breaks.
1.223     schwarze  293: When output is to a pager on a terminal that is less than 66 columns
                    294: wide, the default is reduced to three columns.
1.231     schwarze  295: .It Cm tag Ns Op = Ns Ar term
                    296: If the formatted manual page is opened in a pager,
                    297: go to the definition of the
                    298: .Ar term
                    299: rather than showing the manual page from the beginning.
                    300: If no
                    301: .Ar term
                    302: is specified, reuse the first command line argument that is not a
                    303: .Ar section
                    304: number.
1.236     schwarze  305: If that argument is in
                    306: .Xr apropos 1
                    307: .Ar key Ns = Ns Ar val
                    308: format, only the
                    309: .Ar val
                    310: is used rather than the argument as a whole.
                    311: This is useful for commands like
                    312: .Ql man -akO tag Ic=ulimit
                    313: to search for a keyword and jump right to its definition
                    314: in the matching manual pages.
1.66      kristaps  315: .It Cm width Ns = Ns Ar width
                    316: The output width is set to
1.223     schwarze  317: .Ar width
                    318: instead of the default of 78.
                    319: When output is to a pager on a terminal that is less than 79 columns
                    320: wide, the default is reduced to one less than the terminal width.
                    321: In any case, lines that are output in literal mode are never wrapped
                    322: and may exceed the output width.
1.1       kristaps  323: .El
1.66      kristaps  324: .Ss HTML Output
                    325: Output produced by
1.156     schwarze  326: .Fl T Cm html
1.114     kristaps  327: conforms to HTML5 using optional self-closing tags.
1.116     kristaps  328: Equations rendered from
                    329: .Xr eqn 7
                    330: blocks use MathML.
1.224     schwarze  331: Non-ASCII characters are rendered
1.225     schwarze  332: as hexadecimal Unicode character references.
1.66      kristaps  333: .Pp
                    334: The following
1.64      kristaps  335: .Fl O
1.66      kristaps  336: arguments are accepted:
1.37      kristaps  337: .Bl -tag -width Ds
1.94      kristaps  338: .It Cm fragment
1.123     schwarze  339: Omit the <!DOCTYPE> declaration and the <html>, <head>, and <body>
                    340: elements and only emit the subtree below the <body> element.
1.94      kristaps  341: The
                    342: .Cm style
1.97      schwarze  343: argument will be ignored.
1.94      kristaps  344: This is useful when embedding manual content within existing documents.
1.64      kristaps  345: .It Cm includes Ns = Ns Ar fmt
1.40      kristaps  346: The string
                    347: .Ar fmt ,
1.49      kristaps  348: for example,
1.40      kristaps  349: .Ar ../src/%I.html ,
                    350: is used as a template for linked header files (usually via the
1.180     schwarze  351: .Ic \&In
1.57      kristaps  352: macro).
                    353: Instances of
1.43      kristaps  354: .Sq \&%I
1.57      kristaps  355: are replaced with the include filename.
                    356: The default is not to present a
1.40      kristaps  357: hyperlink.
1.229     schwarze  358: .It Cm man Ns = Ns Ar fmt Ns Op ; Ns Ar fmt
1.39      kristaps  359: The string
                    360: .Ar fmt ,
1.49      kristaps  361: for example,
1.39      kristaps  362: .Ar ../html%S/%N.%S.html ,
                    363: is used as a template for linked manuals (usually via the
1.180     schwarze  364: .Ic \&Xr
1.57      kristaps  365: macro).
                    366: Instances of
1.43      kristaps  367: .Sq \&%N
1.40      kristaps  368: and
                    369: .Sq %S
                    370: are replaced with the linked manual's name and section, respectively.
1.57      kristaps  371: If no section is included, section 1 is assumed.
                    372: The default is not to
1.40      kristaps  373: present a hyperlink.
1.229     schwarze  374: If two formats are given and a file
                    375: .Ar %N.%S
                    376: exists in the current directory, the first format is used;
                    377: otherwise, the second format is used.
1.64      kristaps  378: .It Cm style Ns = Ns Ar style.css
1.58      kristaps  379: The file
                    380: .Ar style.css
1.265     schwarze  381: is used as an external stylesheet.
1.58      kristaps  382: This must be a valid absolute or
                    383: relative URI.
1.265     schwarze  384: .Pp
                    385: Using the file
                    386: .Pa mandoc.css
                    387: that is distributed with
                    388: .Nm
                    389: is recommended.
                    390: It provides an appearance similar to terminal output with some additional
                    391: features specific to
                    392: .Nm
                    393: HTML output, in particular making anchor locations that support
                    394: deep linking stand out visually by putting a dotted line under them,
                    395: providing tooltips showing the semantic function of elements (macro
                    396: names), providing some simple aspects of responsive web design, and
                    397: providing simple support for users who prefer a dark color scheme.
                    398: .Pp
                    399: Using a custom CSS file is possible, but writing it requires
                    400: proficiency in all of the languages HTML 5, CSS 4, and
                    401: .Xr mdoc 7
                    402: and familiarity with the
                    403: .Nm Ns -specific
                    404: classes used in
                    405: .Pa mandoc.css .
                    406: Besides, while the file
                    407: .Pa mandoc.css
                    408: is always adapted to the HTML output generated by the
                    409: .Nm
                    410: version it is distributed with, maintaining a custom CSS file usually
                    411: requires adaptations each time
                    412: .Nm
                    413: is upgraded to a new version.
                    414: .Pp
                    415: If a stylesheet is not specified with
                    416: .Fl O Cm style ,
                    417: .Fl T Cm html
                    418: embeds a minimal stylesheet into the HTML output, mostly to select
                    419: adequate font-style and font-weight attributes for various macros.
                    420: The result is readable in any graphical or text-based web browser,
                    421: but does not aim for looking similar to terminal output.
                    422: Instead, formatting is mostly left to browser defaults
                    423: and to user settings in the browser configuration.
1.244     schwarze  424: .It Cm tag Ns Op = Ns Ar term
                    425: Same syntax and semantics as for
                    426: .Sx ASCII Output .
                    427: This is implemented by passing a
                    428: .Ic file://
                    429: URI ending in a fragment identifier to the pager
                    430: rather than passing merely a file name.
                    431: When using this argument, use a pager supporting such URIs, for example
                    432: .Bd -literal -offset 3n
                    433: MANPAGER='lynx -force_html' man -T html -O tag=MANPAGER man
                    434: MANPAGER='w3m -T text/html' man -T html -O tag=toc mandoc
                    435: .Ed
                    436: .Pp
1.246     schwarze  437: Consequently, for HTML output, this argument does not work with
1.244     schwarze  438: .Xr more 1
                    439: or
                    440: .Xr less 1 .
1.246     schwarze  441: For example,
                    442: .Ql MANPAGER=less man -T html -O tag=toc mandoc
                    443: does not work because
                    444: .Xr less 1
                    445: does not support
                    446: .Ic file://
                    447: URIs.
1.230     schwarze  448: .It Cm toc
                    449: If an input file contains at least two non-standard sections,
                    450: print a table of contents near the beginning of the output.
1.61      kristaps  451: .El
1.93      schwarze  452: .Ss Locale Output
1.224     schwarze  453: By default,
                    454: .Nm
                    455: automatically selects UTF-8 or ASCII output according to the current
                    456: .Xr locale 1 .
                    457: If any of the environment variables
                    458: .Ev LC_ALL ,
                    459: .Ev LC_CTYPE ,
                    460: or
                    461: .Ev LANG
                    462: are set and the first one that is set
                    463: selects the UTF-8 character encoding, it produces
                    464: .Sx UTF-8 Output ;
                    465: otherwise, it falls back to
                    466: .Sx ASCII Output .
                    467: This output mode can also be selected explicitly with
1.156     schwarze  468: .Fl T Cm locale .
1.95      kristaps  469: .Ss Man Output
1.224     schwarze  470: Use
                    471: .Fl T Cm man
                    472: to translate
                    473: .Xr mdoc 7
                    474: input into
1.95      kristaps  475: .Xr man 7
                    476: output format.
1.102     schwarze  477: This is useful for distributing manual sources to legacy systems
1.96      kristaps  478: lacking
1.95      kristaps  479: .Xr mdoc 7
                    480: formatters.
1.242     schwarze  481: Embedded
                    482: .Xr eqn 7
                    483: and
                    484: .Xr tbl 7
                    485: code is not supported.
1.95      kristaps  486: .Pp
1.224     schwarze  487: If the input format of a file is
1.95      kristaps  488: .Xr man 7 ,
1.247     schwarze  489: the input is copied to the output.
1.97      schwarze  490: The parser is also run, and as usual, the
                    491: .Fl W
                    492: level controls which
                    493: .Sx DIAGNOSTICS
                    494: are displayed before copying the input to the output.
1.175     schwarze  495: .Ss Markdown Output
1.224     schwarze  496: Use
                    497: .Fl T Cm markdown
                    498: to translate
1.175     schwarze  499: .Xr mdoc 7
1.224     schwarze  500: input to the markdown format conforming to
1.256     schwarze  501: .Lk https://daringfireball.net/projects/markdown/syntax.text\
1.175     schwarze  502:  "John Gruber's 2004 specification" .
1.178     schwarze  503: The output also almost conforms to the
1.256     schwarze  504: .Lk https://commonmark.org/ CommonMark
1.178     schwarze  505: specification.
                    506: .Pp
                    507: The character set used for the markdown output is ASCII.
                    508: Non-ASCII characters are encoded as HTML entities.
                    509: Since that is not possible in literal font contexts, because these
                    510: are rendered as code spans and code blocks in the markdown output,
                    511: non-ASCII characters are transliterated to ASCII approximations in
                    512: these contexts.
1.175     schwarze  513: .Pp
                    514: Markdown is a very weak markup language, so all semantic markup is
                    515: lost, and even part of the presentational markup may be lost.
                    516: Do not use this as an intermediate step in converting to HTML;
                    517: instead, use
                    518: .Fl T Cm html
                    519: directly.
                    520: .Pp
                    521: The
                    522: .Xr man 7 ,
                    523: .Xr tbl 7 ,
                    524: and
                    525: .Xr eqn 7
                    526: input languages are not supported by
                    527: .Fl T Cm markdown
                    528: output mode.
1.93      schwarze  529: .Ss PDF Output
                    530: PDF-1.1 output may be generated by
1.156     schwarze  531: .Fl T Cm pdf .
1.93      schwarze  532: See
                    533: .Sx PostScript Output
                    534: for
                    535: .Fl O
                    536: arguments and defaults.
1.62      kristaps  537: .Ss PostScript Output
1.65      kristaps  538: PostScript
                    539: .Qq Adobe-3.0
                    540: Level-2 pages may be generated by
1.156     schwarze  541: .Fl T Cm ps .
1.67      kristaps  542: Output pages default to letter sized and are rendered in the Times font
1.70      kristaps  543: family, 11-point.
                    544: Margins are calculated as 1/9 the page length and width.
1.71      kristaps  545: Line-height is 1.4m.
1.66      kristaps  546: .Pp
                    547: Special characters are rendered as in
                    548: .Sx ASCII Output .
                    549: .Pp
                    550: The following
                    551: .Fl O
                    552: arguments are accepted:
                    553: .Bl -tag -width Ds
                    554: .It Cm paper Ns = Ns Ar name
                    555: The paper size
                    556: .Ar name
                    557: may be one of
1.68      kristaps  558: .Ar a3 ,
                    559: .Ar a4 ,
                    560: .Ar a5 ,
                    561: .Ar legal ,
1.66      kristaps  562: or
                    563: .Ar letter .
1.68      kristaps  564: You may also manually specify dimensions as
                    565: .Ar NNxNN ,
                    566: width by height in millimetres.
                    567: If an unknown value is encountered,
                    568: .Ar letter
                    569: is used.
1.66      kristaps  570: .El
1.224     schwarze  571: .Ss UTF-8 Output
1.93      schwarze  572: Use
1.156     schwarze  573: .Fl T Cm utf8
1.224     schwarze  574: to force text output in UTF-8 multi-byte character encoding,
                    575: ignoring the
                    576: .Xr locale 1
                    577: settings in the environment.
1.73      kristaps  578: See
1.224     schwarze  579: .Sx ASCII Output
                    580: regarding font styles and
                    581: .Fl O
                    582: arguments.
                    583: .Pp
                    584: On operating systems lacking locale or wide character support, and
                    585: on those where the internal character representation is not UCS-4,
                    586: .Nm
                    587: always falls back to
                    588: .Sx ASCII Output .
1.161     schwarze  589: .Ss Syntax tree output
                    590: Use
                    591: .Fl T Cm tree
                    592: to show a human readable representation of the syntax tree.
                    593: It is useful for debugging the source code of manual pages.
1.162     schwarze  594: The exact format is subject to change, so don't write parsers for it.
1.170     schwarze  595: .Pp
                    596: The first paragraph shows meta data found in the
                    597: .Xr mdoc 7
                    598: prologue, on the
                    599: .Xr man 7
                    600: .Ic \&TH
                    601: line, or the fallbacks used.
                    602: .Pp
                    603: In the tree dump, each output line shows one syntax tree node.
1.161     schwarze  604: Child nodes are indented with respect to their parent node.
                    605: The columns are:
                    606: .Pp
                    607: .Bl -enum -compact
                    608: .It
                    609: For macro nodes, the macro name; for text and
                    610: .Xr tbl 7
1.162     schwarze  611: nodes, the content.
                    612: There is a special format for
1.161     schwarze  613: .Xr eqn 7
                    614: nodes.
                    615: .It
                    616: Node type (text, elem, block, head, body, body-end, tail, tbl, eqn).
                    617: .It
                    618: Flags:
                    619: .Bl -dash -compact
                    620: .It
                    621: An opening parenthesis if the node is an opening delimiter.
                    622: .It
                    623: An asterisk if the node starts a new input line.
                    624: .It
                    625: The input line number (starting at one).
                    626: .It
                    627: A colon.
                    628: .It
                    629: The input column number (starting at one).
                    630: .It
                    631: A closing parenthesis if the node is a closing delimiter.
                    632: .It
                    633: A full stop if the node ends a sentence.
1.169     schwarze  634: .It
1.174     schwarze  635: BROKEN if the node is a block broken by another block.
                    636: .It
1.169     schwarze  637: NOSRC if the node is not in the input file,
                    638: but automatically generated from macros.
                    639: .It
                    640: NOPRT if the node is not supposed to generate output
                    641: for any output format.
1.161     schwarze  642: .El
1.174     schwarze  643: .El
                    644: .Pp
                    645: The following
                    646: .Fl O
                    647: argument is accepted:
                    648: .Bl -tag -width Ds
                    649: .It Cm noval
                    650: Skip validation and show the unvalidated syntax tree.
                    651: This can help to find out whether a given behaviour is caused by
                    652: the parser or by the validator.
                    653: Meta data is not available in this case.
1.161     schwarze  654: .El
1.108     schwarze  655: .Sh ENVIRONMENT
                    656: .Bl -tag -width MANPAGER
1.224     schwarze  657: .It Ev LC_CTYPE
                    658: The character encoding
                    659: .Xr locale 1 .
                    660: When
                    661: .Sx Locale Output
                    662: is selected, it decides whether to use ASCII or UTF-8 output format.
                    663: It never affects the interpretation of input files.
1.108     schwarze  664: .It Ev MANPAGER
                    665: Any non-empty value of the environment variable
                    666: .Ev MANPAGER
1.179     schwarze  667: is used instead of the standard pagination program,
1.245     schwarze  668: .Xr less 1 ;
1.179     schwarze  669: see
                    670: .Xr man 1
                    671: for details.
                    672: Only used if
                    673: .Fl a
                    674: or
                    675: .Fl l
                    676: is specified.
1.108     schwarze  677: .It Ev PAGER
                    678: Specifies the pagination program to use when
                    679: .Ev MANPAGER
                    680: is not defined.
                    681: If neither PAGER nor MANPAGER is defined,
1.245     schwarze  682: .Xr less 1
1.179     schwarze  683: is used.
                    684: Only used if
                    685: .Fl a
                    686: or
                    687: .Fl l
                    688: is specified.
1.108     schwarze  689: .El
1.77      schwarze  690: .Sh EXIT STATUS
                    691: The
                    692: .Nm
                    693: utility exits with one of the following values, controlled by the message
                    694: .Ar level
                    695: associated with the
                    696: .Fl W
                    697: option:
                    698: .Pp
                    699: .Bl -tag -width Ds -compact
                    700: .It 0
1.202     schwarze  701: No base system convention violations, style suggestions, warnings,
                    702: or errors occurred, or those that did were ignored because they
                    703: were lower than the requested
1.77      schwarze  704: .Ar level .
1.185     schwarze  705: .It 1
1.202     schwarze  706: At least one base system convention violation or style suggestion
                    707: occurred, but no warning or error, and
                    708: .Fl W Cm base
                    709: or
1.185     schwarze  710: .Fl W Cm style
                    711: was specified.
1.77      schwarze  712: .It 2
                    713: At least one warning occurred, but no error, and
1.156     schwarze  714: .Fl W Cm warning
1.202     schwarze  715: or a lower
                    716: .Ar level
                    717: was requested.
1.77      schwarze  718: .It 3
1.133     schwarze  719: At least one parsing error occurred,
                    720: but no unsupported feature was encountered, and
1.156     schwarze  721: .Fl W Cm error
1.185     schwarze  722: or a lower
                    723: .Ar level
                    724: was requested.
1.133     schwarze  725: .It 4
1.134     schwarze  726: At least one unsupported feature was encountered, and
1.185     schwarze  727: .Fl W Cm unsupp
                    728: or a lower
                    729: .Ar level
                    730: was requested.
1.77      schwarze  731: .It 5
                    732: Invalid command line arguments were specified.
                    733: No input files have been read.
                    734: .It 6
1.131     schwarze  735: An operating system error occurred, for example exhaustion
                    736: of memory, file descriptors, or process table entries.
1.240     schwarze  737: Such errors may cause
1.77      schwarze  738: .Nm
                    739: to exit at once, possibly in the middle of parsing or formatting a file.
                    740: .El
                    741: .Pp
                    742: Note that selecting
1.156     schwarze  743: .Fl T Cm lint
1.77      schwarze  744: output mode implies
1.202     schwarze  745: .Fl W Cm all .
1.1       kristaps  746: .Sh EXAMPLES
1.13      kristaps  747: To page manuals to the terminal:
1.1       kristaps  748: .Pp
1.255     schwarze  749: .Dl $ mandoc -a mandoc.1 man.1 apropos.1 makewhatis.8
1.28      kristaps  750: .Pp
1.41      kristaps  751: To produce HTML manuals with
1.234     schwarze  752: .Pa /usr/share/misc/mandoc.css
1.265     schwarze  753: as the stylesheet:
1.38      kristaps  754: .Pp
1.234     schwarze  755: .Dl $ mandoc \-T html -O style=/usr/share/misc/mandoc.css mdoc.7 > mdoc.7.html
1.38      kristaps  756: .Pp
1.28      kristaps  757: To check over a large set of manuals:
                    758: .Pp
1.158     schwarze  759: .Dl $ mandoc \-T lint \(gafind /usr/src -name \e*\e.[1-9]\(ga
1.66      kristaps  760: .Pp
                    761: To produce a series of PostScript manuals for A4 paper:
                    762: .Pp
1.234     schwarze  763: .Dl $ mandoc \-T ps \-O paper=a4 mdoc.7 man.7 > manuals.ps
1.91      schwarze  764: .Pp
                    765: Convert a modern
                    766: .Xr mdoc 7
                    767: manual to the older
                    768: .Xr man 7
                    769: format, for use on systems lacking an
                    770: .Xr mdoc 7
                    771: parser:
                    772: .Pp
1.234     schwarze  773: .Dl $ mandoc \-T man foo.mdoc > foo.man
1.77      schwarze  774: .Sh DIAGNOSTICS
1.106     schwarze  775: Messages displayed by
                    776: .Nm
                    777: follow this format:
1.202     schwarze  778: .Bd -ragged -offset indent
1.205     schwarze  779: .Nm :
1.264     schwarze  780: .Ar file : Ns Ar line : Ns Ar column : level : message : macro argument ...
1.202     schwarze  781: .Pq Ar os
                    782: .Ed
1.77      schwarze  783: .Pp
1.233     schwarze  784: The first three fields identify the
                    785: .Ar file
                    786: name,
                    787: .Ar line
                    788: number, and
                    789: .Ar column
                    790: number of the input file where the message was triggered.
                    791: The line and column numbers start at 1.
1.106     schwarze  792: Both are omitted for messages referring to an input file as a whole.
1.233     schwarze  793: All
                    794: .Ar level
                    795: and
                    796: .Ar message
                    797: strings are explained below.
                    798: The name of the
                    799: .Ar macro
1.264     schwarze  800: triggering the message and its arguments are omitted where meaningless.
1.202     schwarze  801: The
                    802: .Ar os
                    803: operating system specifier is omitted for messages that are relevant
                    804: for all operating systems.
1.106     schwarze  805: Fatal messages about invalid command line arguments
                    806: or operating system errors, for example when memory is exhausted,
                    807: may also omit the
                    808: .Ar file
1.104     schwarze  809: and
1.106     schwarze  810: .Ar level
                    811: fields.
1.104     schwarze  812: .Pp
1.77      schwarze  813: Message levels have the following meanings:
                    814: .Bl -tag -width "warning"
1.240     schwarze  815: .It Cm syserr
                    816: An operating system error occurred.
                    817: There isn't necessarily anything wrong with the input files.
                    818: Output may all the same be missing or incomplete.
                    819: .It Cm badarg
                    820: Invalid command line arguments were specified.
                    821: No input files have been read and no output is produced.
1.133     schwarze  822: .It Cm unsupp
                    823: An input file uses unsupported low-level
                    824: .Xr roff 7
                    825: features.
                    826: The output may be incomplete and/or misformatted,
                    827: so using GNU troff instead of
                    828: .Nm
                    829: to process the file may be preferable.
1.77      schwarze  830: .It Cm error
1.216     schwarze  831: Indicates a risk of information loss or severe misformatting,
                    832: in most cases caused by serious syntax errors.
1.77      schwarze  833: .It Cm warning
1.216     schwarze  834: Indicates a risk that the information shown or its formatting
                    835: may mismatch the author's intent in minor ways.
                    836: Additionally, syntax errors are classified at least as warnings,
                    837: even if they do not usually cause misformatting.
1.185     schwarze  838: .It Cm style
                    839: An input file uses dubious or discouraged style.
                    840: This is not a complaint about the syntax, and probably neither
                    841: formatting nor portability are in danger.
                    842: While great care is taken to avoid false positives on the higher
                    843: message levels, the
                    844: .Cm style
                    845: level tries to reduce the probability that issues go unnoticed,
                    846: so it may occasionally issue bogus suggestions.
1.254     schwarze  847: Use your judgement to decide whether any particular
1.185     schwarze  848: .Cm style
                    849: suggestion really justifies a change to the input file.
1.202     schwarze  850: .It Cm base
1.219     schwarze  851: A convention used in the base system of a specific operating system
1.202     schwarze  852: is not adhered to.
                    853: These are not markup mistakes, and neither the quality of formatting
                    854: nor portability are in danger.
1.214     schwarze  855: Messages of the
                    856: .Cm base
                    857: level are printed with the more intuitive
                    858: .Cm style
                    859: .Ar level
                    860: tag.
1.77      schwarze  861: .El
                    862: .Pp
                    863: Messages of the
1.202     schwarze  864: .Cm base ,
1.185     schwarze  865: .Cm style ,
1.133     schwarze  866: .Cm warning ,
                    867: .Cm error ,
1.77      schwarze  868: and
1.133     schwarze  869: .Cm unsupp
1.240     schwarze  870: levels are hidden unless their level, or a lower level, is requested using a
1.77      schwarze  871: .Fl W
                    872: option or
1.156     schwarze  873: .Fl T Cm lint
1.77      schwarze  874: output mode.
1.202     schwarze  875: .Pp
                    876: As indicated below, all
                    877: .Cm base
                    878: and some
                    879: .Cm style
                    880: checks are only performed if a specific operating system name occurs
                    881: in the arguments of the
                    882: .Fl W
                    883: command line option, of the
1.195     schwarze  884: .Ic \&Os
                    885: macro, of the
                    886: .Fl Ios
                    887: command line option, or, if neither are present, in the return value
                    888: of the
                    889: .Xr uname 3
                    890: function.
1.202     schwarze  891: .Ss Conventions for base system manuals
1.189     schwarze  892: .Bl -ohang
1.200     schwarze  893: .It Sy "Mdocdate found"
                    894: .Pq mdoc , Nx
                    895: The
                    896: .Ic \&Dd
                    897: macro uses CVS
                    898: .Ic Mdocdate
                    899: keyword substitution, which is not supported by the
                    900: .Nx
                    901: base system.
                    902: Consider using the conventional
                    903: .Dq "Month dd, yyyy"
                    904: format instead.
                    905: .It Sy "Mdocdate missing"
                    906: .Pq mdoc , Ox
                    907: The
                    908: .Ic \&Dd
                    909: macro does not use CVS
                    910: .Ic Mdocdate
                    911: keyword substitution, but using it is conventionally expected in the
                    912: .Ox
                    913: base system.
1.204     schwarze  914: .It Sy "unknown architecture"
                    915: .Pq mdoc , Ox , Nx
                    916: The third argument of the
                    917: .Ic \&Dt
                    918: macro does not match any of the architectures this operating system
                    919: is running on.
1.203     schwarze  920: .It Sy "operating system explicitly specified"
                    921: .Pq mdoc , Ox , Nx
                    922: The
                    923: .Ic \&Os
                    924: macro has an argument.
                    925: In the base system, it is conventionally left blank.
1.202     schwarze  926: .It Sy "RCS id missing"
                    927: .Pq Ox , Nx
                    928: The manual page lacks the comment line with the RCS identifier
                    929: generated by CVS
                    930: .Ic OpenBSD
                    931: or
                    932: .Ic NetBSD
                    933: keyword substitution as conventionally used in these operating systems.
                    934: .El
                    935: .Ss Style suggestions
                    936: .Bl -ohang
1.200     schwarze  937: .It Sy "legacy man(7) date format"
                    938: .Pq mdoc
                    939: The
                    940: .Ic \&Dd
                    941: macro uses the legacy
                    942: .Xr man 7
                    943: date format
1.270     schwarze  944: .Dq yyyy-mm-dd .
1.200     schwarze  945: Consider using the conventional
                    946: .Xr mdoc 7
                    947: date format
                    948: .Dq "Month dd, yyyy"
                    949: instead.
1.226     schwarze  950: .It Sy "normalizing date format to" : No ...
                    951: .Pq mdoc , man
                    952: The
                    953: .Ic \&Dd
                    954: or
                    955: .Ic \&TH
                    956: macro provides an abbreviated month name or a day number with a
                    957: leading zero.
                    958: In the formatted output, the month name is written out in full
                    959: and the leading zero is omitted.
1.215     schwarze  960: .It Sy "lower case character in document title"
                    961: .Pq mdoc , man
                    962: The title is still used as given in the
                    963: .Ic \&Dt
                    964: or
                    965: .Ic \&TH
                    966: macro.
1.201     schwarze  967: .It Sy "duplicate RCS id"
                    968: A single manual page contains two copies of the RCS identifier for
                    969: the same operating system.
                    970: Consider deleting the later instance and moving the first one up
                    971: to the top of the page.
1.220     schwarze  972: .It Sy "possible typo in section name"
1.207     schwarze  973: .Pq mdoc
                    974: Fuzzy string matching revealed that the argument of an
                    975: .Ic \&Sh
                    976: macro is similar, but not identical to a standard section name.
1.215     schwarze  977: .It Sy "unterminated quoted argument"
                    978: .Pq roff
                    979: Macro arguments can be enclosed in double quote characters
                    980: such that space characters and macro names contained in the quoted
                    981: argument need not be escaped.
                    982: The closing quote of the last argument of a macro can be omitted.
                    983: However, omitting it is not recommended because it makes the code
                    984: harder to read.
1.189     schwarze  985: .It Sy "useless macro"
                    986: .Pq mdoc
                    987: A
                    988: .Ic \&Bt ,
                    989: .Ic \&Tn ,
                    990: or
1.190     schwarze  991: .Ic \&Ud
1.189     schwarze  992: macro was found.
1.190     schwarze  993: Simply delete it: it serves no useful purpose.
1.191     schwarze  994: .It Sy "consider using OS macro"
                    995: .Pq mdoc
                    996: A string was found in plain text or in a
                    997: .Ic \&Bx
                    998: macro that could be represented using
                    999: .Ic \&Ox ,
                   1000: .Ic \&Nx ,
                   1001: .Ic \&Fx ,
                   1002: or
                   1003: .Ic \&Dx .
1.195     schwarze 1004: .It Sy "errnos out of order"
                   1005: .Pq mdoc, Nx
                   1006: The
                   1007: .Ic \&Er
                   1008: items in a
                   1009: .Ic \&Bl
                   1010: list are not in alphabetical order.
                   1011: .It Sy "duplicate errno"
                   1012: .Pq mdoc, Nx
                   1013: A
                   1014: .Ic \&Bl
                   1015: list contains two consecutive
                   1016: .Ic \&It
                   1017: entries describing the same
                   1018: .Ic \&Er
                   1019: number.
1.249     schwarze 1020: .It Sy "referenced manual not found"
                   1021: .Pq mdoc
                   1022: An
                   1023: .Ic \&Xr
                   1024: macro references a manual page that was not found.
                   1025: When running with
                   1026: .Fl W Cm base ,
                   1027: the search is restricted to the base system, by default to
                   1028: .Pa /usr/share/man : Ns Pa /usr/X11R6/man .
                   1029: This path can be configured at compile time using the
                   1030: .Dv MANPATH_BASE
                   1031: preprocessor macro.
                   1032: When running with
                   1033: .Fl W Cm style ,
                   1034: the search is done along the full search path as described in the
                   1035: .Xr man 1
                   1036: manual page, respecting the
                   1037: .Fl m
                   1038: and
                   1039: .Fl M
                   1040: command line options, the
                   1041: .Ev MANPATH
                   1042: environment variable, the
                   1043: .Xr man.conf 5
                   1044: file and falling back to the default of
                   1045: .Pa /usr/share/man : Ns Pa /usr/X11R6/man : Ns Pa /usr/local/man ,
                   1046: also configurable at compile time using the
                   1047: .Dv MANPATH_DEFAULT
                   1048: preprocessor macro.
1.213     schwarze 1049: .It Sy "trailing delimiter"
1.192     schwarze 1050: .Pq mdoc
1.213     schwarze 1051: The last argument of an
                   1052: .Ic \&Ex , \&Fo , \&Nd , \&Nm , \&Os , \&Sh , \&Ss , \&St ,
                   1053: or
                   1054: .Ic \&Sx
                   1055: macro ends with a trailing delimiter.
                   1056: This is usually bad style and often indicates typos.
                   1057: Most likely, the delimiter can be removed.
1.197     schwarze 1058: .It Sy "no blank before trailing delimiter"
1.198     schwarze 1059: .Pq mdoc
1.197     schwarze 1060: The last argument of a macro that supports trailing delimiter
                   1061: arguments is longer than one byte and ends with a trailing delimiter.
                   1062: Consider inserting a blank such that the delimiter becomes a separate
                   1063: argument, thus moving it out of the scope of the macro.
1.215     schwarze 1064: .It Sy "fill mode already enabled, skipping"
                   1065: .Pq man
                   1066: A
                   1067: .Ic \&fi
                   1068: request occurs even though the document is still in fill mode,
                   1069: or already switched back to fill mode.
                   1070: It has no effect.
                   1071: .It Sy "fill mode already disabled, skipping"
                   1072: .Pq man
                   1073: An
                   1074: .Ic \&nf
                   1075: request occurs even though the document already switched to no-fill mode
                   1076: and did not switch back to fill mode yet.
                   1077: It has no effect.
1.250     schwarze 1078: .It Sy "input text line longer than 80 bytes"
                   1079: Consider breaking the input text line
                   1080: at one of the blank characters before column 80.
1.222     schwarze 1081: .It Sy "verbatim \(dq--\(dq, maybe consider using \e(em"
                   1082: .Pq mdoc
                   1083: Even though the ASCII output device renders an em-dash as
                   1084: .Qq \-\- ,
                   1085: that is not a good way to write it in an input file
                   1086: because it renders poorly on all other output devices.
1.198     schwarze 1087: .It Sy "function name without markup"
                   1088: .Pq mdoc
                   1089: A word followed by an empty pair of parentheses occurs on a text line.
                   1090: Consider using an
                   1091: .Ic \&Fn
                   1092: or
                   1093: .Ic \&Xr
                   1094: macro.
1.215     schwarze 1095: .It Sy "whitespace at end of input line"
                   1096: .Pq mdoc , man , roff
                   1097: Whitespace at the end of input lines is almost never semantically
                   1098: significant \(em but in the odd case where it might be, it is
                   1099: extremely confusing when reviewing and maintaining documents.
                   1100: .It Sy "bad comment style"
                   1101: .Pq roff
                   1102: Comment lines start with a dot, a backslash, and a double-quote character.
                   1103: The
                   1104: .Nm
                   1105: utility treats the line as a comment line even without the backslash,
                   1106: but leaving out the backslash might not be portable.
1.189     schwarze 1107: .El
1.106     schwarze 1108: .Ss Warnings related to the document prologue
                   1109: .Bl -ohang
                   1110: .It Sy "missing manual title, using UNTITLED"
1.272   ! schwarze 1111: .Pq mdoc , man
1.106     schwarze 1112: A
                   1113: .Ic \&Dt
1.272   ! schwarze 1114: or
        !          1115: .Ic \&TH
        !          1116: macro has no arguments, its first argument is an empty string, or there is no
1.106     schwarze 1117: .Ic \&Dt
1.272   ! schwarze 1118: macro before the first non-prologue
        !          1119: .Xr mdoc 7
        !          1120: macro.
1.106     schwarze 1121: .It Sy "missing manual title, using \(dq\(dq"
                   1122: .Pq man
1.272   ! schwarze 1123: An input document does not contain any
1.106     schwarze 1124: .Ic \&TH
1.272   ! schwarze 1125: macro.
1.106     schwarze 1126: .It Sy "missing manual section, using \(dq\(dq"
                   1127: .Pq mdoc , man
                   1128: A
                   1129: .Ic \&Dt
                   1130: or
                   1131: .Ic \&TH
                   1132: macro lacks the mandatory section argument.
                   1133: .It Sy "unknown manual section"
                   1134: .Pq mdoc
                   1135: The section number in a
                   1136: .Ic \&Dt
                   1137: line is invalid, but still used.
1.243     schwarze 1138: .It Sy "filename/section mismatch"
                   1139: .Pq mdoc , man
                   1140: The name of the input file being processed is known and its file
                   1141: name extension starts with a non-zero digit, but the
                   1142: .Ic \&Dt
                   1143: or
                   1144: .Ic \&TH
                   1145: macro contains a
                   1146: .Ar section
                   1147: argument that starts with a different non-zero digit.
                   1148: The
                   1149: .Ar section
                   1150: argument is used as provided anyway.
                   1151: Consider checking whether the file name or the argument need a correction.
1.241     schwarze 1152: .It Sy "missing date, using \(dq\(dq"
1.106     schwarze 1153: .Pq mdoc, man
                   1154: The document was parsed as
                   1155: .Xr mdoc 7
                   1156: and it has no
                   1157: .Ic \&Dd
                   1158: macro, or the
                   1159: .Ic \&Dd
                   1160: macro has no arguments or only empty arguments;
                   1161: or the document was parsed as
                   1162: .Xr man 7
                   1163: and it has no
                   1164: .Ic \&TH
                   1165: macro, or the
                   1166: .Ic \&TH
                   1167: macro has less than three arguments or its third argument is empty.
                   1168: .It Sy "cannot parse date, using it verbatim"
                   1169: .Pq mdoc , man
                   1170: The date given in a
                   1171: .Ic \&Dd
                   1172: or
                   1173: .Ic \&TH
                   1174: macro does not follow the conventional format.
1.212     schwarze 1175: .It Sy "date in the future, using it anyway"
                   1176: .Pq mdoc , man
                   1177: The date given in a
                   1178: .Ic \&Dd
                   1179: or
                   1180: .Ic \&TH
                   1181: macro is more than a day ahead of the current system
                   1182: .Xr time 3 .
1.106     schwarze 1183: .It Sy "missing Os macro, using \(dq\(dq"
                   1184: .Pq mdoc
                   1185: The default or current system is not shown in this case.
                   1186: .It Sy "late prologue macro"
                   1187: .Pq mdoc
                   1188: A
                   1189: .Ic \&Dd
                   1190: or
                   1191: .Ic \&Os
                   1192: macro occurs after some non-prologue macro, but still takes effect.
                   1193: .It Sy "prologue macros out of order"
                   1194: .Pq mdoc
                   1195: The prologue macros are not given in the conventional order
                   1196: .Ic \&Dd ,
                   1197: .Ic \&Dt ,
                   1198: .Ic \&Os .
                   1199: All three macros are used even when given in another order.
                   1200: .El
                   1201: .Ss Warnings regarding document structure
                   1202: .Bl -ohang
                   1203: .It Sy ".so is fragile, better use ln(1)"
                   1204: .Pq roff
                   1205: Including files only works when the parser program runs with the correct
                   1206: current working directory.
                   1207: .It Sy "no document body"
                   1208: .Pq mdoc , man
                   1209: The document body contains neither text nor macros.
                   1210: An empty document is shown, consisting only of a header and a footer line.
                   1211: .It Sy "content before first section header"
                   1212: .Pq mdoc , man
                   1213: Some macros or text precede the first
                   1214: .Ic \&Sh
                   1215: or
                   1216: .Ic \&SH
                   1217: section header.
                   1218: The offending macros and text are parsed and added to the top level
                   1219: of the syntax tree, outside any section block.
                   1220: .It Sy "first section is not NAME"
                   1221: .Pq mdoc
                   1222: The argument of the first
                   1223: .Ic \&Sh
                   1224: macro is not
                   1225: .Sq NAME .
                   1226: This may confuse
                   1227: .Xr makewhatis 8
                   1228: and
                   1229: .Xr apropos 1 .
1.168     schwarze 1230: .It Sy "NAME section without Nm before Nd"
1.106     schwarze 1231: .Pq mdoc
1.155     schwarze 1232: The NAME section does not contain any
                   1233: .Ic \&Nm
1.168     schwarze 1234: child macro before the first
                   1235: .Ic \&Nd
                   1236: macro.
1.155     schwarze 1237: .It Sy "NAME section without description"
                   1238: .Pq mdoc
                   1239: The NAME section lacks the mandatory
                   1240: .Ic \&Nd
                   1241: child macro.
                   1242: .It Sy "description not at the end of NAME"
                   1243: .Pq mdoc
                   1244: The NAME section does contain an
1.106     schwarze 1245: .Ic \&Nd
1.155     schwarze 1246: child macro, but other content follows it.
                   1247: .It Sy "bad NAME section content"
                   1248: .Pq mdoc
                   1249: The NAME section contains plain text or macros other than
                   1250: .Ic \&Nm
1.106     schwarze 1251: and
1.155     schwarze 1252: .Ic \&Nd .
1.168     schwarze 1253: .It Sy "missing comma before name"
                   1254: .Pq mdoc
                   1255: The NAME section contains an
                   1256: .Ic \&Nm
                   1257: macro that is neither the first one nor preceded by a comma.
1.142     schwarze 1258: .It Sy "missing description line, using \(dq\(dq"
                   1259: .Pq mdoc
                   1260: The
                   1261: .Ic \&Nd
                   1262: macro lacks the required argument.
                   1263: The title line of the manual will end after the dash.
1.177     schwarze 1264: .It Sy "description line outside NAME section"
                   1265: .Pq mdoc
                   1266: An
                   1267: .Ic \&Nd
                   1268: macro appears outside the NAME section.
                   1269: The arguments are printed anyway and the following text is used for
                   1270: .Xr apropos 1 ,
                   1271: but none of that behaviour is portable.
1.106     schwarze 1272: .It Sy "sections out of conventional order"
                   1273: .Pq mdoc
                   1274: A standard section occurs after another section it usually precedes.
                   1275: All section titles are used as given,
                   1276: and the order of sections is not changed.
                   1277: .It Sy "duplicate section title"
                   1278: .Pq mdoc
                   1279: The same standard section title occurs more than once.
                   1280: .It Sy "unexpected section"
                   1281: .Pq mdoc
                   1282: A standard section header occurs in a section of the manual
                   1283: where it normally isn't useful.
1.211     schwarze 1284: .It Sy "cross reference to self"
1.266     schwarze 1285: .Pq mdoc , man
1.211     schwarze 1286: An
                   1287: .Ic \&Xr
1.266     schwarze 1288: or
                   1289: .Ic \&MR
1.211     schwarze 1290: macro refers to a name and section matching the section of the present
                   1291: manual page and a name mentioned in an
                   1292: .Ic \&Nm
                   1293: macro in the NAME or SYNOPSIS section, or in an
                   1294: .Ic \&Fn
                   1295: or
                   1296: .Ic \&Fo
                   1297: macro in the SYNOPSIS.
                   1298: Consider using
                   1299: .Ic \&Nm
                   1300: or
                   1301: .Ic \&Fn
                   1302: instead of
                   1303: .Ic \&Xr .
1.112     schwarze 1304: .It Sy "unusual Xr order"
                   1305: .Pq mdoc
                   1306: In the SEE ALSO section, an
                   1307: .Ic \&Xr
                   1308: macro with a lower section number follows one with a higher number,
                   1309: or two
                   1310: .Ic \&Xr
1.157     schwarze 1311: macros referring to the same section are out of alphabetical order.
1.112     schwarze 1312: .It Sy "unusual Xr punctuation"
                   1313: .Pq mdoc
                   1314: In the SEE ALSO section, punctuation between two
                   1315: .Ic \&Xr
                   1316: macros differs from a single comma, or there is trailing punctuation
                   1317: after the last
                   1318: .Ic \&Xr
                   1319: macro.
1.111     schwarze 1320: .It Sy "AUTHORS section without An macro"
                   1321: .Pq mdoc
                   1322: An AUTHORS sections contains no
                   1323: .Ic \&An
                   1324: macros, or only empty ones.
                   1325: Probably, there are author names lacking markup.
1.106     schwarze 1326: .El
                   1327: .Ss "Warnings related to macros and nesting"
                   1328: .Bl -ohang
                   1329: .It Sy "obsolete macro"
                   1330: .Pq mdoc
                   1331: See the
                   1332: .Xr mdoc 7
                   1333: manual for replacements.
1.126     schwarze 1334: .It Sy "macro neither callable nor escaped"
                   1335: .Pq mdoc
                   1336: The name of a macro that is not callable appears on a macro line.
                   1337: It is printed verbatim.
1.152     schwarze 1338: If the intention is to call it, move it to its own input line;
1.126     schwarze 1339: otherwise, escape it by prepending
                   1340: .Sq \e& .
1.106     schwarze 1341: .It Sy "skipping paragraph macro"
                   1342: In
                   1343: .Xr mdoc 7
                   1344: documents, this happens
                   1345: .Bl -dash -compact
                   1346: .It
                   1347: at the beginning and end of sections and subsections
                   1348: .It
                   1349: right before non-compact lists and displays
                   1350: .It
                   1351: at the end of items in non-column, non-compact lists
                   1352: .It
                   1353: and for multiple consecutive paragraph macros.
                   1354: .El
                   1355: In
                   1356: .Xr man 7
                   1357: documents, it happens
                   1358: .Bl -dash -compact
                   1359: .It
                   1360: for empty
                   1361: .Ic \&P ,
                   1362: .Ic \&PP ,
                   1363: and
                   1364: .Ic \&LP
                   1365: macros
                   1366: .It
                   1367: for
                   1368: .Ic \&IP
                   1369: macros having neither head nor body arguments
                   1370: .It
                   1371: for
                   1372: .Ic \&br
                   1373: or
                   1374: .Ic \&sp
                   1375: right after
                   1376: .Ic \&SH
                   1377: or
                   1378: .Ic \&SS
                   1379: .El
                   1380: .It Sy "moving paragraph macro out of list"
                   1381: .Pq mdoc
                   1382: A list item in a
                   1383: .Ic \&Bl
                   1384: list contains a trailing paragraph macro.
                   1385: The paragraph macro is moved after the end of the list.
                   1386: .It Sy "skipping no-space macro"
                   1387: .Pq mdoc
                   1388: An input line begins with an
                   1389: .Ic \&Ns
1.208     schwarze 1390: macro, or the next argument after an
                   1391: .Ic \&Ns
                   1392: macro is an isolated closing delimiter.
1.106     schwarze 1393: The macro is ignored.
                   1394: .It Sy "blocks badly nested"
                   1395: .Pq mdoc
                   1396: If two blocks intersect, one should completely contain the other.
                   1397: Otherwise, rendered output is likely to look strange in any output
                   1398: format, and rendering in SGML-based output formats is likely to be
                   1399: outright wrong because such languages do not support badly nested
                   1400: blocks at all.
                   1401: Typical examples of badly nested blocks are
                   1402: .Qq Ic \&Ao \&Bo \&Ac \&Bc
                   1403: and
                   1404: .Qq Ic \&Ao \&Bq \&Ac .
                   1405: In these examples,
                   1406: .Ic \&Ac
                   1407: breaks
                   1408: .Ic \&Bo
                   1409: and
                   1410: .Ic \&Bq ,
                   1411: respectively.
                   1412: .It Sy "nested displays are not portable"
                   1413: .Pq mdoc
                   1414: A
                   1415: .Ic \&Bd ,
                   1416: .Ic \&D1 ,
                   1417: or
                   1418: .Ic \&Dl
                   1419: display occurs nested inside another
                   1420: .Ic \&Bd
                   1421: display.
                   1422: This works with
                   1423: .Nm ,
                   1424: but fails with most other implementations.
                   1425: .It Sy "moving content out of list"
                   1426: .Pq mdoc
                   1427: A
                   1428: .Ic \&Bl
                   1429: list block contains text or macros before the first
                   1430: .Ic \&It
                   1431: macro.
                   1432: The offending children are moved before the beginning of the list.
1.209     schwarze 1433: .It Sy "first macro on line"
                   1434: Inside a
                   1435: .Ic \&Bl Fl column
                   1436: list, a
                   1437: .Ic \&Ta
                   1438: macro occurs as the first macro on a line, which is not portable.
1.106     schwarze 1439: .It Sy "line scope broken"
                   1440: .Pq man
                   1441: While parsing the next-line scope of the previous macro,
                   1442: another macro is found that prematurely terminates the previous one.
                   1443: The previous, interrupted macro is deleted from the parse tree.
                   1444: .El
                   1445: .Ss "Warnings related to missing arguments"
                   1446: .Bl -ohang
                   1447: .It Sy "skipping empty request"
1.118     schwarze 1448: .Pq roff , eqn
                   1449: The macro name is missing from a macro definition request,
                   1450: or an
                   1451: .Xr eqn 7
                   1452: control statement or operation keyword lacks its required argument.
1.106     schwarze 1453: .It Sy "conditional request controls empty scope"
                   1454: .Pq roff
                   1455: A conditional request is only useful if any of the following
                   1456: follows it on the same logical input line:
                   1457: .Bl -dash -compact
                   1458: .It
                   1459: The
                   1460: .Sq \e{
                   1461: keyword to open a multi-line scope.
                   1462: .It
                   1463: A request or macro or some text, resulting in a single-line scope.
                   1464: .It
                   1465: The immediate end of the logical line without any intervening whitespace,
                   1466: resulting in next-line scope.
                   1467: .El
                   1468: Here, a conditional request is followed by trailing whitespace only,
                   1469: and there is no other content on its logical input line.
                   1470: Note that it doesn't matter whether the logical input line is split
                   1471: across multiple physical input lines using
                   1472: .Sq \e
                   1473: line continuation characters.
                   1474: This is one of the rare cases
                   1475: where trailing whitespace is syntactically significant.
                   1476: The conditional request controls a scope containing whitespace only,
                   1477: so it is unlikely to have a significant effect,
                   1478: except that it may control a following
                   1479: .Ic \&el
                   1480: clause.
                   1481: .It Sy "skipping empty macro"
                   1482: .Pq mdoc
1.147     schwarze 1483: The indicated macro has no arguments and hence no effect.
                   1484: .It Sy "empty block"
                   1485: .Pq mdoc , man
                   1486: A
                   1487: .Ic \&Bd ,
                   1488: .Ic \&Bk ,
                   1489: .Ic \&Bl ,
                   1490: .Ic \&D1 ,
                   1491: .Ic \&Dl ,
                   1492: or
1.263     schwarze 1493: .Ic \&RS
1.147     schwarze 1494: block contains nothing in its body and will produce no output.
1.106     schwarze 1495: .It Sy "empty argument, using 0n"
                   1496: .Pq mdoc
                   1497: The required width is missing after
                   1498: .Ic \&Bd
                   1499: or
                   1500: .Ic \&Bl
                   1501: .Fl offset
                   1502: or
1.186     schwarze 1503: .Fl width .
1.106     schwarze 1504: .It Sy "missing display type, using -ragged"
                   1505: .Pq mdoc
                   1506: The
                   1507: .Ic \&Bd
                   1508: macro is invoked without the required display type.
                   1509: .It Sy "list type is not the first argument"
                   1510: .Pq mdoc
                   1511: In a
                   1512: .Ic \&Bl
                   1513: macro, at least one other argument precedes the type argument.
                   1514: The
                   1515: .Nm
                   1516: utility copes with any argument order, but some other
                   1517: .Xr mdoc 7
                   1518: implementations do not.
                   1519: .It Sy "missing -width in -tag list, using 8n"
                   1520: .Pq mdoc
                   1521: Every
                   1522: .Ic \&Bl
                   1523: macro having the
                   1524: .Fl tag
                   1525: argument requires
                   1526: .Fl width ,
                   1527: too.
                   1528: .It Sy "missing utility name, using \(dq\(dq"
                   1529: .Pq mdoc
                   1530: The
                   1531: .Ic \&Ex Fl std
                   1532: macro is called without an argument before
                   1533: .Ic \&Nm
                   1534: has first been called with an argument.
1.146     schwarze 1535: .It Sy "missing function name, using \(dq\(dq"
                   1536: .Pq mdoc
                   1537: The
                   1538: .Ic \&Fo
                   1539: macro is called without an argument.
                   1540: No function name is printed.
1.106     schwarze 1541: .It Sy "empty head in list item"
                   1542: .Pq mdoc
                   1543: In a
                   1544: .Ic \&Bl
                   1545: .Fl diag ,
                   1546: .Fl hang ,
                   1547: .Fl inset ,
                   1548: .Fl ohang ,
                   1549: or
                   1550: .Fl tag
                   1551: list, an
                   1552: .Ic \&It
                   1553: macro lacks the required argument.
                   1554: The item head is left empty.
                   1555: .It Sy "empty list item"
                   1556: .Pq mdoc
                   1557: In a
                   1558: .Ic \&Bl
                   1559: .Fl bullet ,
                   1560: .Fl dash ,
                   1561: .Fl enum ,
                   1562: or
                   1563: .Fl hyphen
                   1564: list, an
                   1565: .Ic \&It
                   1566: block is empty.
                   1567: An empty list item is shown.
1.209     schwarze 1568: .It Sy "missing argument, using next line"
                   1569: .Pq mdoc
                   1570: An
                   1571: .Ic \&It
                   1572: macro in a
                   1573: .Ic \&Bd Fl column
                   1574: list has no arguments.
                   1575: While
                   1576: .Nm
                   1577: uses the text or macros of the following line, if any, for the cell,
                   1578: other formatters may misformat the list.
1.152     schwarze 1579: .It Sy "missing font type, using \efR"
1.106     schwarze 1580: .Pq mdoc
                   1581: A
                   1582: .Ic \&Bf
                   1583: macro has no argument.
1.152     schwarze 1584: It switches to the default font.
                   1585: .It Sy "unknown font type, using \efR"
1.106     schwarze 1586: .Pq mdoc
                   1587: The
                   1588: .Ic \&Bf
                   1589: argument is invalid.
1.152     schwarze 1590: The default font is used instead.
1.127     schwarze 1591: .It Sy "nothing follows prefix"
                   1592: .Pq mdoc
                   1593: A
                   1594: .Ic \&Pf
                   1595: macro has no argument, or only one argument and no macro follows
                   1596: on the same input line.
                   1597: This defeats its purpose; in particular, spacing is not suppressed
                   1598: before the text or macros following on the next input line.
1.143     schwarze 1599: .It Sy "empty reference block"
                   1600: .Pq mdoc
                   1601: An
                   1602: .Ic \&Rs
                   1603: macro is immediately followed by an
                   1604: .Ic \&Re
                   1605: macro on the next input line.
                   1606: Such an empty block does not produce any output.
1.165     schwarze 1607: .It Sy "missing section argument"
1.266     schwarze 1608: .Pq mdoc , man
1.165     schwarze 1609: An
                   1610: .Ic \&Xr
1.266     schwarze 1611: or
                   1612: .Ic \&MR
1.165     schwarze 1613: macro lacks its second, section number argument.
1.266     schwarze 1614: The first argument, i.e. the name, is printed, but without a section number.
                   1615: In the case of
                   1616: .Ic \&Xr ,
                   1617: the parentheses are also omitted.
1.106     schwarze 1618: .It Sy "missing -std argument, adding it"
                   1619: .Pq mdoc
                   1620: An
                   1621: .Ic \&Ex
                   1622: or
                   1623: .Ic \&Rv
                   1624: macro lacks the required
                   1625: .Fl std
                   1626: argument.
                   1627: The
                   1628: .Nm
                   1629: utility assumes
                   1630: .Fl std
                   1631: even when it is not specified, but other implementations may not.
1.150     schwarze 1632: .It Sy "missing option string, using \(dq\(dq"
                   1633: .Pq man
                   1634: The
                   1635: .Ic \&OP
                   1636: macro is invoked without any argument.
                   1637: An empty pair of square brackets is shown.
                   1638: .It Sy "missing resource identifier, using \(dq\(dq"
                   1639: .Pq man
                   1640: The
1.206     schwarze 1641: .Ic \&MT
                   1642: or
1.150     schwarze 1643: .Ic \&UR
                   1644: macro is invoked without any argument.
                   1645: An empty pair of angle brackets is shown.
1.118     schwarze 1646: .It Sy "missing eqn box, using \(dq\(dq"
                   1647: .Pq eqn
                   1648: A diacritic mark or a binary operator is found,
                   1649: but there is nothing to the left of it.
                   1650: An empty box is inserted.
1.106     schwarze 1651: .El
                   1652: .Ss "Warnings related to bad macro arguments"
                   1653: .Bl -ohang
                   1654: .It Sy "duplicate argument"
                   1655: .Pq mdoc
                   1656: A
                   1657: .Ic \&Bd
                   1658: or
                   1659: .Ic \&Bl
                   1660: macro has more than one
                   1661: .Fl compact ,
                   1662: more than one
                   1663: .Fl offset ,
                   1664: or more than one
                   1665: .Fl width
                   1666: argument.
                   1667: All but the last instances of these arguments are ignored.
                   1668: .It Sy "skipping duplicate argument"
                   1669: .Pq mdoc
                   1670: An
                   1671: .Ic \&An
                   1672: macro has more than one
                   1673: .Fl split
                   1674: or
                   1675: .Fl nosplit
                   1676: argument.
                   1677: All but the first of these arguments are ignored.
                   1678: .It Sy "skipping duplicate display type"
                   1679: .Pq mdoc
                   1680: A
                   1681: .Ic \&Bd
                   1682: macro has more than one type argument; the first one is used.
                   1683: .It Sy "skipping duplicate list type"
                   1684: .Pq mdoc
                   1685: A
                   1686: .Ic \&Bl
                   1687: macro has more than one type argument; the first one is used.
                   1688: .It Sy "skipping -width argument"
                   1689: .Pq mdoc
                   1690: A
                   1691: .Ic \&Bl
                   1692: .Fl column ,
                   1693: .Fl diag ,
                   1694: .Fl ohang ,
                   1695: .Fl inset ,
                   1696: or
                   1697: .Fl item
                   1698: list has a
                   1699: .Fl width
                   1700: argument.
                   1701: That has no effect.
1.151     schwarze 1702: .It Sy "wrong number of cells"
                   1703: In a line of a
                   1704: .Ic \&Bl Fl column
                   1705: list, the number of tabs or
                   1706: .Ic \&Ta
                   1707: macros is less than the number expected from the list header line
                   1708: or exceeds the expected number by more than one.
                   1709: Missing cells remain empty, and all cells exceeding the number of
                   1710: columns are joined into one single cell.
1.106     schwarze 1711: .It Sy "unknown AT&T UNIX version"
                   1712: .Pq mdoc
                   1713: An
                   1714: .Ic \&At
                   1715: macro has an invalid argument.
                   1716: It is used verbatim, with
                   1717: .Qq "AT&T UNIX "
                   1718: prefixed to it.
1.113     schwarze 1719: .It Sy "comma in function argument"
                   1720: .Pq mdoc
                   1721: An argument of an
                   1722: .Ic \&Fa
                   1723: or
                   1724: .Ic \&Fn
                   1725: macro contains a comma; it should probably be split into two arguments.
1.117     schwarze 1726: .It Sy "parenthesis in function name"
                   1727: .Pq mdoc
                   1728: The first argument of an
                   1729: .Ic \&Fc
                   1730: or
                   1731: .Ic \&Fn
                   1732: macro contains an opening or closing parenthesis; that's probably wrong,
                   1733: parentheses are added automatically.
1.196     schwarze 1734: .It Sy "unknown library name"
                   1735: .Pq mdoc, not on Ox
                   1736: An
                   1737: .Ic \&Lb
                   1738: macro has an unknown name argument and will be rendered as
                   1739: .Qq library Dq Ar name .
1.106     schwarze 1740: .It Sy "invalid content in Rs block"
                   1741: .Pq mdoc
                   1742: An
                   1743: .Ic \&Rs
                   1744: block contains plain text or non-% macros.
                   1745: The bogus content is left in the syntax tree.
                   1746: Formatting may be poor.
                   1747: .It Sy "invalid Boolean argument"
                   1748: .Pq mdoc
                   1749: An
                   1750: .Ic \&Sm
                   1751: macro has an argument other than
                   1752: .Cm on
                   1753: or
                   1754: .Cm off .
                   1755: The invalid argument is moved out of the macro, which leaves the macro
                   1756: empty, causing it to toggle the spacing mode.
1.228     schwarze 1757: .It Sy "argument contains two font escapes"
                   1758: .Pq roff
                   1759: The second argument of a
                   1760: .Ic char
                   1761: request contains more than one font escape sequence.
                   1762: A wrong font may remain active after using the character.
1.106     schwarze 1763: .It Sy "unknown font, skipping request"
1.115     schwarze 1764: .Pq man , tbl
1.106     schwarze 1765: A
                   1766: .Xr roff 7
                   1767: .Ic \&ft
1.115     schwarze 1768: request or a
                   1769: .Xr tbl 7
                   1770: .Ic \&f
                   1771: layout modifier has an unknown
                   1772: .Ar font
                   1773: argument.
1.258     schwarze 1774: .It Sy "ignoring distance argument"
                   1775: .Pq roff
                   1776: In addition to the margin character, an
                   1777: .Ic \&mc
                   1778: request has a second argument supposed to represent a distance, but the
                   1779: .Nm
                   1780: implementation of
                   1781: .Ic \&mc
                   1782: always ignores the second argument.
1.151     schwarze 1783: .It Sy "odd number of characters in request"
                   1784: .Pq roff
                   1785: A
                   1786: .Ic \&tr
                   1787: request contains an odd number of characters.
                   1788: The last character is mapped to the blank character.
1.106     schwarze 1789: .El
                   1790: .Ss "Warnings related to plain text"
                   1791: .Bl -ohang
                   1792: .It Sy "blank line in fill mode, using .sp"
                   1793: .Pq mdoc
                   1794: The meaning of blank input lines is only well-defined in non-fill mode:
                   1795: In fill mode, line breaks of text input lines are not supposed to be
                   1796: significant.
                   1797: However, for compatibility with groff, blank lines in fill mode
1.238     schwarze 1798: are formatted like
1.106     schwarze 1799: .Ic \&sp
                   1800: requests.
1.238     schwarze 1801: To request a paragraph break, use
                   1802: .Ic \&Pp
                   1803: instead of a blank line.
1.106     schwarze 1804: .It Sy "tab in filled text"
                   1805: .Pq mdoc , man
                   1806: The meaning of tab characters is only well-defined in non-fill mode:
                   1807: In fill mode, whitespace is not supposed to be significant
                   1808: on text input lines.
                   1809: As an implementation dependent choice, tab characters on text lines
                   1810: are passed through to the formatters in any case.
                   1811: Given that the text before the tab character will be filled,
                   1812: it is hard to predict which tab stop position the tab will advance to.
1.172     schwarze 1813: .It Sy "new sentence, new line"
                   1814: .Pq mdoc
                   1815: A new sentence starts in the middle of a text line.
                   1816: Start it on a new input line to help formatters produce correct spacing.
1.260     schwarze 1817: .It Sy "invalid escape sequence argument"
1.106     schwarze 1818: .Pq roff
1.260     schwarze 1819: The argument of an escape sequence is of an invalid form.
1.259     schwarze 1820: Invalid escape sequences are ignored.
1.232     schwarze 1821: .It Sy "undefined escape, printing literally"
                   1822: .Pq roff
                   1823: In an escape sequence, the first character
                   1824: right after the leading backslash is invalid.
                   1825: That character is printed literally,
                   1826: which is equivalent to ignoring the backslash.
1.106     schwarze 1827: .It Sy "undefined string, using \(dq\(dq"
                   1828: .Pq roff
                   1829: If a string is used without being defined before,
                   1830: its value is implicitly set to the empty string.
                   1831: However, defining strings explicitly before use
                   1832: keeps the code more readable.
                   1833: .El
1.138     schwarze 1834: .Ss "Warnings related to tables"
                   1835: .Bl -ohang
                   1836: .It Sy "tbl line starts with span"
                   1837: .Pq tbl
                   1838: The first cell in a table layout line is a horizontal span
                   1839: .Pq Sq Cm s .
                   1840: Data provided for this cell is ignored, and nothing is printed in the cell.
                   1841: .It Sy "tbl column starts with span"
                   1842: .Pq tbl
                   1843: The first line of a table layout specification
                   1844: requests a vertical span
                   1845: .Pq Sq Cm ^ .
                   1846: Data provided for this cell is ignored, and nothing is printed in the cell.
                   1847: .It Sy "skipping vertical bar in tbl layout"
                   1848: .Pq tbl
                   1849: A table layout specification contains more than two consecutive vertical bars.
                   1850: A double bar is printed, all additional bars are discarded.
1.106     schwarze 1851: .El
                   1852: .Ss "Errors related to tables"
1.136     schwarze 1853: .Bl -ohang
                   1854: .It Sy "non-alphabetic character in tbl options"
                   1855: .Pq tbl
                   1856: The table options line contains a character other than a letter,
                   1857: blank, or comma where the beginning of an option name is expected.
                   1858: The character is ignored.
                   1859: .It Sy "skipping unknown tbl option"
                   1860: .Pq tbl
                   1861: The table options line contains a string of letters that does not
                   1862: match any known option name.
                   1863: The word is ignored.
                   1864: .It Sy "missing tbl option argument"
                   1865: .Pq tbl
                   1866: A table option that requires an argument is not followed by an
                   1867: opening parenthesis, or the opening parenthesis is immediately
                   1868: followed by a closing parenthesis.
                   1869: The option is ignored.
                   1870: .It Sy "wrong tbl option argument size"
                   1871: .Pq tbl
                   1872: A table option argument contains an invalid number of characters.
                   1873: Both the option and the argument are ignored.
1.138     schwarze 1874: .It Sy "empty tbl layout"
                   1875: .Pq tbl
                   1876: A table layout specification is completely empty,
                   1877: specifying zero lines and zero columns.
                   1878: As a fallback, a single left-justified column is used.
                   1879: .It Sy "invalid character in tbl layout"
                   1880: .Pq tbl
                   1881: A table layout specification contains a character that can neither
                   1882: be interpreted as a layout key character nor as a layout modifier,
                   1883: or a modifier precedes the first key.
                   1884: The invalid character is discarded.
                   1885: .It Sy "unmatched parenthesis in tbl layout"
                   1886: .Pq tbl
                   1887: A table layout specification contains an opening parenthesis,
                   1888: but no matching closing parenthesis.
                   1889: The rest of the input line, starting from the parenthesis, has no effect.
1.268     schwarze 1890: .It Sy "ignoring invalid column width in tbl layout"
                   1891: .Pq tbl
                   1892: A column width specifier in a table layout is empty, zero, or not a valid
                   1893: numerical expression.
                   1894: The width specifier is ignored and the column is made wide enough
1.269     schwarze 1895: to accommodate all its data cells.
1.248     schwarze 1896: .It Sy "ignoring excessive spacing in tbl layout"
                   1897: .Pq tbl
                   1898: A spacing modifier in a table layout is unreasonably large.
                   1899: The default spacing of 3n is used instead.
1.139     schwarze 1900: .It Sy "tbl without any data cells"
                   1901: .Pq tbl
                   1902: A table does not contain any data cells.
                   1903: It will probably produce no output.
                   1904: .It Sy "ignoring data in spanned tbl cell"
                   1905: .Pq tbl
                   1906: A table cell is marked as a horizontal span
                   1907: .Pq Sq Cm s
                   1908: or vertical span
                   1909: .Pq Sq Cm ^
                   1910: in the table layout, but it contains data.
                   1911: The data is ignored.
                   1912: .It Sy "ignoring extra tbl data cells"
                   1913: .Pq tbl
                   1914: A data line contains more cells than the corresponding layout line.
                   1915: The data in the extra cells is ignored.
                   1916: .It Sy "data block open at end of tbl"
                   1917: .Pq tbl
                   1918: A data block is opened with
                   1919: .Cm T{ ,
                   1920: but never closed with a matching
                   1921: .Cm T} .
                   1922: The remaining data lines of the table are all put into one cell,
                   1923: and any remaining cells stay empty.
1.106     schwarze 1924: .El
                   1925: .Ss "Errors related to roff, mdoc, and man code"
                   1926: .Bl -ohang
1.215     schwarze 1927: .It Sy "duplicate prologue macro"
                   1928: .Pq mdoc
                   1929: One of the prologue macros occurs more than once.
                   1930: The last instance overrides all previous ones.
                   1931: .It Sy "skipping late title macro"
                   1932: .Pq mdoc
                   1933: The
                   1934: .Ic \&Dt
                   1935: macro appears after the first non-prologue macro.
                   1936: Traditional formatters cannot handle this because
                   1937: they write the page header before parsing the document body.
                   1938: Even though this technical restriction does not apply to
                   1939: .Nm ,
                   1940: traditional semantics is preserved.
                   1941: The late macro is discarded including its arguments.
1.106     schwarze 1942: .It Sy "input stack limit exceeded, infinite loop?"
                   1943: .Pq roff
                   1944: Explicit recursion limits are implemented for the following features,
                   1945: in order to prevent infinite loops:
                   1946: .Bl -dash -compact
                   1947: .It
                   1948: expansion of nested escape sequences
                   1949: including expansion of strings and number registers,
                   1950: .It
                   1951: expansion of nested user-defined macros,
                   1952: .It
                   1953: and
                   1954: .Ic \&so
                   1955: file inclusion.
                   1956: .El
                   1957: When a limit is hit, the output is incorrect, typically losing
                   1958: some content, but the parser can continue.
                   1959: .It Sy "skipping bad character"
                   1960: .Pq mdoc , man , roff
                   1961: The input file contains a byte that is not a printable
                   1962: .Xr ascii 7
                   1963: character.
                   1964: The message mentions the character number.
                   1965: The offending byte is replaced with a question mark
                   1966: .Pq Sq \&? .
                   1967: Consider editing the input file to replace the byte with an ASCII
                   1968: transliteration of the intended character.
                   1969: .It Sy "skipping unknown macro"
                   1970: .Pq mdoc , man , roff
                   1971: The first identifier on a request or macro line is neither recognized as a
                   1972: .Xr roff 7
                   1973: request, nor as a user-defined macro, nor, respectively, as an
                   1974: .Xr mdoc 7
                   1975: or
                   1976: .Xr man 7
                   1977: macro.
                   1978: It may be mistyped or unsupported.
                   1979: The request or macro is discarded including its arguments.
1.227     schwarze 1980: .It Sy "skipping request outside macro"
                   1981: .Pq roff
                   1982: A
                   1983: .Ic shift
                   1984: or
                   1985: .Ic return
                   1986: request occurs outside any macro definition and has no effect.
1.133     schwarze 1987: .It Sy "skipping insecure request"
                   1988: .Pq roff
                   1989: An input file attempted to run a shell command
                   1990: or to read or write an external file.
                   1991: Such attempts are denied for security reasons.
1.106     schwarze 1992: .It Sy "skipping item outside list"
1.118     schwarze 1993: .Pq mdoc , eqn
1.106     schwarze 1994: An
                   1995: .Ic \&It
                   1996: macro occurs outside any
                   1997: .Ic \&Bl
1.118     schwarze 1998: list, or an
                   1999: .Xr eqn 7
                   2000: .Ic above
                   2001: delimiter occurs outside any pile.
1.106     schwarze 2002: It is discarded including its arguments.
                   2003: .It Sy "skipping column outside column list"
                   2004: .Pq mdoc
                   2005: A
                   2006: .Ic \&Ta
                   2007: macro occurs outside any
                   2008: .Ic \&Bl Fl column
                   2009: block.
                   2010: It is discarded including its arguments.
                   2011: .It Sy "skipping end of block that is not open"
                   2012: .Pq mdoc , man , eqn , tbl , roff
                   2013: Various syntax elements can only be used to explicitly close blocks
                   2014: that have previously been opened.
                   2015: An
                   2016: .Xr mdoc 7
                   2017: block closing macro, a
                   2018: .Xr man 7
1.206     schwarze 2019: .Ic \&ME , \&RE
1.106     schwarze 2020: or
                   2021: .Ic \&UE
1.118     schwarze 2022: macro, an
                   2023: .Xr eqn 7
                   2024: right delimiter or closing brace, or the end of an equation, table, or
1.106     schwarze 2025: .Xr roff 7
                   2026: conditional request is encountered but no matching block is open.
                   2027: The offending request or macro is discarded.
1.135     schwarze 2028: .It Sy "fewer RS blocks open, skipping"
                   2029: .Pq man
                   2030: The
                   2031: .Ic \&RE
                   2032: macro is invoked with an argument, but less than the specified number of
                   2033: .Ic \&RS
                   2034: blocks is open.
                   2035: The
                   2036: .Ic \&RE
                   2037: macro is discarded.
1.106     schwarze 2038: .It Sy "inserting missing end of block"
                   2039: .Pq mdoc , tbl
                   2040: Various
                   2041: .Xr mdoc 7
                   2042: macros as well as tables require explicit closing by dedicated macros.
                   2043: A block that doesn't support bad nesting
                   2044: ends before all of its children are properly closed.
                   2045: The open child nodes are closed implicitly.
1.152     schwarze 2046: .It Sy "appending missing end of block"
1.106     schwarze 2047: .Pq mdoc , man , eqn , tbl , roff
                   2048: At the end of the document, an explicit
                   2049: .Xr mdoc 7
                   2050: block, a
                   2051: .Xr man 7
                   2052: next-line scope or
1.206     schwarze 2053: .Ic \&MT , \&RS
1.106     schwarze 2054: or
                   2055: .Ic \&UR
                   2056: block, an equation, table, or
                   2057: .Xr roff 7
                   2058: conditional or ignore block is still open.
                   2059: The open block is closed implicitly.
                   2060: .It Sy "escaped character not allowed in a name"
                   2061: .Pq roff
                   2062: Macro, string and register identifiers consist of printable,
                   2063: non-whitespace ASCII characters.
                   2064: Escape sequences and characters and strings expressed in terms of them
                   2065: cannot form part of a name.
                   2066: The first argument of an
                   2067: .Ic \&am ,
                   2068: .Ic \&as ,
                   2069: .Ic \&de ,
                   2070: .Ic \&ds ,
                   2071: .Ic \&nr ,
                   2072: or
                   2073: .Ic \&rr
                   2074: request, or any argument of an
                   2075: .Ic \&rm
                   2076: request, or the name of a request or user defined macro being called,
                   2077: is terminated by an escape sequence.
                   2078: In the cases of
                   2079: .Ic \&as ,
                   2080: .Ic \&ds ,
                   2081: and
                   2082: .Ic \&nr ,
                   2083: the request has no effect at all.
                   2084: In the cases of
                   2085: .Ic \&am ,
                   2086: .Ic \&de ,
                   2087: .Ic \&rr ,
                   2088: and
                   2089: .Ic \&rm ,
                   2090: what was parsed up to this point is used as the arguments to the request,
                   2091: and the rest of the input line is discarded including the escape sequence.
                   2092: When parsing for a request or a user-defined macro name to be called,
                   2093: only the escape sequence is discarded.
                   2094: The characters preceding it are used as the request or macro name,
                   2095: the characters following it are used as the arguments to the request or macro.
1.227     schwarze 2096: .It Sy "using macro argument outside macro"
                   2097: .Pq roff
                   2098: The escape sequence \e$ occurs outside any macro definition
                   2099: and expands to the empty string.
                   2100: .It Sy "argument number is not numeric"
                   2101: .Pq roff
                   2102: The argument of the escape sequence \e$ is not a digit;
                   2103: the escape sequence expands to the empty string.
1.257     schwarze 2104: .It Sy "negative argument, using 0"
                   2105: .Pq roff
                   2106: A
                   2107: .Ic \&shift
                   2108: request has a negative argument
                   2109: or an argument that is negative due to integer overflow.
                   2110: Macro argument numbering remains unchanged.
1.124     schwarze 2111: .It Sy "NOT IMPLEMENTED: Bd -file"
                   2112: .Pq mdoc
                   2113: For security reasons, the
                   2114: .Ic \&Bd
                   2115: macro does not support the
                   2116: .Fl file
                   2117: argument.
                   2118: By requesting the inclusion of a sensitive file, a malicious document
                   2119: might otherwise trick a privileged user into inadvertently displaying
                   2120: the file on the screen, revealing the file content to bystanders.
                   2121: The argument is ignored including the file name following it.
1.163     schwarze 2122: .It Sy "skipping display without arguments"
                   2123: .Pq mdoc
                   2124: A
                   2125: .Ic \&Bd
                   2126: block macro does not have any arguments.
                   2127: The block is discarded, and the block content is displayed in
                   2128: whatever mode was active before the block.
1.106     schwarze 2129: .It Sy "missing list type, using -item"
                   2130: .Pq mdoc
                   2131: A
                   2132: .Ic \&Bl
                   2133: macro fails to specify the list type.
1.194     schwarze 2134: .It Sy "argument is not numeric, using 1"
                   2135: .Pq roff
                   2136: The argument of a
                   2137: .Ic \&ce
                   2138: request is not a number.
1.228     schwarze 2139: .It Sy "argument is not a character"
                   2140: .Pq roff
                   2141: The first argument of a
                   2142: .Ic char
                   2143: request is neither a single ASCII character
                   2144: nor a single character escape sequence.
                   2145: The request is ignored including all its arguments.
1.258     schwarze 2146: .It Sy "skipping unusable escape sequence"
                   2147: .Pq roff
                   2148: The first argument of an
                   2149: .Ic mc
                   2150: request is neither a single ASCII character
                   2151: nor a single character escape sequence.
                   2152: All arguments are ignored and printing of a margin character is disabled.
1.106     schwarze 2153: .It Sy "missing manual name, using \(dq\(dq"
1.266     schwarze 2154: .Pq mdoc , man
1.106     schwarze 2155: The first call to
1.168     schwarze 2156: .Ic \&Nm ,
1.266     schwarze 2157: or any call in the NAME section, lacks the required argument, or
                   2158: .Ic \&MR
                   2159: is called without any argument.
1.106     schwarze 2160: .It Sy "uname(3) system call failed, using UNKNOWN"
                   2161: .Pq mdoc
                   2162: The
                   2163: .Ic \&Os
                   2164: macro is called without arguments, and the
                   2165: .Xr uname 3
                   2166: system call failed.
                   2167: As a workaround,
                   2168: .Nm
                   2169: can be compiled with
                   2170: .Sm off
                   2171: .Fl D Cm OSNAME=\(dq\e\(dq Ar string Cm \e\(dq\(dq .
                   2172: .Sm on
                   2173: .It Sy "unknown standard specifier"
                   2174: .Pq mdoc
                   2175: An
                   2176: .Ic \&St
                   2177: macro has an unknown argument and is discarded.
                   2178: .It Sy "skipping request without numeric argument"
1.118     schwarze 2179: .Pq roff , eqn
1.106     schwarze 2180: An
                   2181: .Ic \&it
1.118     schwarze 2182: request or an
                   2183: .Xr eqn 7
                   2184: .Ic \&size
                   2185: or
                   2186: .Ic \&gsize
                   2187: statement has a non-numeric or negative argument or no argument at all.
                   2188: The invalid request or statement is ignored.
1.227     schwarze 2189: .It Sy "excessive shift"
                   2190: .Pq roff
                   2191: The argument of a
                   2192: .Ic shift
                   2193: request is larger than the number of arguments of the macro that is
                   2194: currently being executed.
                   2195: All macro arguments are deleted and \en(.$ is set to zero.
1.132     schwarze 2196: .It Sy "NOT IMPLEMENTED: .so with absolute path or \(dq..\(dq"
                   2197: .Pq roff
                   2198: For security reasons,
                   2199: .Nm
                   2200: allows
                   2201: .Ic \&so
                   2202: file inclusion requests only with relative paths
                   2203: and only without ascending to any parent directory.
                   2204: By requesting the inclusion of a sensitive file, a malicious document
                   2205: might otherwise trick a privileged user into inadvertently displaying
                   2206: the file on the screen, revealing the file content to bystanders.
                   2207: .Nm
                   2208: only shows the path as it appears behind
                   2209: .Ic \&so .
                   2210: .It Sy ".so request failed"
                   2211: .Pq roff
                   2212: Servicing a
                   2213: .Ic \&so
                   2214: request requires reading an external file, but the file could not be
                   2215: opened.
                   2216: .Nm
                   2217: only shows the path as it appears behind
                   2218: .Ic \&so .
1.106     schwarze 2219: .It Sy "skipping all arguments"
                   2220: .Pq mdoc , man , eqn , roff
                   2221: An
                   2222: .Xr mdoc 7
                   2223: .Ic \&Bt ,
                   2224: .Ic \&Ed ,
                   2225: .Ic \&Ef ,
                   2226: .Ic \&Ek ,
                   2227: .Ic \&El ,
1.144     schwarze 2228: .Ic \&Lp ,
                   2229: .Ic \&Pp ,
1.106     schwarze 2230: .Ic \&Re ,
1.143     schwarze 2231: .Ic \&Rs ,
1.106     schwarze 2232: or
                   2233: .Ic \&Ud
                   2234: macro, an
                   2235: .Ic \&It
                   2236: macro in a list that don't support item heads, a
                   2237: .Xr man 7
                   2238: .Ic \&LP ,
                   2239: .Ic \&P ,
                   2240: or
                   2241: .Ic \&PP
                   2242: macro, an
                   2243: .Xr eqn 7
1.120     schwarze 2244: .Ic \&EQ
                   2245: or
1.106     schwarze 2246: .Ic \&EN
                   2247: macro, or a
                   2248: .Xr roff 7
1.148     schwarze 2249: .Ic \&br ,
                   2250: .Ic \&fi ,
                   2251: or
                   2252: .Ic \&nf
1.144     schwarze 2253: request or
1.106     schwarze 2254: .Sq \&..
                   2255: block closing request is invoked with at least one argument.
                   2256: All arguments are ignored.
                   2257: .It Sy "skipping excess arguments"
1.135     schwarze 2258: .Pq mdoc , man , roff
1.150     schwarze 2259: A macro or request is invoked with too many arguments:
                   2260: .Bl -dash -offset 2n -width 2n -compact
                   2261: .It
                   2262: .Ic \&Fo ,
1.206     schwarze 2263: .Ic \&MT ,
1.150     schwarze 2264: .Ic \&PD ,
                   2265: .Ic \&RS ,
                   2266: .Ic \&UR ,
                   2267: .Ic \&ft ,
                   2268: or
                   2269: .Ic \&sp
                   2270: with more than one argument
                   2271: .It
1.144     schwarze 2272: .Ic \&An
1.150     schwarze 2273: with another argument after
1.144     schwarze 2274: .Fl split
                   2275: or
1.150     schwarze 2276: .Fl nosplit
                   2277: .It
                   2278: .Ic \&RE
                   2279: with more than one argument or with a non-integer argument
                   2280: .It
                   2281: .Ic \&OP
                   2282: or a request of the
                   2283: .Ic \&de
                   2284: family with more than two arguments
1.154     schwarze 2285: .It
                   2286: .Ic \&Dt
1.266     schwarze 2287: or
                   2288: .Ic \&MR
1.154     schwarze 2289: with more than three arguments
1.150     schwarze 2290: .It
                   2291: .Ic \&TH
                   2292: with more than five arguments
                   2293: .It
1.145     schwarze 2294: .Ic \&Bd ,
                   2295: .Ic \&Bk ,
                   2296: or
                   2297: .Ic \&Bl
1.150     schwarze 2298: with invalid arguments
                   2299: .El
1.106     schwarze 2300: The excess arguments are ignored.
1.259     schwarze 2301: .El
                   2302: .Ss "Errors related to escape sequences"
                   2303: .Bl -ohang
                   2304: .It Sy "incomplete escape sequence"
                   2305: .Pq roff
                   2306: The end of the input line is encountered
                   2307: while parsing the argument of an escape sequence.
                   2308: In this case,
                   2309: .Ic \e*
                   2310: and
                   2311: .Ic \en
                   2312: expand to an empty string,
                   2313: .Ic \eB
                   2314: to the digit
                   2315: .Sq 0 ,
                   2316: and
                   2317: .Ic \ew
                   2318: to the length of the incomplete argument.
                   2319: All other incomplete escape sequences are ignored.
                   2320: .It Sy "invalid special character"
                   2321: .Pq roff
                   2322: A special character escape sequence is invalid,
                   2323: for example a Unicode sequence pointing to a surrogate
                   2324: or beyond the Unicode range, a \e[char...] escape sequence
                   2325: representing a control character or pointing beyond the
                   2326: .Vt unsigned char
                   2327: range, or an invalid variable-length form
                   2328: of a single-byte character escape sequence, for example writing
                   2329: .Qq \e[e]
                   2330: or
                   2331: .Qq \e[~]
                   2332: instead of
                   2333: .Qq \ee
                   2334: or
                   2335: .Qq \e~ ,
                   2336: respectively.
                   2337: The escape sequence is ignored.
                   2338: .It Sy "unknown special character"
                   2339: .Pq roff
                   2340: The name given in a special character escape sequence is not known to
                   2341: .Nm .
                   2342: The escape sequence is ignored.
1.260     schwarze 2343: .It Sy "invalid escape argument delimiter"
                   2344: .Pq roff
                   2345: An escape sequence that expects a numerical argument
                   2346: attempts to employ one of the characters
                   2347: .Qq " %&()*+-./0123456789:<=>"
                   2348: as an argument delimiter.
                   2349: The escape sequence is ignored including the invalid opening delimiter
                   2350: and the rest of the argument may appear as output text.
1.262     schwarze 2351: While various characters can be used as argument delimiters,
1.260     schwarze 2352: using the apostrophe-quote character
                   2353: .Pq Sq \(aq
                   2354: is recommended for readability and robustness.
1.133     schwarze 2355: .El
                   2356: .Ss Unsupported features
                   2357: .Bl -ohang
                   2358: .It Sy "input too large"
                   2359: .Pq mdoc , man
                   2360: Currently,
                   2361: .Nm
                   2362: cannot handle input files larger than its arbitrary size limit
                   2363: of 2^31 bytes (2 Gigabytes).
                   2364: Since useful manuals are always small, this is not a problem in practice.
                   2365: Parsing is aborted as soon as the condition is detected.
1.136     schwarze 2366: .It Sy "unsupported control character"
                   2367: .Pq roff
                   2368: An ASCII control character supported by other
                   2369: .Xr roff 7
                   2370: implementations but not by
                   2371: .Nm
                   2372: was found in an input file.
                   2373: It is replaced by a question mark.
1.232     schwarze 2374: .It Sy "unsupported escape sequence"
                   2375: .Pq roff
                   2376: An input file contains an escape sequence supported by GNU troff
                   2377: or Heirloom troff but not by
                   2378: .Nm ,
                   2379: and it is likely that this will cause information loss
                   2380: or considerable misformatting.
1.133     schwarze 2381: .It Sy "unsupported roff request"
                   2382: .Pq roff
                   2383: An input file contains a
                   2384: .Xr roff 7
                   2385: request supported by GNU troff or Heirloom troff but not by
                   2386: .Nm ,
                   2387: and it is likely that this will cause information loss
                   2388: or considerable misformatting.
1.139     schwarze 2389: .It Sy "eqn delim option in tbl"
                   2390: .Pq eqn , tbl
                   2391: The options line of a table defines equation delimiters.
                   2392: Any equation source code contained in the table will be printed unformatted.
                   2393: .It Sy "unsupported table layout modifier"
1.138     schwarze 2394: .Pq tbl
                   2395: A table layout specification contains an
                   2396: .Sq Cm m
                   2397: modifier.
                   2398: The modifier is discarded.
1.133     schwarze 2399: .It Sy "ignoring macro in table"
1.139     schwarze 2400: .Pq tbl , mdoc , man
                   2401: A table contains an invocation of an
                   2402: .Xr mdoc 7
                   2403: or
                   2404: .Xr man 7
                   2405: macro or of an undefined macro.
                   2406: The macro is ignored, and its arguments are handled
                   2407: as if they were a text line.
1.252     schwarze 2408: .It Sy "skipping tbl in -Tman mode"
                   2409: .Pq mdoc , tbl
                   2410: An input file contains the
                   2411: .Ic \&TS
                   2412: macro.
                   2413: This message is only generated in
                   2414: .Fl T Cm man
                   2415: output mode, where
                   2416: .Xr tbl 7
                   2417: input is not supported.
                   2418: .It Sy "skipping eqn in -Tman mode"
                   2419: .Pq mdoc , eqn
                   2420: An input file contains the
                   2421: .Ic \&EQ
                   2422: macro.
                   2423: This message is only generated in
                   2424: .Fl T Cm man
                   2425: output mode, where
                   2426: .Xr eqn 7
                   2427: input is not supported.
1.240     schwarze 2428: .El
                   2429: .Ss Bad command line arguments
                   2430: .Bl -ohang
                   2431: .It Sy "bad command line argument"
                   2432: The argument following one of the
                   2433: .Fl IKMmOTW
                   2434: command line options is invalid, or a
                   2435: .Ar file
                   2436: given as a command line argument cannot be opened.
                   2437: .It Sy "duplicate command line argument"
                   2438: The
                   2439: .Fl I
                   2440: command line option was specified twice.
                   2441: .It Sy "option has a superfluous value"
                   2442: An argument to the
                   2443: .Fl O
                   2444: option has a value but does not accept one.
                   2445: .It Sy "missing option value"
                   2446: An argument to the
                   2447: .Fl O
                   2448: option has no argument but requires one.
                   2449: .It Sy "bad option value"
                   2450: An argument to the
                   2451: .Fl O
                   2452: .Cm indent
                   2453: or
                   2454: .Cm width
                   2455: option has an invalid value.
                   2456: .It Sy "duplicate option value"
                   2457: The same
                   2458: .Fl O
                   2459: option is specified more than once.
                   2460: .It Sy "no such tag"
                   2461: The
                   2462: .Fl O Cm tag
                   2463: option was specified but the tag was not found in any of the displayed
                   2464: manual pages.
1.253     schwarze 2465: .It Sy "\-Tmarkdown unsupported for man(7) input"
                   2466: .Pq man
                   2467: The
                   2468: .Fl T Cm markdown
                   2469: option was specified but an input file uses the
                   2470: .Xr man 7
                   2471: language.
                   2472: No output is produced for that input file.
1.106     schwarze 2473: .El
1.1       kristaps 2474: .Sh SEE ALSO
1.141     schwarze 2475: .Xr apropos 1 ,
                   2476: .Xr man 1 ,
1.85      kristaps 2477: .Xr eqn 7 ,
1.57      kristaps 2478: .Xr man 7 ,
1.13      kristaps 2479: .Xr mandoc_char 7 ,
1.84      kristaps 2480: .Xr mdoc 7 ,
                   2481: .Xr roff 7 ,
                   2482: .Xr tbl 7
1.173     schwarze 2483: .Sh HISTORY
                   2484: The
                   2485: .Nm
                   2486: utility first appeared in
                   2487: .Ox 4.8 .
                   2488: The option
                   2489: .Fl I
                   2490: appeared in
                   2491: .Ox 5.2 ,
                   2492: and
                   2493: .Fl aCcfhKklMSsw
                   2494: in
                   2495: .Ox 5.7 .
1.1       kristaps 2496: .Sh AUTHORS
1.156     schwarze 2497: .An -nosplit
1.1       kristaps 2498: The
                   2499: .Nm
1.26      kristaps 2500: utility was written by
1.141     schwarze 2501: .An Kristaps Dzonsons Aq Mt kristaps@bsd.lv
                   2502: and is maintained by
                   2503: .An Ingo Schwarze Aq Mt schwarze@openbsd.org .

CVSweb