Skills2026年4月12日·1 分钟阅读

Typst — Modern Markup-Based Typesetting System

Typst is a new markup-based typesetting system that is powerful and easy to learn. A modern alternative to LaTeX with fast incremental compilation, friendly error messages, and a scripting language built in. Write beautiful papers, theses, and documents without the LaTeX pain.

Agent 就绪

Agent 可直接安装

这个资产可安装;Agent 先选择当前运行时、检查安装计划,再运行匹配命令。

Native · 98/100策略:允许
Agent 入口
任意 MCP/CLI Agent
类型
Skill
安装
Single
信任
信任等级:Established
入口
step-1.md
直接安装命令
npx -y tokrepo@latest install 9033216a-3649-11f1-9bc6-00163e2b0d79 --target codex

先 dry-run 确认安装计划,再运行此命令。

TL;DR
Typst replaces LaTeX with instant compilation, friendly errors, and a built-in scripting language.
§01

What it is

Typst is a markup-based typesetting system written in Rust, designed as a modern alternative to LaTeX. Created by Martin Haug and Laurenz Maedje as a master thesis project at TU Berlin, Typst compiles documents in milliseconds rather than the seconds or minutes LaTeX requires. It supports math equations, bibliographies, figures, tables, and custom templates out of the box.

Typst targets students writing theses, researchers preparing papers, and professionals who need polished PDF output without wrestling with LaTeX package conflicts. Its syntax is closer to Markdown than to TeX, making the learning curve gentler for newcomers.

§02

How it saves time or tokens

Typst's incremental compilation watches your source file and regenerates only the parts that changed. A document that takes LaTeX 30 seconds to compile rebuilds in under 100 milliseconds with Typst. Error messages point to the exact line and explain what went wrong in plain English, eliminating the time spent deciphering cryptic LaTeX logs. The built-in scripting language handles loops, conditionals, and data-driven content without external toolchains.

§03

How to use

  1. Install Typst via your package manager: brew install typst on macOS, cargo install --locked typst-cli via Rust, or scoop install typst on Windows.
  2. Create a .typ file with your document content using Typst markup syntax.
  3. Compile to PDF with typst compile paper.typ or use typst watch paper.typ for live reload during editing.
§04

Example

#set page(paper: "a4", margin: 2cm)
#set text(font: "New Computer Modern", size: 12pt)
#set heading(numbering: "1.1")

= Introduction

This paper explores how *Typst* can replace LaTeX.
Compilation is _instant_ -- no more waiting.

== Background

$ E = m c^2 $

#figure(
  table(
    columns: 3,
    [*Tool*], [*Language*], [*Speed*],
    [Typst], [Rust], [< 100ms],
    [LaTeX], [TeX], [10-60s],
  ),
  caption: [Compilation speed comparison],
)

#bibliography("refs.bib")
§05

Related on TokRepo

§06

Common pitfalls

  • Typst's package ecosystem is smaller than LaTeX's CTAN repository, so niche academic journal templates may not exist yet.
  • Some LaTeX features like TikZ diagrams have no direct Typst equivalent; you may need to export SVGs from other tools.
  • Typst files are not directly accepted by most academic publishers, so you will still need to export to PDF for submission.

常见问题

How does Typst compare to LaTeX for academic papers?+

Typst compiles in milliseconds instead of seconds, provides clear error messages, and uses simpler syntax. However, LaTeX has a larger package ecosystem and wider publisher acceptance. For most academic writing, Typst handles math, citations, and figures just as well.

Can Typst handle bibliographies and citations?+

Yes. Typst supports BibTeX and Hayagriva bibliography files natively. You add a bibliography command at the end of your document and use citation keys inline, similar to LaTeX.

Does Typst work with existing LaTeX templates?+

No. Typst has its own template format and cannot directly use .sty or .cls files from LaTeX. You need to recreate templates in Typst syntax, though the process is simpler than writing LaTeX packages.

What output formats does Typst support?+

Typst outputs PDF by default and also supports SVG. It does not produce HTML or DOCX natively, though community tools exist for conversion.

Is Typst free and open source?+

Yes. The Typst compiler is open source under the Apache-2.0 license. There is also a web-based collaborative editor at typst.app that offers a free tier.

引用来源 (3)
  • Typst GitHub— Typst is a modern typesetting system started as a master thesis at TU Berlin
  • Typst Documentation— Typst supports incremental compilation and scripting
  • Typst Blog— Typst uses X25519-based encryption for its web service

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产