help-texinfo
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Relating multiple index entries to one table item


From: Patrice Dumas
Subject: Re: Relating multiple index entries to one table item
Date: Mon, 21 Nov 2022 22:04:16 +0100

On Mon, Nov 21, 2022 at 08:49:34PM +0000, Gavin Smith wrote:
> My current work is at the bottom of the email.  This will need more testing
> and also implementing in the XS parser, so it will take me at least few days 
> to
> finish.

It could also be a tree transformation that is applied after the
tree parsing.

> The idea is to put the index entries in the 'table_term' element rather
> than 'table_item', and in the transformation in Texinfo::Common,
> to reorder inside table_term to put index entries first, taking the
> first index entry that occurs as the copiable anchor.  So
> 
> @table @asis
> @item -Wpedantic
> @itemx -pedantic
> @vindex pedantic
> @vindex Wpedantic
> @vindex Wno-pedantic
> aaaaa
> 
> bbb
> @end table
> 
> produces
> 
> <dl class="table">
> <a class="index-entry-id" id="index-Wpedantic"></a>
> <a class="index-entry-id" id="index-Wno_002dpedantic"></a>
> <dt id='index-pedantic'><span>-Wpedantic<a class="copiable-link" 
> href='#index-pe
> dantic'> &para;</a></span></dt>
> <dt>-pedantic</dt>
> <dd><p>aaaaa
> </p>
> <p>bbb
> </p></dd>
> </dl>
> 
> Does this seem ok?

The repositioning of index entries look ok, but automatically
associating one to the table_term does not look clearly ok to me.  In
some cases it could what the user wanted, but in other cases not.  I
think that it would be better to separate the issue of index entries
repositioning from the issue of having a table command associated to
another index type, and to have an index entry not matching the @item
argument.

Could be for example

@itable
@item v, pedantic, -pedantic

@end itable

To have the 'pedantic' variable index entry associated with the
'-pedantic' table term label.  Instead of @item, it could be another
command, like @itemindex, so something like

@itable @code
@itemindex v, pedantic, -pedantic
@itemindexx op, -Wpedantic@comma{} option, -Wpedantic
description
@end itable


-- 
Pat



reply via email to

[Prev in Thread] Current Thread [Next in Thread]