bug-texinfo
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Feature request: multilevel indexing for TeX


From: Gavin Smith
Subject: Re: Feature request: multilevel indexing for TeX
Date: Thu, 21 Feb 2019 19:42:40 +0000
User-agent: Mutt/1.5.23 (2014-03-12)

On Thu, Feb 21, 2019 at 03:08:30AM -0700, address@hidden wrote:
> I have a feature request, please. It relates to indexing in texinfo.tex.
> Packages like LaTeX and professional publishing packages provide for
> multiple levels of index entries, usually up to three keys. For example
> 
>       coffee makers ..... 15, 21
>          electric ........... 32
>               pink ............ 45
> 
> I would very much like to see this available in texinfo.tex. In
> the gawk manual I have up to three items, separated by commas; if
> more are needed for what I want to say, I use @comma{}.
> 
> I took a look a texinfo.tex to see what's there for this kind of thing.
> I'm not at all a TeX hacker, but it looks like there's some half-completed
> support for two levels of items (not three).  Sort of like someone
> thought about it, but it doesn't seem to have been carried through.

If my understanding is correct, this code used to be used for some 
of the commands for indexing methods in object-oriented languages, like 
@defop, but these were changed long ago.  Possibly in the change on
2001-02-02 in the ChangeLog.

2001-02-02    <address@hidden>

        * texinfo.tex (\secondary): handle pdf case.
        (\dosubind): secondary index entry not written as separate arg for
                texindex.
        From: Trevin Beattie <address@hidden>
        Date: Tue, 21 Mar 2000 13:04:06 -0700

I've attached the mail for historical interest, which Karl provided to me.

The C implementation of texindex did actually sort \primary and \secondary
correctly last time I checked (some years ago).

> For backwards compatibility, this would probably have to be done as
> a new command, something like
> 
>       @cindex2 {coffee makers}{electic}{pink}
> 
> or more likely:
> 
>       @cindex2{coffee makers, electic, pink}
> 
> (Yes, that's a bad name, it's just an example for discussion.)

I think @cindextwo (no digits in TeX macro names) could be called as

@cindextwo coffee makers, electic, pink

This would be consistent with the arguments to @node, which are also separated
by commas.  But let's make sure that the interface is as consistent as possible
with other Texinfo commands.

> I would be willing to update texindex to support multiple sort
> keys if this would help.  Unfortunately, I don't think I can help
> with the TeX part or the makeinfo part.

I think it should work with \primary and \secondary the same as C texindex did.

I don't think implementing it would be too much of a barrier.  The more
important thing is to get the interface right.

> Does all this make sense?  Is it something that can be added to
> the TODO list?

Yes, I don't see why not.

Attachment: tmp
Description: Text document


reply via email to

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