SuperAPI AI 工具集

typst

编程与开发

查看项目

更新于 10-16 00:02

技能介绍

用途:该技能面向 Typst 0.15+,用于创建 Typst 文档、开发模板与包,并处理 .typ 文件、typst.toml、typst-cli 相关工作。若使用 Typst 0.14.2,需改用 typst-0.14.2 仓库标签获取旧版技能快照。

主要能力:提供编译、监视重编译与内省查询命令,如 typst compile document.typ、typst compile document.typ -f png、typst watch document.typ、typst eval --in document.typ 'query(heading).len()'。支持通过 HTML 导出、PNG 导出或 pdftotext 验证输出,分别适合检查文本结构、视觉布局与页面内容。文档主题涵盖语法与类型、样式与布局、表格、学术写作、Markdown/LaTeX 转换、旧代码迁移、CLI、查询与多遍构建、状态与计数器、模板与包发布、调试与性能分析。

使用方式:新文档可从示例起步,如 basic-document.typ、styled-document.typ、template-report.typ、tables-showcase.typ、academic-paper.typ、query-export.typ 与 package-example/。可用 python3 scripts/search-packages.py 检索 Typst Universe 包索引,用 python3 scripts/search-api.py 检索 API 函数、方法与构造器。依赖包括 typst CLI 0.15+(macOS 用 brew install typst,Linux 用 cargo install typst-cli,Windows 用 winget install typst),可选 pdftotext、Python 3.10+ 与 jq。生态工具包括 tinymist、typstyle、typst-package-check、tytanic。

限制:资料未提供收费、价格与效果信息;具体命令选项需查阅 cli.md,调试细节见 debug.md,包工具细节见 package.md。