Re: [NTG-context] Index entries messing up page breaks
Hans wrote: > can you try (test extensively): > > \def\dodoregister[#1]#2#3% > {\dogotopar{\dontleavehmode\doprocesspageregister[#1]{#2}{#3}}} Well, it has some problems, introducing vertical space in certain circumstances. Will try to work up a minimal, but two observations: 1. The extra vertical space tends to happen immediately before headings, which is probably immediately after a \par, suggesting that if we're already in vertical mode there is something creating a horizontal mode object here. 2. If I use \dontleavehmode\index{blah} in material that immediately follows a heading, and just \index{blah} everywhere else, everything appears to work well with no white-space issues and no headings at the bottom of the page. (I can only do 2. easily because I'm generating my code from XML, not writing directly in ConTeXt, so it's easy to put in a rule that makes the tag behave differently in different contexts. It's probably not a solution for anyone else.) Duncan ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Index entries messing up page breaks
Duncan Hothersall wrote: The manual suggests that you can put index calls between a \section heading and its first paragraph without worry, but for me it breaks the page-breaking mechanism, allowing the section title to end up at the bottom of a page like this: \starttext \section{Tufte} \dorecurse{4}{\input tufte \par} \section{Knuth} \index{Knuth} \input knuth \par \stoptext Is there any workaround/fix? can you try (test extensively): \def\dodoregister[#1]#2#3% {\dogotopar{\dontleavehmode\doprocesspageregister[#1]{#2}{#3}}} ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Index entries messing up page breaks
Hans Hagen wrote: Duncan Hothersall wrote: I find that the addition of \dontleavehmode fixes it. Is this safe to use in general? no, use \dontleavehmode instead ;-) ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Index entries messing up page breaks
Duncan Hothersall wrote: I said: Is there any workaround/fix? I find that the addition of \dontleavehmode fixes it. Is this safe to use in general? \starttext \section{Tufte} \dorecurse{4}{\input tufte \par} \section{Knuth} \dontleavehmode\index{knuth} \input knuth \par \stoptext no, use \dontleavehmode instead if you see a tex file on the web and wonder why the spacing is messed up ... it's probably because of abundant use of \leavemode (recent versions of pdftex provide \quitvmode which is equivalent to \dontleavehmode; taco wrote that patch a while ago) Hans ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Index entries messing up page breaks
I said: > Is there any workaround/fix? I find that the addition of \dontleavehmode fixes it. Is this safe to use in general? \starttext \section{Tufte} \dorecurse{4}{\input tufte \par} \section{Knuth} \dontleavehmode\index{knuth} \input knuth \par \stoptext Thanks, Duncan ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context