Save the TeX cursor in native shipout order

This commit is contained in:
gloamxun committed 2026-11-21 04:27:06 +08:00
1 parent 555a029505
commit 413939911f
12 files changed
+173 -28

No files matched your search

@@ -252,6 +252,7 @@ pub enum OutputOperation {
shipout: bool,
tokens: Vec<Token>,
},
PdfSavePosition,
}
#[derive(Clone, Debug, PartialEq, Eq, Hash, serde::Serialize, serde::Deserialize)]
@@ -275,6 +276,10 @@ impl OutputNode {
)
}
pub(super) fn needs_shipout_position(&self) -> bool {
self.is_pdf_graphics() || matches!(self.operation, OutputOperation::PdfSavePosition)
}
pub(super) fn dimensions(&self) -> Option<(i64, i64, i64)> {
match &self.operation {
OutputOperation::PdfImage { image, .. } => Some(image.dimensions()),