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: Arsen Arsenović
Subject: Re: Relating multiple index entries to one table item
Date: Sat, 26 Nov 2022 21:40:53 +0100

Gavin Smith <gavinsmith0123@gmail.com> writes:

> On Sat, Nov 26, 2022 at 03:59:00PM +0000, Gavin Smith wrote:
>> I still haven't put index entries before the very first
>> @item in a @table inside the <dt> - I need to do something with the
>> 'before_item' element.
>
> It should be done now.  I tried never adding a 'before_item' element
> in the first place, but this appeared to have repercussions throughout
> the code leading to failures in several places that I couldn't understand,
> so I fixed it in a more limited way.
>
> Currently, the input:
>
>     @table @code
>     @vindex ONE
>     @vindex TWO
>     @item in item
>     @itemx in itemx
>     aaaaa
>     
>     @vindex TTHREE
>     @item item2
>     aaaaa
>     @end table
>
> gives the HTML output:
>
>     <dl class="table">
>     <dt><a class="index-entry-id" id="index-ONE"></a>
>     <a class="index-entry-id" id="index-TWO"></a>
>     <code class="code">in item</code></dt>
>     <dt><code class="code">in itemx</code></dt>
>     <dd><p>aaaaa
>     </p>
>     </dd>
>     <dt><a class="index-entry-id" id="index-TTHREE"></a>
>     <code class="code">item2</code></dt>
>     <dd><p>aaaaa
>     </p></dd>
>     </dl>
>
> which I think is good.

That is pretty good!  Thanks.

I was still interested in indexing @itemx', so I tried:

  @table @code
  @vindex ABC
  @item ABC
  @vindex DEF
  @itemx DEF
  
  Test.
  
  @end table

... which produced:

  <dl class="table">
  <dt><a class="index-entry-id" id="index-ABC"></a>
  <code class="code">ABC</code></dt>
    <dd><a class="index-entry-id" id="index-DEF"></a>
    </dd>
  <dt><code class="code">DEF</code></dt>
  <dd>
  <p>Test.
  </p>
  </dd>
  </dl>

(double indentation used as emphasis) without handling @itemx it'd seem.

It looks like gather_previous_items supports @itemx (at least in the
Non-XS parser), so I might be able to figure that out tomorrow, sadly, I
am out of time for the day.  Hopefully, it wouldn't be too hard to
recover the anchors too (people have taken to like them a lot :) ).

Thanks again, this is already wonderful, have a great night.
-- 
Arsen Arsenović

Attachment: signature.asc
Description: PGP signature


reply via email to

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