If its input is badly formatted, lexgrog will print lqparse failedrq; this may be useful for external programs that need to check man pages for correctness. If one of lexgrog's input files is lq-rq, it will read from standard input; if any input file is compressed, a decompressed version will be read automatically.
$ lexgrog man.1 man.1: "man - an interface to the on-line reference manuals" $ lexgrog -fw man.1 man.1 (t): "man - an interface to the on-line reference manuals" $ lexgrog -c whatis.cat1 whatis.cat1: "whatis - display manual page descriptions" $ lexgrog broken.1 broken.1: parse failed
When using the traditional man macro set, a correct NAME section looks something like this:
.SH NAME foo \- program to do something
Some manual pagers require the oq\-cq to be exactly as shown; mandb is more tolerant, but for compatibility with other systems it is nevertheless a good idea to retain the backslash.
On the left-hand side, there may be several names, separated by commas. The text on the right-hand side is free-form, and may be spread over multiple lines. If several features with different descriptions are being documented in the same manual page, the following form is therefore used:
.SH NAME foo, bar \- programs to do something .br baz \- program to do nothing
(A macro which starts a new paragraph, like .PP, may be used instead of the break macro .br.)
When using the BSD-derived mdoc macro set, a correct NAME section looks something like this:
.Sh NAME .Nm foo .Nd program to do something
There are several common reasons why whatis parsing fails. Sometimes authors of manual pages replace oq.SH NAMEcq with oq.SH MYPROGRAMcq, and then mandb cannot find the section from which to extract the information it needs. Sometimes authors include a NAME section, but place free-form text there rather than oqname \- descriptioncq. However, any syntax resembling the above should be accepted.
Wilf. (G.Wilford@ee.surrey.ac.uk). Fabrizio Polacco (firstname.lastname@example.org). Colin Watson (email@example.com).
Colin Watson wrote the current incarnation of the command-line front-end, as well as this man page.