[latexrefman-discuss] Indices

Vincent Belaïche vincent.belaiche at domain.hid
Mon Apr 4 19:54:37 CEST 2016



Le 02/04/2016 00:12, Karl Berry a écrit :
>     I think that it would be valuable if we had an environment index and a
>     control character index.
>
> Sorry, but I disagree.  I do not want multiple indexes.  I think they
> make things harder for readers, because they create multiple places to
> look for the same information.  (Indeed, I'd like to merge the concept
> and command indexes.  I inherited them.)
>
> What I can agree with is that index entries could contain text
> like " (environment)".

Ok, what I was unhappy with is that the findex of environments was
inconsistent (the word `environment' was not always used). Also it is
quite evil to duplicate information, and repeating in many places the
word `environment' was evil to that extent.

So what I did is create an EnvIndex macro to produce the index
entries. So in result we have a single index, as you are willing, but it
is made consistent and futureproof, ie easy to maintain. Also, each
EnvIndex call indeed creates two entries, one is

   @r{environment}, @code{\env\}

and the other one is

   @code{\env\} @r{environment}

So we can find all the environments in the same place in the index by
looking at word `environment'

>
>     Since they are not so many, 
>
> Precisely because there are not so many, I don't think there is any
> great problem with having the list in the text.  A whole separate index
> would be overkill to me.  -k

This means that they should be  all indexed with some macro like this:

@macro CtlCharIndex {cc}
@findex @r{control character}, code{\cc\}
@findex code{\cc\} @r{control character}
@end macro

This way all the control characters could be found in the same place by
looking for `control character' in the index. The same argument as for
using EnvIndex macro apply here : consistency & futureproofness.


  V.





More information about the latexrefman mailing list