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

Annotation of mandoc/mandoc.1, Revision 1.267

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

CVSweb