For AI agents: the complete documentation index is available at https://shijin.space/llms.txt, the full documentation bundle is available at https://shijin.space/llms-full.txt, and this page is available as Markdown at https://shijin.space/projects/cinderfolio/typst-cetz/index.md.

Cinderfolio-Typst/CeTZ

Typst 负责排版,CeTZ 负责绘图。调整三个种子后,下载包含亮暗配色的原生颜色模块,通过下方 Prompt 指导 AI 使用语义颜色。

深色g0#121212
浅色g16bg#fafaf8
品牌基准色brand#f97316

使用

将下载的 cinderfolio.typ 与绘图文件 diagram.typ 放在同一目录,在 diagram.typ 中导入模块和 CeTZ。示例使用 Typst 0.14.2 与 CeTZ 0.5.2:

查看 Typst 源码
#import "cinderfolio.typ": cf-palette
#import "@preview/cetz:0.5.2"

#let cf = cf-palette(mode: "light")
#set page(width: auto, height: auto, margin: 6pt, fill: cf.background)
#set text(fill: cf.foreground)

#cetz.canvas({
  import cetz.draw: *
  circle((0, 0), radius: 0.8, fill: cf.surface, stroke: cf.diagram-stroke)
  content((0, 0), [CeTZ])
})

使用 Typst CLI 编译为 SVG:

typst compile diagram.typ diagram.svg

网页中的图随站点主题切换。点击图片可在本页放大,再点一下或按 Esc 回到正文。在本地编译时,cf-palette(mode: "light") 选择亮色,改为 "dark" 选择暗色。模块可以放在项目的其他目录,导入路径相对于当前源文件填写。

For your Agent
用 AI 快速开始