Introduction
For decades, LaTeX has dominated technical and academic document preparation, offering unparalleled typesetting quality for complex mathematical content, structured documents, and publication-ready manuscripts. However, LaTeX’s steep learning curve, complex debugging, and dated tooling have frustrated generations of writers. Enter Typstโa modern document preparation system that preserves LaTeX’s powerful capabilities while dramatically improving the writing experience.
Typst represents a fundamental reimagining of structured document creation. Built from the ground up in Rust, it offers lightning-fast compilation, an intuitive markup language, real-time preview, and built-in support for citation management. This guide explores Typst’s capabilities, comparing it with LaTeX and providing practical guidance for adoption.
Whether you are a LaTeX veteran seeking a more pleasant experience or a newcomer looking for professional document preparation without LaTeX’s complexity, Typst offers a compelling solution that may transform how you create documents.
Understanding Typst’s Design Philosophy
Modern Architecture
Typst was designed explicitly to address LaTeX’s pain points while maintaining its powerful capabilities. The system uses a markup language that feels familiar to both LaTeX users and those coming from Markdown backgrounds, making the learning curve significantly gentler.
Unlike LaTeX’s separate compilation and preview workflow, Typst provides instant feedback. The typst watch command recompiles on every save, updating your preview in milliseconds. This real-time feedback loop transforms document creation from a batch process into an interactive experience.
The language itself emphasizes readability and consistency. Where LaTeX often requires obscure commands and complex macro definitions, Typst uses clear, predictable syntax that reduces cognitive load while writing.
Built for the Modern Web
Typst generates PDF output directly, eliminating the multiple-step compilation process LaTeX requires. The system handles font embedding, PDF/A archival format, and accessibility features natively, producing publication-ready documents without additional tooling.
Cross-platform support means Typst works identically on Windows, macOS, and Linux. The web-based Typst.app provides even more accessibility, enabling document editing from any browser without local installation.
Core Features and Capabilities
The Typst Markup Language
Typst uses an intuitive markup syntax that balances readability with power. Headings are created with equals signs, emphasis with asterisks, and raw content with backticksโpatterns familiar to Markdown users while supporting advanced features.
= Introduction
This is a paragraph with *emphasis* and **strong** text.
== Mathematical Content
We can write inline math like $x^2 + y^2 = z^2$ or display equations:
$ sum_(i=1)^n i = (n(n+1))/2 $
This syntax is significantly more approachable than LaTeX commands, reducing the mental overhead of document creation while maintaining the ability to produce complex, professionally typeset documents.
Structured Documents
Typst supports full document structuring through outlined headings, figure and table management, and automatic numbering. Cross-references are handled elegantly, with labels and references that automatically track numbering.
#figure(
table(
columns: (1fr, 1fr),
[Method], [Accuracy],
[A], [95%],
[B], [97%],
),
caption: [Model comparison results]
) <results>
As shown in @results, Method B outperforms Method A.
This approach eliminates the manual numbering and reference management that makes LaTeX documents cumbersome to maintain.
Bibliographies and Citations
Typst includes native bibliography support, eliminating the need for external tools like BibTeX or Biber. References can be managed directly within Typst files or loaded from standard .bib files.
#bibliography("references.bib")
The neural network approach achieves state-of-the-art results
@smith2023deep learning.
Citation styles are easily customizable, supporting various standard formats through style files similar to LaTeX’s CSL approach.
Templates and Theming
Typst supports reusable templates through functions, enabling consistent document styling across projects. The community has developed numerous templates for academic papers, resumes, books, and presentations.
#let template(doc) = [
#set page(margin: 1.5in)
#set text(font: "Times New Roman", size: 12pt)
#doc
]
#show: template
// Document content follows
This template system provides flexibility without requiring understanding of LaTeX’s complex class and package systems.
Comparing Typst with LaTeX
Learning Curve
LaTeX’s learning curve is notoriously steep. Understanding packages, classes, macro definitions, and debugging cryptic error messages requires significant time investment. Many users rely on templates without truly understanding the underlying system.
Typst’s syntax is immediately intuitive. Basic documents can be created within minutes, while advanced features are accessible without the extensive background knowledge LaTeX demands. The real-time feedback accelerates learning by immediately showing the impact of changes.
Compilation Speed
LaTeX compilation, especially for large documents with numerous references, can take minutes. The multiple-pass process required for cross-references and bibliographies compounds this delay. Users often disable features like automatic reference updates to speed compilation.
Typst’s compilation is measured in milliseconds for typical documents. The incremental compilation approach means only changed content requires reprocessing. This dramatic speed difference transforms the document creation workflow from a batch process to an interactive experience.
Package Ecosystem
LaTeX’s greatest strength is its comprehensive package ecosystemโvirtually any typesetting need has an established solution. However, package compatibility issues, conflicting options, and version dependencies create ongoing maintenance challenges.
Typst, being younger, has a smaller package ecosystem. However, the core functionality that requires numerous LaTeX packages is built into Typst natively. The ecosystem grows steadily, with community packages filling gaps for specialized needs.
Mathematical Typesetting
LaTeX’s mathematical typesetting remains the gold standard, and Typst aims to match rather than exceed this capability. Mathematical notation support is comprehensive, with most LaTeX mathematical constructs having direct Typst equivalents.
% LaTeX
\frac{\partial f}{\partial x} = \sum_{i=1}^{n} x_i^2
// Typst
$ (diff f)/(diff x) = sum_(i=1)^n x_i^2 $
The syntax differs but produces equivalent output. LaTeX users will find most mathematical constructs familiar, with slight syntax adjustments.
Getting Started with Typst
Installation
Typst is available through multiple channels. The official releases provide binaries for Windows, macOS, and Linux. Package managers including Homebrew, Cargo, and scoop simplify installation on respective platforms.
# Using Homebrew (macOS/Linux)
brew install typst
# Using Cargo
cargo install typst
# Download releases from GitHub
The web-based Typst.app requires no installation, providing full functionality through any browser. This option is particularly convenient for occasional use or trying Typst without commitment.
Your First Document
Create a file named hello.typst with basic content:
#import "@preview/counters:0.1.0"
= Hello World
This is my first Typst document. It demonstrates basic
formatting and structure.
== Features
- Fast compilation
- Intuitive syntax
- Real-time preview
The quick brown fox jumps over the lazy dog.
Compile with:
typst compile hello.typst
The resulting PDF demonstrates Typst’s typesetting quality while showcasing the straightforward markup approach.
Using the VS Code Extension
For an enhanced editing experience, the Typst VS Code extension provides syntax highlighting, autocompletion, and integrated preview. This combination offers a professional document creation environment similar to LaTeX editing setups.
The extension enables the typst watch command within VS Code, providing automatic recompilation on save. Split-view editing shows the compiled output alongside source, enabling immediate visual feedback.
Advanced Features
Conditional Content
Typst’s scripting capabilities enable sophisticated conditional content. This feature proves valuable for generating multiple document versionsโdifferent formats for screen versus print, or conditional inclusion of review comments.
#let show-comments = true
#if show-comments [
*Note to reviewers: This section is preliminary.*
]
Data-Driven Documents
Typst can ingest structured data and generate documents programmatically. This capability enables automated report generation, data-driven visualizations, and templated documents populated from external sources.
#let data = (
(name: "Alice", score: 95),
(name: "Bob", score: 87),
)
#for person in data [
#person.name: #person.score
]
Custom Functions
Users can define custom functions for reusable content patterns, similar to LaTeX macros but with more intuitive syntax.
#let definition(term, content) = block[
*#term:* #content
]
#definition("Typst", "A modern document preparation system.")
Migration from LaTeX
Converting Existing Documents
LaTeX to Typst conversion is straightforward for basic documents but can require effort for complex projects using specialized packages. The typst converter tool provides automated conversion with manual review needed for advanced features.
For documents using standard LaTeX features, conversion typically requires only syntax adjustmentsโthe document structure and content remain largely unchanged.
Hybrid Approaches
Organizations may run LaTeX and Typst concurrently during migration periods. The different systems can produce consistent output, enabling gradual transition without immediate full migration.
LaTeX remains appropriate for projects with specific requirementsโcertain journal submissions, legacy document maintenance, or specialized packages unavailable in Typst. The systems can coexist based on project-specific needs.
The Growing Typst Ecosystem
Community Packages
The Typst community has developed numerous packages extending core functionality. The Typst Universe (typst.app/packages) provides a package registry with packages for specialized typesetting needs, additional functions, and integration with external tools.
Contributions include packages for chemical equations, musical notation, circuit diagrams, and numerous other specialized needs. The ecosystem grows steadily as adoption increases.
Templates and Examples
Community templates provide starting points for common document types. Academic paper templates, resume builders, beamer-style presentations, and book templates are readily available. These templates demonstrate Typst capabilities while accelerating document creation.
Conclusion
Typst represents a significant advancement in document preparation, combining professional typesetting capabilities with a dramatically improved writing experience. For new document creators, Typst provides accessible entry to professional-quality output. For LaTeX veterans, Typst offers a more pleasant workflow without sacrificing capability.
The decision between Typst and LaTeX depends on specific circumstances. For new projects without legacy constraints, Typst’s advantages are compelling. For existing LaTeX projects or specialized requirements, LaTeX’s mature ecosystem may be necessary.
Regardless of the choice, Typst’s emergence benefits the document preparation community. Competition drives improvement across systems, and the modern approach Typst embodies influences the broader ecosystem’s evolution.
Explore Typst for your next document projectโyou may find that professional typesetting has finally become accessible without frustration.
Comments