Keep body text clear of the title footnote area

This commit is contained in:
gloamxun committed 2026-10-19 18:51:25 +08:00
1 parent 247893282b
commit 8c07d3442e
2 files changed
+8 -3

No files matched your search

+1 -1
View File
@@ -80,7 +80,7 @@ the source changes; the SVG preview is refreshed per page.
bottom (TeX `\maxdepth`) so the last baseline and its descender stay inside
the page frame.
- Preprint title blocks reserve the title/author `\thanks` footnote height on
page one, use the arxiv class's 11 pt leading and reference title
page one plus one spare baseline; the body layout goal is reduced while the footnote area still paints from the unreduced page goal, so body text cannot cross the separator. Uses the arxiv class's 11 pt leading and reference title
gaps; table cells get a 1 mm render-area tolerance so bottom floats at the page
goal do not trip the frame check.
- Live preview: paragraph cache, page-hash diffing, warm rebuilds in the low
+7 -2
View File
@@ -1705,6 +1705,7 @@ pub(super) fn build_positioned_pages(
// inside the page frame; TeX's \maxdepth plays the same role.
let mut page_goal = scaled_points(content_height_mm * PDF_POINTS_PER_INCH / 25.4).0 as i64
- millimeters_to_scaled(3.0);
let footnote_goal = page_goal;
let mut pages = vec![PositionedPage::default()];
set_body_line_factor(if model.title_style == TitleStyle::Preprint {
1.1
@@ -1726,7 +1727,11 @@ pub(super) fn build_positioned_pages(
math_layout,
cache,
);
page_goal = page_goal.saturating_sub(title_reserve);
// The measured note may wrap to one more line than the conservative
// estimate; reserve a full baseline of slack above the insertion area.
if title_reserve > 0 {
page_goal = page_goal.saturating_sub(title_reserve.saturating_add(normal_line_height));
}
let mut deferred: Vec<DeferredFloat> = Vec::new();
let mut block_end_pages: HashMap<usize, usize> = HashMap::new();
let mut block_start_pages: HashMap<usize, usize> = HashMap::new();
@@ -3091,7 +3096,7 @@ pub(super) fn build_positioned_pages(
model,
&mut pages,
&block_end_pages,
page_goal,
footnote_goal,
content_width_mm,
metrics,
font_cache,