Cover horizontal centering of the natural-width table
This commit is contained in:
1 parent
9b367e87ee
commit
6e046575ac
1 file changed
+9
@@ -1204,6 +1204,15 @@ fn arxiv_table_rules_follow_a_narrow_centered_table() {
|
|||||||
(60.8..61.4).contains(&widest),
|
(60.8..61.4).contains(&widest),
|
||||||
"natural-width table should match the reference width (~61.2mm), got {widest:.2}mm"
|
"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]
|
#[test]
|
||||||
|
|||||||
Reference in new issue
Block a user