in progress

Over the past 40 years, LaTeX has accumulated a vast ecosystem of programs and documentation, solidifying its position as the de facto standard for typesetting in academia and publishing. Few would dispute that it is a great project. However, while no system is without its flaws, could it be time to explore something new? Consider, for instance, the younger contender: Typst. That said, this post is intended for readers already familiar with LaTeX. If someone has never touched LaTeX or Typst and feels unsure where to begin, my advice is to start with LaTeX.

Migration

Guide for LaTeX users – Typst Documentation

Based on the official Typst documentation, the following shows some common markup commands used in LaTeX and their Typst equivalents.

ElementLaTeX with additional packagesTypst
Sections\part{}, \chapter{}, \section{}, \subsection{}, \subsubsection{}#set heading(numbering:"1.A.a.i.*")
= , == , === , ==== , =====
Non-counting Sections\part*{}, \chapter*{}, \section*{}, \subsection*{}, \subsubsection*{}= , == , === , ==== , =====
Strong Emphasis\textbf{}, \mathbf{}* *, #strong[]
Italic\textit{}#text(style:"italic")[]
Emphasis\emph{}_ _, #emph[]
Monospace\texttt{}, \verb||,
\begin{verbatim} \end{verbatim}
` `, ``` ```
Colored\textcolor{red}{}#text(red,)[]
Link\url{example.com}, \href{example.com}{e.g.}#link("example.com"), #link("example.com")[e.g.]
Label\label{}< >
Reference\ref{}@label[LB24]
Citation\cite{}@label , #cite(< >)
Bullet List\begin{itemize}
\item
\item
\end{itemize}
-
-
Numbered List\begin{enumerate}
\item
\item
\end{enumerate}
+
+
Term List\begin{description}
\item[]
\item[]
\end{description}
/ term: list
/ term: list
Figure\begin{figure}
\includegraphics[width=1.0\textwidth]{example.jpg}
\caption{e.g.}
\end{figure}
#figure(image("example.jpg",width:100%),
caption:[e.g.],)
Table\begin{tabular}{| | | |}
\hline 1&2&3\\
\hline 4&5&6\\
\hline 7&8&9\\
\hline<br>\end{tabular}
#table(columns:3,
[1],[2],[3],
[4],[5],[6],
[7],[8],[9],)
Math Environment$inline$, $$display$$,
\begin{equation} \end{equation}
$inline$, $ display $
Footnote\footnote{}#footnote[]

Some frequently used Equivalent Typst Function Names of LaTeX Commands.

Consider using CeTZ for drawing with Typst, especially if packages like TikZ are required on the LaTeX side. For alternatives of Beamer to build static slides, there are slydst and touying in the Typst universe.

Moreover, styles in LaTeX that require third-party packages and supernumerary commands to customize are built-in for Typst, while some functionalities provided by LaTeX packages require extra effort to implement in Typst.

Comparison

Let’s inspect the differences in behavior and performance between LaTeX and Typst for some common tasks.

First, in LaTeX, a minimal runnable .tex example is as follows:

1\documentclass{article}
2\begin{document}
3Hello, world!
4\end{document}

One must specify at least the document class and document body, or it will not compile.

But in Typst, it provides out-of-the-box presets, making it possible to write what you want directly.

1Hello, world!

So, a .typ files can be used as sticky notes, like .txt or .md files, and you may apply customized styles after completing some structured content.

One of the notable advantages of Typst is its performance, which provides real-time preview (What You See Is What You Get) easily with imperceptible latency, compared to the several seconds required for a LaTeX compilation to refresh.