On Thu, Oct 15, 2026 at 11:18:45PM +0100, Gavin Smith wrote:
> On Mon, Oct 12, 2026 at 04:51:40PM +0200, Patrice Dumas wrote:
> > > I think this means the default for Info and HTML is AUTO_SECTION_NODE=1 
> > > and
> > > WARN_DUPLICATE_SECTION_TARGET=0.  For other formats it is 
> > > AUTO_SECTION_NODE=0
> > > and WARN_DUPLICATE_SECTION_TARGET=1.
> > 
> > That would be my preference, too.
> 
> I don't understand the purpose of not setting AUTO_SECTION_NODE=1 for all
> output formats.

The main reason is that for output formats that do not use nodes except
for references, it is not useful to add nodes as it does not add
anything to adding shadow targets.  In case of duplicate section without
node names, useless and ugly targets are added, with [+XX+] prependend.
Not adding nodes allows to avoid this.

We could still consider that, conceptually, the nodes are added for
these formats, even with AUTO_SECTION_NODE=0, especially if it helps for the
writting of the manual.  From the implementation side, the nodes are not
added, but from the "user" side, the nodes are there for all the purposes
they are useful for, for those output formats.

> I am reviewing text in the node "The Body of the Document" in texinfo.texi
> (below).
> 
> I have removed the @node lines before the @chapter line and the two
> @section lines, but then it is not true any more that there are always three
> nodes here.

With the default customization variables values, I would say that there
are always three nodes, even for output formats for which AUTO_SECTION_NODE=0
is the default, because nodes are not used for these output formats
except to set targets.

(actually, this may not be true for Plaintext because of SPLIT, maybe we
should set AUTO_SECTION_NODE=1 for plaintext such that SPLIT=node has the
documented effect, I'll put that in a TODO, need a test).

> I think I managed to revise the text here appropriately, although it may be
> worth bearing in mind that the inconsistency between output formats 
> potentially
> complicates the semantics of the language.
> 
> 
>     The body segment contains all the text of the document.  A manual is
>     divided into one or more “nodes” (*note Nodes::).  The example
>     illustrates a chapter made of three nodes, one for introductory material
>     in the chapter, and two sections.  The introductory material contains an
>     enumerated list.
>     
>          @node First Chapter
>          @chapter First Chapter
>     
>          @cindex chapter, first
>          This is the first chapter.
>          @cindex index entry, another
>     
>          Here is a numbered list.
>     
>          @enumerate
>          @item
>          This is the first item.
>     
>          @item
>          This is the second item.
>          @end enumerate
>     
>     
>          @node First Section
>          @section First Section
>     
>          First section of first chapter.
>     
>     
>          @node Second Section
>          @section Second Section
>     
>          Second section of first chapter.
> 

Reply via email to