> Here there are not only two @sortas, but also nested @sortas, the
> expanded Texinfo code (expanded by texi2any) is like:
> 
>  @findex @sortas{@sortas{bbb}ddd X}@sortas{bbb}ddd
> 
> texi2any warns about this, rightly in my opinion:
> 
> sortas_sortas.texi:13: warning:
>   @sortas should not appear in @sortas (possibly involving @funindex)
> sortas_sortas.texi:13: warning:
>   @sortas should only appear in an index entry (possibly involving @funindex)
> 
> My feeling is that if Texinfo TeX is broken by this input it is not
> really a problem.

I'm not convinced.  The argument to `@sortas` is for the index
generator; I would expect that the argument of `@sortas` gets handled
in verbatim mode, i.e., it gets completely ignored by TeX except while
writing the unsorted index file.  In other words, `@` should no longer
start a command after the outermost `@sortas` command has read its
argument; there shouldn't occur any recursive behaviour.  The only
limitations are balanced braces, but this is necessary for other
commands, too.

> If there are two @sortas in one index entry, like
> 
>   @findex @sortas{first} cc @sortas{second}
> 
> texi2any does not warn and use the second to sort, as you said.  I
> have no problem with not warning, however, what is used for sorting
> should be considered to be undefined, could be the first @sortas,
> the second one, both together, none at all.

Why undefined?  I suggest that the last entry always wins.


    Werner

Reply via email to