On Wed, Feb 12, 2025 at 04:56:26PM +0000, Gavin Smith wrote: > Having removed @anchor from the scope of "@xrefautomaticsectiontitle", > there is now a reason to add a new command that affects @anchor only. > > Your proposal from a few days ago of using a @*heading command appears > relevant. We could use a command like "@xrefanchorlabelisheading" (hard > to get a descriptive, short name). > > So with input like: > > @heading Bögen > @anchor{Bows} > > Then @ref{Bows} would produce "Bögen", etc. > > If that is not enough, we could add a Texinfo command to be used thus: > > @anchorlabel Bögen > @anchor{Bows} > > This would work exactly the same way, except no heading would be printed.
I do not like the automatic association of an inline command like @anchor, that may happen anywhere, to another command. I think that it would be cleaner to have an @-command with two arguments, instead, like @anchorlabel Bows, Bögen A comma in the anchor part would need to be escaped. If we want an heading command with a specific anchor, similarly I think that it would be better to have the anchor as argument instead of an automatic association, like @headinganchor Bows, Bögen For heading, having a line command giving the anchor would be consistent with the remaining of the language, too, like @headinganchor Bows @heading Bögen Note that having separate anchor and label most likely requires changing diverse things, because the anchor part always need to be 'hidden'. For instance cross references should be like @ref{Bows, Bögen, Bögen, manual}, which complexifies somewhat cross-references writing. -- Pat