From 87b6b6e44edff936c12ff87884c6f6f208d761ba Mon Sep 17 00:00:00 2001 From: GloamXun Date: Mon, 19 Oct 2026 18:00:24 +0800 Subject: [PATCH] Align preprint title top margin with TeX --- src/rust_typeset/pdf/layout.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/rust_typeset/pdf/layout.rs b/src/rust_typeset/pdf/layout.rs index 2e28aff..87af505 100644 --- a/src/rust_typeset/pdf/layout.rs +++ b/src/rust_typeset/pdf/layout.rs @@ -1688,13 +1688,15 @@ pub(super) fn build_positioned_pages( run.small_caps = true; } } + // TeX's \@toptitlebar sits a little above the generic text + // margin, so start the first rule in the title block higher. push_title_rule( &mut pages, &mut deferred, &mut cursor, page_breaks, page_goal, - top_skip, + top_skip.saturating_sub(millimeters_to_scaled(3.1)), max_depth, rule_width, rule_height,