On Sun, Jan 23, 2022 at 10:20:03AM -0800, Per Bothner wrote:
> 
> On 1/22/22 02:07, Gavin Smith wrote:
> > @chapter or @section without @node would become a lot like
> > @heading except perhaps there could also be an @anchor generated
> > for the chapter heading as well as appearing in the table of
> > contents.  There would have to be a check that the name of the
> > automatic @anchor didn't clash with any other @node or @anchor.
> 
> If the @section/whatever is immediately preceded by an @anchor,
> one can use the explicit anchor instead.  In a sense the @anchor
> functions like the @missing node command, except in terms of splitting.
> 
> I assume you would disallow sub-nodes: I.e. the next @node command would
> have to be followed by a sectioning comand at the same or higher level.

Links to mail archives:

https://lists.gnu.org/archive/html/bug-texinfo/2022-01/msg00104.html

Earlier posts in thread:
https://lists.gnu.org/archive/html/bug-texinfo/2021-10/msg00000.html
https://lists.gnu.org/archive/html/bug-texinfo/2021-12/msg00130.html

It's years later, but this is now possible with the current development
version, although it requires setting a variable with
"texi2any --html -c AUTO_SECTION_NODE=0 <input.texi>".

Both the AUTO_SECTION_NODE=0 and AUTO_SECTION_NODE=1 behaviours are useful
and valid for HTML output, although in my opinion, AUTO_SECTION_NODE=1
would be useful more often so that is the default.

Here's the current draft of the documentation of this:

‘AUTO_SECTION_NODE’
     If set, insert nodes for sectioning commands lacking a
     corresponding node.  Done by default in ‘texi2any’ for Info and
     HTML output.  This allows you to create a node for these output
     formats using only a sectioning command, using the section title as
     the node name.

     In HTML output split by node, you may wish to set this variable to
     ‘0’ to obtain finer control over output file splitting than that
     afforded by the ‘SPLIT’ variable.  In this usage, you provide
     explicit ‘@node’ commands to separate the regions of the manual
     that should be placed in different output files.  In contrast to
     the ‘chapter’ and ‘section’ settings for ‘SPLIT’ which apply
     uniformly across the entire manual, you can split your manual at
     different levels in the chapter structuring hierarchy according to
     what you consider best for different parts of your manual.

     Note that regardless of the setting of this variable, sectioning
     commands without a corresponding ‘@node’ line can still be the
     target of cross-references; see *note Cross Reference Targets::.




Reply via email to