From 6e046575ac2f0869ab75ccb09f883cb0064299ab Mon Sep 17 00:00:00 2001 From: GloamXun Date: Mon, 19 Oct 2026 22:54:25 +0800 Subject: [PATCH] Cover horizontal centering of the natural-width table --- tests/typeset.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/typeset.rs b/tests/typeset.rs index c6fec82..719e1b6 100644 --- a/tests/typeset.rs +++ b/tests/typeset.rs @@ -1204,6 +1204,15 @@ fn arxiv_table_rules_follow_a_narrow_centered_table() { (60.8..61.4).contains(&widest), "natural-width table should match the reference width (~61.2mm), got {widest:.2}mm" ); + let (x, width, _) = table_rules + .iter() + .max_by(|a, b| a.1.partial_cmp(&b.1).unwrap()) + .expect("the table has at least one rule"); + let center = x + width / 2.0; + assert!( + (center - 82.55).abs() < 1.0, + "table should be centred on the Letter page (expected 82.55mm), got {center:.2}mm" + ); } #[test]