Skip to content

fix(typst): add rendering for proof, remark, and solution environments#14312

Open
mcanouil wants to merge 2 commits intoquarto-dev:mainfrom
mcanouil:fix/issue14290
Open

fix(typst): add rendering for proof, remark, and solution environments#14312
mcanouil wants to merge 2 commits intoquarto-dev:mainfrom
mcanouil:fix/issue14290

Conversation

@mcanouil
Copy link
Copy Markdown
Collaborator

@mcanouil mcanouil commented Apr 4, 2026

Fixes #14290.

The Proof renderer lacked a Typst-specific branch, so remark and solution environments fell through to the generic renderer producing #block[...] output that Typst cannot cross-reference.

Adds a Typst branch that generates theorion make-frame() calls with labels, matching how theorem environments already work.
Extracts shared theorion setup logic into common/theorems.lua to avoid duplication between theorem.lua and proof.lua.

The shared content was moved to a module to workaround the Lua bundle limit.

mcanouil added 2 commits April 4, 2026 17:21
…quarto-dev#14290)

The Proof renderer lacked a Typst-specific branch, causing remark and
solution environments to fall through to the generic renderer which
produces plain `#block[...]` output that Typst cannot cross-reference.

Add a Typst branch that generates proper theorion `make-frame()` calls
with labels, matching how theorem environments already work.
Extract shared theorion setup logic into `common/theorems.lua` to
avoid duplication between theorem.lua and proof.lua.

Closes quarto-dev#14290
…variable limit

The import()-based common/theorems.lua added locals to the main chunk
scope, pushing past Lua's 200-variable limit and breaking CI.
Move the logic to modules/theorems.lua loaded via require(), which runs
in its own scope.
@mcanouil mcanouil changed the title fix: add Typst rendering for proof, remark, and solution environments fix(typst): add rendering for proof, remark, and solution environments Apr 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot cross reference solution and remark environments in Typst

1 participant