diff options
Diffstat (limited to 'crates/typst-cli/src')
| -rw-r--r-- | crates/typst-cli/src/compile.rs | 9 | ||||
| -rw-r--r-- | crates/typst-cli/src/query.rs | 4 |
2 files changed, 6 insertions, 7 deletions
diff --git a/crates/typst-cli/src/compile.rs b/crates/typst-cli/src/compile.rs index 74d818a5..c6d37ffe 100644 --- a/crates/typst-cli/src/compile.rs +++ b/crates/typst-cli/src/compile.rs @@ -12,8 +12,7 @@ use typst::diag::{ bail, At, Severity, SourceDiagnostic, SourceResult, StrResult, Warned, }; use typst::foundations::{Datetime, Smart}; -use typst::layout::{Frame, Page, PageRanges}; -use typst::model::Document; +use typst::layout::{Frame, Page, PageRanges, PagedDocument}; use typst::syntax::{FileId, Source, Span}; use typst::WorldExt; use typst_pdf::{PdfOptions, PdfStandards}; @@ -171,7 +170,7 @@ pub fn compile_once( /// Export into the target format. fn export( world: &mut SystemWorld, - document: &Document, + document: &PagedDocument, command: &CompileCommand, watching: bool, ) -> SourceResult<()> { @@ -189,7 +188,7 @@ fn export( } /// Export to a PDF. -fn export_pdf(document: &Document, command: &CompileCommand) -> SourceResult<()> { +fn export_pdf(document: &PagedDocument, command: &CompileCommand) -> SourceResult<()> { let options = PdfOptions { ident: Smart::Auto, timestamp: convert_datetime( @@ -229,7 +228,7 @@ enum ImageExportFormat { /// Export to one or multiple images. fn export_image( world: &mut SystemWorld, - document: &Document, + document: &PagedDocument, command: &CompileCommand, watching: bool, fmt: ImageExportFormat, diff --git a/crates/typst-cli/src/query.rs b/crates/typst-cli/src/query.rs index 90d99a5a..947a6485 100644 --- a/crates/typst-cli/src/query.rs +++ b/crates/typst-cli/src/query.rs @@ -3,7 +3,7 @@ use ecow::{eco_format, EcoString}; use serde::Serialize; use typst::diag::{bail, HintedStrResult, StrResult, Warned}; use typst::foundations::{Content, IntoValue, LocatableSelector, Scope}; -use typst::model::Document; +use typst::layout::PagedDocument; use typst::syntax::Span; use typst::World; use typst_eval::{eval_string, EvalMode}; @@ -53,7 +53,7 @@ pub fn query(command: &QueryCommand) -> HintedStrResult<()> { fn retrieve( world: &dyn World, command: &QueryCommand, - document: &Document, + document: &PagedDocument, ) -> HintedStrResult<Vec<Content>> { let selector = eval_string( &typst::ROUTINES, |
