Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions news/changelog-1.9.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ All changes included in 1.9:
- Two-column layout now uses `set page(columns:)` instead of `columns()` function, fixing compatibility with landscape sections.
- Title block now properly spans both columns in multi-column layouts.
- ([#13870](https://github.com/quarto-dev/quarto-cli/issues/13870)): Add support for `alt` attribute on cross-referenced equations for improved accessibility. (author: @mcanouil)
- ([#13942](https://github.com/quarto-dev/quarto-cli/issues/13942)): Fix Typst compilation errors showing confusing internal stack traces. Users now see only the relevant Typst error message.
- ([#13950](https://github.com/quarto-dev/quarto-cli/pull/13950)): Replace ctheorems with theorion package for theorem environments. Add `theorem-appearance` option to control styling: `simple` (default, classic LaTeX style), `fancy` (colored boxes with brand colors), `clouds` (rounded backgrounds), or `rainbow` (colored start border and colored title).
- ([#13954](https://github.com/quarto-dev/quarto-cli/issues/13954)): Add support for Typst book projects via format extensions. Quarto now bundles the `orange-book` extension which provides a textbook-style format with chapter numbering, cross-references, and professional styling. Book projects with `format: typst` automatically use this extension.
- ([#13978](https://github.com/quarto-dev/quarto-cli/pull/13978)): Keep term and description together in definition lists to avoid breaking across pages. (author: @mcanouil)
Expand Down
4 changes: 2 additions & 2 deletions src/command/render/output-typst.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import {
kVariant,
} from "../../config/constants.ts";
import { error, warning } from "../../deno_ral/log.ts";
import { ErrorEx } from "../../core/lib/error.ts";
import { Format } from "../../config/types.ts";
import { writeFileToStdout } from "../../core/console.ts";
import { dirAndStem, expandPath } from "../../core/path.ts";
Expand Down Expand Up @@ -167,11 +168,10 @@ export function typstPdfOutputRecipe(
typstOptions,
);
if (!result.success) {
// Log the error so test framework can detect it via shouldError
if (result.stderr) {
error(result.stderr);
}
throw new Error("Typst compilation failed");
throw new ErrorEx("Error", "Typst compilation failed", false, false);
}

// Validate PDF against specified standards using verapdf (if available)
Expand Down
6 changes: 5 additions & 1 deletion tests/smoke/smoke-all.test.ts
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious, as there is no test associated with this change. What is the syntax that is enabled by this change?

Thanks

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This suppresses the stack trace when showing a Typst failure in a production (packaged) build.

It can’t be tested because we don’t currently do any significant testing of production builds, and the technique only works in production.

(As developers we’re used to stack traces, but at least in theory we shouldn’t be showing them for expected/known failures in prod. I don’t think we’re very good at this.)

Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,11 @@ function resolveTestSpecs(
verifyFns.push(verifyMap[key](outputFile.outputPath, ...value));
}
} else if (key === "printsMessage") {
verifyFns.push(verifyMap[key](value));
// Support both single object and array of printsMessage checks
const messages = Array.isArray(value) ? value : [value];
for (const msg of messages) {
verifyFns.push(verifyMap[key](msg));
}
} else if (key === "ensureEpubFileRegexMatches") {
// this ensure function is special because it takes an array of path + regex specifiers,
// so we should never use the spread operator
Expand Down
Loading