I was reviewing the "Short Sample Texinfo File" in the Texinfo manual and wanted to check if the @node command was necessary for the "Index" node, which looks like:
@node Index
@nodedescription Complete Index
@unnumbered Index
@printindex cp
"Index" is duplicated in both the arguments to @node and @unnumbered
and so the @node line is redundant.
I first tried simply removing the @node line:
@nodedescription Complete Index
@unnumbered Index
@printindex cp
This led to an error:
sample.texi:51: warning: multiple node @nodedescription
I thought that the @nodedescription may have been considered to be part
of the previous node ("Second Section"), and so it should appear after the
@unnumbered command that starts a new node:
@unnumbered Index
@nodedescription Complete Index
@printindex cp
This doesn't work either:
sample.texi:52: warning: multiple node @nodedescription
However, for this second input, the node description is correctly
output on the menu entry for "Index" in the superior node:
* Menu:
* First Chapter:: The first chapter is the only chapter in this
sample.
* Index:: Complete Index
So @nodedescription looks like it nearly works correctly, if it is placed after
the sectioning command, but the warning is wrong. It appears for the
sake of the @nodedescription warning, only explicit @node lines are considered.
I'm attaching the file I used to test this.
Could texi2any associate the @nodedescription line with a preceding
lone sectioning command so that this warning isn't emitted? I'm guessing
that internally, @node commands are added to the Texinfo tree after these
warnings are generated (with AUTO_SECTION_NODE=1), which is too late to
prevent the warning.
sample.texi
Description: TeXInfo document
