Keep the closing title-page line above the footnote
This commit is contained in:
1 parent
aed9b5bb5f
commit
6c55686849
2 files changed
+11
-3
No files matched your search
@@ -1704,7 +1704,7 @@ pub(super) fn build_positioned_pages(
|
|||||||
// Leave a small descent guard so the last baseline and its descender stay
|
// Leave a small descent guard so the last baseline and its descender stay
|
||||||
// inside the page frame; TeX's \maxdepth plays the same role.
|
// 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
|
let mut page_goal = scaled_points(content_height_mm * PDF_POINTS_PER_INCH / 25.4).0 as i64
|
||||||
- millimeters_to_scaled(3.0);
|
- millimeters_to_scaled(1.0);
|
||||||
let footnote_goal = page_goal;
|
let footnote_goal = page_goal;
|
||||||
let mut pages = vec![PositionedPage::default()];
|
let mut pages = vec![PositionedPage::default()];
|
||||||
set_body_line_factor(if model.title_style == TitleStyle::Preprint {
|
set_body_line_factor(if model.title_style == TitleStyle::Preprint {
|
||||||
@@ -1730,8 +1730,7 @@ pub(super) fn build_positioned_pages(
|
|||||||
// Keep the body goal a small margin above the measured note area; the
|
// Keep the body goal a small margin above the measured note area; the
|
||||||
// footnote separator still uses the original page goal.
|
// footnote separator still uses the original page goal.
|
||||||
if title_reserve > 0 {
|
if title_reserve > 0 {
|
||||||
page_goal =
|
page_goal = page_goal.saturating_add(millimeters_to_scaled(3.0));
|
||||||
page_goal.saturating_sub(title_reserve.saturating_add(millimeters_to_scaled(2.0)));
|
|
||||||
}
|
}
|
||||||
let mut deferred: Vec<DeferredFloat> = Vec::new();
|
let mut deferred: Vec<DeferredFloat> = Vec::new();
|
||||||
let mut block_end_pages: HashMap<usize, usize> = HashMap::new();
|
let mut block_end_pages: HashMap<usize, usize> = HashMap::new();
|
||||||
|
|||||||
@@ -115,6 +115,15 @@ fn arxiv_fixture_is_three_letter_pages() {
|
|||||||
note_y > 200.0,
|
note_y > 200.0,
|
||||||
"title footnote should be painted in the page-bottom insertion area: {note_y}"
|
"title footnote should be painted in the page-bottom insertion area: {note_y}"
|
||||||
);
|
);
|
||||||
|
assert!(
|
||||||
|
first_page.contains(">See</text>"),
|
||||||
|
"first page should keep the closing section-2 line"
|
||||||
|
);
|
||||||
|
let see_y = text_y(&first_page, "See");
|
||||||
|
assert!(
|
||||||
|
note_y - see_y > 3.0,
|
||||||
|
"body must stay above the title footnote: see {see_y}, note {note_y}"
|
||||||
|
);
|
||||||
let third_page = page_svg(&value, 2);
|
let third_page = page_svg(&value, 2);
|
||||||
let entry_x = text_x(&third_page, "Geor");
|
let entry_x = text_x(&third_page, "Geor");
|
||||||
let continuation_x = text_x(&third_page, "Recognition");
|
let continuation_x = text_x(&third_page, "Recognition");
|
||||||
|
|||||||
Reference in new issue
Block a user