You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Typst: theorem-appearance simple sets definitions, examples and exercises in italics (ignores theorem style) #15168
In Typst output, the default theorem appearance (theorem-appearance: simple) sets the body of every theorem-like environment in italics, including definitions, examples and exercises.
Quarto itself classifies these environments by style in theorem_types (e.g. exr = { env = "exercise", style = "definition", ... }, likewise def and exm), and the LaTeX output honours this via amsthm: definition-style environments are upright there. The Typst renderer ignores style; simple-theorem-render always wraps the body in emph(body):
So the same document gives an upright exercise in PDF (LaTeX) and an italic one in Typst. Everything inside the environment is affected, e.g. tables in an exercise end up italic as well.
Steps to reproduce
---title: Testformat:
typst: defaultpdf: default---
::: {#exr-a}
## Mean
Compute the mean of the following data.
| x | y ||---|---|| 1 | 2 |
:::
::: {#def-b}
A definition.
:::
Actual behavior
Typst: the bodies of the exercise (including the table) and of the definition are italic.
Expected behavior
Typst should follow the theorem style as the LaTeX output does: italic body for plain style (theorem, lemma, corollary, proposition, conjecture), upright body for definition (definition, example, exercise) and remark style.
A minimal approach would be to emit a second render function (or pass the style) for non-plain environments in ensure_typst_theorems, rendering body instead of emph(body).
Your environment
Quarto 1.10.19
macOS
Quarto check output
n/a – the behaviour is visible directly in src/resources/filters (ensure_typst_theorems).
Thanks for the clear report, I can reproduce it on main.
This is a follow-up to #14312, which was merged a few days ago. That PR moved the Typst theorem setup into modules/theorems.lua and gave ensure_simple_render a simple_style parameter, so proof, remark and solution now get an italic header and an upright body in the simple appearance. Theorems weren't part of that change: ensure_typst_theorems still passes simple_style = "theorem" for every type, so def, exm and exr keep the emph(body) they already had in 1.10.
if full-title != "" and full-title != auto and full-title != none {
strong[#full-title.]
h(0.5em)
}
emph(body)
parbreak()
}
]])
end
The fix could build on that parameter. ensure_typst_theorems could pass the style from theorem_types, and ensure_simple_render could get a definition branch with a bold title and an upright body, as amsthm does. Each style would also need its own renderer name, because all theorem frames currently share simple-theorem-render. The proof branch can't be reused as it is, since its header is italic.
Activity
mcanouil commentedon Oct 23, 2026
Thanks for the clear report, I can reproduce it on
main.This is a follow-up to #14312, which was merged a few days ago. That PR moved the Typst theorem setup into
modules/theorems.luaand gaveensure_simple_renderasimple_styleparameter, so proof, remark and solution now get an italic header and an upright body in thesimpleappearance. Theorems weren't part of that change:ensure_typst_theoremsstill passessimple_style = "theorem"for every type, sodef,exmandexrkeep theemph(body)they already had in 1.10.quarto-cli/src/resources/filters/customnodes/theorem.lua
Lines 101 to 120 in 69592e5
quarto-cli/src/resources/filters/modules/theorems.lua
Lines 56 to 86 in 69592e5
The fix could build on that parameter.
ensure_typst_theoremscould pass thestylefromtheorem_types, andensure_simple_rendercould get adefinitionbranch with a bold title and an upright body, as amsthm does. Each style would also need its own renderer name, because all theorem frames currently sharesimple-theorem-render. The proof branch can't be reused as it is, since its header is italic.tinh-assignments Typst: schlankes Template, Libertinus Serif, Aufgabe…
fix(typst): upright body for definition-style theorems (quarto-dev#15250