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: arnold
Subject: Re: Feature request: multilevel indexing for TeX
Date: Mon, 25 Feb 2019 07:01:04 -0700
User-agent: Heirloom mailx 12.5 7/5/10

Hi. Thanks for the answer.

Gavin Smith <address@hidden> wrote:

> 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).

I took a quick look. It looks like the output was

        \entry ...
        \primary ...
        \secondary ...
        \secondary ...
        \secondary ...

> > 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.

So why not just make it work with @cindex?  Or do we really need
a new command?

> > 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.

Could we do \tertiary also? Or is that asking too much?

> 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.

How do we move forward?

Thanks!

Arnold



reply via email to

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