typst
安装方式
先用 Prompt 核对来源与依赖。也可下载安装包。
用 AI 助手安装
复制提示词,让助手先核对固定版本和依赖。
查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "typst":https://skillpi.com/zh/skills/deepskill-e8856a6388fb0ee949238dcaf7eb4b7c12549f4444cbcb18cd31ad2aa49d1b66。安装前核对上游来源和版本:https://skillhub.cn/skills/user_3c6cb52e/typst-markup-typesetting-system。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。
来源与配置
skillhub.cn
配置方式待核实
请查看原始来源中的适用工具、依赖和权限要求。
安装实测待补充
Typst 是一个现代的基于标记的排版系统,旨在作为比 LaTeX 更快速且更易学习的替代方案,提供内置标记、脚本系统、数学排版、参考文献管理和增量编译以实现近乎即时的构建速度。
介绍来源: third_party · user_3c6cb52e · 1.0.0 参考来源
SkillPi 解读
- 能完成的任务
- 翻译待完成,请参阅来源文档。
- 适合谁
- 翻译待完成,请参阅来源文档。
- 输入和输出
- 翻译待完成,请参阅来源文档。
- 软件、账号及付费要求
- 来源文档未说明。
- 限制与区别
- 来源文档未说明。
- 实测状态
- 未测试
文件浏览
Frontmatter
name: typst
description: Create beautifully typeset documents with Typst, a modern markup-based typesetting system. Handles academic papers, scientific documents, mathematical equations, tables, and document layouts. Use when creating PDFs, typesetting documents, or when the user mentions typst, document formatting, or mathematical typesetting.
license: Apache-2.0Typst Skill
Typst is a modern markup-based typesetting system designed for scientific documents. It serves as an alternative to LaTeX with faster compilation (milliseconds, not seconds) and simpler syntax.
When to Use This Skill
Use Typst when:
- Creating academic papers, theses, or scientific documents
- Writing documents with mathematical equations
- Need faster compilation than LaTeX
- Want a simpler markup syntax than LaTeX
- Creating documents with complex tables and layouts
- Building reusable document templates
Three Syntactical Modes
Typst operates in three modes:
| Mode | Purpose | Switching |
|---|---|---|
| Markup | Document structure (default) | Default mode |
| Math | Mathematical formulas | $...$ for inline, $ ... $ with spaces for display |
| Code | Scripting features | Prefix with # |
Escaping Special Characters
CRITICAL: When writing literal text in markup mode, you MUST escape special characters with a backslash (\). An unescaped # is the most common source of compilation errors — it tells Typst to enter code mode, so any literal # in text (e.g. "C#", "issue #42") must be written as \#.
Markup Mode Special Characters
| Character | Meaning | Escape | Example |
|---|---|---|---|
\ |
Escape character / line break | \\ |
path\\to\\file |
# |
Code expression | \# |
Tweet at us \#ad, C\#, \$1.50 per \#item |
* |
Bold text | \* |
5 \* 3 = 15 |
_ |
Italic text | \_ |
file\_name\_here |
` | Raw text / code | \` |
|||
$ |
Math mode | \$ |
costs \$1.50 |
< |
Label | \< |
a \< b in text |
@ |
Reference / citation | \@ |
email\@example.com |
~ |
Non-breaking space | \~ |
|
' |
Smart quote | \' |
|
" |
Smart quote | \" |
Note: =, -, +, / only have special meaning at the start of a line (headings, lists, term lists). They do not need escaping mid-sentence.
Math Mode Special Characters
Inside $...$, these characters have special meaning and need \ to use literally:
| Character | Meaning | Escape |
|---|---|---|
_ |
Subscript | \_ |
^ |
Superscript | \^ |
/ |
Fraction | \/ |
& |
Alignment | \& |
# |
Code/variable access | \# |
Symbols and Special Characters
Typst has built-in named symbols for common characters. Prefer these over \u{...} unicode escapes:
// Dashes
En dash: -- Em dash: ---
// Emojis via #emoji namespace
#emoji.avocado #emoji.face.happy
// Named symbols via #sym namespace
#sym.arrow.r #sym.checkmark #sym.euro
// Direct UTF-8 characters also work
Ü, ñ, ö — just type them directly
Common Mistakes
// WRONG — # starts code mode, causes compilation error:
I love C# programming
// CORRECT:
I love C\# programming
// WRONG — $ enters math mode:
The price is $10
// CORRECT:
The price is \$10
// WRONG — @ tries to find a reference:
Contact me @twitter
// CORRECT:
Contact me \@twitter
Basic Markup Syntax
= First-Level Heading
== Second-Level Heading
Regular paragraph text.
A blank line creates a new paragraph.
_italics_ and *bold* text.
- Unordered list item
- Another item
+ Numbered list item
+ Another numbered item
/ Term: Definition for term lists
`inline code` and code blocks:
```python
def hello():
print("Hello!")
`` `
Link: https://typst.app or #link("https://typst.app")[Typst App]
#image("diagram.png", width: 70%)
Mathematical Typesetting
Inline math: $x^2 + y^2 = z^2$
Display math (note the spaces):
$ integral_0^infinity e^(-x^2) dif x = sqrt(pi) / 2 $
Greek letters: $alpha$, $beta$, $gamma$, $omega$
Fractions: $a/b$ or $(a + b) / c$
Subscripts and superscripts: $x_1$, $x^2$, $x_1^2$
Vectors and matrices:
$ vec(a, b, c) quad mat(1, 2; 3, 4) $
Aligned equations:
$ a &= b + c \
&= d + e $
Functions and Content
// Image with caption
#figure(
image("chart.png", width: 80%),
caption: [Monthly revenue growth],
) <fig:chart>
See @fig:chart for details.
// Bibliography
#bibliography("refs.bib")
Citation: @einstein1905
// Tables
#table(
columns: 3,
[Header 1], [Header 2], [Header 3],
[Row 1 A], [Row 1 B], [Row 1 C],
[Row 2 A], [Row 2 B], [Row 2 C],
)
Set Rules (Global Styling)
Apply styles throughout your document:
// Font and text settings
#set text(font: "Libertinus Serif", size: 11pt)
#set par(justify: true, leading: 0.65em)
// Page setup
#set page(
paper: "us-letter",
margin: (x: 2.5cm, y: 3cm),
numbering: "1",
)
// Heading numbering
#set heading(numbering: "1.1")
// Document metadata
#set document(
title: "My Document",
author: "Author Name",
)
Show Rules (Element Transformation)
Customize how elements are displayed:
// Style all level-1 headings
#show heading.where(level: 1): it => [
#set text(blue)
#block(smallcaps(it.body))
]
// Style specific text
#show "Typst": name => box[
#text(blue)[#name]
]
// Combine show with set
#show heading: set text(navy)
Variables and Functions
// Define variables
#let title = "My Document"
#let version = 2
// Define functions
#let highlight(body, color: yellow) = {
box(fill: color, inset: 3pt, body)
}
// Use them
#highlight[Important text]
#highlight(color: red)[Warning!]
Document Templates
Create reusable templates:
// template.typ
#let article(
title: none,
authors: (),
abstract: none,
body
) = {
set document(title: title)
set page(margin: 2cm)
set text(font: "Libertinus Serif", size: 11pt)
// Title
align(center)[
#text(17pt, weight: "bold")[#title]
#v(1em)
#authors.join(", ")
]
// Abstract
if abstract != none [
#heading(outlined: false)[Abstract]
#abstract
]
body
}
// main.typ
#import "template.typ": article
#show: article.with(
title: "My Paper",
authors: ("Alice", "Bob"),
abstract: [This paper explores...],
)
= Introduction
Content here...
Tables
// Basic table with styling
#table(
columns: (auto, 1fr, auto),
align: (right, left, center),
fill: (_, y) => if y == 0 { gray.lighten(50%) },
stroke: 0.5pt,
table.header[ID][Name][Score],
[1], [Alice], [95],
[2], [Bob], [87],
[3], [Carol], [92],
)
// Cell spanning
#table(
columns: 3,
table.cell(colspan: 2)[Merged], [Single],
[A], [B], [C],
)
Page Layout
// Two-column layout
#set page(columns: 2)
// Headers and footers
#set page(
header: [Document Title #h(1fr) Draft],
footer: context [
#h(1fr)
Page #counter(page).display()
],
)
// Page breaks
#pagebreak()
// Column breaks
#colbreak()
Popular Packages
Import packages from Typst Universe with #import "@preview/package:version".
Presentations
#import "@preview/touying:0.6.1": * // Full-featured slides with themes
#import "@preview/polylux:0.4.0": * // Lightweight beamer-style slides
Drawing and Visualization
#import "@preview/cetz:0.4.2" // TikZ-inspired drawing
#import "@preview/lilaq:0.5.0" as lq // Scientific plots and charts
Code and Algorithms
#import "@preview/codly:1.3.0": * // Enhanced code blocks
#import "@preview/lovelace:0.3.0": * // Pseudocode formatting
Document Utilities
#import "@preview/drafting:0.2.2": * // Margin notes and comments
See individual package guides for detailed usage:
- Presentations Guide - Creating slides with Typst
- Touying - Presentations with themes
- Polylux - Lightweight slides
- CeTZ - Drawing library
- Lilaq - Scientific plots
- Codly - Code blocks
- Lovelace - Pseudocode
- Drafting - Margin notes
CLI Usage
# Compile to PDF
typst compile document.typ
# Watch for changes
typst watch document.typ
# Specify output
typst compile document.typ output.pdf
# Add font paths
typst compile --font-path ./fonts document.typ
Quick Reference: LaTeX to Typst
| LaTeX | Typst |
|---|---|
\section{Title} |
= Title |
\textbf{bold} |
*bold* |
\textit{italic} |
_italic_ |
\begin{itemize} |
- item |
\begin{enumerate} |
+ item |
$x^2$ |
$x^2$ |
\frac{a}{b} |
$a/b$ |
\usepackage{...} |
#import "@preview/..." |
\documentclass |
Template with show rule |
Additional Resources
当前收录版本
1.0.0
安全与评测信息
质量评测
满分100 · 来自 SkillPi LAB 实验室的评测报告。
亮点
- Typst 作为现代排版系统,直接解决学术文档、科学论文、数学公式等核心排版需求
- 相比 LaTeX 具有更快的编译速度和更简单的语法,满足高频刚需场景
亮点
- 触发描述完整覆盖多种使用场景:academic papers, mathematical equations, document formatting 等
- 边界清晰,准确描述了 Typst 的适用范围和优势
待提升项
-
文档过长 原报告严重程度:轻微
主文档内容非常详细,超过500行,可能影响用户快速查找信息
改进建议:考虑将部分内容拆分为独立的参考文档,保持主文档简洁明了
亮点
- Phase/步骤清晰,包含完整的语法说明、示例和使用指南
- frontmatter完整,包含名称、描述、许可证等信息
- 提供了详细的错误处理和最佳实践指导
亮点
- 工具来源明确,提供了完整的 CLI 使用说明
- 覆盖了主要异常场景(特殊字符转义、常见错误等)
- 提供了详细的包管理和模板使用方法
取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。
正文静态检测
100 / 100 · skillpi-20261123-no-r3-v1
正文未命中当前规则。
分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。
权限与使用前检查
根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。
未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。
文档引用的域名或地址
这些地址可能用于文档链接或示例,不是已批准的联网清单。使用前核对实际目的地及发送的数据。
- typst.app
安全评级与访问范围
safe · 静态证据核验,不代表运行安全保证。
来源文档未说明。
使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。
用户讨论
还没有已核实的点评。