diff --git a/crates/typst-layout/src/pages/finalize.rs b/crates/typst-layout/src/pages/finalize.rs index 3b570832a..8e99fda13 100644 --- a/crates/typst-layout/src/pages/finalize.rs +++ b/crates/typst-layout/src/pages/finalize.rs @@ -43,20 +43,20 @@ pub fn finalize( frame.push(Point::zero(), FrameItem::Tag(tag)); } - let bleed_start = Point::new(bleed.left, bleed.top); + let content_origin = Point::new(bleed.left, bleed.top); // Add the "before" marginals. The order in which we push things here is // important as it affects the relative ordering of introspectable elements // and thus how counters resolve. if let Some(background) = background { - frame.push_frame(bleed_start, background); + frame.push_frame(content_origin, background); } if let Some(header) = header { - frame.push_frame(bleed_start + Point::with_x(margin.left), header); + frame.push_frame(content_origin + Point::with_x(margin.left), header); } // Add the inner contents. - frame.push_frame(bleed_start + Point::new(margin.left, margin.top), inner); + frame.push_frame(content_origin + Point::new(margin.left, margin.top), inner); // Add the "after" marginals. if let Some(footer) = footer { @@ -64,7 +64,7 @@ pub fn finalize( frame.push_frame(Point::new(margin.left + bleed.left, y), footer); } if let Some(foreground) = foreground { - frame.push_frame(bleed_start + Point::zero(), foreground); + frame.push_frame(content_origin + Point::zero(), foreground); } // Apply counter updates from within the page to the manual page counter.