[texhax] Long entries in index

Uwe Lueck uwe.lueck at web.de
Thu Jun 30 12:13:18 CEST 2011


"Heiko Oberdiek" <heiko.oberdiek at googlemail.com>
>On Thu, Jun 09, 2011 at 09:21:34PM +1000, Vafa Khalighi wrote:
>
>> Maybe you should add some hyphenation exception. Not sure if there is any
>> other way.
>
>> > \index{VeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVery long entry1}
>
> Or as example:
>     \index{VeryVery...LongSortKey at Very\-Very\-...Long\penalty0 LongKey}

I *guess* the primitive TeX behavior not to hyphenate the first word of a paragraph 
is the cause of the problem, and according to the LaTeX Companion this can be 
overcome by starting with \hspace{0pt}; either by 

    \index{VeryVery...@\hspace{0pt}VeryVery...}

or by a general hack of a macro invoked by \printindex (start printing each entry
with \hspace{0pt}).

Curious:

    Uwe.




More information about the texhax mailing list