[Top][All Lists]

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

Re: [help-texinfo] Sortas key

From: Gavin Smith
Subject: Re: [help-texinfo] Sortas key
Date: Sat, 31 Aug 2019 12:17:03 +0100

On Sat, Aug 31, 2019 at 11:41 AM Hilaire Fernandes <address@hidden> wrote:
> Hi,
> Under texinfo (6.5.0.dfsg.1-2), I noticed using @sortas twice with the
> same sort key is causing trouble.
> @cindex @sortas{e} échelle
> @cindex @sortas{e} équation (méthodes)
> Only the first occurrence appears in the index.

You would have to use a longer argument to the @sortas comand, like
@sortas{echelle} and @sortas{equation (methodes)} instead. I can't
think of an easier way of doing it or a way of changing how @sortas
works so that this would work.

That was the behaviour from before the @sortas command existed. There
is a comment in the source code of texindex:

If a given sort key has more than one display text, we only take the
first (this matches the behavior of C @command{texindex}).  Put another
way, if the same sort key has two different display texts, it means that
different markup was used, probably inadvertently, and we just take the
first.  As an example, consider these two Texinfo commands:

@@cindex @@file@{field_split()@} function
@@cindex @@code@{field_split()@} function
@end example

They produce the following output via @file{texinfo.tex},
which in turn is the input to @file{texindex.awk}:

@@entry@{field_split() function@}@{2@}@{@@file @{field_split()@} function@}
@@entry@{field_split() function@}@{7@}@{@@code @{field_split()@} function@}
@end example

The result will be a single entry, using @code{@@file},
accumulating the page numbers:

@@entry@{@@file @{field_split()@} function@}@{2, 7@}
@end example


reply via email to

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