Re: @anchor around @item

Gavin Smith <[email protected]>
Newsgroups gmane.comp.tex.texinfo.general
Message-ID <20210813155455.GA30012@mintstar>
On Fri, Aug 13, 2021 at 08:25:36AM +0000, Vincent Belaïche wrote:
> Just wondering where the best place is for an @anchor in a table or any other
> kind of enumeration (@itemize and suchlikes) where we want a reference to a
> specific @item.
> 
> Would that be before or after the corresponding @item command.
> 
> Node (info "(texinfo) @anchor") does not tell anything about thart AFAIK.
> 
> In the example below, should I place a0 or a1 to get a reference to item
> ``First one''.
> 
> @itemize
> @anchor{a0}
> @item
> @anchor{a1}
> First one
> @end itmize
> 
> PS : Please keep me in the Cc: or To: as I am not subscribed to this list.

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.  The reason for this is that if there is
a previous @item, so:

@itemize
@item
First

@anchor{a0}
@item
Second
@end itemize

- from a parsing point of view the @anchor would very likely be considered
as part of the first @item, not the second.
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.