Skip to content

feat(typst): pass callout kind and appearance to callout() - #15415

Open
mcanouil wants to merge 6 commits into
quarto-dev:mainfrom
mcanouil:feat/typst-callout-kind-15414
Open

mcanouil wants to merge 6 commits into
quarto-dev:mainfrom
mcanouil:feat/typst-callout-kind-15414

Conversation

@mcanouil

@mcanouil mcanouil commented Nov 22, 2026 •

Copy link
Copy Markdown
Collaborator

Description

In Typst output, callout() now receives the callout type as kind and the appearance as appearance, on both the basic and the cross-referenced paths.
A template or an extension that redefines callout() can then style each type without guessing from the colours, which breaks when _brand.yml changes them (#14092).

The Callout constructor turns minimal into simple with no icon, and the HTML, LaTeX and DOCX renderers rely on that.
The constructor now also keeps the original value, so appearance is "default", "simple" or "minimal" in Typst, and the other formats don't change.
A callout created with quarto.Callout() and no type gets kind: "none", the same value as a plain .callout div.

The default callout() in definitions.typ declares kind: "none", appearance: "default", the same values Quarto sends, and ignores them, so Quarto's own callouts look the same.
Typst rejects undeclared named arguments, so a callout() override without ..args will now fail.
The issue lists the extensions I found with such an override, and the changelog entry asks template authors to accept ..args.

The new smoke-all tests check the generated .typ for each type and appearance, a typeless callout from the Lua API, and an override that reads both values.

Closes #15414.

Checklist

I have (if applicable):

  • referenced the GitHub issue this PR closes
  • updated the appropriate changelog in the PR
  • ensured the present test suite passes
  • added new tests
  • created a separate documentation PR in Quarto's website repo and linked it to this PR

@mcanouil mcanouil added enhancement New feature or request callouts Issues with Callout Blocks. typst labels Nov 22, 2026
@mcanouil mcanouil self-assigned this Nov 22, 2026
@posit-snyk-bot

posit-snyk-bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Collaborator

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Open Source Security 0 0 0 0 0 issues
✅ Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@mcanouil
mcanouil marked this pull request as ready for review November 22, 2026 22:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

callouts Issues with Callout Blocks. enhancement New feature or request typst

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pass the callout type and appearance to the Typst callout() function

2 participants