Kamal Abdali k.abdali at acm.org
Wed Apr 25 16:50:23 CEST 2018

Thanks, Zdeněk. I found the problem and a solution for it discussed here:
https://tex.stackexchange.com/questions/263696/polyglossias-setotherlanguage-blocks-imakeindexs-indexprologue.
The solution did work for me.

Briefly, the problem is attributed to bidi's restoring the book definition
of the theindex environment for no apparent reason. The solution is to
insert the following lines between the \usepackage{imakeindex} and
\makeindex[intoc] lines:

% nullify bidi redefinition

% this should go after polyglossia and imakeidx have been loaded

\let\imakeidxtheindex\theindex

\let\imakeidxendtheindex\endtheindex

\AtBeginDocument{%

\let\theindex\imakeidxtheindex

\let\endtheindex\imakeidxendtheindex

}

Kamal Abdali

On Wed, Apr 25, 2018 at 4:25 AM, Zdenek Wagner <zdenek.wagner at gmail.com>
wrote:

> You have to redefine the header, it automatically inserts
> \chapter*{Index}. You have to remove the asterisk. I do not remember the
> details, I would have to search in the documentatin but it is written there.
>
>
> Zdeněk Wagner
> http://ttsm.icpf.cas.cz/team/wagner.shtml
> http://icebearsoft.euweb.cz
>
> 2018-04-24 23:09 GMT+02:00 Kamal Abdali <k.abdali at acm.org>:
>
>> lines in the preamble of a xelatex+polyglossia+bidi program:
>>
>> \usepackage[imakeidx]
>> \makeindex[intoc]
>>
>> My problem is that while the index does get produced it doesn’t get
>> listed in the TOC. The trouble can be reproduced in this small program:
>>
>> %%%%%%%%%%%%%%%%%%%
>> \documentclass{book}
>>
>> \usepackage{imakeidx}
>> \makeindex[intoc]
>>
>> \usepackage{polyglossia}
>> \usepackage{bidi}       %%%%%
>> \setmainlanguage{english}
>>
>> \title{Facts}
>> \author{Aleck}
>> \date{}
>>
>> \begin{document}
>> \maketitle
>> \tableofcontents
>> \chapter{Stars}
>> Sirius, the brightest star in the night sky, is actually a double star.
>> \index{Sirius}
>> \printindex
>> \end{document}
>> %%%%%%%%%%%%%%%%%%%%
>>
>> The above program produces the index without listing it in the TOC.
>> However, if you comment out the  \usepackage{bidi} line, the index IS
>> produced and listed in TOC as expected.
>>
>> Note that the above program doesn’t really need bidi as all of its output
>> text is in the Latin script. But I do need the bidi feature  in the actual
>> document that I need to process.
>>
>> Any help will be appreciated.
>>
>> Kamal Abdali
>>
>>
>>
>>
>> --------------------------------------------------
>> Subscriptions, Archive, and List information, etc.:
>>   http://tug.org/mailman/listinfo/xetex
>>
>>
>
>
>
> --------------------------------------------------
> Subscriptions, Archive, and List information, etc.:
>   http://tug.org/mailman/listinfo/xetex
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/xetex/attachments/20180425/dfa53ef7/attachment.html>