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: Fri, 25 Nov 2022 23:41:51 +0100

On Fri, Nov 25, 2022 at 10:12:21PM +0000, Gavin Smith wrote:
> On Tue, Nov 22, 2022 at 09:49:33PM +0000, Gavin Smith wrote:
> > On Tue, Nov 22, 2022 at 10:23:24PM +0100, Patrice Dumas wrote:
> > > Maybe not important if there are other changes afterwards, but with the
> > > change, in HTML, the result is now invalid, as the index entries end up
> > > not associated with the index term <dt>, but after the index term.  This
> > > is not correct, as the outer <dl> should only contain <dl> and <dt>.  It
> > > may not be an issue at all if you do further changes, or it could be an
> > > issue to be solved in the HTML converter.
> > 
> > I'll check this output and see I can change it to be valid again.
> 
> I've reverted my change as I couldn't make it work out right and it is
> not clearly right.
> 
> I'm starting to think that it should be index entries *before* the @item that
> are associated with the @item, not after it.  I feel this may be easier to
> implement.  This would leave the Info output unaltered.

Index entries before the @item already appear at the item when linked
to.  So keeping them as they are is ok too.  Index entries after an item
appears to be after the item, while the intention of th ewriters is
often for the entries to be associated with the @item.  So I still think
that your original attempt, to associate index entries following @itemx
and @item to the @item, and possibly having all the <a> elements before
the text in the <dt> would seem right to me.

> There may be a related issue with associating index entries with other
> constructs.  For example, a paragraph:
> 
>     @cindex paragraph 1
>     This is a paragraph.
> 
> outputing in HTML as
> 
>     <a class="index-entry-id" id="index-paragraph-1"></a>
>     <p>This is a paragraph.
>     </p>
> 
> Arguably, the following may be better:
> 
>     <p id="index-paragraph-1">This is a paragraph.
>     </p>
> 
> However, this may be more difficult to achieve than just focusing on
> the @table case.

I am not convinced that it is right, as the information that
id="index-paragraph-1" relates to an index entry is lost.  With a
separate <a> with the class="index-entry-id" the structure is better
kept.

-- 
Pat



reply via email to

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