Marc Baudoin | 21 Jan 2010 10:30

Re: Non-alphabetic characters sorting

Joachim Schrod <jschrod <at> acm.org> écrit :
> 
> > I'm writing a manual with a lot of non-alphabetic characters in
> > the index.  The way they are sorted seems a little strange.  For
> > instance, I have, in the default section of the index :
> >
> > $
> > ?
> > "
> > #
> > #!
> > #
> > &
> > &&
> > $((
> 
> Since these letters are heavily rewritten to parse LaTeX markup, it's
> necessary that you post the raw index entries with these letters in
> them. I.e., can you locate and extract from the .idx file the
> \indexentry lines that produce these entries?

Sure:

\indexentry{$ (valeur d'une variable) <at> \intercom{\$} (valeur d'une variable)|hyperpage}{122}
\indexentry{$ (valeur d'une variable) <at> \intercom{\$} (valeur d'une variable)|hyperpage}{176}
\indexentry{$(( ... )) <at> \intercom{\$((} \ldots\ \intercom{))} (calcul entier)|hyperpage}{177}

\indexentry{? (m\IeC {\'e}tacaract\IeC {\`e}re) <at> \path{?} (m\IeC {\'e}tacaract\IeC {\`e}re)|hyperpage}{89}
\indexentry{? (variable sp\IeC {\'e}ciale) <at> \texttt  {?} (variable sp\IeC {\'e}ciale)|hyperpage}{132}

(Continue reading)

Joachim Schrod | 9 Feb 2010 13:11
Picon
Favicon

Re: Non-alphabetic characters sorting

On Thu, Jan 21, 2010 at 10:30 AM, Marc Baudoin <babafou <at> babafou.eu.org> wrote:
> Joachim Schrod <jschrod <at> acm.org> écrit :

Hi,

Marc's problem has a complex answer, and actually one open issue.

>> > I'm writing a manual with a lot of non-alphabetic characters in
>> > the index.  The way they are sorted seems a little strange.  For
>> > instance, I have, in the default section of the index :
>> >
>> > $
>> > ?
>> > "
>> > #
>> > #!
>> > #
>> > &
>> > &&
>> > $((

[raw index]

> \indexentry{$ (valeur d'une variable) <at> \intercom{\$} (valeur d'une variable)|hyperpage}{122}
> \indexentry{$ (valeur d'une variable) <at> \intercom{\$} (valeur d'une variable)|hyperpage}{176}
> \indexentry{$(( ... )) <at> \intercom{\$((} \ldots\ \intercom{))} (calcul entier)|hyperpage}{177}
>
> \indexentry{? (m\IeC {\'e}tacaract\IeC {\`e}re) <at> \path{?} (m\IeC {\'e}tacaract\IeC {\`e}re)|hyperpage}{89}

xindy's module texindy, which you use, knows about TeX macros and
(Continue reading)

Marc Baudoin | 9 Feb 2010 14:51

Re: Non-alphabetic characters sorting

Joachim Schrod <jschrod <at> acm.org> écrit :
> On Thu, Jan 21, 2010 at 10:30 AM, Marc Baudoin <babafou <at> babafou.eu.org> wrote:
> > Joachim Schrod <jschrod <at> acm.org> écrit :
> 
> >> > I'm writing a manual with a lot of non-alphabetic characters in
> >> > the index.  The way they are sorted seems a little strange.  For
> >> > instance, I have, in the default section of the index :
[...]
> 
> > \indexentry{$ (valeur d'une variable) <at> \intercom{\$} (valeur d'une variable)|hyperpage}{122}
> > \indexentry{$ (valeur d'une variable) <at> \intercom{\$} (valeur d'une variable)|hyperpage}{176}
> > \indexentry{$(( ... )) <at> \intercom{\$((} \ldots\ \intercom{))} (calcul entier)|hyperpage}{177}
> >
> > \indexentry{? (m\IeC {\'e}tacaract\IeC {\`e}re) <at> \path{?} (m\IeC {\'e}tacaract\IeC {\`e}re)|hyperpage}{89}
> 
> xindy's module texindy, which you use, knows about TeX macros and
> special characters, it processes them.
> In your index entries, you give explicit sort and print keys. (As the
> 4th example shows, that sort key still has TeX macros in them, this is
> typical.)
> 
> xindy ignores all characters that are TeX formatting chars, in your
> example it ignores $, #, and &. It also ignores most macros, e.g.,
> \IeC. \'e is known, this is the same as just e. Therefore your entries
> are processed as
> 
>   "$ (valeur d'une variable)"  ==> " (valeur d'une variable)"        %
> leading blank!!
>   "$(( ... ))" ==> "(( ... ))"
>   "? (m\IeC {\'e}tacaract\IeC {\`e}re)"  ==> "? (metacaractere)"
(Continue reading)

Joachim Schrod | 9 Feb 2010 21:20
Picon
Favicon

Re: Non-alphabetic characters sorting

Marc Baudoin writes:
> 
> Right.  The dollars are sorted correctly.  I didn't notice it
> before but the ? are not [...]
> Same problem as the exclamation point?

Yes, see my previous email about make-rules, that's the root cause.

> Thanks *a lot* for your help.  Documentation about xindy for
> beginners is very thin and I'm not enough accustomed to it to
> figure this out by myself...

I'm glad that I could help, even if it took some time. I'm also aware
cf. the documentation problem; but for this case better beginner's
documentation wouldn't have been of help anyhow. One had to look at
the merge and sort steps (that's done with the options
 -d level=1 -t log_file
and these options are documented in the man pages) and look what goes
wrong when.

Best,
	Joachim

--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Joachim Schrod			Email: jschrod <at> acm.org
xindy maintainer		http://www.xindy.org/
Roedermark, Germany

------------------------------------------------------------------------------
(Continue reading)


Gmane