Introduction to Typst
Typst is a modern typesetting engine designed as a simpler alternative to LaTeX. It features a clean syntax, built-in styling, and fast compilation.
Why Typst?
- Faster than LaTeX — compiles in milliseconds
- Clean syntax — no
\begin{document}boilerplate - Built-in styling — headings, tables, figures are all first-class
- Powerful scripting — variables, loops, functions, and more
- Excellent typography — professional-quality output
Basic Typst Syntax
Text and Headings
typst
= Level 1 Heading
== Level 2 Heading
=== Level 3 Heading
This is a paragraph of text. Typst automatically handles line breaks and paragraph spacing.Emphasis
typst
*italic text*
_bold text_Lists
typst
- Unordered item 1
- Unordered item 2
+ Ordered item 1
+ Ordered item 2Tables
typst
#table(
columns: (auto, auto),
[Name], [Grade],
[Alice], [A],
[Bob], [B+],
)Images
typst
#image("assets/logo.png", width: 50%)Math
typst
$E = mc^2$
$x^2 + y^2 = z^2$Data Injection
In Better Reports, JSON data is injected into templates via sys.inputs:
typst
#let data = json.decode(sys.inputs.at("data"))
#let title = data.title
#let name = data.name
#let items = data.itemsResources
- Typst Documentation
- Typst Universe — packages and templates
- Typst Discord — community support