[XeTeX] xeindex bug. index entry mangles processing of section and chapter environments.

Paul Isambert zappathustra at free.fr
Tue Feb 15 19:52:34 CET 2011


Le 15/02/2011 19:03, Michael Joyner a écrit :
>
>
> On Mon, Feb 14, 2011 at 6:25 PM, Paul Isambert <zappathustra at free.fr 
> <mailto:zappathustra at free.fr>> wrote:
>
>
>     Nice, you've just discovered a bug in XeSearch. 
>
> Bleck. I don't consider it nice. Why am I the one always finding these 
> bugs that don't afflict other people? :(

Perhaps because XeSearch and XeIndex aren't widely used. (Not even by 
me, otherwise those bugs would have been fixed long ago. By the way, I 
don't use them not because I think they're bad, but because I've become 
a LuaTeX user in the meanwhile. I /thought/ they were good :) )

>     Basically, it builds an horizontal box; \section inserts a
>     vertical command (\vskip) at the end of its argument; but TeX
>     doesn't like vertical commands in horizontal boxes, hence the
>     complaining. This happens only when searching for phrases, not
>     simple words, because such things as \vskip are boundaries to
>     XeSearch, so it normally closes the box, but boundaries are
>     ignored when searching for phrases.
>
> Just ran into a case where it occurs for a single word. Please see 
> example document below.

Actually it's the same thing. XeSearch doesn't trim space around words, 
hence

\IndexList{xeindexList}
{
Virus
}

amounts to searching for " Virus " which, technically, is a phrase, not 
a word. Just remove spurious space:

\IndexList{xeindexList}
{%
Virus%
}


>
>     Right now I can only recommend stopping the search before the
>     section title and starting it again after. I know it's far from
>     satisfying, but I have to think about a better solution.
>
> Haven't quite figured out how to do that yet without changing lots of 
> stuff not directly related to the indexing so I was trying to index 
> just "words" and not "phrases". :)

XeIndex has a \NoIndex command, but I've just tested it, it won't work 
in \section. So you can surround the section title with XeaSearch's 
\StopSearching/\StartSearching, unless you have other operartions going 
on with XeSearch.

Best,
Paul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/xetex/attachments/20110215/aa8ed8a0/attachment-0001.html>


More information about the XeTeX mailing list