[XeTeX] makeindex and active characters

Musa Furber musaf_spamtrap at runbox.com
Wed Sep 27 20:56:59 CEST 2006


On 27 Sep 2006, at 22:04, William Adams wrote:

> On Sep 27, 2006, at 1:40 PM, Musa Furber wrote:
>
>> After first defining my set of active char definitions like
>>
>> \newcommand{\oneEzeroC}{{\transfont\string Ḍ\normalfont 
>> \selectfont}}
>> \catcode"1E0C=\active \def^^^^1e0c{{\protect\oneEzeroC}}
>>
>> I create two macros, one to set up the active chars (a repeat of the
>> above) and another to de-activate them with
>>
>> \catcode"1E0C=11
>>
>> but then I'm still left with a lot of font garbage in the .idx.
>
> Okay, then try something this:
>
> \newcommand{\forminindex}[1]{\catcode"1E0C=11\index{#1}\catcode"1E0C=
> \active}
>
> adding catcodes to affect addition characters as necessary.


Given

"""
\newcommand{\oneEzeroC}{\protect{\transfont\string Ḍ\normalfont 
\selectfont}}
\catcode"1E0C=\active \def^^^^1e0c{{\protect\oneEzeroC}}

\newcommand{\forminindex}[1]{\catcode"1E0C=11\index{#1}\catcode"1E0C= 
\active}
"""

Calling \index{Ḍ}\forminindex{Ḍ} produces

"""
\indexentry{{\oneEzeroC }}{1}
\indexentry{{\oneEzeroC }}{1}
"""

What I have now gives acceptable results if I don't mind removing a  
few extra spaces in the .idx so that makeindex combines things  
correctly.

Regards,
Musa


More information about the XeTeX mailing list