1 .\" $Id: mandoc.1,v 1.238 2019/04/30 11:48:10 schwarze Exp $
3 .\" Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
4 .\" Copyright (c) 2012, 2014-2018 Ingo Schwarze <schwarze@openbsd.org>
6 .\" Permission to use, copy, modify, and distribute this software for any
7 .\" purpose with or without fee is hereby granted, provided that the above
8 .\" copyright notice and this permission notice appear in all copies.
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.
18 .Dd $Mdocdate: April 30 2019 $
23 .Nd format manual pages
27 .Op Fl I Cm os Ns = Ns Ar name
37 utility formats manual pages for display.
45 text from stdin and produces
49 The options are as follows:
52 If the standard output is a terminal device and
56 to paginate the output, just like
60 Copy the formatted manual pages to the standard output without using
64 It can be specified to override
66 .It Fl I Cm os Ns = Ns Ar name
67 Override the default operating system
77 Specify the input encoding.
85 If not specified, autodetection uses the first match in the following
89 If the first three bytes of the input file are the UTF-8 byte order
90 mark (BOM, 0xefbbbf), input is interpreted as
93 If the first or second line of the input file matches the
97 .D1 .\e" -*- Oo ...; Oc coding: Ar encoding ; No -*-
99 then input is interpreted according to
102 If the first non-ASCII byte in the file introduces a valid UTF-8
103 sequence, input is interpreted as
106 Otherwise, input is interpreted as
112 all input files are interpreted as
116 all input files are interpreted as
118 By default, the input language is automatically detected for each file:
119 if the first macro is
125 parser is used; otherwise, the
128 With other arguments,
132 Comma-separated output options.
133 See the descriptions of the individual output formats for supported
136 Select the output format.
137 Supported values for the
154 mode only parses the input and produces no output.
157 and redirects parser messages, which usually appear on standard
158 error output, to standard output.
160 Specify the minimum message
162 to be reported on the standard error output and to affect the exit status.
174 level automatically derives the operating system from the contents of the
178 command line option, or from the
187 that bypass autodetection and request validation of base system
188 conventions for a particular operating system.
206 to exit after parsing a file that causes warnings or errors of at least
208 No formatted output will be produced from that file.
213 are requested, they can be joined with a comma, for example
214 .Fl W Cm error , Ns Cm stop .
216 Read from the given input file.
217 If multiple files are specified, they are processed in the given order.
220 reads from standard input.
225 are also supported and are documented in man(1).
232 also supports the options
239 are mutually exclusive and override each other.
243 to force text output in 7-bit ASCII character encoding documented in the
245 manual page, ignoring the
247 set in the environment.
249 Font styles are applied by using back-spaced encoding such that an
253 .Sq _ Ns \e[bs] Ns c ,
256 is the back-space character number 8.
257 Emboldened characters are rendered as
258 .Sq c Ns \e[bs] Ns c .
259 This markup is typically converted to appropriate terminal sequences by
262 To remove the markup, pipe the output to
267 The special characters documented in
269 are rendered best-effort in an ASCII equivalent.
270 In particular, opening and closing
272 are represented as characters number 0x60 and 0x27, respectively,
273 which agrees with all ASCII standards from 1965 to the latest
274 revision (2012) and which matches the traditional way in which
276 formatters represent single quotes in ASCII output.
277 This correct ASCII rendering may look strange with modern
278 Unicode-compatible fonts because contrary to ASCII, Unicode uses
279 the code point U+0060 for the grave accent only, never for an opening
284 arguments are accepted:
286 .It Cm indent Ns = Ns Ar indent
287 The left margin for normal text is set to
289 blank characters instead of the default of five for
293 Increasing this is not recommended; it may result in degraded formatting,
294 for example overfull lines or ugly line breaks.
295 When output is to a pager on a terminal that is less than 66 columns
296 wide, the default is reduced to three columns.
303 Specifically, this suppresses the two additional blank lines near the
304 top and the bottom of each page, and it implies
305 .Fl O Cm indent Ns =5 .
306 One useful application is for checking that
308 output formats in the same way as the
310 source it was generated from.
311 .It Cm tag Ns Op = Ns Ar term
312 If the formatted manual page is opened in a pager,
313 go to the definition of the
315 rather than showing the manual page from the beginning.
318 is specified, reuse the first command line argument that is not a
321 If that argument is in
323 .Ar key Ns = Ns Ar val
326 is used rather than the argument as a whole.
327 This is useful for commands like
328 .Ql man -akO tag Ic=ulimit
329 to search for a keyword and jump right to its definition
330 in the matching manual pages.
331 .It Cm width Ns = Ns Ar width
332 The output width is set to
334 instead of the default of 78.
335 When output is to a pager on a terminal that is less than 79 columns
336 wide, the default is reduced to one less than the terminal width.
337 In any case, lines that are output in literal mode are never wrapped
338 and may exceed the output width.
343 conforms to HTML5 using optional self-closing tags.
344 Default styles use only CSS1.
345 Equations rendered from
350 .Pa /usr/share/misc/mandoc.css
351 documents style-sheet classes available for customising output.
352 If a style-sheet is not specified with
355 defaults to simple output (via an embedded style-sheet)
356 readable in any graphical or text-based web
359 Non-ASCII characters are rendered
360 as hexadecimal Unicode character references.
364 arguments are accepted:
367 Omit the <!DOCTYPE> declaration and the <html>, <head>, and <body>
368 elements and only emit the subtree below the <body> element.
371 argument will be ignored.
372 This is useful when embedding manual content within existing documents.
373 .It Cm includes Ns = Ns Ar fmt
378 is used as a template for linked header files (usually via the
383 are replaced with the include filename.
384 The default is not to present a
386 .It Cm man Ns = Ns Ar fmt Ns Op ; Ns Ar fmt
390 .Ar ../html%S/%N.%S.html ,
391 is used as a template for linked manuals (usually via the
398 are replaced with the linked manual's name and section, respectively.
399 If no section is included, section 1 is assumed.
400 The default is not to
402 If two formats are given and a file
404 exists in the current directory, the first format is used;
405 otherwise, the second format is used.
406 .It Cm style Ns = Ns Ar style.css
409 is used for an external style-sheet.
410 This must be a valid absolute or
413 If an input file contains at least two non-standard sections,
414 print a table of contents near the beginning of the output.
419 automatically selects UTF-8 or ASCII output according to the current
421 If any of the environment variables
426 are set and the first one that is set
427 selects the UTF-8 character encoding, it produces
429 otherwise, it falls back to
431 This output mode can also be selected explicitly with
441 This is useful for distributing manual sources to legacy systems
446 If the input format of a file is
448 the input is copied to the output, expanding any
452 The parser is also run, and as usual, the
456 are displayed before copying the input to the output.
462 input to the markdown format conforming to
463 .Lk http://daringfireball.net/projects/markdown/syntax.text\
464 "John Gruber's 2004 specification" .
465 The output also almost conforms to the
466 .Lk http://commonmark.org/ CommonMark
469 The character set used for the markdown output is ASCII.
470 Non-ASCII characters are encoded as HTML entities.
471 Since that is not possible in literal font contexts, because these
472 are rendered as code spans and code blocks in the markdown output,
473 non-ASCII characters are transliterated to ASCII approximations in
476 Markdown is a very weak markup language, so all semantic markup is
477 lost, and even part of the presentational markup may be lost.
478 Do not use this as an intermediate step in converting to HTML;
488 input languages are not supported by
492 PDF-1.1 output may be generated by
495 .Sx PostScript Output
498 arguments and defaults.
499 .Ss PostScript Output
502 Level-2 pages may be generated by
504 Output pages default to letter sized and are rendered in the Times font
506 Margins are calculated as 1/9 the page length and width.
509 Special characters are rendered as in
514 arguments are accepted:
516 .It Cm paper Ns = Ns Ar name
526 You may also manually specify dimensions as
528 width by height in millimetres.
529 If an unknown value is encountered,
536 to force text output in UTF-8 multi-byte character encoding,
539 settings in the environment.
542 regarding font styles and
546 On operating systems lacking locale or wide character support, and
547 on those where the internal character representation is not UCS-4,
551 .Ss Syntax tree output
554 to show a human readable representation of the syntax tree.
555 It is useful for debugging the source code of manual pages.
556 The exact format is subject to change, so don't write parsers for it.
558 The first paragraph shows meta data found in the
563 line, or the fallbacks used.
565 In the tree dump, each output line shows one syntax tree node.
566 Child nodes are indented with respect to their parent node.
571 For macro nodes, the macro name; for text and
574 There is a special format for
578 Node type (text, elem, block, head, body, body-end, tail, tbl, eqn).
583 An opening parenthesis if the node is an opening delimiter.
585 An asterisk if the node starts a new input line.
587 The input line number (starting at one).
591 The input column number (starting at one).
593 A closing parenthesis if the node is a closing delimiter.
595 A full stop if the node ends a sentence.
597 BROKEN if the node is a block broken by another block.
599 NOSRC if the node is not in the input file,
600 but automatically generated from macros.
602 NOPRT if the node is not supposed to generate output
603 for any output format.
609 argument is accepted:
612 Skip validation and show the unvalidated syntax tree.
613 This can help to find out whether a given behaviour is caused by
614 the parser or by the validator.
615 Meta data is not available in this case.
618 .Bl -tag -width MANPAGER
620 The character encoding
624 is selected, it decides whether to use ASCII or UTF-8 output format.
625 It never affects the interpretation of input files.
627 Any non-empty value of the environment variable
629 is used instead of the standard pagination program,
640 Specifies the pagination program to use when
643 If neither PAGER nor MANPAGER is defined,
656 utility exits with one of the following values, controlled by the message
662 .Bl -tag -width Ds -compact
664 No base system convention violations, style suggestions, warnings,
665 or errors occurred, or those that did were ignored because they
666 were lower than the requested
669 At least one base system convention violation or style suggestion
670 occurred, but no warning or error, and
676 At least one warning occurred, but no error, and
682 At least one parsing error occurred,
683 but no unsupported feature was encountered, and
689 At least one unsupported feature was encountered, and
695 Invalid command line arguments were specified.
696 No input files have been read.
698 An operating system error occurred, for example exhaustion
699 of memory, file descriptors, or process table entries.
702 to exit at once, possibly in the middle of parsing or formatting a file.
710 To page manuals to the terminal:
712 .Dl $ mandoc -l mandoc.1 man.1 apropos.1 makewhatis.8
714 To produce HTML manuals with
715 .Pa /usr/share/misc/mandoc.css
718 .Dl $ mandoc \-T html -O style=/usr/share/misc/mandoc.css mdoc.7 > mdoc.7.html
720 To check over a large set of manuals:
722 .Dl $ mandoc \-T lint \(gafind /usr/src -name \e*\e.[1-9]\(ga
724 To produce a series of PostScript manuals for A4 paper:
726 .Dl $ mandoc \-T ps \-O paper=a4 mdoc.7 man.7 > manuals.ps
732 format, for use on systems lacking an
736 .Dl $ mandoc \-T man foo.mdoc > foo.man
738 Messages displayed by
741 .Bd -ragged -offset indent
743 .Ar file : Ns Ar line : Ns Ar column : level : message : macro arguments
747 The first three fields identify the
753 number of the input file where the message was triggered.
754 The line and column numbers start at 1.
755 Both are omitted for messages referring to an input file as a whole.
760 strings are explained below.
763 triggering the message and its
765 are omitted where meaningless.
768 operating system specifier is omitted for messages that are relevant
769 for all operating systems.
770 Fatal messages about invalid command line arguments
771 or operating system errors, for example when memory is exhausted,
778 Message levels have the following meanings:
779 .Bl -tag -width "warning"
781 An input file uses unsupported low-level
784 The output may be incomplete and/or misformatted,
785 so using GNU troff instead of
787 to process the file may be preferable.
789 Indicates a risk of information loss or severe misformatting,
790 in most cases caused by serious syntax errors.
792 Indicates a risk that the information shown or its formatting
793 may mismatch the author's intent in minor ways.
794 Additionally, syntax errors are classified at least as warnings,
795 even if they do not usually cause misformatting.
797 An input file uses dubious or discouraged style.
798 This is not a complaint about the syntax, and probably neither
799 formatting nor portability are in danger.
800 While great care is taken to avoid false positives on the higher
803 level tries to reduce the probability that issues go unnoticed,
804 so it may occasionally issue bogus suggestions.
805 Please use your good judgement to decide whether any particular
807 suggestion really justifies a change to the input file.
809 A convention used in the base system of a specific operating system
811 These are not markup mistakes, and neither the quality of formatting
812 nor portability are in danger.
815 level are printed with the more intuitive
828 levels except those about non-existent or unreadable input files
829 are hidden unless their level, or a lower level, is requested using a
835 As indicated below, all
839 checks are only performed if a specific operating system name occurs
840 in the arguments of the
842 command line option, of the
846 command line option, or, if neither are present, in the return value
850 .Ss Conventions for base system manuals
852 .It Sy "Mdocdate found"
858 keyword substitution, which is not supported by the
861 Consider using the conventional
864 .It Sy "Mdocdate missing"
868 macro does not use CVS
870 keyword substitution, but using it is conventionally expected in the
873 .It Sy "unknown architecture"
875 The third argument of the
877 macro does not match any of the architectures this operating system
879 .It Sy "operating system explicitly specified"
883 macro has an argument.
884 In the base system, it is conventionally left blank.
885 .It Sy "RCS id missing"
887 The manual page lacks the comment line with the RCS identifier
892 keyword substitution as conventionally used in these operating systems.
893 .It Sy "referenced manual not found"
897 macro references a manual page that is not found in the base system.
898 The path to look for base system manuals is configurable at compile
900 .Pa /usr/share/man : /usr/X11R6/man .
902 .Ss Style suggestions
904 .It Sy "legacy man(7) date format"
908 macro uses the legacy
912 Consider using the conventional
917 .It Sy "normalizing date format to" : No ...
923 macro provides an abbreviated month name or a day number with a
925 In the formatted output, the month name is written out in full
926 and the leading zero is omitted.
927 .It Sy "lower case character in document title"
929 The title is still used as given in the
934 .It Sy "duplicate RCS id"
935 A single manual page contains two copies of the RCS identifier for
936 the same operating system.
937 Consider deleting the later instance and moving the first one up
938 to the top of the page.
939 .It Sy "possible typo in section name"
941 Fuzzy string matching revealed that the argument of an
943 macro is similar, but not identical to a standard section name.
944 .It Sy "unterminated quoted argument"
946 Macro arguments can be enclosed in double quote characters
947 such that space characters and macro names contained in the quoted
948 argument need not be escaped.
949 The closing quote of the last argument of a macro can be omitted.
950 However, omitting it is not recommended because it makes the code
952 .It Sy "useless macro"
960 Simply delete it: it serves no useful purpose.
961 .It Sy "consider using OS macro"
963 A string was found in plain text or in a
965 macro that could be represented using
971 .It Sy "errnos out of order"
977 list are not in alphabetical order.
978 .It Sy "duplicate errno"
982 list contains two consecutive
984 entries describing the same
987 .It Sy "trailing delimiter"
989 The last argument of an
990 .Ic \&Ex , \&Fo , \&Nd , \&Nm , \&Os , \&Sh , \&Ss , \&St ,
993 macro ends with a trailing delimiter.
994 This is usually bad style and often indicates typos.
995 Most likely, the delimiter can be removed.
996 .It Sy "no blank before trailing delimiter"
998 The last argument of a macro that supports trailing delimiter
999 arguments is longer than one byte and ends with a trailing delimiter.
1000 Consider inserting a blank such that the delimiter becomes a separate
1001 argument, thus moving it out of the scope of the macro.
1002 .It Sy "fill mode already enabled, skipping"
1006 request occurs even though the document is still in fill mode,
1007 or already switched back to fill mode.
1009 .It Sy "fill mode already disabled, skipping"
1013 request occurs even though the document already switched to no-fill mode
1014 and did not switch back to fill mode yet.
1016 .It Sy "verbatim \(dq--\(dq, maybe consider using \e(em"
1018 Even though the ASCII output device renders an em-dash as
1020 that is not a good way to write it in an input file
1021 because it renders poorly on all other output devices.
1022 .It Sy "function name without markup"
1024 A word followed by an empty pair of parentheses occurs on a text line.
1030 .It Sy "whitespace at end of input line"
1031 .Pq mdoc , man , roff
1032 Whitespace at the end of input lines is almost never semantically
1033 significant \(em but in the odd case where it might be, it is
1034 extremely confusing when reviewing and maintaining documents.
1035 .It Sy "bad comment style"
1037 Comment lines start with a dot, a backslash, and a double-quote character.
1040 utility treats the line as a comment line even without the backslash,
1041 but leaving out the backslash might not be portable.
1043 .Ss Warnings related to the document prologue
1045 .It Sy "missing manual title, using UNTITLED"
1049 macro has no arguments, or there is no
1051 macro before the first non-prologue macro.
1052 .It Sy "missing manual title, using \(dq\(dq"
1056 macro, or it has no arguments.
1057 .It Sy "missing manual section, using \(dq\(dq"
1063 macro lacks the mandatory section argument.
1064 .It Sy "unknown manual section"
1066 The section number in a
1068 line is invalid, but still used.
1069 .It Sy "missing date, using today's date"
1071 The document was parsed as
1077 macro has no arguments or only empty arguments;
1078 or the document was parsed as
1084 macro has less than three arguments or its third argument is empty.
1085 .It Sy "cannot parse date, using it verbatim"
1091 macro does not follow the conventional format.
1092 .It Sy "date in the future, using it anyway"
1098 macro is more than a day ahead of the current system
1100 .It Sy "missing Os macro, using \(dq\(dq"
1102 The default or current system is not shown in this case.
1103 .It Sy "late prologue macro"
1109 macro occurs after some non-prologue macro, but still takes effect.
1110 .It Sy "prologue macros out of order"
1112 The prologue macros are not given in the conventional order
1116 All three macros are used even when given in another order.
1118 .Ss Warnings regarding document structure
1120 .It Sy ".so is fragile, better use ln(1)"
1122 Including files only works when the parser program runs with the correct
1123 current working directory.
1124 .It Sy "no document body"
1126 The document body contains neither text nor macros.
1127 An empty document is shown, consisting only of a header and a footer line.
1128 .It Sy "content before first section header"
1130 Some macros or text precede the first
1135 The offending macros and text are parsed and added to the top level
1136 of the syntax tree, outside any section block.
1137 .It Sy "first section is not NAME"
1139 The argument of the first
1147 .It Sy "NAME section without Nm before Nd"
1149 The NAME section does not contain any
1151 child macro before the first
1154 .It Sy "NAME section without description"
1156 The NAME section lacks the mandatory
1159 .It Sy "description not at the end of NAME"
1161 The NAME section does contain an
1163 child macro, but other content follows it.
1164 .It Sy "bad NAME section content"
1166 The NAME section contains plain text or macros other than
1170 .It Sy "missing comma before name"
1172 The NAME section contains an
1174 macro that is neither the first one nor preceded by a comma.
1175 .It Sy "missing description line, using \(dq\(dq"
1179 macro lacks the required argument.
1180 The title line of the manual will end after the dash.
1181 .It Sy "description line outside NAME section"
1185 macro appears outside the NAME section.
1186 The arguments are printed anyway and the following text is used for
1188 but none of that behaviour is portable.
1189 .It Sy "sections out of conventional order"
1191 A standard section occurs after another section it usually precedes.
1192 All section titles are used as given,
1193 and the order of sections is not changed.
1194 .It Sy "duplicate section title"
1196 The same standard section title occurs more than once.
1197 .It Sy "unexpected section"
1199 A standard section header occurs in a section of the manual
1200 where it normally isn't useful.
1201 .It Sy "cross reference to self"
1205 macro refers to a name and section matching the section of the present
1206 manual page and a name mentioned in an
1208 macro in the NAME or SYNOPSIS section, or in an
1212 macro in the SYNOPSIS.
1219 .It Sy "unusual Xr order"
1221 In the SEE ALSO section, an
1223 macro with a lower section number follows one with a higher number,
1226 macros referring to the same section are out of alphabetical order.
1227 .It Sy "unusual Xr punctuation"
1229 In the SEE ALSO section, punctuation between two
1231 macros differs from a single comma, or there is trailing punctuation
1235 .It Sy "AUTHORS section without An macro"
1237 An AUTHORS sections contains no
1239 macros, or only empty ones.
1240 Probably, there are author names lacking markup.
1242 .Ss "Warnings related to macros and nesting"
1244 .It Sy "obsolete macro"
1248 manual for replacements.
1249 .It Sy "macro neither callable nor escaped"
1251 The name of a macro that is not callable appears on a macro line.
1252 It is printed verbatim.
1253 If the intention is to call it, move it to its own input line;
1254 otherwise, escape it by prepending
1256 .It Sy "skipping paragraph macro"
1259 documents, this happens
1262 at the beginning and end of sections and subsections
1264 right before non-compact lists and displays
1266 at the end of items in non-column, non-compact lists
1268 and for multiple consecutive paragraph macros.
1272 documents, it happens
1284 macros having neither head nor body arguments
1295 .It Sy "moving paragraph macro out of list"
1299 list contains a trailing paragraph macro.
1300 The paragraph macro is moved after the end of the list.
1301 .It Sy "skipping no-space macro"
1303 An input line begins with an
1305 macro, or the next argument after an
1307 macro is an isolated closing delimiter.
1308 The macro is ignored.
1309 .It Sy "blocks badly nested"
1311 If two blocks intersect, one should completely contain the other.
1312 Otherwise, rendered output is likely to look strange in any output
1313 format, and rendering in SGML-based output formats is likely to be
1314 outright wrong because such languages do not support badly nested
1316 Typical examples of badly nested blocks are
1317 .Qq Ic \&Ao \&Bo \&Ac \&Bc
1319 .Qq Ic \&Ao \&Bq \&Ac .
1327 .It Sy "nested displays are not portable"
1334 display occurs nested inside another
1339 but fails with most other implementations.
1340 .It Sy "moving content out of list"
1344 list block contains text or macros before the first
1347 The offending children are moved before the beginning of the list.
1348 .It Sy "first macro on line"
1353 macro occurs as the first macro on a line, which is not portable.
1354 .It Sy "line scope broken"
1356 While parsing the next-line scope of the previous macro,
1357 another macro is found that prematurely terminates the previous one.
1358 The previous, interrupted macro is deleted from the parse tree.
1360 .Ss "Warnings related to missing arguments"
1362 .It Sy "skipping empty request"
1364 The macro name is missing from a macro definition request,
1367 control statement or operation keyword lacks its required argument.
1368 .It Sy "conditional request controls empty scope"
1370 A conditional request is only useful if any of the following
1371 follows it on the same logical input line:
1376 keyword to open a multi-line scope.
1378 A request or macro or some text, resulting in a single-line scope.
1380 The immediate end of the logical line without any intervening whitespace,
1381 resulting in next-line scope.
1383 Here, a conditional request is followed by trailing whitespace only,
1384 and there is no other content on its logical input line.
1385 Note that it doesn't matter whether the logical input line is split
1386 across multiple physical input lines using
1388 line continuation characters.
1389 This is one of the rare cases
1390 where trailing whitespace is syntactically significant.
1391 The conditional request controls a scope containing whitespace only,
1392 so it is unlikely to have a significant effect,
1393 except that it may control a following
1396 .It Sy "skipping empty macro"
1398 The indicated macro has no arguments and hence no effect.
1399 .It Sy "empty block"
1411 block contains nothing in its body and will produce no output.
1412 .It Sy "empty argument, using 0n"
1414 The required width is missing after
1421 .It Sy "missing display type, using -ragged"
1425 macro is invoked without the required display type.
1426 .It Sy "list type is not the first argument"
1430 macro, at least one other argument precedes the type argument.
1433 utility copes with any argument order, but some other
1435 implementations do not.
1436 .It Sy "missing -width in -tag list, using 8n"
1445 .It Sy "missing utility name, using \(dq\(dq"
1449 macro is called without an argument before
1451 has first been called with an argument.
1452 .It Sy "missing function name, using \(dq\(dq"
1456 macro is called without an argument.
1457 No function name is printed.
1458 .It Sy "empty head in list item"
1470 macro lacks the required argument.
1471 The item head is left empty.
1472 .It Sy "empty list item"
1484 An empty list item is shown.
1485 .It Sy "missing argument, using next line"
1491 list has no arguments.
1494 uses the text or macros of the following line, if any, for the cell,
1495 other formatters may misformat the list.
1496 .It Sy "missing font type, using \efR"
1500 macro has no argument.
1501 It switches to the default font.
1502 .It Sy "unknown font type, using \efR"
1506 argument is invalid.
1507 The default font is used instead.
1508 .It Sy "nothing follows prefix"
1512 macro has no argument, or only one argument and no macro follows
1513 on the same input line.
1514 This defeats its purpose; in particular, spacing is not suppressed
1515 before the text or macros following on the next input line.
1516 .It Sy "empty reference block"
1520 macro is immediately followed by an
1522 macro on the next input line.
1523 Such an empty block does not produce any output.
1524 .It Sy "missing section argument"
1528 macro lacks its second, section number argument.
1529 The first argument, i.e. the name, is printed, but without subsequent
1531 .It Sy "missing -std argument, adding it"
1537 macro lacks the required
1544 even when it is not specified, but other implementations may not.
1545 .It Sy "missing option string, using \(dq\(dq"
1549 macro is invoked without any argument.
1550 An empty pair of square brackets is shown.
1551 .It Sy "missing resource identifier, using \(dq\(dq"
1557 macro is invoked without any argument.
1558 An empty pair of angle brackets is shown.
1559 .It Sy "missing eqn box, using \(dq\(dq"
1561 A diacritic mark or a binary operator is found,
1562 but there is nothing to the left of it.
1563 An empty box is inserted.
1565 .Ss "Warnings related to bad macro arguments"
1567 .It Sy "duplicate argument"
1573 macro has more than one
1580 All but the last instances of these arguments are ignored.
1581 .It Sy "skipping duplicate argument"
1585 macro has more than one
1590 All but the first of these arguments are ignored.
1591 .It Sy "skipping duplicate display type"
1595 macro has more than one type argument; the first one is used.
1596 .It Sy "skipping duplicate list type"
1600 macro has more than one type argument; the first one is used.
1601 .It Sy "skipping -width argument"
1615 .It Sy "wrong number of cells"
1618 list, the number of tabs or
1620 macros is less than the number expected from the list header line
1621 or exceeds the expected number by more than one.
1622 Missing cells remain empty, and all cells exceeding the number of
1623 columns are joined into one single cell.
1624 .It Sy "unknown AT&T UNIX version"
1628 macro has an invalid argument.
1629 It is used verbatim, with
1632 .It Sy "comma in function argument"
1638 macro contains a comma; it should probably be split into two arguments.
1639 .It Sy "parenthesis in function name"
1641 The first argument of an
1645 macro contains an opening or closing parenthesis; that's probably wrong,
1646 parentheses are added automatically.
1647 .It Sy "unknown library name"
1651 macro has an unknown name argument and will be rendered as
1652 .Qq library Dq Ar name .
1653 .It Sy "invalid content in Rs block"
1657 block contains plain text or non-% macros.
1658 The bogus content is left in the syntax tree.
1659 Formatting may be poor.
1660 .It Sy "invalid Boolean argument"
1664 macro has an argument other than
1668 The invalid argument is moved out of the macro, which leaves the macro
1669 empty, causing it to toggle the spacing mode.
1670 .It Sy "argument contains two font escapes"
1672 The second argument of a
1674 request contains more than one font escape sequence.
1675 A wrong font may remain active after using the character.
1676 .It Sy "unknown font, skipping request"
1684 layout modifier has an unknown
1687 .It Sy "odd number of characters in request"
1691 request contains an odd number of characters.
1692 The last character is mapped to the blank character.
1694 .Ss "Warnings related to plain text"
1696 .It Sy "blank line in fill mode, using .sp"
1698 The meaning of blank input lines is only well-defined in non-fill mode:
1699 In fill mode, line breaks of text input lines are not supposed to be
1701 However, for compatibility with groff, blank lines in fill mode
1705 To request a paragraph break, use
1707 instead of a blank line.
1708 .It Sy "tab in filled text"
1710 The meaning of tab characters is only well-defined in non-fill mode:
1711 In fill mode, whitespace is not supposed to be significant
1712 on text input lines.
1713 As an implementation dependent choice, tab characters on text lines
1714 are passed through to the formatters in any case.
1715 Given that the text before the tab character will be filled,
1716 it is hard to predict which tab stop position the tab will advance to.
1717 .It Sy "new sentence, new line"
1719 A new sentence starts in the middle of a text line.
1720 Start it on a new input line to help formatters produce correct spacing.
1721 .It Sy "invalid escape sequence"
1723 An escape sequence has an invalid opening argument delimiter, lacks the
1724 closing argument delimiter, the argument is of an invalid form, or it is
1725 a character escape sequence with an invalid name.
1726 If the argument is incomplete,
1730 expand to an empty string,
1736 to the length of the incomplete argument.
1737 All other invalid escape sequences are ignored.
1738 .It Sy "undefined escape, printing literally"
1740 In an escape sequence, the first character
1741 right after the leading backslash is invalid.
1742 That character is printed literally,
1743 which is equivalent to ignoring the backslash.
1744 .It Sy "undefined string, using \(dq\(dq"
1746 If a string is used without being defined before,
1747 its value is implicitly set to the empty string.
1748 However, defining strings explicitly before use
1749 keeps the code more readable.
1751 .Ss "Warnings related to tables"
1753 .It Sy "tbl line starts with span"
1755 The first cell in a table layout line is a horizontal span
1757 Data provided for this cell is ignored, and nothing is printed in the cell.
1758 .It Sy "tbl column starts with span"
1760 The first line of a table layout specification
1761 requests a vertical span
1763 Data provided for this cell is ignored, and nothing is printed in the cell.
1764 .It Sy "skipping vertical bar in tbl layout"
1766 A table layout specification contains more than two consecutive vertical bars.
1767 A double bar is printed, all additional bars are discarded.
1769 .Ss "Errors related to tables"
1771 .It Sy "non-alphabetic character in tbl options"
1773 The table options line contains a character other than a letter,
1774 blank, or comma where the beginning of an option name is expected.
1775 The character is ignored.
1776 .It Sy "skipping unknown tbl option"
1778 The table options line contains a string of letters that does not
1779 match any known option name.
1780 The word is ignored.
1781 .It Sy "missing tbl option argument"
1783 A table option that requires an argument is not followed by an
1784 opening parenthesis, or the opening parenthesis is immediately
1785 followed by a closing parenthesis.
1786 The option is ignored.
1787 .It Sy "wrong tbl option argument size"
1789 A table option argument contains an invalid number of characters.
1790 Both the option and the argument are ignored.
1791 .It Sy "empty tbl layout"
1793 A table layout specification is completely empty,
1794 specifying zero lines and zero columns.
1795 As a fallback, a single left-justified column is used.
1796 .It Sy "invalid character in tbl layout"
1798 A table layout specification contains a character that can neither
1799 be interpreted as a layout key character nor as a layout modifier,
1800 or a modifier precedes the first key.
1801 The invalid character is discarded.
1802 .It Sy "unmatched parenthesis in tbl layout"
1804 A table layout specification contains an opening parenthesis,
1805 but no matching closing parenthesis.
1806 The rest of the input line, starting from the parenthesis, has no effect.
1807 .It Sy "tbl without any data cells"
1809 A table does not contain any data cells.
1810 It will probably produce no output.
1811 .It Sy "ignoring data in spanned tbl cell"
1813 A table cell is marked as a horizontal span
1817 in the table layout, but it contains data.
1818 The data is ignored.
1819 .It Sy "ignoring extra tbl data cells"
1821 A data line contains more cells than the corresponding layout line.
1822 The data in the extra cells is ignored.
1823 .It Sy "data block open at end of tbl"
1825 A data block is opened with
1827 but never closed with a matching
1829 The remaining data lines of the table are all put into one cell,
1830 and any remaining cells stay empty.
1832 .Ss "Errors related to roff, mdoc, and man code"
1834 .It Sy "duplicate prologue macro"
1836 One of the prologue macros occurs more than once.
1837 The last instance overrides all previous ones.
1838 .It Sy "skipping late title macro"
1842 macro appears after the first non-prologue macro.
1843 Traditional formatters cannot handle this because
1844 they write the page header before parsing the document body.
1845 Even though this technical restriction does not apply to
1847 traditional semantics is preserved.
1848 The late macro is discarded including its arguments.
1849 .It Sy "input stack limit exceeded, infinite loop?"
1851 Explicit recursion limits are implemented for the following features,
1852 in order to prevent infinite loops:
1855 expansion of nested escape sequences
1856 including expansion of strings and number registers,
1858 expansion of nested user-defined macros,
1864 When a limit is hit, the output is incorrect, typically losing
1865 some content, but the parser can continue.
1866 .It Sy "skipping bad character"
1867 .Pq mdoc , man , roff
1868 The input file contains a byte that is not a printable
1871 The message mentions the character number.
1872 The offending byte is replaced with a question mark
1874 Consider editing the input file to replace the byte with an ASCII
1875 transliteration of the intended character.
1876 .It Sy "skipping unknown macro"
1877 .Pq mdoc , man , roff
1878 The first identifier on a request or macro line is neither recognized as a
1880 request, nor as a user-defined macro, nor, respectively, as an
1885 It may be mistyped or unsupported.
1886 The request or macro is discarded including its arguments.
1887 .It Sy "skipping request outside macro"
1893 request occurs outside any macro definition and has no effect.
1894 .It Sy "skipping insecure request"
1896 An input file attempted to run a shell command
1897 or to read or write an external file.
1898 Such attempts are denied for security reasons.
1899 .It Sy "skipping item outside list"
1903 macro occurs outside any
1908 delimiter occurs outside any pile.
1909 It is discarded including its arguments.
1910 .It Sy "skipping column outside column list"
1914 macro occurs outside any
1917 It is discarded including its arguments.
1918 .It Sy "skipping end of block that is not open"
1919 .Pq mdoc , man , eqn , tbl , roff
1920 Various syntax elements can only be used to explicitly close blocks
1921 that have previously been opened.
1924 block closing macro, a
1931 right delimiter or closing brace, or the end of an equation, table, or
1933 conditional request is encountered but no matching block is open.
1934 The offending request or macro is discarded.
1935 .It Sy "fewer RS blocks open, skipping"
1939 macro is invoked with an argument, but less than the specified number of
1945 .It Sy "inserting missing end of block"
1949 macros as well as tables require explicit closing by dedicated macros.
1950 A block that doesn't support bad nesting
1951 ends before all of its children are properly closed.
1952 The open child nodes are closed implicitly.
1953 .It Sy "appending missing end of block"
1954 .Pq mdoc , man , eqn , tbl , roff
1955 At the end of the document, an explicit
1963 block, an equation, table, or
1965 conditional or ignore block is still open.
1966 The open block is closed implicitly.
1967 .It Sy "escaped character not allowed in a name"
1969 Macro, string and register identifiers consist of printable,
1970 non-whitespace ASCII characters.
1971 Escape sequences and characters and strings expressed in terms of them
1972 cannot form part of a name.
1973 The first argument of an
1981 request, or any argument of an
1983 request, or the name of a request or user defined macro being called,
1984 is terminated by an escape sequence.
1990 the request has no effect at all.
1997 what was parsed up to this point is used as the arguments to the request,
1998 and the rest of the input line is discarded including the escape sequence.
1999 When parsing for a request or a user-defined macro name to be called,
2000 only the escape sequence is discarded.
2001 The characters preceding it are used as the request or macro name,
2002 the characters following it are used as the arguments to the request or macro.
2003 .It Sy "using macro argument outside macro"
2005 The escape sequence \e$ occurs outside any macro definition
2006 and expands to the empty string.
2007 .It Sy "argument number is not numeric"
2009 The argument of the escape sequence \e$ is not a digit;
2010 the escape sequence expands to the empty string.
2011 .It Sy "NOT IMPLEMENTED: Bd -file"
2013 For security reasons, the
2015 macro does not support the
2018 By requesting the inclusion of a sensitive file, a malicious document
2019 might otherwise trick a privileged user into inadvertently displaying
2020 the file on the screen, revealing the file content to bystanders.
2021 The argument is ignored including the file name following it.
2022 .It Sy "skipping display without arguments"
2026 block macro does not have any arguments.
2027 The block is discarded, and the block content is displayed in
2028 whatever mode was active before the block.
2029 .It Sy "missing list type, using -item"
2033 macro fails to specify the list type.
2034 .It Sy "argument is not numeric, using 1"
2038 request is not a number.
2039 .It Sy "argument is not a character"
2041 The first argument of a
2043 request is neither a single ASCII character
2044 nor a single character escape sequence.
2045 The request is ignored including all its arguments.
2046 .It Sy "missing manual name, using \(dq\(dq"
2050 or any call in the NAME section, lacks the required argument.
2051 .It Sy "uname(3) system call failed, using UNKNOWN"
2055 macro is called without arguments, and the
2060 can be compiled with
2062 .Fl D Cm OSNAME=\(dq\e\(dq Ar string Cm \e\(dq\(dq .
2064 .It Sy "unknown standard specifier"
2068 macro has an unknown argument and is discarded.
2069 .It Sy "skipping request without numeric argument"
2078 statement has a non-numeric or negative argument or no argument at all.
2079 The invalid request or statement is ignored.
2080 .It Sy "excessive shift"
2084 request is larger than the number of arguments of the macro that is
2085 currently being executed.
2086 All macro arguments are deleted and \en(.$ is set to zero.
2087 .It Sy "NOT IMPLEMENTED: .so with absolute path or \(dq..\(dq"
2089 For security reasons,
2093 file inclusion requests only with relative paths
2094 and only without ascending to any parent directory.
2095 By requesting the inclusion of a sensitive file, a malicious document
2096 might otherwise trick a privileged user into inadvertently displaying
2097 the file on the screen, revealing the file content to bystanders.
2099 only shows the path as it appears behind
2101 .It Sy ".so request failed"
2105 request requires reading an external file, but the file could not be
2108 only shows the path as it appears behind
2110 .It Sy "skipping all arguments"
2111 .Pq mdoc , man , eqn , roff
2127 macro in a list that don't support item heads, a
2146 block closing request is invoked with at least one argument.
2147 All arguments are ignored.
2148 .It Sy "skipping excess arguments"
2149 .Pq mdoc , man , roff
2150 A macro or request is invoked with too many arguments:
2151 .Bl -dash -offset 2n -width 2n -compact
2161 with more than one argument
2164 with another argument after
2170 with more than one argument or with a non-integer argument
2175 family with more than two arguments
2178 with more than three arguments
2181 with more than five arguments
2187 with invalid arguments
2189 The excess arguments are ignored.
2191 .Ss Unsupported features
2193 .It Sy "input too large"
2197 cannot handle input files larger than its arbitrary size limit
2198 of 2^31 bytes (2 Gigabytes).
2199 Since useful manuals are always small, this is not a problem in practice.
2200 Parsing is aborted as soon as the condition is detected.
2201 .It Sy "unsupported control character"
2203 An ASCII control character supported by other
2205 implementations but not by
2207 was found in an input file.
2208 It is replaced by a question mark.
2209 .It Sy "unsupported escape sequence"
2211 An input file contains an escape sequence supported by GNU troff
2212 or Heirloom troff but not by
2214 and it is likely that this will cause information loss
2215 or considerable misformatting.
2216 .It Sy "unsupported roff request"
2218 An input file contains a
2220 request supported by GNU troff or Heirloom troff but not by
2222 and it is likely that this will cause information loss
2223 or considerable misformatting.
2224 .It Sy "eqn delim option in tbl"
2226 The options line of a table defines equation delimiters.
2227 Any equation source code contained in the table will be printed unformatted.
2228 .It Sy "unsupported table layout modifier"
2230 A table layout specification contains an
2233 The modifier is discarded.
2234 .It Sy "ignoring macro in table"
2235 .Pq tbl , mdoc , man
2236 A table contains an invocation of an
2240 macro or of an undefined macro.
2241 The macro is ignored, and its arguments are handled
2242 as if they were a text line.
2256 utility first appeared in
2270 utility was written by
2271 .An Kristaps Dzonsons Aq Mt kristaps@bsd.lv
2272 and is maintained by
2273 .An Ingo Schwarze Aq Mt schwarze@openbsd.org .