Introduction to Typst

Typst is a modern typesetting system, similar to LaTeX, but designed to be more concise and easier to learn. It is primarily used to create beautifully typeset documents such as academic papers, books, and reports.

You can find the official English documentation here: Typst Document
For a Chinese tutorial on Typst, I highly recommend: The Typst Blue Book
(Oh my, the author is clearly aware that they're explaining an ontology!).


Typst

🔥has risen!🔥




🚀Did the TeX folks miss the memo?🚀


The rest of this section will introduce Typst & HTML → Typsite

1 Typst’s HTML Export Feature

In version 0.13 0.13 , Typst added HTML export capabilities, including an html-export mode and two core functions: html.elem html.elem and html.frame html.frame — using these, we can write Typst documents targeting HTML+CSS output.

2 Typsite: A Static Site Generator Based on Typst

Inspired by this, I developed a static site generator in Rust called Typsite.

Currently, Typst’s HTML export:

  • Has good support for basic rich text
  • Requires users to manually write complex styles using the html.elem html.elem function
  • Cannot automatically convert all Typst ecosystem content into HTML
  • For content with complex Typst styles, html.frame html.frame can be used to convert them into SVG and embed them into HTML
  • Only supports single-file HTML output per compilation

For details on supported features and the roadmap, follow this issue: HTML export #5512

Although the official team plans to support automatic typst style → HTML+CSS in the future, this won’t conflict with Typsite. On the contrary, Typst’s development will make Typsite even more useful, because Typsite’s main role is to coordinate interaction between articles and ultimately build a fully functional static website.