On Tue, Feb 18, 2025 at 04:04:53PM +0100, [email protected] wrote:
> On Mon, Feb 17, 2025 at 07:13:43PM +0000, Gavin Smith wrote:
> > On Mon, Feb 17, 2025 at 07:37:23PM +0100, [email protected] wrote:
> > > One possibility, which is not very acceptable either would be to allow
> > > an empty @anchorname to remove the link between a @node and @heading,
> > > for example
> > >
> > > @node my node
> > >
> > > @quotation
> > > a quotation
> > > @end quotation
> > >
> > > @anchorname
> > > @heading heading
> > >
> > > but it is not very appealing either for many reasons.
> >
> > Here is an alternative:
> >
> > @node my node
> > @xrefname{my node}@c
> >
> > @quotation
> > a quotation
> > @end quotation
> >
> > @heading heading
> >
> > The @xrefname would set the label text for linking to the last node or
> > anchor.
> > Here it would take priority over "@heading" as it occurs earlier, and takes
> > the place of a section command, but does not produce a heading or anything
> > else.
>
> For such a command, that is not supposed to be inline, I would propose a
> line command.
Ok.
> > The user could also specify "@xrefautomaticsectiontitle on" and
> > "@xrefautomaticsectiontitle off" throughout the manual to get the
> > desired effect.
> >
> > For links to anchors, the @xrefname would follow the @anchor:
> >
> > @anchor{Butterfly}@xrefname{Papilon}.
>
> I really dislike this possibility. For one thing, I think that an
> inline version should be a different command. However, my feeling is that
> having a separate command with both the anchor and associated name would
> be better in term of consistency of the language. I think that
> associating inline braced commands based on their relative location is
> not something we should start doing unless we have used all the other
> possibilities. Based on nesting is more ok, though it is also better to
> avoid if possible.
I question how anchors appearing immediately after nodes should be treated.
For example (from texinfo.texi):
@node Document Permissions
@nodedescription Ensuring your manual is free.
@anchor{Software Copying Permissions}@c old node name
@section Document Permissions
Here "Software Copying Permissions" is an alias for the "Document Permissions"
node, so it would make sense for the @section line to be used for both
under xrefautomaticsectiontitle. (I expect that this not what currently
happens.)
Then if we used @xrefname instead, then it would make sense that this
should also provide the text for links to both the node and the anchor:
@node Document Permissions
@nodedescription Ensuring your manual is free.
@anchor{Software Copying Permissions}@c old node name
@xrefname Document Permissions
Such @anchors, in between a @node and a sectioning command (or heading
command, or @xrefname) could possibly be treated as a special case.