On Mon, Jul 20, 2026 at 11:45:41PM +0200, Patrice Dumas wrote:
> On Mon, Jul 20, 2026 at 07:39:35PM +0100, Gavin Smith wrote:
> > I am not keen on it for @*heading, as this is confusing the purpose
> > of these commands - primarily to print a heading.  I know it does
> > do slightly more, in that a user can use a @node line followed by a
> > @heading line and the two will be associated, so the argument to @heading
> > could be used for cross-reference text if "@xrefautomaticsectiontitle on"
> > is given (in Texinfo 7.3, at least).
> > 
> > As you explain it, as a language feature it doesn't seem like it would
> > conflict with anything.  However, it would be more complexity to implement,
> > especially in texinfo.tex, and also makes the feature more complicated
> > for users to understand (as we would have three levels of priority, rather
> > than two).
> > 
> > Can we just do it for sectioning commands to start with and see where that
> > takes us?
> 
> Ok, but we should keep a track of this, such that users relying on
> @heading know that it is different for heading and keep this in a TODO.

Another complication that adding shadow targets for @heading would introduce
is the possible effect on node splitting.  If a lone @heading appears in
a @node, it should not cause the node to be split.  It is the usual usage
for @*heading commands to appear throughout a node where the manual author
wants to produce headings but does not want to split the node into smaller
nodes.

So it would be inappropriate to consider:

    @heading Foo

to be equivalent to:

    @node Foo
    @heading Foo

(assuming no other nodes called "Foo" occur, etc.).  It is possible
that it could produce an effect like:

    @anchor{Foo}@c
    @heading Foo

This is what the Texinfo manual says:

   • The ‘@heading’-like commands produce simple unnumbered headings
     that do not appear in a table of contents, are not associated with
     nodes, and cannot be cross-referenced.  These heading commands
     never start a new page.

Based on this, users cannot make cross-references to @heading-like commands
(without adding an @anchor, of course).  If they wanted to, it would
raise the question of why they did not use sectioning commands instead.

Reply via email to