New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve automatic widow/club control #1752
Comments
I've tried \nopagebreak in the definitions of \itemdecl and \itemdescr, but to no avail (i.e. no effect shows up). It appears I can relax the page break penalty before \itemdecl, but that just causes lone headings. And the end of the \lstnewenvironment seems particularly hostile to adding a \nopagebreak. Ah, suggesting a \pagebreak at the end of an \itemdescr seems to do some good. |
Re: suggesting a \pagebreak at the end of an \itemdescr seems to do some good Not so, it just makes index entries have off-by-one errors in the page number, apparently when the \itemdecl is preceded by \index stuff. |
After some further experimentation, it seems we should enable \raggedbottom. For example, \itemdescr uses the indenthelper environment, which seems to have nearly zero stretchable vertical space. (I'm actually wondering why we're using that particular path to indent an area of text.) My theory is that with zero vertical stretchable space, we often run into the situation that there are several page break scenarios that are all infinitely bad, so TeX picks a random scenario (which could mean a lone section heading at the bottom of a page). @tkoeppe: Any opinions on \raggedbottom? |
https://tex.stackexchange.com/questions/35933/indenting-a-whole-paragraph |
@jensmaurer: I thought raggedbottom is the default. What are we currently using? |
@tkoeppe: There is no explicit \raggedbottom or \flushbottom in the source. |
Strongly discourage breaking between itemdecl and itemdescr. Mildly discourage breaking before an itemized list. Add stretchable vertical space between paragraphs and before listings. Allow substantial whitespace at the end of a page. Fixes cplusplus#1752.
It appears we need to allow a bit of vertical stretching between paragraphs: |
Strongly discourage breaking between itemdecl and itemdescr. Mildly discourage breaking before an itemized list. Add stretchable vertical space between paragraphs and before listings. Allow substantial whitespace at the end of a page. Fixes cplusplus#1752.
Specifically, we seem to have orphaned headings (
\rSec
s) and orphaned\itemdecl
s that we should prevent automatically. I think we should generally never have a page break between an\itemdecl
and its associated\itemdescr
(though I could be persuaded to tolerate a page break within a long\itemdecl
containing multiple declarations).The headings are even more confusing; currently it seems that LaTeX sometimes really wants to keep a few lines of the preceding parapgraph together with a heading, and only a manual
\newpage
achieves the appropriate break.We should revise or add appropriate penalties to make this work.
The text was updated successfully, but these errors were encountered: