On Sat, Feb 15, 2025 at 01:17:43PM +0000, Werner LEMBERG wrote: > > > I propose that, if USE_NEXT_HEADING_FOR_LONE_NODE is set, the > > @*heading appearing after a @node be treated as much as possible > > like a sectioning command. > > What about HTML split mode?
The question is where nodes would be placed when splitting by "chapter" (or by "section") in HTML output. I think a node with only a heading in it would be placed under the last chapter or section. For example: @node Cap 1 @chapter Chapter One @dots{} @node Cap 2 @chapter Chapter Two @dots{} @node Node 1 @heading Topic @dots{} Here the "Cap 1" node would be output in a file for "Chapter One", and the "Cap 2" and "Node 1" nodes would be output in the file for "Chapter 2", under chapter-level splitting. This would be the same regardless of the level of heading command - for example, if @majorheading was used instead, it would be the same. If there is no preceding chapter, a separate file could be created. For example: @node Node 1 @heading Topic One @dots{} @node Node 2 @heading Topic Two @dots{} @node Cap 1 @chapter Chapter One @dots{} @node Cap 2 @chapter Chapter Two @dots{} Here there would be three output files, one for "Node 1" and "Node 2", one for "Cap 1", and one for "Cap 2". (We could check what texi2any does with such input at present.) There are other structures. For example, what if we are splitting by section, and a @node/@*heading node appears in a chapter before any @section: @node Chapter @chapter Chapter @node Topic @subsubheading Topic @node Section @section Section Again, I suggest checking what texi2any does already with such input when splitting by section. Perhaps the presence of the "@node Topic" line shouldn't make a large difference to the splitting, so that the output files would be the same as if the following were done instead: @node Chapter @chapter Chapter @subsubheading Topic @node Section @section Section Here, the @subsubheading is just producing output (just like regular paragraph text) and is irrelevant for the structure.