I was experimenting with adding a page break penalty at the start of an @example, and some other display environments, because in material like:
If you want to remove a preinstalled AUC@TeX{} completely before any of
its modes have been used,
@example
(unload-feature 'tex-site)
@end example
should accomplish that.
it looks better if there's no page break before the example. I've made
a test file to show this.
I managed to add a penalty at the start of the environment, but I
don't understand why there was actually a bonus for a page break in
the existing code. In \aboveenvbreak there is:
% it's not a good place to break if the last penalty was \nobreak
% or better ...
\ifnum\lastpenalty<10000 \penalty-50 \fi
That \penalty-50 is a bonus. As far as I can tell that bonus has
always been there.
Any thoughts or guesses about whether it's a good idea, to discourage
or encourage page breaks before @examples?
I would guess that bonus is there to try to get an @example not to
span more than one page.
example-new-page.texi
Description: TeXInfo document
example-new-page.dvi
Description: TeX dvi file
