A few weeks ago I added preliminary support for Typst to knitr. The way it works is simple: if your file has the extension .Rtyp, knitr will recognize it as a Typst document, knit it, and produce a .typ output file. The chunk syntax follows the same Markdown-style fenced code block convention: {r}</code> to start a chunk and <code> to end it, with inline R expressions written as r expr. A minimal example (hello.Rtyp):

<c …