paper-comic

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Paper Comic - 论文漫画生成

Paper Comic - Academic Paper Comic Generator

将学术论文转化为连贯的教育漫画,用视觉叙事让复杂概念易于理解。
Convert academic papers into coherent educational comics, making complex concepts easy to understand through visual storytelling.

使用方法

Usage

bash
/paper-comic /path/to/paper.pdf
/paper-comic /path/to/paper.pdf --style tech
/paper-comic  # 然后粘贴论文内容
bash
/paper-comic /path/to/paper.pdf
/paper-comic /path/to/paper.pdf --style tech
/paper-comic  # Then paste the paper content

画风选项

Art Style Options

画风特点适用论文
classic清线风格,简洁专业,易于理解通用,大多数论文(默认)
tech科技风,电路元素,霓虹光效AI/计算机/工程类
warm温暖风,亲和力强,怀旧感心理学/认知科学/教育类
chalk粉笔风,黑板效果,学术感数学/物理/理论类
Art StyleFeaturesSuitable Papers
classicClean line style, concise and professional, easy to understandGeneral purpose, suitable for most papers (default)
techTechnical style with circuit elements and neon effectsAI/Computer Science/Engineering papers
warmWarm style, approachable, nostalgicPsychology/Cognitive Science/Education papers
chalkChalkboard style, blackboard effect, academic feelMathematics/Physics/Theoretical papers

输出结构

Output Structure

[output-dir]/
├── outline.md           # 大纲和分镜
├── characters/
│   ├── characters.md    # 角色定义
│   └── characters.png   # 角色参考图
├── prompts/
│   ├── 00-cover.md      # 封面 prompt
│   └── XX-page.md       # 各页 prompt
├── 00-cover.png         # 封面
└── XX-page.png          # 各页漫画
输出目录
  • 有源文件:
    [source-dir]/comic/
  • 无源文件:
    comic-outputs/YYYY-MM-DD/[topic-slug]/
[output-dir]/
├── outline.md           # Outline and storyboards
├── characters/
│   ├── characters.md    # Character definitions
│   └── characters.png   # Character reference images
├── prompts/
│   ├── 00-cover.md      # Cover prompt
│   └── XX-page.md       # Page-specific prompts
├── 00-cover.png         # Cover image
└── XX-page.png          # Comic pages
Output Directories
  • With source files:
    [source-dir]/comic/
  • Without source files:
    comic-outputs/YYYY-MM-DD/[topic-slug]/

工作流程

Workflow

第一步:分析论文

Step 1: Analyze the Paper

  1. 读取论文内容(PDF 或 Markdown)
  2. 提取核心信息:
    • 论文标题、作者
    • 研究背景和动机
    • 核心创新点(1-3 个)
    • 关键方法/算法
    • 主要实验结果
  3. 根据论文领域自动推荐画风(或使用用户指定)
  1. Read paper content (PDF or Markdown)
  2. Extract core information:
    • Paper title, authors
    • Research background and motivation
    • Core innovations (1-3)
    • Key methods/algorithms
    • Main experimental results
  3. Automatically recommend an art style based on the paper's field (or use user-specified style)

第二步:设计叙事结构

Step 2: Design Narrative Structure

四段式结构(适合 8-12 页漫画):
阶段页数内容
引入1-2 页问题背景,为什么需要这个研究
探索2-3 页现有方法的局限,引出创新点
核心3-5 页详细讲解创新方法,用比喻可视化
总结1-2 页实验结果,意义和展望
Four-stage structure (suitable for 8-12 pages):
StageNumber of PagesContent
Introduction1-2 pagesProblem background, why this research is needed
Exploration2-3 pagesLimitations of existing methods, leading to innovations
Core3-5 pagesDetailed explanation of innovative methods, visualized with metaphors
Summary1-2 pagesExperimental results, significance and future outlook

第三步:定义角色

Step 3: Define Characters

创建
characters/characters.md
必要角色
  • 导师:知识讲解者,睿智亲和
  • 学生:代表读者,提问和学习
  • 概念化身(可选):将抽象概念拟人化
角色一致性要求
  • 导师和学生必须出现在 ≥60% 的页面
  • 每页明确标注出场角色
  • 角色外观在所有页面保持一致
Create
characters/characters.md
:
Required Characters:
  • Mentor: Knowledge explainer, wise and approachable
  • Student: Represents readers, asks questions and learns
  • Concept Personification (optional): Personify abstract concepts
Character Consistency Requirements:
  • Mentor and student must appear in ≥60% of pages
  • Clearly mark characters present on each page
  • Character appearance remains consistent across all pages

第四步:创建分镜

Step 4: Create Storyboards

创建
outline.md
,包含:
  • 元数据(标题、画风、页数)
  • 封面设计
  • 每页的分格布局和内容
分镜要求
  • 每页 3-5 个分格
  • 标注每格的角色、场景、对话
  • 对话全部使用中文
  • 公式用图示表达,不写文字公式
Create
outline.md
, including:
  • Metadata (title, art style, number of pages)
  • Cover design
  • Panel layout and content for each page
Storyboard Requirements:
  • 3-5 panels per page
  • Mark characters, scenes, and dialogue for each panel
  • All dialogue must be in Chinese
  • Express formulas with illustrations instead of text

第五步:生成图片

Step 5: Generate Images

使用 baoyu-gemini-web 生成(需要 Google 账号认证):
bash
undefined
Generate using baoyu-gemini-web (requires Google account authentication):
bash
undefined

获取技能安装路径(假设通过 npx skills add 安装)

Get skill installation path (assuming installed via npx skills add)

SKILL_DIR="$HOME/.claude/skills/baoyu-gemini-web"
SKILL_DIR="$HOME/.claude/skills/baoyu-gemini-web"

或者如果在其他位置:

Or if located elsewhere:

SKILL_DIR="$HOME/.codex/skills/baoyu-gemini-web"

SKILL_DIR="$HOME/.codex/skills/baoyu-gemini-web"

生成角色参考图

Generate character reference images

npx -y bun "$SKILL_DIR/scripts/main.ts"
--promptfiles references/base-prompt.md characters/characters.md
--image characters/characters.png
--sessionId comic-[topic]-[timestamp]
npx -y bun "$SKILL_DIR/scripts/main.ts"
--promptfiles references/base-prompt.md characters/characters.md
--image characters/characters.png
--sessionId comic-[topic]-[timestamp]

生成各页(使用相同 sessionId 保持一致性)

Generate each page (use the same sessionId for consistency)

npx -y bun "$SKILL_DIR/scripts/main.ts"
--promptfiles references/base-prompt.md prompts/XX-page.md
--image XX-page.png
--sessionId comic-[topic]-[timestamp]

**关键**:使用相同的 `--sessionId` 确保角色外观一致。

**首次运行**:会打开 Chrome 浏览器进行 Google 账号认证,之后 Cookie 会被缓存。
npx -y bun "$SKILL_DIR/scripts/main.ts"
--promptfiles references/base-prompt.md prompts/XX-page.md
--image XX-page.png
--sessionId comic-[topic]-[timestamp]

**Key**: Use the same `--sessionId` to ensure consistent character appearance.

**First Run**: Chrome browser will open for Google account authentication, and cookies will be cached afterward.

第六步:输出文档

Step 6: Output Documentation

生成
[topic]-paper-comic.md
markdown
undefined
Generate
[topic]-paper-comic.md
:
markdown
undefined

[论文标题] - 漫画解读

[Paper Title] - Comic Interpretation

概览

Overview

  • 论文:[标题]
  • 画风:[选择的画风]
  • 页数:[N]
  • 生成时间:[YYYY-MM-DD]
  • Paper: [Title]
  • Art Style: [Selected Style]
  • Number of Pages: [N]
  • Generation Time: [YYYY-MM-DD]

漫画页面

Comic Pages

封面

Cover

封面
Cover

第 1 页

Page 1

第1页 内容:[简述本页讲解的内容]
...
Page 1 Content: [Brief description of what this page explains]
...

核心知识点

Core Knowledge Points

  1. [知识点1]
  2. [知识点2]
  3. [知识点3]
undefined
  1. [Knowledge Point 1]
  2. [Knowledge Point 2]
  3. [Knowledge Point 3]
undefined

重要原则

Key Principles

文字要求

Text Requirements

  • 所有对话和旁白必须是中文
  • 专业术语:中文 + 英文,如"梯度下降 (Gradient Descent)"
  • 文字必须清晰可读,不模糊
  • All dialogue and narration must be in Chinese
  • Professional terms: Chinese + English, e.g., "梯度下降 (Gradient Descent)"
  • Text must be clear and readable, no blurriness

公式处理

Formula Handling

  • 不要用文字写公式
  • 用图示/比喻表达公式含义
  • 例:梯度下降 → 画小球滚下山坡
  • Do not write formulas as text
  • Express formula meanings with illustrations/metaphors
  • Example: Gradient Descent → Draw a ball rolling down a hillside

画面连贯性

Visual Coherence

  • 角色外观全程一致
  • 场景风格统一
  • 叙事逻辑清晰递进
  • Consistent character appearance throughout
  • Unified scene style
  • Clear and progressive narrative logic

参考文件

Reference Files

  • references/base-prompt.md
    - 基础 prompt 模板
  • references/styles/classic.md
    - 清线风格
  • references/styles/tech.md
    - 科技风格
  • references/styles/warm.md
    - 温暖风格
  • references/styles/chalk.md
    - 粉笔风格
  • references/base-prompt.md
    - Base prompt template
  • references/styles/classic.md
    - Clean line style template
  • references/styles/tech.md
    - Technical style template
  • references/styles/warm.md
    - Warm style template
  • references/styles/chalk.md
    - Chalkboard style template