-
Notifications
You must be signed in to change notification settings - Fork 751
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[tables] Avoid whitespace around float placement by disallowing float pages #7269
base: main
Are you sure you want to change the base?
Conversation
Have a look at the grammar immediately following the heading of 5.4 [lex.pptoken], that's now orphaned. Table 1 used to just be on a page of floats, didn't it? It's not that there's "unnecessary whitespace"; it's just that the float goes on its own page because there wasn't space to fit it on an existing page. I don't think that's particularly bad? |
I understand that the heading [lex.pptoken] is now separated from the rest of its contents, but that's independent of the issue. Since grammar definitions can't be split in the middle, LaTeX decides to split after the heading. If there were a way to force-prohibit splitting after a heading, I'd be all for it, but it seems there are two (!) entries in the TeX vertical list that allow splitting here (penalty=0), so there's not much of a chance to get that right. I wouldn't be surprised if the bnflist would add such an entry, because splitting in front of a chunk of grammar seems rather ok-ish. Pertinent data from
ISO/CS complained that the table was centered on the page of floats, as opposed to starting at the top. And there's still lots of whitespace on the page that could be filled by the text that follows; it's not that there would be more tables to come. So, why have a page of floats to start with? |
Ok, here is what happens with the stray page break in front of grammar snippets: We have our special "light-gray" coloring for grammar non-terminals. This causes the following on the vertical list (output from
Note the
|
Manually adding a penalty after the color setting "fixes" the issue:
|
@tkoeppe , I've attached a patch for the fix. |
That's great, thank you! |
The fix is great, and I've added that to the main branch. I'm not yet sure about the page-of-floats change; I'd be OK leaving that to the IS for the time being. |
As this seems relevant for the main branch, but not the pending IS, I would note that my attempt to reflow the whole of [lex] to follow the phases of translation happens to solve many of the problems with floating tables floating onto following page and into the wrong subsections: #7193 I have rebased and verified line-by-line that the copy/paste text of the reordering is identical to the current |
… pages This is particularly noticeable for Table 1 (basic character set).
This is particularly noticeable for Table 1 (basic character set).