Typst is wonderful. I can’t wait to apply it to my actual papers. However, in my field, MS Word is still the most widely used format for both casual review among colleagues and final submission. To adopt Typst into my actual workflow, there must be a decent support for DOCX output.
Luckily, the good thing about using DOCX, the complexity of typesetting it is completely offloaded to the press. There’s NO need for outline, colors, cross referencing. In that regards, Acrobat’s (an many other tools’) support for PDF to DOCX already does a very great job (they even preserve all the cross referencing).
The only part that’s missing is math equations. So far, only pandoc correctly renders into Unicode math in Word. But pandoc’s support for Typst is very limited. Many basic functions are not supported (e.g. table stroke), and they will cause the conversion to fail. (I tried to contribute to Pandoc directly, but I’m very unfamiliar with Haskell, and the existing code base is still very basic)
There is a solution that I’m considering:
- Use some regex to extract math equations and some surrounding text from a document, and put all of them into a separate Typst file.
- Render this file to DOCX with Pandoc.
- Compile the original Typst source file to PDF with Typst.
- Convert this PDF into DOCX (I use Acrobat)
- Use Office Word MCP (model context protocol) to make LLMs merge these two DOCX files.
I’d like to hear some thoughts on converting Typst to Word, especially for academic papers submission. If this is helpful for many researchers adopting Typst, maybe the community should put more effort to it.
EDIT: LLMs will attempt to read the whole document as XML, which easily exeeds the token limit. Perhaps I can save XML to file system and use tools like grep for better extraction of the interested portion.
EDIT: The reason I wanted to use LLM is I don’t want to deal with Word XML at all. However, I realized that it’s very possible to operate on it directly. So here’s a new pipeline I’m proposing:
- Use a
show mathrule to add marker around all math content. - Use
typst-syntaxRust crate to extract all math, and put them into a separate file - Render raw file to PDF, then to DOCX; render the math reference file with Pandoc
- Use XLST ( XSL Transformations Language) to swap the proper math in.

