关于 infographic
将提供的文本制作成适合印刷的 PNG 信息图。它会根据内容选择版式,并提供多种命名风格及可独立选择的配色方案。
主要功能
- 01将文本生成信息图 PNG
- 02根据内容特征检测版式
- 03提供九种命名视觉风格
- 04组合风格与配色方案
- 05导出宽 2000 像素的 PNG
适用场景
- 01将文章摘要制作成统计区块图
- 02用并排信息图比较不同选项
- 03用柱形图呈现排序数据
- 04以编号步骤展示流程
安装
复制下面的命令,在终端中运行。
npx skills add https:/ / github.com/ cerico/ macfair --skill infographic安装后在 Claude Code 中输入/infographic确认已加载。
包含的文件
除 SKILL.md 外,安装时一起下载的参考资料和脚本。
palettes/desert.mdearth.mdforest.mdnordic.mdocean.mdstyles/c82.mdeuclid.mdnico.mdolive.mdparks.mdpreston.mdtimber.mdtransit.mdwerner.md详细介绍
信息图生成器
将任意文本转换为适合印刷的信息图 PNG。
使用方法
/infographic
/infographic nico
/infographic olive
/infographic werner
/infographic transit
/infographic parks
/infographic euclid
/infographic timber
/infographic preston
然后在出现提示时粘贴或描述内容。
也可以直接提供文本:
/infographic "Your article or content here..."
/infographic olive "When should I use X vs Y?"
/infographic werner "List the primary colors with examples"
/infographic transit "Rank the tallest buildings in NYC"
/infographic parks "Compare 3 national parks with stats"
/infographic euclid "Overview of geometry concepts"
/infographic timber "History of JavaScript frameworks"
/infographic preston "How to deploy a Next.js app"
配色方案
配色方案独立于样式控制颜色。可将任意样式与任意配色方案搭配使用。
使用方法
# Style with default palette
/infographic olive "..."
# Style with specific palette
/infographic olive:nordic "..."
/infographic olive --palette nordic "..."
可用配色方案
| 配色方案 | 画布 | 描述 |
|---|---|---|
| earth | 浅色 | 温暖的奶油色,搭配鼠尾草绿点缀(默认) |
| nordic | 深色 | 冷调蓝灰色,搭配霜色点缀 |
| desert | 浅色 | 沙色调,搭配陶土色点缀 |
| ocean | 浅色 | 浅蓝灰色,搭配青绿色点缀 |
| forest | 深色 | 深绿色,搭配苔藓色点缀 |
默认配色方案映射
| 样式 | 默认配色方案 |
|---|---|
| olive | earth |
| c82 | earth |
| nico | earth |
| werner | earth |
| transit | earth |
| parks | forest |
| euclid | earth |
| timber | earth |
| preston | earth |
兼容性
样式会声明画布偏好(light、dark 或 any)。当样式偏好与配色方案的画布类型冲突时:
- 会显示警告
- 文本颜色会切换为
text.onDark/text.onLight,以确保可读性
令牌参考
样式使用以下令牌(根据当前配色方案解析):
| 令牌 | SVG 占位符 | 用途 |
|---|---|---|
{canvas} | {canvasColor} | 背景填充 |
{text.primary} | {textColor} | 主标题/正文 |
{text.secondary} | {secondaryColor} | 辅助文本 |
{text.muted} | {mutedColor} | 弱化标签 |
{text.onDark} | {textOnDark} | 深色卡片上的文本 |
{text.onLight} | {textOnLight} | 浅色卡片上的文本 |
{accents[0-3]} | {accentColor} | 强调色(按数组顺序循环使用) |
{cards.primary} | {primaryCard} | 主卡片填充 |
{cards.secondary} | {secondaryCard} | 次要卡片填充 |
{rules} | {ruleColor} | 分隔线 |
样式解析
第一个参数(如果不是带引号的文本)会被视为样式名称。默认值:c82。
加载顺序:
- 从此技能目录加载
styles/<name>.md - 如果样式声明了
inherits: design:<name>,还要从技能目录加载design/<name>/SKILL.md - 设计系统 = 基础,信息图样式 = 覆盖项
可用样式:
- c82(默认)——古典排版、温暖的奶油色画布、低饱和自然色调。最适合统计信息块。
- nico——深色森林美学、明亮文字、低饱和强调色。最适合统计信息块。
- olive——柔和的大地色调、圆角卡片、阴影。最适合决策树和比较图。
- werner——古典目录/表格布局,配有色块和多列。最适合目录和参考图表。
- transit——带刻度的垂直柱状图,用于展示排名数据。最适合按数量进行比较。
- parks——深色仪表盘,采用彩色网格、图标和数值。最适合多项统计比较。
- euclid——包豪斯配色的画廊网格,搭配几何插图。最适合可视化项目画廊。
- timber——垂直时间线,带有主轴和交替排列的事件卡片。最适合按时间顺序展示历史。
- preston——带编号步骤和连接箭头的流程图。最适合操作指南。
流程
- 解析样式 — 根据参数确定样式并加载样式文件
- 检测布局 — 分析内容以确定最佳布局类型
- 提取结构 — 提取与检测到的布局相匹配的结构化数据
- 生成 SVG — 按照已加载的样式指南编写 SVG
- 导出 PNG — 转换为高分辨率 PNG(宽 2000px)
- 打开 — 显示结果以供检查
输出位置
文件保存至:~/Downloads/infographic-{timestamp}.png
布局检测
分析输入内容并选择合适的布局:
| 内容模式 | 布局 | 最适合的样式 |
|---|---|---|
| “如果 X,则 Y”、“何时使用”、是/否问题、二选一 | decision-tree | olive |
| “A 与 B 对比”、比较选项、优缺点、替代方案 | comparison | olive |
| 统计数据、关键发现、章节、摘要 | stat-block | c82、nico |
| 包含多个属性的列表、调色板、规格 | catalog | werner |
| 用于比较的排名数量、长度、高度、计数 | bars | transit |
| 包含多个数值统计项的项目、仪表盘 | tiles | parks |
| 带插图/图标和说明文字的视觉项目 | gallery | euclid |
| 按时间顺序排列的事件、历史、演变、里程碑 | timeline | timber |
| 顺序步骤、操作指南、工作流、流程 | process | preston |
检测规则:
- 如果内容提出一个有两种不同答案路径的问题 →
decision-tree - 如果内容比较 2-4 个不同选项/方法 →
comparison - 如果内容列出的每个项目都包含多个属性(颜色、规格) →
catalog - 如果内容按单一数量(高度、长度、计数)对项目进行排名 →
bars - 如果内容展示每个项目的多个数值统计项(仪表盘样式) →
tiles - 如果内容展示带标签/描述的视觉项目 →
gallery - 如果内容包含带日期/年份的时间顺序事件 →
timeline - 如果内容描述顺序步骤或流程 →
process - 否则 →
stat-block(默认)
样式与布局的适配关系:
olive样式默认在 decision-tree 和 comparison 之间自动检测werner样式默认使用 catalog 布局transit样式默认使用 bars 布局parks样式默认使用 tiles 布局euclid样式默认使用 gallery 布局timber样式默认使用 timeline 布局preston样式默认使用 process 布局c82和nico样式默认使用 stat-block 布局
布局:stat-block(默认)
包含章节、统计数据和关键信息的经典信息图。
提取架构
{
layout: "stat-block"
title: string // Main title, 3-10 words
subtitle?: string // Optional tagline
sections: [{ // 2-4 sections
heading: string // Section heading, 3-8 words
content: string // 1-2 sentences max
stats?: [{ // Up to 3 stats per section
value: string // e.g. "85%", "1.2M"
label: string // What it represents
}]
}]
keyTakeaway: string // Single most important insight
}
SVG 模板结构
<svg width="800" height="1100" xmlns="http://www.w3.org/2000/svg">
<rect width="800" height="1100" fill="{canvasColor}"/>
<rect x="{inset}" y="{inset}" width="{w-2*inset}" height="{h-2*inset}" fill="none" stroke="{ruleColor}" stroke-width="1"/>
<text x="400" y="100" text-anchor="middle" fill="{textColor}" font-size="36" font-weight="bold" font-family="{headingFont}">{title}</text>
<text x="400" y="132" text-anchor="middle" fill="{mutedColor}" font-size="16" font-style="italic" font-family="{headingFont}">{subtitle}</text>
<line x1="200" y1="160" x2="600" y2="160" stroke="{ruleColor}" stroke-width="0.5"/>
<text x="{margin}" y="210" fill="{accentColor}" font-size="13" font-family="{labelFont}" letter-spacing="2">{SECTION HEADING}</text>
<text x="{margin}" y="236" fill="{textColor}" font-size="15" font-family="{bodyFont}" line-height="1.6">
<tspan x="{margin}" dy="0">{contentLine1}</tspan>
<tspan x="{margin}" dy="22">{contentLine2}</tspan>
</text>
<text x="{statX}" y="300" text-anchor="middle" fill="{textColor}" font-size="48" font-family="{headingFont}">{statValue}</text>
<line x1="{ruleX1}" y1="308" x2="{ruleX2}" y2="308" stroke="{ruleColor}" stroke-width="0.5"/>
<text x="{statX}" y="324" text-anchor="middle" fill="{mutedColor}" font-size="11" font-family="{labelFont}" letter-spacing="2">{STAT LABEL}</text>
<line x1="{margin}" y1="360" x2="{margin+contentWidth}" y2="360" stroke="{ruleColor}" stroke-width="0.5"/>
<line x1="200" y1="980" x2="600" y2="980" stroke="{ruleColor}" stroke-width="0.5"/>
<line x1="200" y1="983" x2="600" y2="983" stroke="{ruleColor}" stroke-width="0.5"/>
<text x="400" y="1020" text-anchor="middle" fill="{mutedColor}" font-size="14" font-style="italic" font-family="{headingFont}">{keyTakeaway}</text>
</svg>
布局:decision-tree
包含问题气泡和两个分支卡片的二选一流程图。
提取架构
{
layout: "decision-tree"
question: string // The decision point (displayed in bubble)
branches: [{
label: string // "YES" / "NO" or custom labels
title: string // Branch heading (e.g., "Use Perplexity")
description: string // Supporting explanation (1-2 sentences)
bullets?: string[] // Optional 2-4 bullet points
icon?: string // Icon hint: search, document, data, draft, etc.
}, {
// Second branch (same structure)
}]
}
SVG 模板(olive 样式)
<svg width="800" height="620" xmlns="http://www.w3.org/2000/svg">
<defs>
<filter id="shadow" x="-20%" y="-20%" width="140%" height="140%">
<feDropShadow dx="0" dy="4" stdDeviation="8" flood-opacity="0.1"/>
</filter>
</defs>
<rect width="800" height="620" fill="#F5F0E6"/>
<rect x="140" y="30" width="520" height="70" rx="35" fill="#FAFAF8" filter="url(#shadow)" stroke="#2C2C2C" stroke-width="1"/>
<text x="400" y="72" text-anchor="middle" fill="#2C2C2C" font-size="18" font-weight="500" font-family="system-ui">{question}</text>
<path d="M280,100 Q280,140 200,180" fill="none" stroke="#2C2C2C" stroke-width="1.5"/>
<path d="M520,100 Q520,140 600,180" fill="none" stroke="#2C2C2C" stroke-width="1.5"/>
<polygon points="195,175 205,185 210,172" fill="#2C2C2C"/>
<polygon points="605,175 595,185 590,172" fill="#2C2C2C"/>
<text x="220" y="145" text-anchor="middle" fill="#7D8B6E" font-size="14" font-weight="bold" font-family="system-ui">{branch1.label}</text>
<text x="580" y="145" text-anchor="middle" fill="#7D8B6E" font-size="14" font-weight="bold" font-family="system-ui">{branch2.label}</text>
<rect x="30" y="190" width="360" height="400" rx="16" fill="#7D8B6E" filter="url(#shadow)"/>
<circle cx="80" cy="240" r="24" fill="#FAFAF8"/>
<text x="120" y="248" fill="#FAFAF8" font-size="20" font-weight="bold" font-family="system-ui">{branch1.title}</text>
<text x="50" y="290" fill="#FAFAF8" font-size="14" font-family="system-ui">
<tspan x="50" dy="0">{description line 1}</tspan>
<tspan x="50" dy="22">{description line 2}</tspan>
</text>
<text x="50" y="360" fill="#FAFAF8" font-size="14" font-family="system-ui">
<tspan x="50" dy="0">• {bullet1}</tspan>
<tspan x="50" dy="24">• {bullet2}</tspan>
<tspan x="50" dy="24">• {bullet3}</tspan>
</text>
<rect x="410" y="190" width="360" height="400" rx="16" fill="#E8E2D4" filter="url(#shadow)"/>
<circle cx="460" cy="240" r="24" fill="#FAFAF8"/>
<text x="500" y="248" fill="#2C2C2C" font-size="20" font-weight="bold" font-family="system-ui">{branch2.title}</text>
</svg>
布局:comparison
用于比较 2-4 个选项的并排对比卡片。
提取架构
{
layout: "comparison"
title?: string // Optional main title above cards
items: [{
heading: string // Option name (e.g., "React", "Vue")
description: string // Brief description (1-2 sentences)
bullets?: string[] // Optional 2-4 key points
color: "primary" | "secondary" // Card color alternation
icon?: string // Icon hint
}]
}
SVG 模板(olive 样式,2 个项目)
<svg width="800" height="520" xmlns="http://www.w3.org/2000/svg">
<defs>
<filter id="shadow" x="-20%" y="-20%" width="140%" height="140%">
<feDropShadow dx="0" dy="4" stdDeviation="8" flood-opacity="0.1"/>
</filter>
</defs>
<rect width="800" height="520" fill="#F5F0E6"/>
<text x="400" y="50" text-anchor="middle" fill="#2C2C2C" font-size="24" font-weight="500" font-family="system-ui">{title}</text>
<rect x="30" y="80" width="360" height="410" rx="16" fill="#7D8B6E" filter="url(#shadow)"/>
<circle cx="80" cy="130" r="24" fill="#FAFAF8"/>
<text x="120" y="138" fill="#FAFAF8" font-size="20" font-weight="bold" font-family="system-ui">{item1.heading}</text>
<text x="50" y="180" fill="#FAFAF8" font-size="14" font-family="system-ui">
<tspan x="50" dy="0">{description}</tspan>
</text>
<text x="50" y="240" fill="#FAFAF8" font-size="14" font-family="system-ui">
<tspan x="50" dy="0">• {bullet1}</tspan>
<tspan x="50" dy="24">• {bullet2}</tspan>
</text>
<rect x="410" y="80" width="360" height="410" rx="16" fill="#E8E2D4" filter="url(#shadow)"/>
<circle cx="460" cy="130" r="24" fill="#FAFAF8"/>
<text x="500" y="138" fill="#2C2C2C" font-size="20" font-weight="bold" font-family="system-ui">{item2.heading}</text>
</svg>
多个项目的尺寸
- 2 个项目:800x520,卡片宽 360px
- 3 个项目:1000x520,卡片宽 300px
- 4 个项目:1200x520,卡片宽 270px
布局:catalog
包含色块、多列和经典排版的表格/目录布局。灵感来自 Werner 的《色彩命名法》。
提取架构
{
layout: "catalog"
title?: string // Optional title above table (uppercase, letter-spaced)
columns: string[] // Column headers
rows: [{
swatch?: string // Hex color for swatch column (optional)
values: string[] // Data for each column
parts?: string[] // Hex colors for palette dots (optional)
}]
}
SVG 模板(werner 样式)
<svg width="900" height="{dynamicHeight}" xmlns="http://www.w3.org/2000/svg">
<rect width="900" height="{height}" fill="#F5F0E6"/>
<text x="450" y="45" text-anchor="middle" fill="#2C2C2C" font-size="18" font-family="Georgia, serif" letter-spacing="4">{TITLE}</text>
<text x="60" y="90" fill="#2C2C2C" font-size="12" font-family="Georgia, serif" text-decoration="underline">Color</text>
<text x="130" y="90" fill="#2C2C2C" font-size="12" font-family="Georgia, serif" text-decoration="underline">Name</text>
<text x="280" y="90" fill="#2C2C2C" font-size="12" font-family="Georgia, serif" text-decoration="underline">Animal</text>
<text x="450" y="90" fill="#2C2C2C" font-size="12" font-family="Georgia, serif" text-decoration="underline">Vegetable</text>
<text x="620" y="90" fill="#2C2C2C" font-size="12" font-family="Georgia, serif" text-decoration="underline">Mineral</text>
<text x="790" y="90" fill="#2C2C2C" font-size="12" font-family="Georgia, serif" text-decoration="underline">Parts</text>
<rect x="60" y="110" width="50" height="60" fill="{swatchColor}" stroke="#C4B8A8" stroke-width="0.5"/>
<text x="130" y="145" fill="#2C2C2C" font-size="14" font-family="Georgia, serif">24. Scotch Blue</text>
<text x="280" y="145" fill="#2C2C2C" font-size="13" font-style="italic" font-family="Georgia, serif">Throat of Blue Titmouse.</text>
<text x="450" y="145" fill="#2C2C2C" font-size="13" font-style="italic" font-family="Georgia, serif">Stamina of Single Purple Anemone.</text>
<text x="620" y="145" fill="#2C2C2C" font-size="13" font-style="italic" font-family="Georgia, serif">Blue Copper Ore.</text>
<circle cx="795" cy="140" r="12" fill="#1a1a1a"/>
<circle cx="823" cy="140" r="12" fill="#4a7089"/>
<circle cx="851" cy="140" r="12" fill="#c4a5a0"/>
</svg>
布局说明
- 行高:80-90px(可容纳色块和换行文本)
- 色块尺寸:50x60px 或 60x70px
- 部件圆点:直径 20-24px,间距 4px 或轻微重叠
- 描述性/自然参考列使用斜体
- 显示有序项目时,在名称前添加编号前缀(例如,“24. 苏格兰蓝”)
- 添加细微的行分隔线(0.5px),或使用留白(间距 24px)
- 高度为动态值:
110 + (rowCount × 90)像素
布局:bars
按高度对项目进行排名的垂直条形图。沿每个条形显示数据点刻度线。
提取架构
{
layout: "bars"
title: string // Main title
subtitle?: string // Byline or source
description?: string // Explanatory text
bars: [{
label: string // Bar name (shown at bottom)
value: number // Determines bar height
color?: string // Override color
ticks?: [{ // Horizontal tick marks
position: number // 0-100 percentage up the bar
label: string // Tick label
}]
}]
sortOrder?: "asc" | "desc" // Default: "asc"
}
SVG 模板(transit 样式)
<svg width="800" height="1200" xmlns="http://www.w3.org/2000/svg">
<rect width="800" height="1200" fill="#E8DFD0"/>
<text x="60" y="80" fill="#2C2C2C" font-size="14" font-family="Helvetica, sans-serif" letter-spacing="3" text-decoration="underline">CHART TITLE</text>
<text x="60" y="120" fill="#2C2C2C" font-size="42" font-weight="bold" font-family="Georgia, serif">Main Title</text>
<rect x="60" y="500" width="80" height="600" fill="#D4A574"/>
<line x1="60" y1="700" x2="140" y2="700" stroke="#2C2C2C" stroke-width="0.5"/>
<text x="145" y="703" fill="#2C2C2C" font-size="9" font-family="Helvetica, sans-serif">Data point</text>
<text x="100" y="1130" text-anchor="middle" fill="#2C2C2C" font-size="11" font-family="Helvetica, sans-serif">LABEL</text>
</svg>
布局说明
- 纵向尺寸较大:800x1200 或类似尺寸
- 所有条形从同一基线开始
- 条形宽度:60-100px,间距:10-20px
- 按升序(最短的在左)或降序排列
- 刻度标签交替显示在两侧,或右对齐
布局:tiles
由彩色方块、图标和统计值构成的网格。以仪表盘样式展示多个属性。
提取架构
{
layout: "tiles"
items: [{
title: string // Item name
subtitle?: string // Location/category
stats: [{
icon: string // elevation-up, elevation-down, area, calendar, people, rainfall, latitude, longitude
value: string // Display value
color?: string // Tile color
}]
}]
columns?: number // Tiles per row (default: 4)
rows?: number // Rows per item (default: 3)
}
SVG 模板(parks 样式)
<svg width="1200" height="500" xmlns="http://www.w3.org/2000/svg">
<rect width="1200" height="500" fill="#3D2E1F"/>
<rect x="40" y="40" width="85" height="85" rx="8" fill="#6B4423"/>
<g transform="translate(82,60)">
<path d="M-8,4 L0,-4 L8,4" fill="none" stroke="#F5F0E6" stroke-width="3"/>
</g>
<text x="82" y="105" text-anchor="middle" fill="#F5F0E6" font-size="14" font-family="Helvetica, sans-serif">10,197 ft</text>
<text x="200" y="430" text-anchor="middle" fill="#F5F0E6" font-size="18" font-weight="bold" font-family="Helvetica, sans-serif">ITEM NAME</text>
<text x="200" y="455" text-anchor="middle" fill="#F5F0E6" font-size="14" font-style="italic" font-family="Helvetica, sans-serif">Subtitle</text>
</svg>
布局说明
- 瓦片尺寸:80-100px 的正方形
- 间距:8-12px,圆角半径:rx="8"
- 上半部分放图标,下半部分放数值
- 深色画布,土色系瓦片
- 每个项目的网格下方居中显示标题/副标题
布局:gallery
由带插图和说明文字的视觉项目组成的网格。灵感来自包豪斯风格的几何构图。
提取模式
{
layout: "gallery"
title?: string // Section title (italic, with period)
items: [{
label: string // Item label (e.g., "BOOK I.")
description: string // Brief description
illustration?: string // Hint: triangle, square, circle, polygon, grid
}]
columns?: number // Items per row (default: 3)
}
SVG 模板(euclid 风格)
<svg width="900" height="700" xmlns="http://www.w3.org/2000/svg">
<rect width="900" height="700" fill="#F5EFE0"/>
<text x="450" y="60" text-anchor="middle" fill="#2C2C2C" font-size="24" font-style="italic" font-family="Georgia, serif">TITLE.</text>
<g transform="translate(150,180)">
<polygon points="0,-80 80,60 -80,60" fill="none" stroke="#1A1A1A" stroke-width="2"/>
<rect x="-30" y="-20" width="40" height="40" fill="#D64045"/>
<circle cx="20" cy="30" r="25" fill="#1B4B8A"/>
</g>
<text x="150" y="360" text-anchor="middle" fill="#2C2C2C" font-size="16" font-family="Georgia, serif">ITEM I.</text>
<text x="150" y="385" text-anchor="middle" fill="#2C2C2C" font-size="14" font-family="Georgia, serif">Description text</text>
</svg>
布局说明
- 网格:通常为 3 列、2 行
- 插图区域:180-220px
- 包豪斯配色:红色 #D64045、蓝色 #1B4B8A、黄色 #F5B800、黑色 #1A1A1A
- 抽象几何构图
- 使用罗马数字作为标签(I、II、III……)
布局:timeline
带有中央主轴和交替排列事件卡片的垂直时间线。适合按时间顺序呈现历史。
提取模式
{
layout: "timeline"
title?: string // Optional main title
subtitle?: string // Optional byline or date range
events: [{
date: string // Year or date (e.g., "1995", "March 2020")
title: string // Event title
description: string // Brief description (1-2 sentences)
side?: "left" | "right" // Override alternation
}]
}
SVG 模板(timber 风格)
<svg width="800" height="{dynamicHeight}" xmlns="http://www.w3.org/2000/svg">
<rect width="800" height="{height}" fill="#F5F0E6"/>
<text x="400" y="60" text-anchor="middle" fill="#2C2C2C" font-size="28" font-weight="bold" font-family="Georgia, serif">{title}</text>
<text x="400" y="90" text-anchor="middle" fill="#8B7355" font-size="14" font-style="italic" font-family="Georgia, serif">{subtitle}</text>
<line x1="400" y1="120" x2="400" y2="{spineEnd}" stroke="#8B7355" stroke-width="2"/>
<circle cx="400" cy="180" r="8" fill="#8B7355"/>
<text x="360" y="185" text-anchor="end" fill="#8B7355" font-size="14" font-weight="bold" font-family="Georgia, serif">1995</text>
<rect x="420" y="150" width="320" height="80" rx="4" fill="#FAFAF8" stroke="#D4C4A8" stroke-width="1"/>
<text x="440" y="180" fill="#2C2C2C" font-size="16" font-weight="bold" font-family="Georgia, serif">{event.title}</text>
<text x="440" y="205" fill="#5C5C5C" font-size="13" font-family="Georgia, serif">
<tspan x="440" dy="0">{description line 1}</tspan>
<tspan x="440" dy="18">{description line 2}</tspan>
</text>
<line x1="408" y1="180" x2="420" y2="180" stroke="#8B7355" stroke-width="1"/>
<rect x="60" y="280" width="320" height="80" rx="4" fill="#FAFAF8" stroke="#D4C4A8" stroke-width="1"/>
</svg>
布局说明
- 主轴垂直穿过中心
- 卡片左右交替排列
- 主轴上的圆形节点标记各个事件
- 日期标签位于卡片的另一侧
- 卡片高度:根据内容为 70-100px
- 事件之间的垂直间距:130-160px
- 动态高度:
120 + (eventCount × 150)像素
布局:process
带编号步骤和连接箭头的顺序流程图。适合操作指南和工作流。
提取模式
{
layout: "process"
title?: string // Optional main title
subtitle?: string // Optional description
steps: [{
number: number // Step number (1, 2, 3...)
title: string // Step title
description: string // Brief description (1-2 sentences)
icon?: string // Icon hint: gear, code, check, etc.
}]
columns?: number // Steps per row (default: 1 for vertical)
}
SVG 模板(preston 风格)
<svg width="800" height="{dynamicHeight}" xmlns="http://www.w3.org/2000/svg">
<rect width="800" height="{height}" fill="#F5F0E6"/>
<text x="400" y="60" text-anchor="middle" fill="#2C2C2C" font-size="28" font-weight="bold" font-family="Helvetica, sans-serif">{title}</text>
<text x="400" y="90" text-anchor="middle" fill="#6B6B6B" font-size="14" font-family="Helvetica, sans-serif">{subtitle}</text>
<g transform="translate(100, 140)">
<circle cx="30" cy="30" r="24" fill="#4A6741" stroke="none"/>
<text x="30" y="38" text-anchor="middle" fill="#FAFAF8" font-size="20" font-weight="bold" font-family="Helvetica, sans-serif">1</text>
<text x="70" y="25" fill="#2C2C2C" font-size="18" font-weight="bold" font-family="Helvetica, sans-serif">{step.title}</text>
<text x="70" y="50" fill="#5C5C5C" font-size="14" font-family="Helvetica, sans-serif">
<tspan x="70" dy="0">{description line 1}</tspan>
<tspan x="70" dy="20">{description line 2}</tspan>
</text>
</g>
<line x1="130" y1="220" x2="130" y2="260" stroke="#4A6741" stroke-width="2"/>
<polygon points="130,270 125,260 135,260" fill="#4A6741"/>
<g transform="translate(100, 280)">
<circle cx="30" cy="30" r="24" fill="#4A6741"/>
<text x="30" y="38" text-anchor="middle" fill="#FAFAF8" font-size="20" font-weight="bold" font-family="Helvetica, sans-serif">2</text>
</g>
</svg>
布局说明
- 左侧放置编号圆圈(半径 24-30px)
- 步骤内容放在编号右侧
- 使用垂直箭头连接各步骤
- 箭头长度:40-60px
- 步骤垂直间距:140-160px
- 编号和箭头使用强调色
- 动态高度:
120 + (stepCount × 150)像素 - 水平布局(列数 > 1)时:按行排列,并使用水平箭头
图标库
常见概念的简易 SVG 路径。在图标圆圈内使用 <g transform="translate(x,y)">,并将其居中。
可用图标
<path d="M-6,-6 L6,6 M-4,0 a6,6 0 1,1 0,0.01" fill="none" stroke="#4A6741" stroke-width="2" stroke-linecap="round"/>
<path d="M-6,-8 L4,-8 L6,-6 L6,8 L-6,8 Z M-4,-5 L3,-5 M-4,-1 L3,-1 M-4,3 L1,3" fill="none" stroke="#4A6741" stroke-width="1.5" stroke-linecap="round"/>
<path d="M0,-7 A7,7 0 0,1 6,3.5 M6,3.5 L4,0 M6,3.5 L9,2 M0,7 A7,7 0 0,1 -6,-3.5 M-6,-3.5 L-4,0 M-6,-3.5 L-9,-2" fill="none" stroke="#4A6741" stroke-width="1.5" stroke-linecap="round"/>
<path d="M-6,8 L-2,8 L8,-6 L4,-6 Z M4,0 L0,0" fill="none" stroke="#4A6741" stroke-width="1.5" stroke-linejoin="round"/>
<path d="M-5,8 L5,8 L5,6 L4,5 L4,2 L5,1 L5,-4 L3,-4 L3,-7 L1,-7 L1,-4 L-1,-4 L-1,-7 L-3,-7 L-3,-4 L-5,-4 L-5,1 L-4,2 L-4,5 L-5,6 Z" fill="none" stroke="#4A6741" stroke-width="1.5"/>
<path d="M0,-8 L8,0 L0,8 L-8,0 Z M-8,0 L0,4 L8,0 M0,4 L0,8" fill="none" stroke="#4A6741" stroke-width="1.5" stroke-linejoin="round"/>
<path d="M0,-8 L0,-6 M-6,-4 L-4,-3 M6,-4 L4,-3 M-4,6 L4,6 M-3,8 L3,8 M-4,2 Q-6,-2 0,-6 Q6,-2 4,2 L3,4 L-3,4 Z" fill="none" stroke="#4A6741" stroke-width="1.5" stroke-linecap="round"/>
<circle cx="0" cy="0" r="8" fill="none" stroke="#4A6741" stroke-width="1.5"/>
<path d="M-4,0 L-1,3 L5,-4" fill="none" stroke="#4A6741" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M0,-7 L8,7 L-8,7 Z M0,0 L0,2 M0,4 L0,5" fill="none" stroke="#4A6741" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M-3,-6 L-8,0 L-3,6 M3,-6 L8,0 L3,6" fill="none" stroke="#4A6741" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<circle cx="-3" cy="-4" r="3" fill="none" stroke="#4A6741" stroke-width="1.5"/>
<path d="M-9,6 Q-9,0 -3,0 Q3,0 3,6" fill="none" stroke="#4A6741" stroke-width="1.5"/>
<circle cx="5" cy="-2" r="2.5" fill="none" stroke="#4A6741" stroke-width="1.5"/>
<path d="M1,6 Q2,2 5,2 Q9,2 9,6" fill="none" stroke="#4A6741" stroke-width="1.5"/>
<circle cx="0" cy="0" r="3" fill="none" stroke="#4A6741" stroke-width="1.5"/>
<path d="M0,-8 L0,-5 M0,5 L0,8 M-8,0 L-5,0 M5,0 L8,0 M-5.6,-5.6 L-3.5,-3.5 M3.5,3.5 L5.6,5.6 M5.6,-5.6 L3.5,-3.5 M-3.5,3.5 L-5.6,5.6" fill="none" stroke="#4A6741" stroke-width="2" stroke-linecap="round"/>
<path d="M-8,-6 L8,-6 L8,4 L2,4 L-2,8 L-2,4 L-8,4 Z" fill="none" stroke="#4A6741" stroke-width="1.5" stroke-linejoin="round"/>
<circle cx="0" cy="0" r="8" fill="none" stroke="#4A6741" stroke-width="1.5"/>
<path d="M-8,0 L8,0 M0,-8 Q-4,0 0,8 Q4,0 0,-8" fill="none" stroke="#4A6741" stroke-width="1"/>
图标用法
- 在所需位置放置图标圆圈
- 在带有
transform="translate(cx,cy)"的<g>中添加图标路径,其中 cx、cy 为圆心坐标 - 将提取数据中的图标提示与图标名称对应
重要说明
- 文本换行: 将较长文本拆分为多个
<tspan>元素,正文使用dy="22" - 动态高度: 根据内容调整画布高度
- stat-block 布局说明:
- 区块标题颜色:轮流使用强调色
- 统计数据布局:在内容区域宽度内将 N 个统计项均匀居中排列
- 不使用阴影、渐变或圆角
- 所有样式均内联(rsvg-convert 不支持 SVG 外部 CSS)
- olive 布局说明:
- 始终在 defs 中包含阴影滤镜
- 主卡片使用浅色文字(#FAFAF8)
- 次卡片使用深色文字(#2C2C2C)
- 图标在白色圆圈中居中
- 所有卡片均使用圆角(rx="16")
- werner 布局说明:
- 全文使用衬线字体(Georgia)
- 描述性列使用斜体文字
- 列标题加下划线
- 色块颜色接近画布颜色时需添加描边
- 部件圆点可以略微重叠
- transit 布局说明:
- 采用纵向格式(800x1200+)
- 条形图从同一基线开始,并按数值排序
- 刻度线配有小号标签
- 标题区块位于左上角,并附带说明
- parks 布局说明:
- 深棕色画布
- 网格中使用土色系瓦片
- 每个瓦片包含图标和数值
- 深色瓦片使用浅色文字,浅色瓦片使用深色文字
- euclid 布局说明:
- 包豪斯配色:红色、蓝色、黄色、黑色
- 几何插图(抽象构图)
- 使用带句点的衬线斜体标题
- 使用罗马数字标签
转换
编写 SVG 文件后,将其转换为 PNG:
rsvg-convert -w 2000 input.svg -o output.png
然后打开:
open output.png
示例
决策树输入:“我该在什么时候使用 Perplexity,什么时候使用 ChatGPT?”
- 检测结果:决策树布局
- 问题气泡:“我该在什么时候使用 Perplexity,什么时候使用 ChatGPT?”
- 分支 1:“使用 Perplexity”,附带侧重研究的要点
- 分支 2:“使用 ChatGPT”,附带创意和编码要点
对比输入:“对比 React 和 Vue 在构建 Web 应用方面的表现”
- 检测结果:对比布局
- 两张卡片并排展示各自的优点和特性
统计块输入:“用户研究的主要发现”
- 检测结果:统计块布局(默认)
- 传统版块,包含统计数据和结论
目录输入:“展示 Werner 色卡中的蓝色”
- 检测结果:目录布局
- 表格中包含色样、名称、自然界中的对应颜色以及调色板色点
柱状图输入:“欧洲最高的 5 座山峰排名”
- 检测结果:柱状图布局
- 按高度排序的垂直柱形,并标注关键海拔刻度
卡片输入:“展示 3 个国家公园的统计数据:海拔、面积、游客人数、降雨量”
- 检测结果:卡片布局
- 由彩色卡片组成的网格,每张卡片展示对应公园的图标和数据
画廊输入:“概览欧几里得《几何原本》的 6 卷”
- 检测结果:画廊布局
- 几何插图网格,并附有说明