On Wed, Nov 11, 2026 at 06:53:04PM +0000, Gavin Smith wrote:
> Probably, the manual should have used @chapheading instead of @unnumbered.

I do not think so, the @unnumbered leads to an entry in @contents with
TeX, which is what is expected.

> This would be in nodes with explicit pointers given in @node, and which do
> not have a @menu.  The nodes we need to reference are those created with
> AUTO_SECTION_NODE, i.e. those without an explicit @node line.  We can further
> restrict this to sectioning commands at a lower level - i.e. @unnumbered in
> the @top node, or @section in a @chapter node.  This is because people using
> sectioning commands for headings would be unlikely to use a higher or equal
> level of sectioning command to that of the node they are in.

Ok, this looks specific enough, and makes sense.

> I found there would be good results in my test files by simply changing
> "@node Top, Location, (dir), (dir)" to "@node Top": removing the explicit
> pointers.  So it should be possible to use the existing automatic generation
> of menus and add a condition where this should be used even if there
> are explicit pointers.

I think that explicit pointers should be removed instead.

> An initial patch to do this is at the end of this email.  It is in the
> Perl code for the Plaintext formatter where manus are added.  There is
> an attempt to check if the node associated with the first section which is
> a child was automatically added.

Without looking in details, it seems to me to be too late.  I think that
this should be taken care of in the structuring step.  Probably in
insert_nodes_for_sectioning_commands, which is in
Texinfo/ManipulateTreeNonXS.pm and is the function that adds nodes for
sectioning commands without nodes, called earlier directly from
texi2any.pl.  In that function it should be possible to make the check
you suggest above when a node is added, and remove explicit pointers for
the upper node if it does not have a @menu.

-- 
Pat

Reply via email to