RE: @anchor around @item

Vincent Belaïche <[email protected]>
Newsgroups gmane.comp.tex.texinfo.general
Message-ID <PAXPR06MB80935735242D6CDAF5449CC384FC9@PAXPR06MB8093.eurprd06.prod.outlook.com>
Dear both,
Thank you for the feedback.

I suggest that it should be always at the same position wrt @item, so
that users don't have to remember too many use cases.

Attzached is a patch to documention…

  V.
________________________________
De : Gavin Smith <[email protected]>
Envoyé : vendredi 13 août 2021 18:44
À : Eli Zaretskii <[email protected]>
Cc : [email protected] <[email protected]>; [email protected] <[email protected]>
Objet : Re: @anchor around @item

On Fri, Aug 13, 2021 at 07:07:40PM +0300, Eli Zaretskii wrote:
> > Good question.  I haven't checked the output or what texi2any does with
> > this kind of input internally, but my first thought is that the @anchor
> > should come AFTER the @item.
>
> It should be BEFORE the @item if you want the link to land you on the
> @item line.  if you put it AFTER the @item, you will land on the text
> after the @item line.  That matters when @item is in a @table, because
> then the @item line typically has some text after the keyword.  In an
> @itemize list it might not matter.

I agree it would be different for a @table.
anchor.diff (application/octet-stream, 744 B)
Index: doc/texinfo.texi
===================================================================
--- doc/texinfo.texi	(revision 8445)
+++ doc/texinfo.texi	(working copy)
@@ -5430,6 +5430,12 @@
 Also like node names, anchor names cannot include some characters
 (@pxref{Node Line Requirements}).
 
+With lists and tables environments such as @code{@@itemize},
+@code{@@enumerate}, @code{@@table}, @code{@@multitable},
+@code{@@ftable}, and @code{@@vtable}, the @code{@@anchor} should be
+placed immediately @i{before} the @code{@@item} command of the item to
+be referred to.
+
 @cindex Nodes, deleting or renaming
 Because of this duality, when you delete or rename a node, it is
 usually a good idea to define an @code{@@anchor} with the old name.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.