On Fri, Feb 14, 2025 at 02:05:23PM +0000, Werner LEMBERG wrote:
> Well, I think that your `@anchorlabel` suggestion is the way to go.
> Actually, I would prefer a shorter name, say, `@label`.  Then you can
> demote
> 
> ```
> @node Foo
> @subsection Foo doodle doo
> ```
> 
> to
> 
> ```
> @label Foo
> @subsubheading Foo doodle doo
> ```
As a side note, even if I think that using @node is better for the
specific purpose of demoting a node to be associated to a subsubheading,
having an @-command more similar to an @anchor associated to an
@XXXheading, or even to another sectioning command may still be a good
idea.  Indeed, it allows to have a node that contains sectioning or heading
commands that can be handled more similarly to sectioning or heading
commands associated to a node but in the same output unit.  Currently,
it is possible to do it, but the sectioning commands do not have a label
correctly associated, they may be right after an anchor, which is better
than nothing but there is not the association that a @node has with the
following sectioning command.

With an example, it would allow to replace a @node that contains several
sectioning commands and @XXXheading without intrinsically associated
label:

@node my node
@section section

@anchor{Subsection in node}
@subsection Subsection in node

@anchor{Heading is lonely}
@heading Heading

by a @node that contains several sectioning commands and @XXXheading with
correctly associated labels:

@node my node
@section section

@anchorlabel Subsection in node
@subsection Subsection in node

@anchorlabel Heading is lonely
@heading Heading


Now, even if it is a good idea in principle, the question is always the
trade-off between the need for such constructs and the cost of
additional code to be done and maintained...

-- 
Pat

Reply via email to