Defer bottom floats like TeX page building
This commit is contained in:
1 parent
17638996a1
commit
4dd28b3aa7
6 files changed
+66
-34
No files matched your search
@@ -1007,12 +1007,10 @@ fn top_floats_reserve_page_space_like_pdftex() {
|
||||
|
||||
/// A `[b]` float reserves its height plus `\textfloatsep` at the page bottom;
|
||||
/// the body must stop earlier on exactly the pages pdfLaTeX chooses.
|
||||
#[test]
|
||||
fn bottom_floats_reserve_page_space_like_pdftex() {
|
||||
fn bottom_float_pages(float_at: usize) {
|
||||
let paragraphs: Vec<String> = (0..80)
|
||||
.map(|index| format!("p{index} alpha beta gamma"))
|
||||
.collect();
|
||||
let float_at = 2_usize;
|
||||
let mut body = String::new();
|
||||
for (index, paragraph) in paragraphs.iter().enumerate() {
|
||||
body.push_str(paragraph);
|
||||
@@ -1076,6 +1074,16 @@ fn bottom_floats_reserve_page_space_like_pdftex() {
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn bottom_floats_reserve_page_space_like_pdftex() {
|
||||
bottom_float_pages(2);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn late_bottom_floats_defer_like_pdftex() {
|
||||
bottom_float_pages(40);
|
||||
}
|
||||
|
||||
/// `\footnotetext` raises insertion material that is reserved at the page
|
||||
/// bottom. With slack on each page, the body breaks and per-page body text
|
||||
/// must stay in step with pdfLaTeX even though the note text is not compared.
|
||||
|
||||
Reference in new issue
Block a user