On Sun, Feb 16, 2025 at 04:56:37PM +0100, pertu...@free.fr wrote:
> What should we do for @*heading not at the top level, like
> 
> @node node
> 
> @quotation
> @heading in quitation
> Quote
> @end quotation
> 
> @heading at top-level

This is actually a problem for an implementation in texinfo.tex.

In your example, the @heading commands should not be associated with
the @node.  All they should do is produce headings.

If we made @heading immediately following a @node associated with the
node, in that the @heading text could be used for cross-references to
the @node, then it would not be possible to tell if any text had intervened.

The way this is done in texinfo.tex for @section is that the @node command
sets a \lastnode variable, which is then used and cleared the next time
a @section command is seen.  This is not a problem as @section is only
expected to appear immediately after a @node, whereas @heading could
appear anywhere.

In terms of the @anchorname or @label feature we were discussing (under
various names), this means it may less problematic to use this with
@section:

@anchorname name 
@section section

than with @heading:

@anchorname name 
@heading heading

This means we lose the ability to control whether the command is in
a table of contents, which may not be significant.

We could provide some other means of providing the printed xref name
for @node with @heading:

@node node
@heading heading

This could be done with some new command.  We could even use the @heading
text, but only if the user has explicitly requested it, not by default.

Reply via email to