At 09:35 AM 11/8/2002 -0600, you wrote:
This is perhaps more of a TeX question, and I'll take it to comp.text.tex next. But I encountered a problem when using \index in ConTeXt.
I had my doc formatted exactly the way I wanted. But after I added \index entries throughout, I found that the line-breaking of some paragraphs had changed. The text became "looser", not packing quite as densely. Small changes, but significant to my layout.
Experimentation showed that substituting "\strut" for "\index{...}" had the same effect. These should be invisible, and I don't see anything added, but the line-breaking is changed.
I'm reading Eijkhout's chapter on "Line Breaking" in "TeX by Topic" but am not sure how to interpret it. Have I introduced "glue preceded by a nondiscardable item"? Would that be less breakable than the simple space that was there before?
list enties, index entries, color changes, marks, etc all introduce nodes in the MVL. Since tex cannot look back when such a node is encountered, it will badly interfere with spacing. Some macros (like the heads) take care of this. Also, since you want an index on the page where you are, by default a nobreak is added, which also interferes with spacing. The solution is simple: attach the index entry to the word that it belongs to, so: \index{bla}this word Hans ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE | pragma@wxs.nl Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com ------------------------------------------------------------------------- information: http://www.pragma-ade.com/roadmap.pdf documentation: http://www.pragma-ade.com/showcase.pdf -------------------------------------------------------------------------