On Thu, Jun 18, 2026 at 07:49:39PM +0100, Gavin Smith wrote:
> On Thu, Jun 18, 2026 at 04:22:42PM +0200, Arsen Arsenović wrote:
> > Indeed, we did just that. And placed @anchor above the new node into
> > which old node contents were merged. But, the enchors ended up
> > generating redirects to the wrong node!
>
> They should be placed after the @node, not before it. We could update
> the manual to state this.
>
> The node only starts after the @node line, so an @anchor before @node is
> in the previous node.
>
> This is the simplest rule to implement, and I believe that changing
> this would be difficult with texi2any, and practically impossible with
> texinfo.tex.
More importantly, I think that from a Texinfo language perspective, we
should consider that the @node delimitation is the output unit
delimitation.
> I remember the issue with @*index after/before @item was quite confusing,
> but I believe it was fixed.
>
> The index commands are not exactly the same as they occupy an entire line
> in the input. The argument to @anchor{..} commands is brace-delimited.
Indeed, and it allows more flexibility with @anchor. For @*index
after/before @item it was fixed because the user intention was somewhat
ambiguous because it could not be on the same line as the @item and
we decided how to solve the ambiguity and we allowed to have the tree
modified post-parsing in texi2any.
For anchor, I think that we should avoid to do that as much as possible
since the user may really want to have the @anchor placed were she did.
--
Pat