Hi,

Gavin Smith <[email protected]> writes:

> I think deciding on the right output for the existing usage and
> implementing such is more important than devising and implementing
> new language constructs.

I understood you to mean that a list of index entries that follows a
list of items should get the index automatically distributed.  I'm not
sure if that's what you mean (my apologies, I've not been following with
full attention).

I'm not sure that's quite possible in this instance.  In the example I
was using, there's a different number of index entries versus items,
since there isn't an item added for -Wno-..., despite there being an
index entry to it.

Associating all the index entries with the @item (i.e. the first term,
rather than trying to match them to the @item and @itemx-es) _would_ be
a large improvement, but, after seeing that it can be done with
@[fv]table, I would be happy to rework the GCC manual to use a similarly
effective construct.

The @itemindex proposal also seems to assume one index per item.  Maybe
some transformation could be added to associate N @XXindex calls with an
@item[x] that follows it too?  I haven't seen this usage in the wild,
but it would allow indices other than f and v to also have properly
indexed tables.  What I mean is that maybe:

  @opindex Wpedantic
  @opindex Wno-pedantic
  @item -Wpedantic
  @opindex pedantic
  @itemx -pedantic

... should produce:

  <dt>
    <span id="index-Wpedantic"></span>
    <span id="index-Wno-pedantic"></span>
    <span>
      <code>-Wpedantic</code>
      <a href="#index-Wpedantic" class="copiable-anchor"> ¶</a>
    </span>
  </dt>
  <dt>
    <span id="index-pedantic"></span>
    <span>
      <code>-pedantic</code>
      <a href="#index-pedantic" class="copiable-anchor"> ¶</a>
    </span>
  </dt>

(formatting added for clarity), though, this has the disadvantage of
still needing some care to keep the indices and items in sync.  Maybe
just adding the -Wno-... flags is worth it to get the right result here.

I'd love to give implementing this a try next week, if no-one beats me
to it, and it's deemed a useful transformation.

Thanks in advance, and have a lovely day.
-- 
Arsen Arsenović

Attachment: signature.asc
Description: PGP signature

Reply via email to