# Typst

**Typst** 是一套基于标记的排版系统，把文档自动化与高质量字体排印结合在一起，编译速度快，学习曲线也比 LaTeX 平缓。这个名字涵盖三样东西：作者书写的 Typst 语言；把 Typst 文件转换成 PDF、HTML 页面及其他格式的开源编译器；以及用于在浏览器中协作编辑的专有网页应用。<sup>[1](https://typst.app/docs)</sup> 该编译器以 Rust 编写，按 Apache-2.0 许可证发布。<sup>[2](https://github.com/typst/typst)</sup><sup> • </sup><sup>[3](https://typst.app/open-source/)</sup>

| 关键事实 | 详情 |
|---|---|
| 它是什么 | 一套基于标记的排版系统，定位为文字处理软件与 LaTeX 之外的另一种选择<sup>[1](https://typst.app/docs)</sup> |
| 组成部分 | Typst 语言、带命令行界面的开源 Rust 编译器，以及一个专有的协作网页应用<sup>[1](https://typst.app/docs)</sup><sup> • </sup><sup>[3](https://typst.app/open-source/)</sup> |
| 许可证与公司 | 编译器采用 Apache-2.0 许可证；由 Typst GmbH 支持，该公司由 Laurenz Mädje 与 Martin Haug 于 2023 年在德国注册成立<sup>[3](https://typst.app/open-source/)</sup> |
| 公开发布 | 在为期三个月的封闭预览测试之后，于 2023 年 3 月 21 日发布公开测试版并开放编译器源代码<sup>[4](https://typst.app/blog/2023/beta-oss-launch)</sup> |
| 编译速度 | 在 2026 年一项针对 1000 节文档的基准测试中，Typst 预热后编译耗时 0.73 秒，Tectonic LaTeX 引擎为 1.81 秒；首次运行时两者分别为 1.61 秒与 523.05 秒<sup>[5](https://whatjustshipped.com/typst-4-verdict/)</sup> |
| 生态 | Typst Universe 托管了 1650 多个宏包与模板；编译器有 400 多名贡献者<sup>[3](https://typst.app/open-source/)</sup> |
| 当前版本 | Typst 0.15.1（2026 年 7 月 17 日）；0.15 版新增可变字体、HTML 导出中的 MathML、打包导出，以及多份参考文献列表<sup>[6](https://typst.app/docs/changelog/0.15.1/)</sup><sup> • </sup><sup>[7](https://typst.app/blog/2026/typst-0.15/)</sup> |

## 起源

Typst 源自 2022 年柏林工业大学的两篇硕士论文：Laurenz Mädje 的《一种用于排版的可编程标记语言》与 Martin Haug 的《借助增量编译的快速排版》。<sup>[8](https://github.com/TopdownSystems/typst-fork/blob/main/CITATION.cff)</sup> 在 2022 年 12 月下旬开始的封闭预览之后，团队于 2023 年 3 月 21 日开放公开测试版并发布编译器源代码，同时推出的还有自动文献管理，以及复刻 IEEE 与 AMS 两份 LaTeX 文档类的模板等功能。<sup>[4](https://typst.app/blog/2023/beta-oss-launch)</sup> 由两位最初的开发者创办的 Typst GmbH 公司，以商业收入资助编译器和网页应用的全职开发工作。<sup>[3](https://typst.app/open-source/)</sup>

## 语言与脚本

基础层是令人联想到 Markdown 的轻量标记：一个等号创建一级标题，两个等号创建二级标题，数学公式则括在美元符号中。<sup>[2](https://github.com/typst/typst)</sup> 数学使用 Typst 自己的记法而非 TeX，因此 `sqrt` 这类常用函数无需反斜杠，符号变体则用 `phi.alt` 这样的修饰符选取。<sup>[2](https://github.com/typst/typst)</sup>

**内嵌脚本。** 标记与代码融为一体：井号（`#`）引出一个代码表达式，其后恢复正常标记解析，而分号可以强制该表达式提前结束。<sup>[9](https://www.typst.app/docs/reference/scripting/)</sup> 脚本可以定义变量与函数、加载数据并计算内容；文档中的示例用递归函数计算斐波那契数，并把结果排成一张表格。<sup>[2](https://github.com/typst/typst)</sup>

**set 规则与 show 规则。** 样式通过两种机制实现。set 规则写成一个前面带 `set` 关键字的函数调用，用于配置元素的某些可选属性，如字体系列或标题编号。<sup>[10](https://www.typst.app/docs/reference/styling/)</sup> show 规则则可以完全重新定义某个元素的呈现方式，既可用函数实现，也可用替换为字面内容的方式实现。<sup>[10](https://www.typst.app/docs/reference/styling/)</sup> 两者结合，使模板得以控制文档外观，而作者大多只需书写普通标记。<sup>[11](https://github.com/typst/typst/discussions/3799)</sup>

## 编译器与性能

编译器由一组 Rust crate 构成，涵盖解析、求值、实现、布局，以及针对 PDF、PNG、SVG 和 HTML 的导出器。<sup>[12](https://github.com/typst/typst/blob/main/docs/dev/architecture.md)</sup> 其决定性的设计约束是增量编译：所有语言特性都必须与之相容，并借助 `comemo` 记忆化系统加以支撑，从而让 `typst watch` 在每次文件变动后重新编译的速度快于完全重建。<sup>[2](https://github.com/typst/typst)</sup> 同一套机制还会为自动补全等 IDE 功能复用已有工作，这些功能运行一次带追踪的求值，复用前一次正常编译留下的记忆化结果。<sup>[12](https://github.com/typst/typst/blob/main/docs/dev/architecture.md)</sup>

独立基准测试一致显示出相对 LaTeX 引擎的巨大速度优势，但具体条件很关键。2026 年一项针对内容相同的 1000 节文档、与 Tectonic 0.17.0 的对比测得：Typst 预热后为 0.73 秒，Tectonic 为 1.81 秒；首次运行时分别为 1.61 秒与 523.05 秒；Typst 占用的内存更多，为 858 MB，而 Tectonic 为 300 MB。<sup>[5](https://whatjustshipped.com/typst-4-verdict/)</sup> 一项简历模板基准测试报告了约 40 倍的加速，Typst 的编译耗时中位数为 19.7 至 20.4 毫秒，Tectonic 为 823 毫秒，峰值内存约为 30 MB 对 217 MB。<sup>[13](https://emikra.com/labs/typst-vs-latex-for-pdf-generation/)</sup> Typst 还是单遍系统，没有辅助文件，也无需重复运行，其错误信息会指出出错行并给出提示，与 LaTeX 的错误输出形成对照。<sup>[13](https://emikra.com/labs/typst-vs-latex-for-pdf-generation/)</sup><sup> • </sup><sup>[5](https://whatjustshipped.com/typst-4-verdict/)</sup>

## 输出格式与无障碍

PDF 是默认导出格式，也可导出 PNG 与 SVG。<sup>[7](https://typst.app/blog/2026/typst-0.15/)</sup> Typst 默认写出带标签的 PDF，以提供基本的无障碍支持，并支持包括 PDF/A-1b 至 PDF/A-4 以及 PDF/UA-1 在内的合规目标；导出 PDF/UA-1 时会运行检查，例如要求图像提供替代文本、文档提供标题。<sup>[14](https://typst.app/docs/reference/pdf/)</sup> 自 0.15 版起，单个文档可以同时面向多个相互兼容的标准，例如以 PDF/A-2a 用于长期保存，同时以 PDF/UA-1 满足无障碍要求。<sup>[7](https://typst.app/blog/2026/typst-0.15/)</sup> 在 2026 年那次与 Tectonic 的对比中，Typst 输出的 PDF/A-2b、PDF/A-4 与 PDF/UA-1 文件，仅凭一个命令行开关便全部通过了独立的 veraPDF 验证。<sup>[5](https://whatjustshipped.com/typst-4-verdict/)</sup>

**HTML 导出**仍属实验性功能，在命令行界面与网页应用中均由特性开关控制，文档明确表示不应在生产环境中使用。<sup>[15](https://typst.app/docs/reference/html/)</sup> 其目标是生成语义丰富、能保留文档结构的 HTML；0.15 版新增了公式自动输出为 MathML，以及 `bundle` 目标，可从单个项目输出多个文件，例如多页网站。<sup>[15](https://typst.app/docs/reference/html/)</sup><sup> • </sup><sup>[7](https://typst.app/blog/2026/typst-0.15/)</sup> 目前没有 Word（docx）或 [OpenDocument](https://www.edgepedia.org/zh/opendocument) 导出。<sup>[5](https://whatjustshipped.com/typst-4-verdict/)</sup>

## 生态与采用情况

宏包与模板通过 Typst Universe 分发，其条目已超过 1650 个；编译器按版本下载并缓存它们，例如 `#import "@preview/package-name:1.0.0"`。<sup>[3](https://typst.app/open-source/)</sup> 社区工具包括用于编辑器集成的 Tinymist 语言服务器。<sup>[2](https://github.com/typst/typst)</sup> 发布两年后，公司报告称有 3500 多家学术机构在使用，Discord 社区成员超过 11000 人。<sup>[16](https://www.typst.app/blog/2025/future/)</sup>

**学术出版**是采用相对滞后的领域。数学与计算机科学领域的期刊仍由 LaTeX 主导，社区讨论也强调，当投稿场所要求 LaTeX 时，作者很少会提交 Typst 源文件。<sup>[11](https://github.com/typst/typst/discussions/3799)</sup> 学位论文是较容易的切入点，因为大学往往只要求提交 PDF。<sup>[18](https://forum.typst.app/t/scientific-papers/3074)</sup>

## 版本历史

Typst 使用 0.x 版本号，并随破坏性变更提供迁移指南。0.12 版新增初步的 PDF/A 支持，0.13 版加入实验性 HTML 导出，0.14 版加入无障碍功能，包括 PDF/UA 支持与默认打标签。<sup>[7](https://typst.app/blog/2026/typst-0.15/)</sup><sup> • </sup><sup>[14](https://typst.app/docs/reference/pdf/)</sup> Typst 0.15 于 2026 年 6 月 15 日发布，被开发者称为规模最大的一次发布，新增可变字体、HTML 导出中的 MathML、打包导出、单文档多份参考文献列表、同时满足多个 PDF 标准，以及布局收敛诊断；随后于 2026 年 7 月 17 日发布 0.15.1。<sup>[7](https://typst.app/blog/2026/typst-0.15/)</sup><sup> • </sup><sup>[6](https://typst.app/docs/changelog/0.15.1/)</sup>

## References

1. [Overview – Typst Documentation](https://typst.app/docs)
2. [typst/typst – GitHub repository](https://github.com/typst/typst)
3. [Typst: Open Source](https://typst.app/open-source/)
4. [Typst starts its public beta test and goes open-source – Typst Blog, March 21, 2023](https://typst.app/blog/2023/beta-oss-launch)
5. [Typst vs LaTeX: Our Benchmarks and the Honest Verdict – What Just Shipped, 2026](https://whatjustshipped.com/typst-4-verdict/)
6. [Typst 0.15.1 changelog – Typst Documentation](https://typst.app/docs/changelog/0.15.1/)
7. [Typst 0.15 contains multitudes – Typst Blog, June 15, 2026](https://typst.app/blog/2026/typst-0.15/)
8. [CITATION.cff for Typst (Mädje and Haug theses, TU Berlin, 2022)](https://github.com/TopdownSystems/typst-fork/blob/main/CITATION.cff)
9. [Scripting – Typst Documentation](https://www.typst.app/docs/reference/scripting/)
10. [Styling – Typst Documentation](https://www.typst.app/docs/reference/styling/)
11. [When will typst be available for journal submissions? – typst/typst Discussion #3799](https://github.com/typst/typst/discussions/3799)
12. [Typst Compiler Architecture – typst/typst docs](https://github.com/typst/typst/blob/main/docs/dev/architecture.md)
13. [Choosing Typst Over LaTeX for PDF Generation in DeedTracker – Emikra Labs](https://emikra.com/labs/typst-vs-latex-for-pdf-generation/)
14. [PDF – Typst Documentation](https://typst.app/docs/reference/pdf/)
15. [HTML – Typst Documentation](https://typst.app/docs/reference/html/)
16. [Two years and counting: How we are building the future of technical writing – Typst Blog, August 20, 2025](https://www.typst.app/blog/2025/future/)
17. [A paper about Typst, written in Typst, with an official Typst-based template in the IJIMAI journal – Typst Forum](https://forum.typst.app/uploads/short-url/jKMkD0eoH1Ec7svo6hQuhEEcodp.pdf)
18. [Scientific papers – Typst Forum](https://forum.typst.app/t/scientific-papers/3074)

---
*Initially written Sep 17, 2026 · Reviewed: Sep 30, 2026; Oct 15, 2026 · Edited: Oct 15, 2026 · Last review: Oct 15, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 软件与编程 › Named software products and platforms › Office and business software › Titles N to Z

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/typst

English original: https://www.edgepedia.org/typst
