Guide
Typst vs LaTeX: syntax, speed and when to switch
We build editors for both: Lemma compiles LaTeX with XeTeX on Android, and Kern runs the Typst compiler on the same phones. This is the comparison we wish we had read first: the same document written both ways, what is genuinely better in each, and a straight answer on when switching is worth it.
The short version
- Typst is a modern typesetting language with readable markup, a real scripting language built in, clear error messages and near-instant incremental compiles.
- LaTeX is the forty-year standard: every journal and university template exists for it, its package ecosystem is enormous, and its output quality is the reference everyone else is measured against.
- For your own documents (notes, assignments, CVs, reports, slides, books you publish yourself), Typst is already the more pleasant tool. For submissions to venues that require LaTeX sources, or projects that depend on specific LaTeX packages, stay with LaTeX.
Where each comes from
TeX is Donald Knuth's typesetting engine from 1978; LaTeX is Leslie Lamport's macro layer on top of it, first released in the early 1980s. Everything in LaTeX, from section headings to tables, is a macro expanded by TeX, which explains both its power and its famously confusing error messages. Packages are distributed through CTAN, which hosts thousands of them.
Typst started as a research project in Berlin and became an open-source compiler written in Rust, released publicly in 2023. It was designed from scratch with a markup layer for writing and a functional scripting layer for logic, so styling and automation use one consistent language instead of macro expansion.
The same document, twice
A short report with a title, a heading, emphasis, a list, an equation and a figure reference. In LaTeX:
\documentclass[11pt]{article}
\usepackage{amsmath}
\usepackage{graphicx}
\title{Growth Report}
\author{A. Writer}
\begin{document}
\maketitle
\section{Results}
Revenue grew \emph{steadily}. Three drivers stood out:
\begin{itemize}
\item new customers,
\item lower churn,
\item higher prices.
\end{itemize}
The model is
\begin{equation}
y = \frac{a}{1 + e^{-k (t - t_0)}}
\label{eq:logistic}
\end{equation}
as shown in Figure~\ref{fig:growth}.
\begin{figure}[h]
\centering
\includegraphics[width=0.6\textwidth]{growth.png}
\caption{Monthly revenue.}
\label{fig:growth}
\end{figure}
\end{document}And in Typst:
#set document(title: "Growth Report", author: "A. Writer")
#set text(size: 11pt)
#set math.equation(numbering: "(1)")
#align(center, text(17pt)[*Growth Report*] + [\ A. Writer])
= Results
Revenue grew _steadily_. Three drivers stood out:
- new customers,
- lower churn,
- higher prices.
The model is
$ y = a / (1 + e^(-k (t - t_0))) $ <logistic>
as shown in @growth.
#figure(
image("growth.png", width: 60%),
caption: [Monthly revenue.],
) <growth>The differences that matter day to day are visible here. Typst uses lightweight markup for common things (= for headings, _ and * for emphasis, - for lists), maths written in a syntax close to how you would type it in plain text (a / (1 + e^(-k t)) becomes a fraction), and labels with <name> referenced as @name. LaTeX needs an environment for every structure and backslash commands for everything else, but every LaTeX user can read it, and every editor and journal understands it.
Styling: set rules and show rules
In LaTeX, changing how headings look means finding the right package (titlesec, for example) or redefining internal macros. In Typst, styling is part of the language: set rules change defaults for an element, and show rules transform how an element is displayed.
// Every heading in the brand colour and numbered "1.1"
#set heading(numbering: "1.1")
#show heading: set text(fill: rgb("#1d4ed8"))
// Every occurrence of a word rendered in small caps
#show "Typst": smallcaps
// Page setup in one line
#set page(paper: "a4", margin: 2cm, numbering: "1")Functions, loops and conditionals use the same syntax, so a template that generates a table from data, or a CV that hides a section when it is empty, is ordinary code rather than macro trickery.
Compile speed and errors
Typst compiles incrementally: after an edit, it recomputes only what changed. On a typical multi-page document, the preview updates in milliseconds, which is what makes a live preview feel instant, including on a phone. LaTeX recompiles the whole document every time, often more than once to resolve references and bibliographies, so a long thesis can take several seconds or more per build.
Errors are the other daily difference. Typst reports an error at the exact span in your source with a plain-language message. A LaTeX error can surface lines away from its cause, in terms of the macro that failed rather than the command you wrote.
Packages and ecosystem
This is LaTeX's decisive advantage. CTAN carries mature packages for almost anything: chemistry (mhchem), circuit diagrams (circuitikz), music, linguistics glosses, every bibliography style a journal has ever demanded, and TikZ for programmatic graphics. Typst's package registry, Typst Universe, is growing quickly and already covers the common needs (diagrams with cetz, slides, CV and thesis templates, code listings), but niche fields may not find their package yet.
Packages in Typst are imported by name and version in the document itself, and downloaded on first use:
#import "@preview/cetz:0.3.1": canvas, draw
// pin the version you tested; newer versions may change the APIBibliographies work in both. Typst reads BibTeX .bib files directly and also supports its own YAML format, with citation styles based on CSL, so an existing reference library carries over.
Side by side
| LaTeX | Typst | |
|---|---|---|
| Markup | Backslash commands and environments | Lightweight markup plus a scripting language |
| Maths | The standard; amsmath for everything | Simpler syntax; covers almost all common notation |
| Compile time | Full rebuilds, often multiple passes | Incremental, typically milliseconds |
| Error messages | Often far from the cause | Precise location, readable |
| Packages | Thousands on CTAN, decades of coverage | Typst Universe, younger and growing |
| Journal submissions | Accepted almost everywhere | Rarely accepted as source |
| Collaboration | Overleaf and every LaTeX tool | typst.app, local editors, Git |
| Output to Word / HTML | Through Pandoc | PDF, PNG and SVG; Pandoc reads Typst |
Moving a document from LaTeX to Typst
Small documents are easiest to rewrite by hand, which takes minutes once you know the markup. For longer ones, Pandoc converts LaTeX to Typst (pandoc report.tex -o report.typ) and handles text, headings, lists, emphasis, most maths and tables. Custom macros and package-specific environments do not convert and need rewriting as Typst functions. Kern includes an importer that does the same first pass on a phone.
Should you switch?
- Switch if you write your own notes, assignments, reports, CVs or books, want a live preview, or have ever lost an afternoon to a LaTeX error message.
- Switch if you generate documents from data, such as invoices, certificates or reports, because Typst's scripting makes templates straightforward.
- Stay with LaTeX if your journal, conference or university requires LaTeX source, if your co-authors work in LaTeX, or if you rely on a package Typst does not have yet.
- Learn both if you are in academia: write drafts and personal work in Typst and keep LaTeX for final submissions until your venues accept Typst.
Whichever you pick, the deciding question is where the document has to end up, not which syntax is nicer. If you are on LaTeX, the next useful choice is the engine: see XeLaTeX vs pdfLaTeX vs LuaLaTeX.