Complete syntax reference for LaTeX users switching to Typst. Side-by-side comparison of every command you need.
| LaTeX | Typst |
|---|---|
\documentclass{article} | #set page(paper: "us-letter") |
\section{Title} | = Title |
\subsection{Title} | == Title |
\subsubsection{Title} | === Title |
\paragraph{Title} | ==== Title |
\tableofcontents | #outline() |
\title{...} \maketitle | #align(center)[#text(size: 24pt)[Title]] |
| LaTeX | Typst |
|---|---|
\textbf{bold} | *bold* |
\textit{italic} | _italic_ |
\underline{text} | #underline[text] |
\texttt{code} | `code` |
\emph{emphasis} | _emphasis_ |
\textsc{SmallCaps} | #smallcaps[SmallCaps] |
{\small text} | #text(size: 0.8em)[text] |
{\large text} | #text(size: 1.2em)[text] |
| LaTeX | Typst |
|---|---|
$x^2$ | $x^2$ |
$x_i$ | $x_i$ |
$\frac{a}{b}$ | $a / b$ or $frac(a, b)$ |
$\sqrt{x}$ | $sqrt(x)$ |
$\sum_{i=1}^{n}$ | $sum_(i=1)^n$ |
$\int_a^b$ | $integral_a^b$ |
\begin{equation}...\end{equation} | $ ... $ (on own line) |
$\alpha, \beta, \gamma$ | $alpha, beta, gamma$ |
$\mathbf{x}$ | $bold(x)$ |
$\mathcal{L}$ | $cal(L)$ |
| LaTeX | Typst |
|---|---|
\begin{itemize}\item...\end{itemize} | - Item 1\n- Item 2 |
\begin{enumerate}\item...\end{enumerate} | + Item 1\n+ Item 2 |
\begin{description}\item[Term]...\end{description} | / Term: Description |
Nested lists with indentation | Nested with indentation |
| LaTeX | Typst |
|---|---|
\includegraphics[width=0.8\textwidth]{img.png} | #image("img.png", width: 80%) |
\begin{figure}...\caption{...}\end{figure} | #figure(image(...), caption: [...]) |
\label{fig:name} | <fig-name> |
\ref{fig:name} | @fig-name |
| LaTeX | Typst |
|---|---|
\begin{tabular}{|c|c|}...\end{tabular} | #table(columns: 2, ...) |
\hline | table.hline() |
\multicolumn{2}{c}{...} | table.cell(colspan: 2)[...] |
\begin{table}...\caption{...}\end{table} | #figure(table(...), caption: [...]) |
| LaTeX | Typst |
|---|---|
\cite{key} | @key |
\cite[p.~5]{key} | @key[p. 5] |
\citep{key} | @key |
\citet{key} | #cite(<key>, form: "prose") |
\bibliography{refs} | #bibliography("refs.bib") |
\bibliographystyle{plain} | #set bibliography(style: "ieee") |
| LaTeX | Typst |
|---|---|
\label{sec:intro} | <sec-intro> |
\ref{sec:intro} | @sec-intro |
\pageref{sec:intro} | (not built-in) |
\eqref{eq:name} | @eq-name |
| LaTeX | Typst |
|---|---|
\&, \%, \$, \# | &, %, $, # |
--- | --- |
-- | -- |
``quotes'' | "quotes" |
\ldots | ... |
~ | ~ |
\\ | \\ |
| LaTeX | Typst |
|---|---|
\textcolor{red}{text} | #text(fill: red)[text] |
\colorbox{yellow}{text} | #highlight[text] |
\definecolor{...} | #let mycolor = rgb("#ff0000") |
Typst uses # for functions instead of \ for commands
Most math syntax is the same: $x^2$, subscripts, Greek letters
= for h1, == for h2, etc. No \section{} needed
*bold*, _italic_ instead of \textbf{}, \textit{}
@key instead of \cite{key}
Functions take content in square brackets: #text[content]
Try our free converter to automatically transform your LaTeX documents to Typst.
Convert LaTeX to Typst