Re: Relating multiple index entries to one table item

Arsen Arsenović <[email protected]>
Newsgroups gmane.comp.tex.texinfo.general
Message-ID <[email protected]>
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ć
signature.asc (application/pgp-signature, 381 B)
-----BEGIN PGP SIGNATURE-----

iOYEARYKAI4WIQT+4rPRE/wAoxYtYGFSwpQwHqLEkwUCY33NrV8UgAAAAAAuAChp
c3N1ZXItZnByQG5vdGF0aW9ucy5vcGVucGdwLmZpZnRoaG9yc2VtYW4ubmV0RkVF
MkIzRDExM0ZDMDBBMzE2MkQ2MDYxNTJDMjk0MzAxRUEyQzQ5MxAcYXJzZW5AYWFy
c2VuLm1lAAoJEFLClDAeosSTJ/QBAN8FkLXeaVywZ2DTBLJ7AJxrL4ciZ5FkeVg3
I9+iHZQ4AQDGZ4thmSOxKhfpHfHzY+GNeRk33f2EQoQLfaq3Yh5tCg==
=heMN
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.