On Sun, Feb 16, 2025 at 12:24:23PM +0000, Gavin Smith wrote: > On Sun, Feb 16, 2025 at 12:57:21PM +0100, pertu...@free.fr wrote: > > This is only true if USE_NODES=1. For HTML, if USE_NODES=0, the > > sectioning commands define units of output and @node are only > > used ase targets of cross-references. > > What would be the advantage to a user of setting USE_NODES=0?
If there are lone nodes, they are associated to the preceding section. It allows to have HTML more book like, while Info could have more @node units. I am not sure that it is often used, but it was important enough as a difference that it was how texi2html was designed in th eearly 2000. Setting USE_NODES=0 also has some other effects on whether node or sectioning command are used as names for some links. But it is a different matter that is not relevant here. > > > So what I am thinking now is that we would allow and encourage > > > multiple section or heading commands within single @node. For example, > > > > We already allow for that and we do not discourage. > > You wouldn't get an idea it was possible from reading the Texinfo manual > or from looking at most Texinfo source files. Usually, when a file has > @section or @subsection without a preceding @node, it is a mistake and > the author meant to write @heading or @subheading instead. I remember someone saying in a discussion, probably the one you quoted above that he did exactly that. That being said I certainly agree with you that if it was documented, it could be used more. > > There is also the idea that the following would lead to @label > > associated to @heading, and not @section, as is the case now for @node: > > > > @label Heading 1 > > @heading heading one > > > > @section a section > > Yes, I agree. For simplicity @label and @node should work the same way > here. Actually, I was proposing the opposite, so I was probably unclear. For @node, the association is with the next sectioning command, even if there are @*heading commands in-between. This is also quite theoretical, as the node should be right before a sectioning command, but still it is the rule. I was proposing that for @anchorname, the rule would be different, ie, it would be associated to the following sectioning or heading command, not to the next sectioning command without node nor anchorname. -- Pat