Changelog
What changed, and when.
Every released version of the typst-render extension, and what each one changed.
0
0.21
0.21.0 (2026-08-02)
Breaking Changes
- feat:
output-directorynow defaults to./assets/typst-render, resolved relative to the document, instead of being unset. Compiled images are written into the project rather than kept only in the render cache under.quarto/, which a website does not copy to its output directory and therefore cannot serve once deployed. Setoutput-directory: ""to restore the previous behaviour. - fix: images named from a label or a block counter are written to a subdirectory of
output-directorynamed after the document. Two documents in one directory both producedtypst-block-1, so whichever rendered last overwrote the other’s image and one of the pages showed the wrong figure. An explicitoutput-filenameis unaffected.
New Features
- feat: inline
{typst}expressions honouroutput-directoryandoutput-source, writingtypst-inline-<N>files alongside the images compiled from blocks. - feat: inline
{typst}expressions accept the compilation options as attributes:format,dpi,background,foreground,cache,classes,preamble, andinput, as in`{typst} $x$`{format="png" dpi="300"}. - feat: an inline expression with both a
lightand adarkcolour is compiled for each mode in HTML output and emitted with Quarto’slight-contentanddark-contentclasses, as blocks already were.
Bug Fixes
- fix: an inline expression with
output: asiswas emitted as raw Typst for every writer, so it vanished from HTML, LaTeX, and DOCX output. Only Typst output passes it through now; the others compile an image, as they do for a block. - fix: an inline expression with
output: asisis scoped in#[ ... ]and gets the colour bindings, thetypst_definevalues, and thepreamblethat blocks get. A#letor#setinside it no longer leaks into the rest of the document, and the preamble is finally in scope. - fix: inline expressions honour
evalandinclude.eval: falseleaves the expression as inline code, andinclude: falsecompiles and writes the image without embedding it. - fix: inline expressions warn about the PDF-to-PNG fallback in HTML output and about dual colours under
format: html, and a failed compilation now leaves atypst-render-errormarker in the text instead of the original code.
0.20
0.20.1 (2026-08-01)
Documentation
- docs: Add a documentation website under
docs/, built on theatelierproject type and published to https://m.canouil.dev/quarto-typst-render/, compiling its figures with the extension itself. - docs: Record that a document containing
{typst}blocks needsengine: markdown, since Quarto’s engine detection otherwise selects Jupyter and the render fails for want of a kernel. - docs: Record that
code-windowclaims{typst}blocks atpre-quartoand prevents this filter from ever seeing them. - docs: Trim
README.mdto a landing page pointing at the website. - docs: Add the Pages workflow, which renders
docs/on pull requests and deploys it from the release tag. - docs: Add the Quarto Extensions Updates workflow, scanning
docsfor the website’s own dependencies.
0.20.0 (2026-07-27)
Breaking Changes
- chore: require Quarto >= 1.10.18, which bundles Typst 0.15. Native HTML output (
format: html) andmath: typstnow work with the bundled Typst binary, so theQUARTO_TYPSTenvironment variable is no longer needed for early access.
0.19
0.19.0 (2026-06-18)
New Features
- feat: add a
code-line-numbersoption for echoed Typst source.
0.18
0.18.0 (2026-06-17)
New Features
- feat: add a
htmlvalue forformatthat renders{typst}blocks and inline expressions as native HTML for HTML-based output, using Typst 0.15 HTML export. Maths become accessible MathML and prose becomes selectable semantic HTML instead of an image. It requires a Typst >= 0.15 binary viaQUARTO_TYPSTand falls back to SVG otherwise; content that relies on layout must be wrapped in Typst’shtml.frame. - feat: add a global
math: typstoption that renders every document equation ($...$and$$...$$) as Typst math syntax rather than LaTeX. HTML output gets native MathML and Typst output passes the maths through unchanged, while Quarto equation numbering and@eq-cross-references keep working. Reference the extension by name without anat:stage so its filters run where they are needed.
0.17
0.17.0 (2026-05-31)
New Features
- feat: add
output-sourceoption that writes the compiled Typst source (preamble plus colour bindings plus user code) next to each saved image, using the same stem with a.typextension. Set globally or per block; requiresoutput-directoryoroutput-filenameto take effect. Dual-mode renders write-light.typand-dark.typnext to the image variants.
Bug Fixes
- fix: prevent colour double-wrap when a per-block
backgroundorforegroundvalue is already a Typst-native constructor such asrgb("#fff")orhsl("..."). The previous logic wrapped any string starting withrgb(orhsl(, producing invalidrgb("rgb("#fff")")literals. CSS functional notation (rgb(255, 0, 0),hsl(120, 50%, 50%)) without quoted arguments is still wrapped so Typst’s string-formrgb()constructor can parse it.
Documentation
- docs: explain in the PPTX-inline warning why inline Typst is unsupported (Pandoc cannot embed images inside text runs in PPTX slides) while block-level
{typst}blocks continue to work.
0.16
0.16.0 (2026-05-27)
New Features
- feat: support Quarto code annotations on echoed Typst source. With
echo: true,// <N>markers on Typst source lines plus a following numbered list render as linked code annotations, composing withcode-fold. Otherechovalues (false,fenced) strip the markers and ignore annotations.
0.15
0.15.0 (2026-05-25)
New Features
- feat: add
code-foldandcode-summaryoptions for echoed Typst source. For HTML-based output,code-fold: true(orshowto render expanded) collapses only the echoed code in a<details>block, withcode-summarysetting the disclosure text (defaults toCode, rendered as Markdown). The rendered output stays outside the fold, and the options are ignored for non-HTML formats.
0.14
0.14.0 (2026-05-24)
New Features
- feat: compilation failure warnings and error blocks now name the failing unit, using its
labelwhen set, otherwise an auto identifier (typst-block-Nfor blocks,typst-inline-Nfor inline expressions) whereNis stable per unit.
Refactoring
- refactor: drop the redundant
Error running .../typst (error code N)log line on compilation failure; the Typst CLI already prints its diagnostic to the terminal.
0.13
0.13.4 (2026-05-23)
- fix: the default Typst compilation
rootis now the document’s own directory instead of the Quarto project directory, so document-relative paths such ascsv("data/energy_cleaned.csv")resolve against the document. A relativerootresolves against the document directory; a leading/still means the project root.
0.13.3 (2026-05-23)
- fix:
include: falsenow compiles the block and writes output files (matching Quarto semantics) while embedding nothing in the document, instead of skipping compilation entirely. Useeval: falseto skip computation.
0.13.2 (2026-05-23)
Bug Fixes
- fix: the
alt(and<prefix>-alt) cell option was not propagated to the rendered image when the block carried a cross-reference label. The alt text lived only in the image caption inlines, which Quarto’s figure pipeline discards once the image is wrapped in aFloatRefTarget. The alt text is now also emitted as afig-altattribute on the image, so it reaches the<img alt>(HTML),\includegraphics[alt=...](LaTeX), andimage(alt: ...)(Typst) outputs.
0.13.1 (2026-05-14)
- no user-facing changes.
0.13.0 (2026-05-14)
New Features
- feat: add
typst_define()helpers (R and Python) that push named values from a knitr or jupyter session into every{typst}cell of the document. Defined values are exposed as a single dict namedtypst_defineaccessible as#typst_define.<name>. Supports scalars, strings, booleans, arrays, nested objects, R data frames (column-wise), pandas/polars DataFrames (column-wise), and numpy arrays. Helpers ship under_extensions/typst-render/_resources/. The data chunk that callstypst_define()must use the chunk optionoutput: asisso the emitted metadata block is not wrapped in a cell-output<div>. - feat: the R helper registers a passthrough knitr engine for
typston source so```{typst}chunks in knitr documents no longer emit “Unknown language engine” warnings and pass through cleanly to the typst-render filter.
0.12
0.12.2 (2026-05-11)
Bug Fixes
- fix: inline Typst expressions written with the backtick text-prefix syntax (
`{typst} ...`) were not compiled to images; the matcher looked for a literal{typst}prefix instead of{typst}, so the expression was always emitted verbatim.
0.12.1 (2026-05-07)
Bug Fixes
- fix: strip the surrounding braces from the echoed code block class so
echo: trueproduces atypstclass (instead of{typst}) andecho: fencedproduces a```{typst}wrapper (instead of```{typst}), restoring syntax highlighting on the echoed source.
0.12.0 (2026-04-22)
New Features
- feat: the cache is now invalidated when any global or per-block rendering option changes, including
font-path,package-path, androotwhich previously only affected the Typst CLI invocation and were invisible to the cache key. - feat: the cache is now invalidated when any locally-imported Typst file changes;
#importand#includepaths are scanned from the compiled source (code and inlined preamble) and their contents are included in the cache hash, recursively. - feat: document colours are exposed to Typst library and package code via
sys.inputs(typst-render-foreground,typst-render-background) and as#letbindings (_typst_render_foreground,_typst_render_background), allowing imported theme functions to adapt to the document’s colour scheme. Only hex colours are exposed viasys.inputs; all colour formats are available via the#letbindings.
Removed
- revert: library fingerprint (scanning
lib.typandsrc/under the project root) introduced in 0.11.0 has been replaced by generic import tracking via#import/#includescanning.
Breaking Changes
- refactor: replace
cache: cleanwith a dedicatedcache-refreshboolean option (defaultfalse). Setcache-refresh: trueto remove stale cache files after each render. - refactor:
cache: falseno longer deletes existing cache files on startup; it now only skips cache lookup and write for the current render.
0.11
0.11.0 (2026-04-21)
New Features
- feat: add library fingerprint to cache key so edits to
.typsource files under the project root invalidate stale rendered images. - feat: expose document colours to Typst library theme functions via
sys.inputs(typst-render-foreground,typst-render-background), allowing imported files to adapt to the document theme.
0.10
0.10.1 (2026-04-18)
Bug Fixes
- fix: prevent double-wrapping of resolved brand colours when
background: autoorforeground: autois set globally with a_brand.yml.
0.10.0 (2026-04-15)
New Features
- feat: add
output-directoryandoutput-filenameoptions to save compiled images to user-specified locations.
0.9
0.9.3 (2026-04-15)
Bug Fixes
- fix: update the Typst language declaration to use curly braces (‘{typst}’) for CodeBlock.
0.9.2 (2026-04-15)
Bug Fixes
- fix: resolve cache image paths relative to document directory for subdirectory rendering.
0.9.1 (2026-04-09)
Bug Fixes
- fix: Use numeric type for
dpioption instead of string.
0.9.0 (2026-03-23)
Refactoring
- refactor: Replace monolithic
utils.luawith focused modules (string.lua,logging.lua,metadata.lua,pandoc-helpers.lua,html.lua,paths.lua,colour.lua).
0.8
0.8.0 (2026-03-18)
- feat: add
foregroundoption to set text fill colour for rendered images. - feat: add brand/theme-aware colour support for
foregroundandbackground. Both options now accept Typst colour literals, CSS hex strings (auto-converted),auto(reads from_brand.yml), or a{light, dark}map for theme-aware rendering. HTML/Reveal.js outputs render both variants using Quarto’s.light-content/.dark-contentclasses; other formats usebrand-modeto select one variant. - feat: add
alignoption for horizontal image alignment (left,center,right,default). - feat: support multiple preamble files via a list of strings or
.typpaths. - feat: surface Typst stderr in compilation error output for easier debugging.
- fix: prevent nil-defaulted options (
format,file,input,classes,label,align, etc.) from leaking as HTML attributes on output images. - fix: resolve table-valued colours for inline code to avoid runtime crashes with dual-mode global config.
- fix: escape image path in inline HTML image
srcattribute. - fix: warn when global
inputoption is not a YAML map. - fix: warn when comment-pipe options appear after code instead of silently ignoring them.
- refactor: remove redundant
get_extension_configcall. - docs: annotate global-only options in schema descriptions.
0.7
0.7.0 (2026-03-12)
- feat: add alt text accessibility for block and inline rendered images. Block images fall back to caption, then truncated source code, instead of empty alt text. Inline images use the Typst source code as alt text instead of a generic string. Users can provide explicit alt text on inline code via
`{typst} ..`{alt="..."}.
0.6
0.6.1 (2026-03-11)
- fix: support inline Typst rendering in DOCX output with proper text-height sizing.
- fix: skip inline Typst for PowerPoint output with a warning (Pandoc limitation).
- fix: add generic
pandoc.Imagefallback for inline Typst in non-HTML formats.
0.6.0 (2026-03-11)
- feat: add inline Typst rendering support for
`{typst} ...`expressions, compiled to images sized to match surrounding text. - feat!: compile to image by default for Typst output (breaking change). The
outputoption now acceptstrue,false, orasis. Useoutput: asisfor native Typst passthrough (previously the default).
0.5
0.5.0 (2026-03-10)
- feat: add
rootoption to set the Typst compilation root directory (--root). - feat: add
font-pathoption to specify additional font directories (--font-path). - feat: add
inputoption to pass key-value pairs to Typst via--input(accessible viasys.inputs). - feat: add
package-pathoption to specify a local Typst package directory (--package-path). - feat:
font-pathnow accepts a list of paths for multiple font directories. - feat: add
cache: cleanmode to remove stale cache files after each render. - feat: add multi-page output support with
pagesandlayout-ncoloptions. - refactor: use per-document cache subdirectories under
.quarto/typst-render/<doc-stem>/. - refactor: use stdin instead of temporary files for Typst compilation.
0.4
0.4.0 (2026-03-09)
- feat: add
classesoption for CSS classes on output image elements. - feat: add
img-fluidclass by default for responsive images in HTML output. - feat: forward unknown code-cell options as HTML attributes on the output image element.
0.3
0.3.0 (2026-03-09)
New Features
- feat: add
output-locationsupport for Reveal.js presentations (fragment, slide, column, column-fragment). - feat: adopt Quarto “/” path convention for project-root-relative file paths (#13).
- feat: add
includeandoutputoptions to control block visibility and compilation. - feat: add prefix-aware option resolution (
cap,alt,align) tocode-cellmodule.
Refactoring
- refactor: move cross-referencing logic (
ref_type,resolve_caption,resolve_alt,wrap_crossref) tocode-cellmodule. - refactor: use
quarto.format.*API for output format detection (#4). - refactor: use
pandoc.path.join()for path construction (#5). - refactor: use
quarto.utils.string_to_inlines()for caption parsing (#6). - refactor: simplify
resolve_typst_bin()by removingpcallwrapper (#7). - refactor: inline format validation and remove
validationmodule dependency (#8). - refactor: use
pandoc.utils.stringifydirectly (#9). - refactor: remove unused
validationmodule (#11).
0.2
0.2.0 (2026-03-08)
- refactor: use explicit
--formatflag fortypst compilecommand.
0.1
0.1.0 (2026-03-08)
- feat: initialise typst-render extension.