From b2a3d3f235fb5a23322435b854460f52db772114 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Wed, 23 Nov 2022 10:54:25 +0100 Subject: More general evaluation interface --- cli/src/main.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'cli/src') diff --git a/cli/src/main.rs b/cli/src/main.rs index 8030a82d..f7fd5903 100644 --- a/cli/src/main.rs +++ b/cli/src/main.rs @@ -235,10 +235,12 @@ fn typeset(command: TypesetCommand) -> StrResult<()> { /// Typeset a single time. fn typeset_once(world: &mut SystemWorld, command: &TypesetCommand) -> StrResult<()> { status(command, Status::Compiling).unwrap(); - world.reset(); + let main = world.resolve(&command.input).map_err(|err| err.to_string())?; - match typst::typeset(world, main) { + let source = world.source(main); + + match typst::typeset(world, source) { // Export the PDF. Ok(frames) => { let buffer = typst::export::pdf(&frames); -- cgit v1.2.3