[XeTeX] xeindex bug. index entry mangles processing of section and chapter environments.
Michael Joyner
michael at newsrx.com
Tue Feb 15 19:03:57 CET 2011
On Mon, Feb 14, 2011 at 6:25 PM, Paul Isambert <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? :(
> 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.
>
> 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". :)
===SNIP====BAD=OUTPUT========
.sty)) (./000000234.out) (./000000234.out) [1]
! Missing } inserted.
<inserted text>
}
l.69 \subsection*{\underbar{Herpes Simplex Virus}}
?
! Emergency stop.
<inserted text>
}
l.69 \subsection*{\underbar{Herpes Simplex Virus}}
** WARNING ** Failed to convert input string to UTF16...
** WARNING ** Failed to convert input string to UTF16...
Output written on 000000234.pdf (1 page).
Transcript written on 000000234.log.
===SNIP====BAD=DOCUMENT=====
\documentclass[12pt,oneside,english]{book}
\usepackage{geometry}
\geometry{verbose,letterpaper,tmargin=1in,bmargin=1in,lmargin=0.75in,rmargin=0.75in}
\pagestyle{headings}
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}
\usepackage{makeidx}
\makeindex
\makeatletter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
\usepackage{tocloft}
\usepackage{fancyhdr}
\usepackage{ifpdf}
\usepackage[unicode=true, pdfusetitle,
bookmarks=true,bookmarksnumbered=false,bookmarksopen=true,bookmarksopenlevel=1,
breaklinks=true,pdfborder={0 0 0},backref=false,colorlinks=false]
{hyperref}
\renewcommand{\cftchapleader}{\cftdotfill{\cftsecdotsep}}
\cftsetindents{chapter}{0em}{3em}
\addtocontents{toc}
%\usepackage{tocbibind}
\usepackage{fontspec}
\usepackage{xunicode}
\usepackage{xltxtra}
\setmainfont{Century Schoolbook L}
%%not enough "save_memory" can be allocated unless you use the patched
version!
%\usepackage{xeindex}
%\IndexList{autoSpecials}{?®,?©}
%,?™} the ™ does not seem to index correctly as part of a word, only shows
up by itself
%index%\IndexList{autoIndex}{}
%\input{\jobname-inc-preamble} %include externally generated latex code for
the preamble
\usepackage{xeindex} %
\IndexList{xeindexList}
{
Virus
}
%add the index to the toc // done this way to try and make pdf bookmark
correct
\let\myIndex\theindex\renewcommand{\theindex}{\cleardoublepage\myIndex\phantomsection\addcontentsline{toc}{chapter}{\indexname}}
\usepackage{babel}
\makeatother
\begin{document}
\frontmatter
\thispagestyle{empty}
\pdfbookmark[1]{Title Page}{titlePage}
\title{Avian Influenza (Bird Flu) for the Healthcare
Professional\label{titlePage}}
\author{Published by: Inform Editions}
\date{02/15/2011}
\maketitle
\mainmatter
\begin{sloppy}
\subsection*{\underbar{Herpes Simplex Virus}}
\end{sloppy}
\printindex{}
\end{document}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/xetex/attachments/20110215/713b3515/attachment.html>
More information about the XeTeX
mailing list