14 Typst and the Modernization of Digital Typesetting
Guiding Question: Can professional typesetting be reinvented for the twenty-first century?
For more than four decades, TeX and LaTeX have set the standard for professional digital typesetting.
Their influence on scientific publishing, mathematics, and academic writing is difficult to overstate.
Yet every generation of software eventually invites a new question.
Could the same typographic quality be achieved using ideas drawn from modern programming languages and contemporary publishing workflows?
Many writers admired the output of LaTeX but found its syntax difficult to learn.
Others appreciated Markdown’s simplicity but wished it could produce more sophisticated documents without relying on numerous external tools.
What if these worlds could be brought together?
That question inspired Typst.
14.1 A New Beginning
Typst is a modern markup and typesetting language designed to combine expressive writing with powerful document automation.
Like TeX and LaTeX, it produces beautifully typeset documents.
Like Markdown, it emphasizes readability and author productivity.
Unlike either, it was designed from the beginning with the benefit of decades of experience in digital publishing.
Rather than preserving historical conventions, Typst asks how a document language might look if it were designed today.
14.2 Familiar Yet Different
At first glance, Typst resembles Markdown.
Headings begin with a hash (#).
Lists are concise.
The source remains clean and readable.
This familiarity often makes the language approachable for authors already comfortable with Markdown.
Yet beneath the surface lies a much richer system.
Many of Typst’s markup constructs are simply convenient forms of function calls.
For example:
# Headingis conceptually equivalent to:
#heading[Heading]The shorter syntax is simply a more convenient way of expressing the same idea.
This elegant consistency gives Typst much of its expressive power.
14.3 Markup Meets Programming
Perhaps Typst’s most distinctive feature is the close relationship between markup and scripting.
Traditional markup languages describe documents.
Programming languages perform computation.
Typst deliberately narrows the gap between these two worlds.
Authors can define variables.
Create reusable functions.
Write conditional logic.
Generate repeated structures automatically.
Build reusable templates.
Instead of treating programming as an external tool, Typst integrates computation naturally into the document itself.
For many authors, this makes large publishing projects significantly easier to maintain.
14.4 Mathematics Reimagined
Like TeX before it, Typst places strong emphasis on mathematical typesetting.
Complex equations, matrices, fractions, and scientific notation remain central capabilities of the language.
At the same time, Typst seeks to reduce much of the syntactic complexity traditionally associated with TeX.
Authors familiar with LaTeX often discover that many mathematical expressions require less punctuation while remaining highly readable.
The result is a system that respects TeX’s achievements while embracing more modern language design.
14.5 Designed for Productivity
One of Typst’s recurring themes is productivity.
Documents compile quickly.
Error messages are generally clear.
The language aims for consistency.
Its syntax minimizes unnecessary verbosity.
Many common publishing tasks require fewer commands than equivalent LaTeX documents.
This emphasis on rapid feedback encourages experimentation.
Writers spend less time waiting for documents to compile and more time refining their ideas.
14.6 Templates and Reuse
Professional publishing often involves recurring document types.
Reports.
Articles.
Books.
Theses.
Letters.
Presentations.
Typst encourages authors to package these structures into reusable templates.
Instead of repeatedly solving the same formatting problems, writers can focus on content while sharing consistent document designs across projects.
This reflects another recurring theme of this primer:
Automation frees writers to concentrate on communication.
14.7 A Language for Today’s Publishing
Typst emerged in a publishing landscape very different from the one that produced TeX.
Today’s authors expect:
- version control
- collaborative editing
- reproducible documents
- rapid compilation
- programmable templates
- portable source files
- integration with modern development tools
Typst embraces these expectations without abandoning the typographic excellence that made TeX famous.
In doing so, it represents both continuity and innovation.
14.8 Typst and Its Predecessors
Typst should not be understood as a replacement for TeX or Markdown.
Instead, it builds upon their achievements.
From TeX, it inherits a commitment to high-quality typesetting.
From Markdown, it inherits the belief that source documents should remain approachable.
From modern programming languages, it adopts consistency, composability, and scripting.
Rather than rejecting the past, Typst demonstrates how decades of experience can inspire a new generation of publishing tools.
14.9 Lessons for the Textsmith
Typst reminds us that the evolution of markup languages is far from complete.
The philosophy established by TeX—describing documents through plain text—remains remarkably relevant.
What changes is the way authors interact with that philosophy.
Modern writers increasingly expect languages that are expressive, programmable, and easy to learn.
Typst answers that expectation without abandoning the enduring principles of structured writing.
It demonstrates that innovation often arises not by discarding earlier ideas, but by refining them.
14.10 Key Ideas
- Typst is a modern markup and typesetting language inspired by both TeX and Markdown.
- It combines high-quality typography with an approachable syntax.
- Many markup constructs are implemented as convenient forms of function calls.
- Integrated scripting enables reusable templates and programmable documents.
- Typst modernizes mathematical typesetting while preserving professional quality.
- The language emphasizes rapid feedback, consistency, and productivity.
- Typst illustrates that the philosophy of plain text publishing continues to evolve.
In the next chapter, we discover that markup is not limited to prose and mathematics.
Can diagrams be written instead of drawn?
That question leads us to Mermaid and Graphviz, two languages that demonstrate how plain text can describe visual ideas with the same elegance that it describes documents.