From 6f71414d69f24e75d5cb774e9ac9dcce9603f891 Mon Sep 17 00:00:00 2001 From: GloamXun Date: Mon, 19 Oct 2026 18:55:37 +0800 Subject: [PATCH] Tighten the title footnote reserve --- src/rust_typeset/pdf/layout.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/rust_typeset/pdf/layout.rs b/src/rust_typeset/pdf/layout.rs index d417358..ea41cbf 100644 --- a/src/rust_typeset/pdf/layout.rs +++ b/src/rust_typeset/pdf/layout.rs @@ -1727,10 +1727,11 @@ pub(super) fn build_positioned_pages( math_layout, cache, ); - // The measured note may wrap to one more line than the conservative - // estimate; reserve a full baseline of slack above the insertion area. + // Keep the body goal a small margin above the measured note area; the + // footnote separator still uses the original page goal. if title_reserve > 0 { - page_goal = page_goal.saturating_sub(title_reserve.saturating_add(normal_line_height)); + page_goal = + page_goal.saturating_sub(title_reserve.saturating_add(millimeters_to_scaled(2.0))); } let mut deferred: Vec = Vec::new(); let mut block_end_pages: HashMap = HashMap::new();