Reserve depth at the bottom of the page frame
This commit is contained in:
1 parent
71bd01c82c
commit
ff509c2d59
2 files changed
+7
-1
No files matched your search
@@ -73,6 +73,9 @@ the source changes; the SVG preview is refreshed per page.
|
|||||||
deterministic `2014a`/`2014b` suffixes for duplicate author-year entries,
|
deterministic `2014a`/`2014b` suffixes for duplicate author-year entries,
|
||||||
indents continuation lines (plainnat hanging style), and drops numeric
|
indents continuation lines (plainnat hanging style), and drops numeric
|
||||||
bibliography labels.
|
bibliography labels.
|
||||||
|
- Pagination: the positioned renderer reserves a 3 mm descent guard at the page
|
||||||
|
bottom (TeX `\maxdepth`) so the last baseline and its descender stay inside
|
||||||
|
the page frame.
|
||||||
- Live preview: paragraph cache, page-hash diffing, warm rebuilds in the low
|
- Live preview: paragraph cache, page-hash diffing, warm rebuilds in the low
|
||||||
milliseconds for small edits.
|
milliseconds for small edits.
|
||||||
|
|
||||||
|
|||||||
@@ -1623,7 +1623,10 @@ pub(super) fn build_positioned_pages(
|
|||||||
let max_depth = i64::from(scaled_points(ARTICLE_11PT_MAX_DEPTH_PT).0);
|
let max_depth = i64::from(scaled_points(ARTICLE_11PT_MAX_DEPTH_PT).0);
|
||||||
let paragraph_gap = (normal_line_height as f64 * 0.35).round() as i64;
|
let paragraph_gap = (normal_line_height as f64 * 0.35).round() as i64;
|
||||||
let heading_gap = (normal_line_height as f64 * 0.65).round() as i64;
|
let heading_gap = (normal_line_height as f64 * 0.65).round() as i64;
|
||||||
let page_goal = scaled_points(content_height_mm * PDF_POINTS_PER_INCH / 25.4).0 as i64;
|
// Leave a small descent guard so the last baseline and its descender stay
|
||||||
|
// inside the page frame; TeX's \maxdepth plays the same role.
|
||||||
|
let page_goal = scaled_points(content_height_mm * PDF_POINTS_PER_INCH / 25.4).0 as i64
|
||||||
|
- millimeters_to_scaled(3.0);
|
||||||
let mut pages = vec![PositionedPage::default()];
|
let mut pages = vec![PositionedPage::default()];
|
||||||
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();
|
||||||
|
|||||||
Reference in new issue
Block a user