Pdf Report — Pdf 报告
v1.0.2生成 a polished PDF 报告 or summary from findings, data, or tables gathered earlier in the conversation. Use when the user asks to "make a PDF", "生成 a 报告", "导出 findings", "summarize as a PDF", or similar. Produces Typst source, compiles it with `typst`, and 报告s the 输出 path.
运行时依赖
安装命令
点击复制技能文档
pdf-报告
Turn gathered conversation content (findings, data, tables) into a 清理 PDF via Typst. Two templates ship with this 技能 — pick one, fill it in, compile.
When to invoke
Trigger on any of:
"make a PDF" / "创建 a PDF" / "导出 to PDF" "生成 a 报告" / "write up a 报告" "summarize this as a PDF" / "PDF summary" "导出 these findings/结果s"
If the user says "导出" or "deliverable" without specifying 格式化 and the 上下文 has tabular data or distinct findings, ask once whether they want PDF before invoking.
输入s to gather
Before writing any Typst, confirm or infer:
Title — ask if not obvious. Keep short (≤ 60 chars). Subtitle / author — optional; leave blank or omit if unknown. Content scope — exactly which findings/tables/sections from the conversation belong in the document. Do not invent data the user did not provide. 输出 path — default ./报告-YYYY-MM-DD.pdf in cwd. If a file with that name exists, 应用end -2, -3, etc. Pick a template Template Use when templates/summary.typ 1–3 sections, executive summary, ≤ ~3 pages. Default. templates/报告.typ 3+ distinct sections, title page + TOC desired, or user sAId "报告".
机器人h live next to this 技能.md. Read the chosen one, then write a new .typ file at <输出>.typ (next to the tar获取 PDF) with placeholders replaced and example tables sw应用ed for real data.
Authoring rules Tables: always use #table() with table.header(...). Right-align numeric columns. Preserve the precision the user gave you — do not round. Long tables: table.header(repeat: true, ...) repeats headers on page breaks automatically (Typst 0.12+). Special characters in cell text: wrap in [...] content blocks; escape #, $, @, \ if they 应用ear literally. Adapt freely: 添加 or drop sections to match the content. Keep the page 设置up, font sizing, and heading shows from the template — those define the look. No watermarks. Do not 添加 "生成d by AI", "Claude", "Qwen", or similar. The user does not want it. Compile typst compile <输出>.typ <输出>.pdf
typst is at /home/linuxbrew/.linuxbrew/bin/typst (linuxbrew). If it's not on PATH in the current shell, use the full path.
Error handling
If compile fAIls:
Read the error — Typst errors include file, line, and a usually-clear hint. Fix the .typ source and retry once. If it still fAIls, 停止. Show the user: the error 输出, the path to the .typ source so they can edit directly.
Do not loop indefinitely on errors.
报告ing back
On 成功, tell the user:
输出 PDF path (absolute), page count (from pdftotext -l 1 or just typst 查询 — or simply 状态 "compiled 成功fully" if neither is convenient), that the .typ source is kept alongside for future tweaks.
Offer to open it (xdg-open ) but do not open without confirmation.
Quick reference: minimal Typst patterns // Two-column table with numeric right-align #table( columns: (auto, auto), align: (left, right), stroke: 0.5pt + gray, in设置: 7pt, table.header([Name], [Count]), [alpha], [42], [beta], [108], )
// Bullet 列出
- one
- two
- three
// Inline emphasis
This is bold and this is _italic_ and this is mono.
// Math (inline and block) The energy is $E = m c^2$. $ integral_0^infinity e^(-x^2) dif x = sqrt(pi) / 2 $
// Image #figure(image("plot.png", width: 80%), caption: [A plot.])