.\" Automatically generated from an mdoc input file. Do not edit. .\" $OpenBSD: mandoc.1,v 1.166 2020/02/15 15:28:01 schwarze Exp $ .\" .\" Copyright (c) 2012, 2014-2021 Ingo Schwarze .\" Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons .\" .\" Permission to use, copy, modify, and distribute this software for any .\" purpose with or without fee is hereby granted, provided that the above .\" copyright notice and this permission notice appear in all copies. .\" .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" .TH "MANDOC" "1" "August 14, 2021" "Debian" "General Commands Manual" .nh .if n .ad l .SH "NAME" \fBmandoc\fR \- format manual pages .SH "SYNOPSIS" .HP 7n \fBmandoc\fR [\fB\-ac\fR] [\fB\-I\fR\ \fBos\fR=\fIname\fR] [\fB\-K\fR\ \fIencoding\fR] [\fB\-mdoc\fR\ |\ \fB\-man\fR] [\fB\-O\fR\ \fIoptions\fR] [\fB\-T\fR\ \fIoutput\fR] [\fB\-W\fR\ \fIlevel\fR] [\fIfile\ ...\fR] .SH "DESCRIPTION" The \fBmandoc\fR utility formats manual pages for display. .PP By default, \fBmandoc\fR reads mdoc(7) or man(7) text from stdin and produces \fB\-T\fR \fBlocale\fR output. .PP The options are as follows: .TP 8n \fB\-a\fR If the standard output is a terminal device and \fB\-c\fR is not specified, use less(1) to paginate the output, just like man(1) would. .TP 8n \fB\-c\fR Copy the formatted manual pages to the standard output without using less(1) to paginate them. This is the default. It can be specified to override \fB\-a\fR. .TP 8n \fB\-I\fR \fBos\fR=\fIname\fR Override the default operating system \fIname\fR for the mdoc(7) \fB\&Os\fR and for the man(7) \fB\&TH\fR macro. .TP 8n \fB\-K\fR \fIencoding\fR Specify the input encoding. The supported \fIencoding\fR arguments are \fBus-ascii\fR, \fBiso-8859-1\fR, and \fButf-8\fR. If not specified, autodetection uses the first match in the following list: .PP .RS 8n .PD 0 .TP 5n 1.\& If the first three bytes of the input file are the UTF-8 byte order mark (BOM, 0xefbbbf), input is interpreted as \fButf-8\fR. .PD .TP 5n 2.\& If the first or second line of the input file matches the \fBemacs\fR mode line format .sp .RS 11n \&.\e" -*- [...;] coding: \fIencoding\fR; -*- .RE .RS 5n .sp then input is interpreted according to \fIencoding\fR. .RE .TP 5n 3.\& If the first non-ASCII byte in the file introduces a valid UTF-8 sequence, input is interpreted as \fButf-8\fR. .TP 5n 4.\& Otherwise, input is interpreted as \fBiso-8859-1\fR. .PD 0 .PP .RE .PD .TP 8n \fB\-mdoc\fR | \fB\-man\fR With \fB\-mdoc\fR, all input files are interpreted as mdoc(7). With \fB\-man\fR, all input files are interpreted as man(7). By default, the input language is automatically detected for each file: if the first macro is \fB\&Dd\fR or \fB\&Dt\fR, the mdoc(7) parser is used; otherwise, the man(7) parser is used. With other arguments, \fB\-m\fR is silently ignored. .TP 8n \fB\-O\fR \fIoptions\fR Comma-separated output options. See the descriptions of the individual output formats for supported \fIoptions\fR. .TP 8n \fB\-T\fR \fIoutput\fR Select the output format. Supported values for the \fIoutput\fR argument are \fBascii\fR, \fBhtml\fR, the default of \fBlocale\fR, \fBman\fR, \fBmarkdown\fR, \fBpdf\fR, \fBps\fR, \fBtree\fR, and \fButf8\fR. .sp The special \fB\-T\fR \fBlint\fR mode only parses the input and produces no output. It implies \fB\-W\fR \fBall\fR and redirects parser messages, which usually appear on standard error output, to standard output. .TP 8n \fB\-W\fR \fIlevel\fR Specify the minimum message \fIlevel\fR to be reported on the standard error output and to affect the exit status. The \fIlevel\fR can be \fBbase\fR, \fBstyle\fR, \fBwarning\fR, \fBerror\fR, or \fBunsupp\fR. The \fBbase\fR level automatically derives the operating system from the contents of the \fB\&Os\fR macro, from the \fB\-Ios\fR command line option, or from the uname(3) return value. The levels \fBopenbsd\fR and \fBnetbsd\fR are variants of \fBbase\fR that bypass autodetection and request validation of base system conventions for a particular operating system. The level \fBall\fR is an alias for \fBbase\fR. By default, \fBmandoc\fR is silent. See \fIEXIT STATUS\fR and \fIDIAGNOSTICS\fR for details. .sp The special option \fB\-W\fR \fBstop\fR tells \fBmandoc\fR to exit after parsing a file that causes warnings or errors of at least the requested level. No formatted output will be produced from that file. If both a \fIlevel\fR and \fBstop\fR are requested, they can be joined with a comma, for example \fB\-W\fR \fBerror\fR,\fBstop\fR. .TP 8n \fIfile\fR Read from the given input file. If multiple files are specified, they are processed in the given order. If unspecified, \fBmandoc\fR reads from standard input. .PP The options \fB\-fhklw\fR are also supported and are documented in man(1). In \fB\-f\fR and \fB\-k\fR mode, \fBmandoc\fR also supports the options \fB\-CMmOSs\fR described in the apropos(1) manual. The options \fB\-fkl\fR are mutually exclusive and override each other. .SS "ASCII Output" Use \fB\-T\fR \fBascii\fR to force text output in 7-bit ASCII character encoding documented in the ascii(7) manual page, ignoring the locale(1) set in the environment. .PP Font styles are applied by using back-spaced encoding such that an underlined character \(oqc\(cq is rendered as \(oq_\e[bs]c\(cq, where \(oq\e[bs]\(cq is the back-space character number 8. Emboldened characters are rendered as \(oqc\e[bs]c\(cq. This markup is typically converted to appropriate terminal sequences by the pager or ul(1). To remove the markup, pipe the output to col(1) \fB\-b\fR instead. .PP The special characters documented in mandoc_char(7) are rendered best-effort in an ASCII equivalent. In particular, opening and closing \(oqsingle quotes\(cq are represented as characters number 0x60 and 0x27, respectively, which agrees with all ASCII standards from 1965 to the latest revision (2012) and which matches the traditional way in which roff(7) formatters represent single quotes in ASCII output. This correct ASCII rendering may look strange with modern Unicode-compatible fonts because contrary to ASCII, Unicode uses the code point U+0060 for the grave accent only, never for an opening quote. .PP The following \fB\-O\fR arguments are accepted: .TP 8n \fBindent\fR=\fIindent\fR The left margin for normal text is set to \fIindent\fR blank characters instead of the default of five for mdoc(7) and seven for man(7). Increasing this is not recommended; it may result in degraded formatting, for example overfull lines or ugly line breaks. When output is to a pager on a terminal that is less than 66 columns wide, the default is reduced to three columns. .TP 8n \fBmdoc\fR Format man(7) input files in mdoc(7) output style. This prints the operating system name rather than the page title on the right side of the footer line, and it implies \fB\-O\fR \fBindent\fR=5. One useful application is for checking that \fB\-T\fR \fBman\fR output formats in the same way as the mdoc(7) source it was generated from. .TP 8n \fBtag\fR[=\fIterm\fR] If the formatted manual page is opened in a pager, go to the definition of the \fIterm\fR rather than showing the manual page from the beginning. If no \fIterm\fR is specified, reuse the first command line argument that is not a \fIsection\fR number. If that argument is in apropos(1) \fIkey\fR=\fIval\fR format, only the \fIval\fR is used rather than the argument as a whole. This is useful for commands like \(oqman -akO tag Ic=ulimit\(cq to search for a keyword and jump right to its definition in the matching manual pages. .TP 8n \fBwidth\fR=\fIwidth\fR The output width is set to \fIwidth\fR instead of the default of 78. When output is to a pager on a terminal that is less than 79 columns wide, the default is reduced to one less than the terminal width. In any case, lines that are output in literal mode are never wrapped and may exceed the output width. .SS "HTML Output" Output produced by \fB\-T\fR \fBhtml\fR conforms to HTML5 using optional self-closing tags. Default styles use only CSS1. Equations rendered from eqn(7) blocks use MathML. .PP The file \fI/usr/share/misc/mandoc.css\fR documents style-sheet classes available for customising output. If a style-sheet is not specified with \fB\-O\fR \fBstyle\fR, \fB\-T\fR \fBhtml\fR defaults to simple output (via an embedded style-sheet) readable in any graphical or text-based web browser. .PP Non-ASCII characters are rendered as hexadecimal Unicode character references. .PP The following \fB\-O\fR arguments are accepted: .TP 8n \fBfragment\fR Omit the declaration and the , , and elements and only emit the subtree below the element. The \fBstyle\fR argument will be ignored. This is useful when embedding manual content within existing documents. .TP 8n \fBincludes\fR=\fIfmt\fR The string \fIfmt\fR, for example, \fI../src/%I.html\fR, is used as a template for linked header files (usually via the \fB\&In\fR macro). Instances of \(oq\&%I\(cq are replaced with the include filename. The default is not to present a hyperlink. .TP 8n \fBman\fR=\fIfmt\fR[;\fIfmt\fR] The string \fIfmt\fR, for example, \fI../html%S/%N.%S.html\fR, is used as a template for linked manuals (usually via the \fB\&Xr\fR macro). Instances of \(oq\&%N\(cq and \(oq%S\(cq are replaced with the linked manual's name and section, respectively. If no section is included, section 1 is assumed. The default is not to present a hyperlink. If two formats are given and a file \fI%N.%S\fR exists in the current directory, the first format is used; otherwise, the second format is used. .TP 8n \fBstyle\fR=\fIstyle.css\fR The file \fIstyle.css\fR is used for an external style-sheet. This must be a valid absolute or relative URI. .TP 8n \fBtag\fR[=\fIterm\fR] Same syntax and semantics as for \fIASCII Output\fR. This is implemented by passing a \fBfile://\fR URI ending in a fragment identifier to the pager rather than passing merely a file name. When using this argument, use a pager supporting such URIs, for example .nf .sp .RS 11n MANPAGER='lynx -force_html' man -T html -O tag=MANPAGER man MANPAGER='w3m -T text/html' man -T html -O tag=toc mandoc .RE .fi .RS 8n .sp Consequently, for HTML output, this argument does not work with more(1) or less(1). For example, \(oqMANPAGER=less man -T html -O tag=toc mandoc\(cq does not work because less(1) does not support \fBfile://\fR URIs. .RE .TP 8n \fBtoc\fR If an input file contains at least two non-standard sections, print a table of contents near the beginning of the output. .SS "Locale Output" By default, \fBmandoc\fR automatically selects UTF-8 or ASCII output according to the current locale(1). If any of the environment variables \fRLC_ALL\fR, \fRLC_CTYPE\fR, or \fRLANG\fR are set and the first one that is set selects the UTF-8 character encoding, it produces \fIUTF-8 Output\fR; otherwise, it falls back to \fIASCII Output\fR. This output mode can also be selected explicitly with \fB\-T\fR \fBlocale\fR. .SS "Man Output" Use \fB\-T\fR \fBman\fR to translate mdoc(7) input into man(7) output format. This is useful for distributing manual sources to legacy systems lacking mdoc(7) formatters. Embedded eqn(7) and tbl(7) code is not supported. .PP If the input format of a file is man(7), the input is copied to the output. The parser is also run, and as usual, the \fB\-W\fR level controls which \fIDIAGNOSTICS\fR are displayed before copying the input to the output. .SS "Markdown Output" Use \fB\-T\fR \fBmarkdown\fR to translate mdoc(7) input to the markdown format conforming to \fIJohn Gruber's 2004 specification\fR: \fBhttp://daringfireball.net/projects/markdown/syntax.text\fR. The output also almost conforms to the \fICommonMark\fR: \fBhttp://commonmark.org/\fR specification. .PP The character set used for the markdown output is ASCII. Non-ASCII characters are encoded as HTML entities. Since that is not possible in literal font contexts, because these are rendered as code spans and code blocks in the markdown output, non-ASCII characters are transliterated to ASCII approximations in these contexts. .PP Markdown is a very weak markup language, so all semantic markup is lost, and even part of the presentational markup may be lost. Do not use this as an intermediate step in converting to HTML; instead, use \fB\-T\fR \fBhtml\fR directly. .PP The man(7), tbl(7), and eqn(7) input languages are not supported by \fB\-T\fR \fBmarkdown\fR output mode. .SS "PDF Output" PDF-1.1 output may be generated by \fB\-T\fR \fBpdf\fR. See \fIPostScript Output\fR for \fB\-O\fR arguments and defaults. .SS "PostScript Output" PostScript "Adobe-3.0" Level-2 pages may be generated by \fB\-T\fR \fBps\fR. Output pages default to letter sized and are rendered in the Times font family, 11-point. Margins are calculated as 1/9 the page length and width. Line-height is 1.4m. .PP Special characters are rendered as in \fIASCII Output\fR. .PP The following \fB\-O\fR arguments are accepted: .TP 8n \fBpaper\fR=\fIname\fR The paper size \fIname\fR may be one of \fIa3\fR, \fIa4\fR, \fIa5\fR, \fIlegal\fR, or \fIletter\fR. You may also manually specify dimensions as \fINNxNN\fR, width by height in millimetres. If an unknown value is encountered, \fIletter\fR is used. .SS "UTF-8 Output" Use \fB\-T\fR \fButf8\fR to force text output in UTF-8 multi-byte character encoding, ignoring the locale(1) settings in the environment. See \fIASCII Output\fR regarding font styles and \fB\-O\fR arguments. .PP On operating systems lacking locale or wide character support, and on those where the internal character representation is not UCS-4, \fBmandoc\fR always falls back to \fIASCII Output\fR. .SS "Syntax tree output" Use \fB\-T\fR \fBtree\fR to show a human readable representation of the syntax tree. It is useful for debugging the source code of manual pages. The exact format is subject to change, so don't write parsers for it. .PP The first paragraph shows meta data found in the mdoc(7) prologue, on the man(7) \fB\&TH\fR line, or the fallbacks used. .PP In the tree dump, each output line shows one syntax tree node. Child nodes are indented with respect to their parent node. The columns are: .TP 5n 1.\& For macro nodes, the macro name; for text and tbl(7) nodes, the content. There is a special format for eqn(7) nodes. .PD 0 .TP 5n 2.\& Node type (text, elem, block, head, body, body-end, tail, tbl, eqn). .TP 5n 3.\& Flags: .PP .RS 5n .TP 4n \fB-\fR An opening parenthesis if the node is an opening delimiter. .TP 4n \fB-\fR An asterisk if the node starts a new input line. .TP 4n \fB-\fR The input line number (starting at one). .TP 4n \fB-\fR A colon. .TP 4n \fB-\fR The input column number (starting at one). .TP 4n \fB-\fR A closing parenthesis if the node is a closing delimiter. .TP 4n \fB-\fR A full stop if the node ends a sentence. .TP 4n \fB-\fR BROKEN if the node is a block broken by another block. .TP 4n \fB-\fR NOSRC if the node is not in the input file, but automatically generated from macros. .TP 4n \fB-\fR NOPRT if the node is not supposed to generate output for any output format. .PP .RE .PD .PP The following \fB\-O\fR argument is accepted: .TP 8n \fBnoval\fR Skip validation and show the unvalidated syntax tree. This can help to find out whether a given behaviour is caused by the parser or by the validator. Meta data is not available in this case. .SH "ENVIRONMENT" .TP 10n \fRLC_CTYPE\fR The character encoding locale(1). When \fILocale Output\fR is selected, it decides whether to use ASCII or UTF-8 output format. It never affects the interpretation of input files. .TP 10n \fRMANPAGER\fR Any non-empty value of the environment variable \fRMANPAGER\fR is used instead of the standard pagination program, less(1); see man(1) for details. Only used if \fB\-a\fR or \fB\-l\fR is specified. .TP 10n \fRPAGER\fR Specifies the pagination program to use when \fRMANPAGER\fR is not defined. If neither PAGER nor MANPAGER is defined, less(1) is used. Only used if \fB\-a\fR or \fB\-l\fR is specified. .SH "EXIT STATUS" The \fBmandoc\fR utility exits with one of the following values, controlled by the message \fIlevel\fR associated with the \fB\-W\fR option: .TP 8n 0 No base system convention violations, style suggestions, warnings, or errors occurred, or those that did were ignored because they were lower than the requested \fIlevel\fR. .PD 0 .TP 8n 1 At least one base system convention violation or style suggestion occurred, but no warning or error, and \fB\-W\fR \fBbase\fR or \fB\-W\fR \fBstyle\fR was specified. .TP 8n 2 At least one warning occurred, but no error, and \fB\-W\fR \fBwarning\fR or a lower \fIlevel\fR was requested. .TP 8n 3 At least one parsing error occurred, but no unsupported feature was encountered, and \fB\-W\fR \fBerror\fR or a lower \fIlevel\fR was requested. .TP 8n 4 At least one unsupported feature was encountered, and \fB\-W\fR \fBunsupp\fR or a lower \fIlevel\fR was requested. .TP 8n 5 Invalid command line arguments were specified. No input files have been read. .TP 8n 6 An operating system error occurred, for example exhaustion of memory, file descriptors, or process table entries. Such errors may cause \fBmandoc\fR to exit at once, possibly in the middle of parsing or formatting a file. .PD .PP Note that selecting \fB\-T\fR \fBlint\fR output mode implies \fB\-W\fR \fBall\fR. .SH "EXAMPLES" To page manuals to the terminal: .PP .RS 6n $ mandoc -l mandoc.1 man.1 apropos.1 makewhatis.8 .RE .PP To produce HTML manuals with \fI/usr/share/misc/mandoc.css\fR as the style-sheet: .PP .RS 6n $ mandoc \-T html -O style=/usr/share/misc/mandoc.css mdoc.7 > mdoc.7.html .RE .PP To check over a large set of manuals: .PP .RS 6n $ mandoc \-T lint \(gafind /usr/src -name \e*\e.[1-9]\(ga .RE .PP To produce a series of PostScript manuals for A4 paper: .PP .RS 6n $ mandoc \-T ps \-O paper=a4 mdoc.7 man.7 > manuals.ps .RE .PP Convert a modern mdoc(7) manual to the older man(7) format, for use on systems lacking an mdoc(7) parser: .PP .RS 6n $ mandoc \-T man foo.mdoc > foo.man .RE .SH "DIAGNOSTICS" Messages displayed by \fBmandoc\fR follow this format: .sp .RS 6n \fBmandoc\fR: \fIfile\fR:\fIline\fR:\fIcolumn\fR: \fIlevel\fR: \fImessage\fR: \fImacro arguments\fR (\fIos\fR) .RE .PP The first three fields identify the \fIfile\fR name, \fIline\fR number, and \fIcolumn\fR number of the input file where the message was triggered. The line and column numbers start at 1. Both are omitted for messages referring to an input file as a whole. All \fIlevel\fR and \fImessage\fR strings are explained below. The name of the \fImacro\fR triggering the message and its \fIarguments\fR are omitted where meaningless. The \fIos\fR operating system specifier is omitted for messages that are relevant for all operating systems. Fatal messages about invalid command line arguments or operating system errors, for example when memory is exhausted, may also omit the \fIfile\fR and \fIlevel\fR fields. .PP Message levels have the following meanings: .TP 9n \fBsyserr\fR An operating system error occurred. There isn't necessarily anything wrong with the input files. Output may all the same be missing or incomplete. .TP 9n \fBbadarg\fR Invalid command line arguments were specified. No input files have been read and no output is produced. .TP 9n \fBunsupp\fR An input file uses unsupported low-level roff(7) features. The output may be incomplete and/or misformatted, so using GNU troff instead of \fBmandoc\fR to process the file may be preferable. .TP 9n \fBerror\fR Indicates a risk of information loss or severe misformatting, in most cases caused by serious syntax errors. .TP 9n \fBwarning\fR Indicates a risk that the information shown or its formatting may mismatch the author's intent in minor ways. Additionally, syntax errors are classified at least as warnings, even if they do not usually cause misformatting. .TP 9n \fBstyle\fR An input file uses dubious or discouraged style. This is not a complaint about the syntax, and probably neither formatting nor portability are in danger. While great care is taken to avoid false positives on the higher message levels, the \fBstyle\fR level tries to reduce the probability that issues go unnoticed, so it may occasionally issue bogus suggestions. Please use your good judgement to decide whether any particular \fBstyle\fR suggestion really justifies a change to the input file. .TP 9n \fBbase\fR A convention used in the base system of a specific operating system is not adhered to. These are not markup mistakes, and neither the quality of formatting nor portability are in danger. Messages of the \fBbase\fR level are printed with the more intuitive \fBstyle\fR \fIlevel\fR tag. .PP Messages of the \fBbase\fR, \fBstyle\fR, \fBwarning\fR, \fBerror\fR, and \fBunsupp\fR levels are hidden unless their level, or a lower level, is requested using a \fB\-W\fR option or \fB\-T\fR \fBlint\fR output mode. .PP As indicated below, all \fBbase\fR and some \fBstyle\fR checks are only performed if a specific operating system name occurs in the arguments of the \fB\-W\fR command line option, of the \fB\&Os\fR macro, of the \fB\-Ios\fR command line option, or, if neither are present, in the return value of the uname(3) function. .SS "Conventions for base system manuals" .PP .BR \& "\fBMdocdate found\fR .br (mdoc,\ NetBSD) The \fB\&Dd\fR macro uses CVS \fBMdocdate\fR keyword substitution, which is not supported by the NetBSD base system. Consider using the conventional \(lqMonth dd, yyyy\(rq format instead. .PP .BR \& "\fBMdocdate missing\fR .br (mdoc,\ OpenBSD) The \fB\&Dd\fR macro does not use CVS \fBMdocdate\fR keyword substitution, but using it is conventionally expected in the OpenBSD base system. .PP .BR \& "\fBunknown architecture\fR .br (mdoc,\ OpenBSD,\ NetBSD) The third argument of the \fB\&Dt\fR macro does not match any of the architectures this operating system is running on. .PP .BR \& "\fBoperating system explicitly specified\fR .br (mdoc,\ OpenBSD,\ NetBSD) The \fB\&Os\fR macro has an argument. In the base system, it is conventionally left blank. .PP .BR \& "\fBRCS id missing\fR .br (OpenBSD,\ NetBSD) The manual page lacks the comment line with the RCS identifier generated by CVS \fBOpenBSD\fR or \fBNetBSD\fR keyword substitution as conventionally used in these operating systems. .SS "Style suggestions" .PP .BR \& "\fBlegacy man(7) date format\fR .br (mdoc) The \fB\&Dd\fR macro uses the legacy man(7) date format \(lqyyyy-dd-mm\(rq. Consider using the conventional mdoc(7) date format \(lqMonth dd, yyyy\(rq instead. .PP .BR \& "\fBnormalizing date format to\fR: ... .br (mdoc, man) The \fB\&Dd\fR or \fB\&TH\fR macro provides an abbreviated month name or a day number with a leading zero. In the formatted output, the month name is written out in full and the leading zero is omitted. .PP .BR \& "\fBlower case character in document title\fR .br (mdoc, man) The title is still used as given in the \fB\&Dt\fR or \fB\&TH\fR macro. .PP .BR \& "\fBduplicate RCS id\fR .br A single manual page contains two copies of the RCS identifier for the same operating system. Consider deleting the later instance and moving the first one up to the top of the page. .PP .BR \& "\fBpossible typo in section name\fR .br (mdoc) Fuzzy string matching revealed that the argument of an \fB\&Sh\fR macro is similar, but not identical to a standard section name. .PP .BR \& "\fBunterminated quoted argument\fR .br (roff) Macro arguments can be enclosed in double quote characters such that space characters and macro names contained in the quoted argument need not be escaped. The closing quote of the last argument of a macro can be omitted. However, omitting it is not recommended because it makes the code harder to read. .PP .BR \& "\fBuseless macro\fR .br (mdoc) A \fB\&Bt\fR, \fB\&Tn\fR, or \fB\&Ud\fR macro was found. Simply delete it: it serves no useful purpose. .PP .BR \& "\fBconsider using OS macro\fR .br (mdoc) A string was found in plain text or in a \fB\&Bx\fR macro that could be represented using \fB\&Ox\fR, \fB\&Nx\fR, \fB\&Fx\fR, or \fB\&Dx\fR. .PP .BR \& "\fBerrnos out of order\fR .br (mdoc,\ NetBSD) The \fB\&Er\fR items in a \fB\&Bl\fR list are not in alphabetical order. .PP .BR \& "\fBduplicate errno\fR .br (mdoc,\ NetBSD) A \fB\&Bl\fR list contains two consecutive \fB\&It\fR entries describing the same \fB\&Er\fR number. .PP .BR \& "\fBreferenced manual not found\fR .br (mdoc) An \fB\&Xr\fR macro references a manual page that was not found. When running with \fB\-W\fR \fBbase\fR, the search is restricted to the base system, by default to \fI/usr/share/man\fR:\fI/usr/X11R6/man\fR. This path can be configured at compile time using the \fRMANPATH_BASE\fR preprocessor macro. When running with \fB\-W\fR \fBstyle\fR, the search is done along the full search path as described in the man(1) manual page, respecting the \fB\-m\fR and \fB\-M\fR command line options, the \fRMANPATH\fR environment variable, the man.conf(5) file and falling back to the default of \fI/usr/share/man\fR:\fI/usr/X11R6/man\fR:\fI/usr/local/man\fR, also configurable at compile time using the \fRMANPATH_DEFAULT\fR preprocessor macro. .PP .BR \& "\fBtrailing delimiter\fR .br (mdoc) The last argument of an \fB\&Ex\fR, \fB\&Fo\fR, \fB\&Nd\fR, \fB\&Nm\fR, \fB\&Os\fR, \fB\&Sh\fR, \fB\&Ss\fR, \fB\&St\fR, or \fB\&Sx\fR macro ends with a trailing delimiter. This is usually bad style and often indicates typos. Most likely, the delimiter can be removed. .PP .BR \& "\fBno blank before trailing delimiter\fR .br (mdoc) The last argument of a macro that supports trailing delimiter arguments is longer than one byte and ends with a trailing delimiter. Consider inserting a blank such that the delimiter becomes a separate argument, thus moving it out of the scope of the macro. .PP .BR \& "\fBfill mode already enabled, skipping\fR .br (man) A \fB\&fi\fR request occurs even though the document is still in fill mode, or already switched back to fill mode. It has no effect. .PP .BR \& "\fBfill mode already disabled, skipping\fR .br (man) An \fB\&nf\fR request occurs even though the document already switched to no-fill mode and did not switch back to fill mode yet. It has no effect. .PP .BR \& "\fBinput text line longer than 80 bytes\fR .br Consider breaking the input text line at one of the blank characters before column 80. .PP .BR \& "\fBverbatim \(dq--\(dq, maybe consider using \e(em\fR .br (mdoc) Even though the ASCII output device renders an em-dash as "\-\-", that is not a good way to write it in an input file because it renders poorly on all other output devices. .PP .BR \& "\fBfunction name without markup\fR .br (mdoc) A word followed by an empty pair of parentheses occurs on a text line. Consider using an \fB\&Fn\fR or \fB\&Xr\fR macro. .PP .BR \& "\fBwhitespace at end of input line\fR .br (mdoc, man, roff) Whitespace at the end of input lines is almost never semantically significant \(em but in the odd case where it might be, it is extremely confusing when reviewing and maintaining documents. .PP .BR \& "\fBbad comment style\fR .br (roff) Comment lines start with a dot, a backslash, and a double-quote character. The \fBmandoc\fR utility treats the line as a comment line even without the backslash, but leaving out the backslash might not be portable. .SS "Warnings related to the document prologue" .PP .BR \& "\fBmissing manual title, using UNTITLED\fR .br (mdoc) A \fB\&Dt\fR macro has no arguments, or there is no \fB\&Dt\fR macro before the first non-prologue macro. .PP .BR \& "\fBmissing manual title, using \(dq\(dq\fR .br (man) There is no \fB\&TH\fR macro, or it has no arguments. .PP .BR \& "\fBmissing manual section, using \(dq\(dq\fR .br (mdoc, man) A \fB\&Dt\fR or \fB\&TH\fR macro lacks the mandatory section argument. .PP .BR \& "\fBunknown manual section\fR .br (mdoc) The section number in a \fB\&Dt\fR line is invalid, but still used. .PP .BR \& "\fBfilename/section mismatch\fR .br (mdoc, man) The name of the input file being processed is known and its file name extension starts with a non-zero digit, but the \fB\&Dt\fR or \fB\&TH\fR macro contains a \fIsection\fR argument that starts with a different non-zero digit. The \fIsection\fR argument is used as provided anyway. Consider checking whether the file name or the argument need a correction. .PP .BR \& "\fBmissing date, using \(dq\(dq\fR .br (mdoc, man) The document was parsed as mdoc(7) and it has no \fB\&Dd\fR macro, or the \fB\&Dd\fR macro has no arguments or only empty arguments; or the document was parsed as man(7) and it has no \fB\&TH\fR macro, or the \fB\&TH\fR macro has less than three arguments or its third argument is empty. .PP .BR \& "\fBcannot parse date, using it verbatim\fR .br (mdoc, man) The date given in a \fB\&Dd\fR or \fB\&TH\fR macro does not follow the conventional format. .PP .BR \& "\fBdate in the future, using it anyway\fR .br (mdoc, man) The date given in a \fB\&Dd\fR or \fB\&TH\fR macro is more than a day ahead of the current system time(3). .PP .BR \& "\fBmissing Os macro, using \(dq\(dq\fR .br (mdoc) The default or current system is not shown in this case. .PP .BR \& "\fBlate prologue macro\fR .br (mdoc) A \fB\&Dd\fR or \fB\&Os\fR macro occurs after some non-prologue macro, but still takes effect. .PP .BR \& "\fBprologue macros out of order\fR .br (mdoc) The prologue macros are not given in the conventional order \fB\&Dd\fR, \fB\&Dt\fR, \fB\&Os\fR. All three macros are used even when given in another order. .SS "Warnings regarding document structure" .PP .BR \& "\fB.so is fragile, better use ln(1)\fR .br (roff) Including files only works when the parser program runs with the correct current working directory. .PP .BR \& "\fBno document body\fR .br (mdoc, man) The document body contains neither text nor macros. An empty document is shown, consisting only of a header and a footer line. .PP .BR \& "\fBcontent before first section header\fR .br (mdoc, man) Some macros or text precede the first \fB\&Sh\fR or \fB\&SH\fR section header. The offending macros and text are parsed and added to the top level of the syntax tree, outside any section block. .PP .BR \& "\fBfirst section is not NAME\fR .br (mdoc) The argument of the first \fB\&Sh\fR macro is not \(oqNAME\(cq. This may confuse makewhatis(8) and apropos(1). .PP .BR \& "\fBNAME section without Nm before Nd\fR .br (mdoc) The NAME section does not contain any \fB\&Nm\fR child macro before the first \fB\&Nd\fR macro. .PP .BR \& "\fBNAME section without description\fR .br (mdoc) The NAME section lacks the mandatory \fB\&Nd\fR child macro. .PP .BR \& "\fBdescription not at the end of NAME\fR .br (mdoc) The NAME section does contain an \fB\&Nd\fR child macro, but other content follows it. .PP .BR \& "\fBbad NAME section content\fR .br (mdoc) The NAME section contains plain text or macros other than \fB\&Nm\fR and \fB\&Nd\fR. .PP .BR \& "\fBmissing comma before name\fR .br (mdoc) The NAME section contains an \fB\&Nm\fR macro that is neither the first one nor preceded by a comma. .PP .BR \& "\fBmissing description line, using \(dq\(dq\fR .br (mdoc) The \fB\&Nd\fR macro lacks the required argument. The title line of the manual will end after the dash. .PP .BR \& "\fBdescription line outside NAME section\fR .br (mdoc) An \fB\&Nd\fR macro appears outside the NAME section. The arguments are printed anyway and the following text is used for apropos(1), but none of that behaviour is portable. .PP .BR \& "\fBsections out of conventional order\fR .br (mdoc) A standard section occurs after another section it usually precedes. All section titles are used as given, and the order of sections is not changed. .PP .BR \& "\fBduplicate section title\fR .br (mdoc) The same standard section title occurs more than once. .PP .BR \& "\fBunexpected section\fR .br (mdoc) A standard section header occurs in a section of the manual where it normally isn't useful. .PP .BR \& "\fBcross reference to self\fR .br (mdoc) An \fB\&Xr\fR macro refers to a name and section matching the section of the present manual page and a name mentioned in an \fB\&Nm\fR macro in the NAME or SYNOPSIS section, or in an \fB\&Fn\fR or \fB\&Fo\fR macro in the SYNOPSIS. Consider using \fB\&Nm\fR or \fB\&Fn\fR instead of \fB\&Xr\fR. .PP .BR \& "\fBunusual Xr order\fR .br (mdoc) In the SEE ALSO section, an \fB\&Xr\fR macro with a lower section number follows one with a higher number, or two \fB\&Xr\fR macros referring to the same section are out of alphabetical order. .PP .BR \& "\fBunusual Xr punctuation\fR .br (mdoc) In the SEE ALSO section, punctuation between two \fB\&Xr\fR macros differs from a single comma, or there is trailing punctuation after the last \fB\&Xr\fR macro. .PP .BR \& "\fBAUTHORS section without An macro\fR .br (mdoc) An AUTHORS sections contains no \fB\&An\fR macros, or only empty ones. Probably, there are author names lacking markup. .SS "Warnings related to macros and nesting" .PP .BR \& "\fBobsolete macro\fR .br (mdoc) See the mdoc(7) manual for replacements. .PP .BR \& "\fBmacro neither callable nor escaped\fR .br (mdoc) The name of a macro that is not callable appears on a macro line. It is printed verbatim. If the intention is to call it, move it to its own input line; otherwise, escape it by prepending \(oq\e&\(cq. .PP .BR \& "\fBskipping paragraph macro\fR .br In mdoc(7) documents, this happens .PD 0 .TP 4n \fB-\fR at the beginning and end of sections and subsections .TP 4n \fB-\fR right before non-compact lists and displays .TP 4n \fB-\fR at the end of items in non-column, non-compact lists .TP 4n \fB-\fR and for multiple consecutive paragraph macros. .PP In man(7) documents, it happens .TP 4n \fB-\fR for empty \fB\&P\fR, \fB\&PP\fR, and \fB\&LP\fR macros .TP 4n \fB-\fR for \fB\&IP\fR macros having neither head nor body arguments .TP 4n \fB-\fR for \fB\&br\fR or \fB\&sp\fR right after \fB\&SH\fR or \fB\&SS\fR .PD .PP .BR \& "\fBmoving paragraph macro out of list\fR .br (mdoc) A list item in a \fB\&Bl\fR list contains a trailing paragraph macro. The paragraph macro is moved after the end of the list. .PP .BR \& "\fBskipping no-space macro\fR .br (mdoc) An input line begins with an \fB\&Ns\fR macro, or the next argument after an \fB\&Ns\fR macro is an isolated closing delimiter. The macro is ignored. .PP .BR \& "\fBblocks badly nested\fR .br (mdoc) If two blocks intersect, one should completely contain the other. Otherwise, rendered output is likely to look strange in any output format, and rendering in SGML-based output formats is likely to be outright wrong because such languages do not support badly nested blocks at all. Typical examples of badly nested blocks are "\fB\&Ao \&Bo \&Ac \&Bc\fR" and "\fB\&Ao \&Bq \&Ac\fR". In these examples, \fB\&Ac\fR breaks \fB\&Bo\fR and \fB\&Bq\fR, respectively. .PP .BR \& "\fBnested displays are not portable\fR .br (mdoc) A \fB\&Bd\fR, \fB\&D1\fR, or \fB\&Dl\fR display occurs nested inside another \fB\&Bd\fR display. This works with \fBmandoc\fR, but fails with most other implementations. .PP .BR \& "\fBmoving content out of list\fR .br (mdoc) A \fB\&Bl\fR list block contains text or macros before the first \fB\&It\fR macro. The offending children are moved before the beginning of the list. .PP .BR \& "\fBfirst macro on line\fR .br Inside a \fB\&Bl\fR \fB\-column\fR list, a \fB\&Ta\fR macro occurs as the first macro on a line, which is not portable. .PP .BR \& "\fBline scope broken\fR .br (man) While parsing the next-line scope of the previous macro, another macro is found that prematurely terminates the previous one. The previous, interrupted macro is deleted from the parse tree. .SS "Warnings related to missing arguments" .PP .BR \& "\fBskipping empty request\fR .br (roff, eqn) The macro name is missing from a macro definition request, or an eqn(7) control statement or operation keyword lacks its required argument. .PP .BR \& "\fBconditional request controls empty scope\fR .br (roff) A conditional request is only useful if any of the following follows it on the same logical input line: .PD 0 .TP 4n \fB-\fR The \(oq\e{\(cq keyword to open a multi-line scope. .TP 4n \fB-\fR A request or macro or some text, resulting in a single-line scope. .TP 4n \fB-\fR The immediate end of the logical line without any intervening whitespace, resulting in next-line scope. .PP Here, a conditional request is followed by trailing whitespace only, and there is no other content on its logical input line. Note that it doesn't matter whether the logical input line is split across multiple physical input lines using \(oq\e\(cq line continuation characters. This is one of the rare cases where trailing whitespace is syntactically significant. The conditional request controls a scope containing whitespace only, so it is unlikely to have a significant effect, except that it may control a following \fB\&el\fR clause. .PD .PP .BR \& "\fBskipping empty macro\fR .br (mdoc) The indicated macro has no arguments and hence no effect. .PP .BR \& "\fBempty block\fR .br (mdoc, man) A \fB\&Bd\fR, \fB\&Bk\fR, \fB\&Bl\fR, \fB\&D1\fR, \fB\&Dl\fR, \fB\&MT\fR, \fB\&RS\fR, or \fB\&UR\fR block contains nothing in its body and will produce no output. .PP .BR \& "\fBempty argument, using 0n\fR .br (mdoc) The required width is missing after \fB\&Bd\fR or \fB\&Bl\fR \fB\-offset\fR or \fB\-width\fR. .PP .BR \& "\fBmissing display type, using -ragged\fR .br (mdoc) The \fB\&Bd\fR macro is invoked without the required display type. .PP .BR \& "\fBlist type is not the first argument\fR .br (mdoc) In a \fB\&Bl\fR macro, at least one other argument precedes the type argument. The \fBmandoc\fR utility copes with any argument order, but some other mdoc(7) implementations do not. .PP .BR \& "\fBmissing -width in -tag list, using 8n\fR .br (mdoc) Every \fB\&Bl\fR macro having the \fB\-tag\fR argument requires \fB\-width\fR, too. .PP .BR \& "\fBmissing utility name, using \(dq\(dq\fR .br (mdoc) The \fB\&Ex\fR \fB\-std\fR macro is called without an argument before \fB\&Nm\fR has first been called with an argument. .PP .BR \& "\fBmissing function name, using \(dq\(dq\fR .br (mdoc) The \fB\&Fo\fR macro is called without an argument. No function name is printed. .PP .BR \& "\fBempty head in list item\fR .br (mdoc) In a \fB\&Bl\fR \fB\-diag\fR, \fB\-hang\fR, \fB\-inset\fR, \fB\-ohang\fR, or \fB\-tag\fR list, an \fB\&It\fR macro lacks the required argument. The item head is left empty. .PP .BR \& "\fBempty list item\fR .br (mdoc) In a \fB\&Bl\fR \fB\-bullet\fR, \fB\-dash\fR, \fB\-enum\fR, or \fB\-hyphen\fR list, an \fB\&It\fR block is empty. An empty list item is shown. .PP .BR \& "\fBmissing argument, using next line\fR .br (mdoc) An \fB\&It\fR macro in a \fB\&Bd\fR \fB\-column\fR list has no arguments. While \fBmandoc\fR uses the text or macros of the following line, if any, for the cell, other formatters may misformat the list. .PP .BR \& "\fBmissing font type, using \efR\fR .br (mdoc) A \fB\&Bf\fR macro has no argument. It switches to the default font. .PP .BR \& "\fBunknown font type, using \efR\fR .br (mdoc) The \fB\&Bf\fR argument is invalid. The default font is used instead. .PP .BR \& "\fBnothing follows prefix\fR .br (mdoc) A \fB\&Pf\fR macro has no argument, or only one argument and no macro follows on the same input line. This defeats its purpose; in particular, spacing is not suppressed before the text or macros following on the next input line. .PP .BR \& "\fBempty reference block\fR .br (mdoc) An \fB\&Rs\fR macro is immediately followed by an \fB\&Re\fR macro on the next input line. Such an empty block does not produce any output. .PP .BR \& "\fBmissing section argument\fR .br (mdoc) An \fB\&Xr\fR macro lacks its second, section number argument. The first argument, i.e. the name, is printed, but without subsequent parentheses. .PP .BR \& "\fBmissing -std argument, adding it\fR .br (mdoc) An \fB\&Ex\fR or \fB\&Rv\fR macro lacks the required \fB\-std\fR argument. The \fBmandoc\fR utility assumes \fB\-std\fR even when it is not specified, but other implementations may not. .PP .BR \& "\fBmissing option string, using \(dq\(dq\fR .br (man) The \fB\&OP\fR macro is invoked without any argument. An empty pair of square brackets is shown. .PP .BR \& "\fBmissing resource identifier, using \(dq\(dq\fR .br (man) The \fB\&MT\fR or \fB\&UR\fR macro is invoked without any argument. An empty pair of angle brackets is shown. .PP .BR \& "\fBmissing eqn box, using \(dq\(dq\fR .br (eqn) A diacritic mark or a binary operator is found, but there is nothing to the left of it. An empty box is inserted. .SS "Warnings related to bad macro arguments" .PP .BR \& "\fBduplicate argument\fR .br (mdoc) A \fB\&Bd\fR or \fB\&Bl\fR macro has more than one \fB\-compact\fR, more than one \fB\-offset\fR, or more than one \fB\-width\fR argument. All but the last instances of these arguments are ignored. .PP .BR \& "\fBskipping duplicate argument\fR .br (mdoc) An \fB\&An\fR macro has more than one \fB\-split\fR or \fB\-nosplit\fR argument. All but the first of these arguments are ignored. .PP .BR \& "\fBskipping duplicate display type\fR .br (mdoc) A \fB\&Bd\fR macro has more than one type argument; the first one is used. .PP .BR \& "\fBskipping duplicate list type\fR .br (mdoc) A \fB\&Bl\fR macro has more than one type argument; the first one is used. .PP .BR \& "\fBskipping -width argument\fR .br (mdoc) A \fB\&Bl\fR \fB\-column\fR, \fB\-diag\fR, \fB\-ohang\fR, \fB\-inset\fR, or \fB\-item\fR list has a \fB\-width\fR argument. That has no effect. .PP .BR \& "\fBwrong number of cells\fR .br In a line of a \fB\&Bl\fR \fB\-column\fR list, the number of tabs or \fB\&Ta\fR macros is less than the number expected from the list header line or exceeds the expected number by more than one. Missing cells remain empty, and all cells exceeding the number of columns are joined into one single cell. .PP .BR \& "\fBunknown AT&T UNIX version\fR .br (mdoc) An \fB\&At\fR macro has an invalid argument. It is used verbatim, with "AT&T UNIX " prefixed to it. .PP .BR \& "\fBcomma in function argument\fR .br (mdoc) An argument of an \fB\&Fa\fR or \fB\&Fn\fR macro contains a comma; it should probably be split into two arguments. .PP .BR \& "\fBparenthesis in function name\fR .br (mdoc) The first argument of an \fB\&Fc\fR or \fB\&Fn\fR macro contains an opening or closing parenthesis; that's probably wrong, parentheses are added automatically. .PP .BR \& "\fBunknown library name\fR .br (mdoc, not on\ OpenBSD) An \fB\&Lb\fR macro has an unknown name argument and will be rendered as "library \(lq\fIname\fR\(rq". .PP .BR \& "\fBinvalid content in Rs block\fR .br (mdoc) An \fB\&Rs\fR block contains plain text or non-% macros. The bogus content is left in the syntax tree. Formatting may be poor. .PP .BR \& "\fBinvalid Boolean argument\fR .br (mdoc) An \fB\&Sm\fR macro has an argument other than \fBon\fR or \fBoff\fR. The invalid argument is moved out of the macro, which leaves the macro empty, causing it to toggle the spacing mode. .PP .BR \& "\fBargument contains two font escapes\fR .br (roff) The second argument of a \fBchar\fR request contains more than one font escape sequence. A wrong font may remain active after using the character. .PP .BR \& "\fBunknown font, skipping request\fR .br (man, tbl) A roff(7) \fB\&ft\fR request or a tbl(7) \fB\&f\fR layout modifier has an unknown \fIfont\fR argument. .PP .BR \& "\fBodd number of characters in request\fR .br (roff) A \fB\&tr\fR request contains an odd number of characters. The last character is mapped to the blank character. .SS "Warnings related to plain text" .PP .BR \& "\fBblank line in fill mode, using .sp\fR .br (mdoc) The meaning of blank input lines is only well-defined in non-fill mode: In fill mode, line breaks of text input lines are not supposed to be significant. However, for compatibility with groff, blank lines in fill mode are formatted like \fB\&sp\fR requests. To request a paragraph break, use \fB\&Pp\fR instead of a blank line. .PP .BR \& "\fBtab in filled text\fR .br (mdoc, man) The meaning of tab characters is only well-defined in non-fill mode: In fill mode, whitespace is not supposed to be significant on text input lines. As an implementation dependent choice, tab characters on text lines are passed through to the formatters in any case. Given that the text before the tab character will be filled, it is hard to predict which tab stop position the tab will advance to. .PP .BR \& "\fBnew sentence, new line\fR .br (mdoc) A new sentence starts in the middle of a text line. Start it on a new input line to help formatters produce correct spacing. .PP .BR \& "\fBinvalid escape sequence\fR .br (roff) An escape sequence has an invalid opening argument delimiter, lacks the closing argument delimiter, the argument is of an invalid form, or it is a character escape sequence with an invalid name. If the argument is incomplete, \fB\e*\fR and \fB\en\fR expand to an empty string, \fB\eB\fR to the digit \(oq0\(cq, and \fB\ew\fR to the length of the incomplete argument. All other invalid escape sequences are ignored. .PP .BR \& "\fBundefined escape, printing literally\fR .br (roff) In an escape sequence, the first character right after the leading backslash is invalid. That character is printed literally, which is equivalent to ignoring the backslash. .PP .BR \& "\fBundefined string, using \(dq\(dq\fR .br (roff) If a string is used without being defined before, its value is implicitly set to the empty string. However, defining strings explicitly before use keeps the code more readable. .SS "Warnings related to tables" .PP .BR \& "\fBtbl line starts with span\fR .br (tbl) The first cell in a table layout line is a horizontal span (\(oq\fBs\fR\(cq). Data provided for this cell is ignored, and nothing is printed in the cell. .PP .BR \& "\fBtbl column starts with span\fR .br (tbl) The first line of a table layout specification requests a vertical span (\(oq\fB^\fR\(cq). Data provided for this cell is ignored, and nothing is printed in the cell. .PP .BR \& "\fBskipping vertical bar in tbl layout\fR .br (tbl) A table layout specification contains more than two consecutive vertical bars. A double bar is printed, all additional bars are discarded. .SS "Errors related to tables" .PP .BR \& "\fBnon-alphabetic character in tbl options\fR .br (tbl) The table options line contains a character other than a letter, blank, or comma where the beginning of an option name is expected. The character is ignored. .PP .BR \& "\fBskipping unknown tbl option\fR .br (tbl) The table options line contains a string of letters that does not match any known option name. The word is ignored. .PP .BR \& "\fBmissing tbl option argument\fR .br (tbl) A table option that requires an argument is not followed by an opening parenthesis, or the opening parenthesis is immediately followed by a closing parenthesis. The option is ignored. .PP .BR \& "\fBwrong tbl option argument size\fR .br (tbl) A table option argument contains an invalid number of characters. Both the option and the argument are ignored. .PP .BR \& "\fBempty tbl layout\fR .br (tbl) A table layout specification is completely empty, specifying zero lines and zero columns. As a fallback, a single left-justified column is used. .PP .BR \& "\fBinvalid character in tbl layout\fR .br (tbl) A table layout specification contains a character that can neither be interpreted as a layout key character nor as a layout modifier, or a modifier precedes the first key. The invalid character is discarded. .PP .BR \& "\fBunmatched parenthesis in tbl layout\fR .br (tbl) A table layout specification contains an opening parenthesis, but no matching closing parenthesis. The rest of the input line, starting from the parenthesis, has no effect. .PP .BR \& "\fBignoring excessive spacing in tbl layout\fR .br (tbl) A spacing modifier in a table layout is unreasonably large. The default spacing of 3n is used instead. .PP .BR \& "\fBtbl without any data cells\fR .br (tbl) A table does not contain any data cells. It will probably produce no output. .PP .BR \& "\fBignoring data in spanned tbl cell\fR .br (tbl) A table cell is marked as a horizontal span (\(oq\fBs\fR\(cq) or vertical span (\(oq\fB^\fR\(cq) in the table layout, but it contains data. The data is ignored. .PP .BR \& "\fBignoring extra tbl data cells\fR .br (tbl) A data line contains more cells than the corresponding layout line. The data in the extra cells is ignored. .PP .BR \& "\fBdata block open at end of tbl\fR .br (tbl) A data block is opened with \fBT{\fR, but never closed with a matching \fBT}\fR. The remaining data lines of the table are all put into one cell, and any remaining cells stay empty. .SS "Errors related to roff, mdoc, and man code" .PP .BR \& "\fBduplicate prologue macro\fR .br (mdoc) One of the prologue macros occurs more than once. The last instance overrides all previous ones. .PP .BR \& "\fBskipping late title macro\fR .br (mdoc) The \fB\&Dt\fR macro appears after the first non-prologue macro. Traditional formatters cannot handle this because they write the page header before parsing the document body. Even though this technical restriction does not apply to \fBmandoc\fR, traditional semantics is preserved. The late macro is discarded including its arguments. .PP .BR \& "\fBinput stack limit exceeded, infinite loop?\fR .br (roff) Explicit recursion limits are implemented for the following features, in order to prevent infinite loops: .PD 0 .TP 4n \fB-\fR expansion of nested escape sequences including expansion of strings and number registers, .TP 4n \fB-\fR expansion of nested user-defined macros, .TP 4n \fB-\fR and \fB\&so\fR file inclusion. .PP When a limit is hit, the output is incorrect, typically losing some content, but the parser can continue. .PD .PP .BR \& "\fBskipping bad character\fR .br (mdoc, man, roff) The input file contains a byte that is not a printable ascii(7) character. The message mentions the character number. The offending byte is replaced with a question mark (\(oq\&?\(cq). Consider editing the input file to replace the byte with an ASCII transliteration of the intended character. .PP .BR \& "\fBskipping unknown macro\fR .br (mdoc, man, roff) The first identifier on a request or macro line is neither recognized as a roff(7) request, nor as a user-defined macro, nor, respectively, as an mdoc(7) or man(7) macro. It may be mistyped or unsupported. The request or macro is discarded including its arguments. .PP .BR \& "\fBskipping request outside macro\fR .br (roff) A \fBshift\fR or \fBreturn\fR request occurs outside any macro definition and has no effect. .PP .BR \& "\fBskipping insecure request\fR .br (roff) An input file attempted to run a shell command or to read or write an external file. Such attempts are denied for security reasons. .PP .BR \& "\fBskipping item outside list\fR .br (mdoc, eqn) An \fB\&It\fR macro occurs outside any \fB\&Bl\fR list, or an eqn(7) \fBabove\fR delimiter occurs outside any pile. It is discarded including its arguments. .PP .BR \& "\fBskipping column outside column list\fR .br (mdoc) A \fB\&Ta\fR macro occurs outside any \fB\&Bl\fR \fB\-column\fR block. It is discarded including its arguments. .PP .BR \& "\fBskipping end of block that is not open\fR .br (mdoc, man, eqn, tbl, roff) Various syntax elements can only be used to explicitly close blocks that have previously been opened. An mdoc(7) block closing macro, a man(7) \fB\&ME\fR, \fB\&RE\fR or \fB\&UE\fR macro, an eqn(7) right delimiter or closing brace, or the end of an equation, table, or roff(7) conditional request is encountered but no matching block is open. The offending request or macro is discarded. .PP .BR \& "\fBfewer RS blocks open, skipping\fR .br (man) The \fB\&RE\fR macro is invoked with an argument, but less than the specified number of \fB\&RS\fR blocks is open. The \fB\&RE\fR macro is discarded. .PP .BR \& "\fBinserting missing end of block\fR .br (mdoc, tbl) Various mdoc(7) macros as well as tables require explicit closing by dedicated macros. A block that doesn't support bad nesting ends before all of its children are properly closed. The open child nodes are closed implicitly. .PP .BR \& "\fBappending missing end of block\fR .br (mdoc, man, eqn, tbl, roff) At the end of the document, an explicit mdoc(7) block, a man(7) next-line scope or \fB\&MT\fR, \fB\&RS\fR or \fB\&UR\fR block, an equation, table, or roff(7) conditional or ignore block is still open. The open block is closed implicitly. .PP .BR \& "\fBescaped character not allowed in a name\fR .br (roff) Macro, string and register identifiers consist of printable, non-whitespace ASCII characters. Escape sequences and characters and strings expressed in terms of them cannot form part of a name. The first argument of an \fB\&am\fR, \fB\&as\fR, \fB\&de\fR, \fB\&ds\fR, \fB\&nr\fR, or \fB\&rr\fR request, or any argument of an \fB\&rm\fR request, or the name of a request or user defined macro being called, is terminated by an escape sequence. In the cases of \fB\&as\fR, \fB\&ds\fR, and \fB\&nr\fR, the request has no effect at all. In the cases of \fB\&am\fR, \fB\&de\fR, \fB\&rr\fR, and \fB\&rm\fR, what was parsed up to this point is used as the arguments to the request, and the rest of the input line is discarded including the escape sequence. When parsing for a request or a user-defined macro name to be called, only the escape sequence is discarded. The characters preceding it are used as the request or macro name, the characters following it are used as the arguments to the request or macro. .PP .BR \& "\fBusing macro argument outside macro\fR .br (roff) The escape sequence \e$ occurs outside any macro definition and expands to the empty string. .PP .BR \& "\fBargument number is not numeric\fR .br (roff) The argument of the escape sequence \e$ is not a digit; the escape sequence expands to the empty string. .PP .BR \& "\fBNOT IMPLEMENTED: Bd -file\fR .br (mdoc) For security reasons, the \fB\&Bd\fR macro does not support the \fB\-file\fR argument. By requesting the inclusion of a sensitive file, a malicious document might otherwise trick a privileged user into inadvertently displaying the file on the screen, revealing the file content to bystanders. The argument is ignored including the file name following it. .PP .BR \& "\fBskipping display without arguments\fR .br (mdoc) A \fB\&Bd\fR block macro does not have any arguments. The block is discarded, and the block content is displayed in whatever mode was active before the block. .PP .BR \& "\fBmissing list type, using -item\fR .br (mdoc) A \fB\&Bl\fR macro fails to specify the list type. .PP .BR \& "\fBargument is not numeric, using 1\fR .br (roff) The argument of a \fB\&ce\fR request is not a number. .PP .BR \& "\fBargument is not a character\fR .br (roff) The first argument of a \fBchar\fR request is neither a single ASCII character nor a single character escape sequence. The request is ignored including all its arguments. .PP .BR \& "\fBmissing manual name, using \(dq\(dq\fR .br (mdoc) The first call to \fB\&Nm\fR, or any call in the NAME section, lacks the required argument. .PP .BR \& "\fBuname(3) system call failed, using UNKNOWN\fR .br (mdoc) The \fB\&Os\fR macro is called without arguments, and the uname(3) system call failed. As a workaround, \fBmandoc\fR can be compiled with \fB\-D\fR\fBOSNAME=\(dq\e\(dq\fR\fIstring\fR\fB\e\(dq\(dq\fR. .PP .BR \& "\fBunknown standard specifier\fR .br (mdoc) An \fB\&St\fR macro has an unknown argument and is discarded. .PP .BR \& "\fBskipping request without numeric argument\fR .br (roff, eqn) An \fB\&it\fR request or an eqn(7) \fB\&size\fR or \fB\&gsize\fR statement has a non-numeric or negative argument or no argument at all. The invalid request or statement is ignored. .PP .BR \& "\fBexcessive shift\fR .br (roff) The argument of a \fBshift\fR request is larger than the number of arguments of the macro that is currently being executed. All macro arguments are deleted and \en(.$ is set to zero. .PP .BR \& "\fBNOT IMPLEMENTED: .so with absolute path or \(dq..\(dq\fR .br (roff) For security reasons, \fBmandoc\fR allows \fB\&so\fR file inclusion requests only with relative paths and only without ascending to any parent directory. By requesting the inclusion of a sensitive file, a malicious document might otherwise trick a privileged user into inadvertently displaying the file on the screen, revealing the file content to bystanders. \fBmandoc\fR only shows the path as it appears behind \fB\&so\fR. .PP .BR \& "\fB.so request failed\fR .br (roff) Servicing a \fB\&so\fR request requires reading an external file, but the file could not be opened. \fBmandoc\fR only shows the path as it appears behind \fB\&so\fR. .PP .BR \& "\fBskipping all arguments\fR .br (mdoc, man, eqn, roff) An mdoc(7) \fB\&Bt\fR, \fB\&Ed\fR, \fB\&Ef\fR, \fB\&Ek\fR, \fB\&El\fR, \fB\&Lp\fR, \fB\&Pp\fR, \fB\&Re\fR, \fB\&Rs\fR, or \fB\&Ud\fR macro, an \fB\&It\fR macro in a list that don't support item heads, a man(7) \fB\&LP\fR, \fB\&P\fR, or \fB\&PP\fR macro, an eqn(7) \fB\&EQ\fR or \fB\&EN\fR macro, or a roff(7) \fB\&br\fR, \fB\&fi\fR, or \fB\&nf\fR request or \(oq\&..\(cq block closing request is invoked with at least one argument. All arguments are ignored. .PP .BR \& "\fBskipping excess arguments\fR .br (mdoc, man, roff) A macro or request is invoked with too many arguments: .RS 2n .PD 0 .TP 4n \fB-\fR \fB\&Fo\fR, \fB\&MT\fR, \fB\&PD\fR, \fB\&RS\fR, \fB\&UR\fR, \fB\&ft\fR, or \fB\&sp\fR with more than one argument .TP 4n \fB-\fR \fB\&An\fR with another argument after \fB\-split\fR or \fB\-nosplit\fR .TP 4n \fB-\fR \fB\&RE\fR with more than one argument or with a non-integer argument .TP 4n \fB-\fR \fB\&OP\fR or a request of the \fB\&de\fR family with more than two arguments .TP 4n \fB-\fR \fB\&Dt\fR with more than three arguments .TP 4n \fB-\fR \fB\&TH\fR with more than five arguments .TP 4n \fB-\fR \fB\&Bd\fR, \fB\&Bk\fR, or \fB\&Bl\fR with invalid arguments .RE The excess arguments are ignored. .PD .SS "Unsupported features" .PP .BR \& "\fBinput too large\fR .br (mdoc, man) Currently, \fBmandoc\fR cannot handle input files larger than its arbitrary size limit of 2^31 bytes (2 Gigabytes). Since useful manuals are always small, this is not a problem in practice. Parsing is aborted as soon as the condition is detected. .PP .BR \& "\fBunsupported control character\fR .br (roff) An ASCII control character supported by other roff(7) implementations but not by \fBmandoc\fR was found in an input file. It is replaced by a question mark. .PP .BR \& "\fBunsupported escape sequence\fR .br (roff) An input file contains an escape sequence supported by GNU troff or Heirloom troff but not by \fBmandoc\fR, and it is likely that this will cause information loss or considerable misformatting. .PP .BR \& "\fBunsupported roff request\fR .br (roff) An input file contains a roff(7) request supported by GNU troff or Heirloom troff but not by \fBmandoc\fR, and it is likely that this will cause information loss or considerable misformatting. .PP .BR \& "\fBeqn delim option in tbl\fR .br (eqn, tbl) The options line of a table defines equation delimiters. Any equation source code contained in the table will be printed unformatted. .PP .BR \& "\fBunsupported table layout modifier\fR .br (tbl) A table layout specification contains an \(oq\fBm\fR\(cq modifier. The modifier is discarded. .PP .BR \& "\fBignoring macro in table\fR .br (tbl, mdoc, man) A table contains an invocation of an mdoc(7) or man(7) macro or of an undefined macro. The macro is ignored, and its arguments are handled as if they were a text line. .PP .BR \& "\fBskipping tbl in -Tman mode\fR .br (mdoc, tbl) An input file contains the \fB\&TS\fR macro. This message is only generated in \fB\-T\fR \fBman\fR output mode, where tbl(7) input is not supported. .PP .BR \& "\fBskipping eqn in -Tman mode\fR .br (mdoc, eqn) An input file contains the \fB\&EQ\fR macro. This message is only generated in \fB\-T\fR \fBman\fR output mode, where eqn(7) input is not supported. .SS "Bad command line arguments" .PP .BR \& "\fBbad command line argument\fR .br The argument following one of the \fB\-IKMmOTW\fR command line options is invalid, or a \fIfile\fR given as a command line argument cannot be opened. .PP .BR \& "\fBduplicate command line argument\fR .br The \fB\-I\fR command line option was specified twice. .PP .BR \& "\fBoption has a superfluous value\fR .br An argument to the \fB\-O\fR option has a value but does not accept one. .PP .BR \& "\fBmissing option value\fR .br An argument to the \fB\-O\fR option has no argument but requires one. .PP .BR \& "\fBbad option value\fR .br An argument to the \fB\-O\fR \fBindent\fR or \fBwidth\fR option has an invalid value. .PP .BR \& "\fBduplicate option value\fR .br The same \fB\-O\fR option is specified more than once. .PP .BR \& "\fBno such tag\fR .br The \fB\-O\fR \fBtag\fR option was specified but the tag was not found in any of the displayed manual pages. .PP .BR \& "\fB\-Tmarkdown unsupported for man(7) input\fR .br (man) The \fB\-T\fR \fBmarkdown\fR option was specified but an input file uses the man(7) language. No output is produced for that input file. .SH "SEE ALSO" apropos(1), man(1), eqn(7), man(7), mandoc_char(7), mdoc(7), roff(7), tbl(7) .SH "HISTORY" The \fBmandoc\fR utility first appeared in OpenBSD\ 4.8. The option \fB\-I\fR appeared in OpenBSD\ 5.2, and \fB\-aCcfhKklMSsw\fR in OpenBSD\ 5.7. .SH "AUTHORS" The \fBmandoc\fR utility was written by Kristaps Dzonsons <\fIkristaps@bsd.lv\fR> and is maintained by Ingo Schwarze <\fIschwarze@openbsd.org\fR>.