in progress

LaTeX, having accumulated a vast ecosystem of programs and documentation over the past 40 years, has become the de facto standard for typesetting in academia and publishing. Few may dispute that it is a great project. However, while no system is without its flaws, what if we were to explore something new? For instance, the younger Typst. That said, this post is intended for those who are already familiar with using LaTeX. If someone has never used either LaTeX or Typst and wants to learn one to start with, my advice is still to begin 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 packages maybeTypst
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, some features in LaTeX that require third-part packages and additional commands for adjustment are built-in and even set as default in Typst, and vice versa.

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.