Hi,
This midweek upload has something new. There has been some discussion
about footnotes and one thing I noticed when playing with some new
possibilities is that the stretch in topskip (we use a default amount
that long ago was derived from plain tex and is relative to the body
font size) influences the pagebreaks in relation to inserts (footnotes)
in a more significant way than one would expect.
I also noticed that this stretch component is one of the reasons why
sometimes a side float shape will carry over to a next page in spite of
there being room. This relates to \brokenpenalty.
At the end of this mail are some tests that demonstrate this. As a
consequence we now have a "ntop" parameter as well as a shaping related
penalty primitives (parameters):
\shapingpenaltiesmode"FF % set all (future) bits (currently 4)
\shapingpenalty\plushundred % don't go too high
which is currently not enabled by default but might be in upcoming
versions; this also depends on user feedback. It's a non intrusive
extension the LuaMetaTeX engine. I have this setting in my local
preferences file.
Hans
% test code (for Massimiliano and Hraban to play with)
\starttext
\showframe
% this is the current default behaviour; we have a topskip with
% quite some stretch and that stretch is taken into account
% when tex calculates the badness; watch the next page
\dorecurse{4}{
\bgroup
\shapingpenaltiesmode\zerocount
\showmakeup[penalty]
\placefigure[left]{}{}
\input tufte \par
\egroup
}
\page EMPTY \page
% the ntop is new and when >= 0 it is a multiplier for the number
% of lines stretch, here we have one line; watch the next page
\dorecurse{4}{
\bgroup
\shapingpenaltiesmode\zerocount
\setupinterlinespace[ntop=1]
\showmakeup[penalty]
\placefigure[left]{}{}
\input tufte \par
\egroup
}
\page EMPTY \page
% these shaping parameters will discourage a linebreak within a
% shape; the placement macro checked available space but that
% doesn't mean that there can be no linebreak
\dorecurse{4}{
\bgroup
\showmakeup[penalty]
\shapingpenaltiesmode"FF\relax
\shapingpenalty\plushundred
\placefigure[left]{}{}
\input tufte \par
\egroup
}
\page EMPTY \page
% the next pages show the effect of changed topskip on page breaks
% with footnotes
\dorecurse{10}{
[#1] \input tufte \footnote{\input{tufte}} \par
}
\page EMPTY \page
\setupinterlinespace[ntop=2]
\dorecurse{10}{
[#1] \input tufte \footnote{\input{tufte}} \par
}
\page EMPTY \page
\setupinterlinespace[ntop=0]
\dorecurse{10}{
[#1] \input tufte \footnote{\input{tufte}} \par
}
\stoptext
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________