The recent report about the failing "M-x tree-search" command when done from the dir node brought the mtools.texi manual to my attention.
Here is a cut-down version of the start of the file which should demonstrate the problems with newer versions of texi2any: ------------------------------------------------------------ \input texinfo @c -*-texinfo-*- @node Top, Location, (dir), (dir) @top Mtools doc This is mtools' documentation. @unnumbered Introduction Mtools is a collection of tools to allow Unix systems to manipulate MS-DOS files: read, write, and move around files on an MS-DOS file system (typically a floppy disk). Where reasonable, each program attempts to emulate the MS-DOS equivalent command. However, unnecessary restrictions and oddities of DOS are not emulated. For instance, it is possible to move subdirectories from one subdirectory to another. @menu * Location:: Where to find mtools and early bug fixes @end menu @node Location,, Top, Top @chapter Where to get mtools @bye ------------------------------------------------------------ The unusual feature of this is the @unnumbered line not precededed by a @node. In the installed mtools.info file I have on my system, this led to two "menus" being output in the Top node of the Info file. This was produced by Texinfo 6.7, which was a version after we started automatically generating menus in nodes that didn't have one (it started in Texinfo 6.1). This is ugly but not a complete disaster. In the current git development version, it is worse: the @unnumbered gets its own node, and the Top node is very short, with no menu: ------------------------------------------------------------ File: mtools-fail.info, Node: Top, Next: Location, Prev: (dir), Up: (dir) Mtools doc ********** This is mtools' documentation. ------------------------------------------------------------ You can see the text under Introduction is missing from the Top node, with no (obvious) way to get to it. There is also a warning from texi2any: mtools-fail.texi:8: warning: node `Introduction' unreferenced Running "texi2any -c AUTO_SECTION_NODE=0 mtools-fail.texi" produces a good result: there is a heading for "Introduction" in the Top node, and there is an anchor for "Introduction" in the file tags table. I have not thought of a good solution to this, other than setting AUTO_SECTION_NODE=0 by default for Info. Another acceptable solution could be to automatically output a menu in such a situation, like: * Menu: * Introduction:: At least then a reader of the manual could navigate to the Introduction node. This option would allow AUTO_SECTION_NODE to remain as 1. However, I have not thought yet what the rules should be for generating such a menu. I expect there is no menu for the Top node in this input because "@node Top" has explicit pointers as extra arguments after "Top".
