md2slide
Skill4 starsChanged 5 months agoMITView on GitHub
从论文、arXiv 预印本或技术文档生成模块化 Beamer 学术幻灯片,面向非专家(本科生级别)听众。 使用 Comic Sans MS + HarmonyOS Sans 字体,采用 content/*.tex 模块化项目结构。 支持联网补充素材,当用户提供的内容不完整时自动搜索补充。 四阶段流水线:素材整理+联网研究 → 大纲设计 → 模块化内容生成 → 编译输出 PDF。 Use when: (1) 用户想把论文/arXiv/技术文档转为演示幻灯片, (2) 用户提及 论文幻灯片, 学术汇报, 论文解读, paper reading, beamer slides, arXiv to slides, conference talk, (3) 用户有论文 PDF/TeX 想为同学/非专家听众制作幻灯片, (4) 用户想要 Comic Sans 或 HarmonyOS Sans 字体风格, (5) 用户想要 content/*.tex 模块化项目结构。
In this repository4 other files it gives its agents.
- archifySkill
- ooda-debuggerSkill
- read-arxiv-paperSkill
- tracerSkill
The file
Files
Beamer 学术幻灯片生成
将论文转化为模块化、高信息密度的 Beamer 幻灯片,面向非专家听众。
流水线
论文/素材 → 素材整理+联网补充 → outline.md → content/*.tex 模块化生成 → xelatex 编译 → output/slides.pdf阶段 0:环境检查与输入定位
0.1 定位输入素材
按优先级搜索当前目录中的素材文件:
assets/目录(含论文源文件 .tex/.docx/.pdf 及补充材料)- 当前目录下的
.tex文件 .docxWord 文档.pdf论文- arXiv 链接(由用户提供)
若找到多个候选文件,询问用户选择哪一个。 若未找到任何素材:"请把论文文件放到当前目录(支持 .tex / .docx / .pdf),或提供 arXiv 链接"
0.2 检查 LaTeX 与字体
检查 xelatex 可用性:
which xelatex若缺失,建议安装(与用户操作系统对应的标准 LaTeX 安装方式相同)。
检查字体可用性:
fc-list | grep -i "comic sans"
fc-list | grep -i "harmonyos"字体策略:Comic Sans MS 和 HarmonyOS Sans SC 为首选字体。 若缺失,提供安装帮助或建议备选方案:
- 拉丁文字备选:Nunito(圆润风格,与 Comic Sans 视觉感受相近)
- 中文字体备选:Noto Sans CJK SC
若用户无 LaTeX 环境,交付 .tex + .sty + figure/ 文件并建议使用 Overleaf 在线编译。
0.3 配置
检查当前目录是否有 config.yaml。若缺失,询问用户:
- 演示文稿标题和副标题
- 作者姓名、单位、日期
- 配色方案:
blue|red|green|purple|teal
阅读 references/tex-header.md 获取导言模板。
阶段 1:素材整理与研究
此阶段至关重要——用户提供的素材通常是不完整的。 需要主动识别知识缺口并通过联网搜索补充。
1.1 阅读与提取
阅读 assets/ 中所有文件,提取四个维度的信息:
- 研究问题:这篇论文解决什么问题?为什么重要?
- 方法:核心技术方案、架构、算法
- 结果:关键实验、指标、对比
- 个人见解:这项工作有何亮点?是否有历史类比?
从论文源文件中提取图片到 figure/ 目录:
.tex来源:定位\includegraphics路径,复制原始图片.pdf来源:使用pdfimages -all paper.pdf figure/或裁剪图片区域.docx来源:提取嵌入图片
1.2 联网研究(必须执行)
系统性地识别已提取素材中的知识缺口,联网搜索补充:
- 论文假设听众已知但实际不知的背景知识
- 关键概念的解释(如"什么是 HPO 本体?"、"Function Call 与 MCP 的区别")
- 最新统计数据或参考文献
- 作者/机构背景信息
将研究发现保存到 assets/Clippings/,附来源 URL。
1.3 整合素材
在项目根目录编写 materials.md,按主题组织,附来源标注:
## 1. 研究背景
罕见病影响全球约 3 亿患者... (来源: Rare Disease International)
...每条关键信息附带来源 URL...1.4 图片清单
提取完成后,列出可用图片及其描述。按优先级排序:
- 论文中的图片(质量高,直接相关)
- 辅助理解的补充图表
- 系统架构 / 工作流图(方法页必备)
阶段 2:大纲设计
2.1 叙事结构
遵循四章节叙事弧线(可前置可选作者介绍页): 0. 作者介绍(可选,1 页):封面与目录之间,介绍论文作者/汇报人背景
- 研究背景与摘要(1-2 页):问题、先前工作、贡献预览
- 方法与创新(5-7 页):核心思路、架构、工作流
- 实验与结果(3-4 页):每页一个实验
- 个人见解(1 页):汇报者的收获
目标:15-18 页正文(不含封面和致谢),1 页可选作者介绍,2 页可选附录。
2.2 逐页规划
编写 outline.md,每页按以下结构规划:
### P3: 研究问题
- **核心信息**: 8000+ 种罕见疾病, 3 亿患者, 5-7 年诊断延迟
- **版式**: 左文右图
- **内容来源**: materials.md §1, 论文表 1
- **配图**: figure/challenge_overview.pdf2.3 节奏约束
- 不允许连续 3 页使用相同布局
- 每章至少使用 2 种不同布局
- 文字密集页与图片密集页交替出现
阅读 references/layouts.md 了解可用布局类型,references/writing-style.md 了解组合模式。
阶段 3:内容生成
3.1 项目结构
按以下目录布局生成文件:
project/
├── assets/ # 用户提供的参考素材
│ └── Clippings/ # 联网研究发现
├── figure/ # 所有被 .tex 引用的图片
├── content/ # 章节 .tex 文件,每节一个
├── output/ # 编译产物 slides.pdf 及构建文件
├── materials.md # 整合后的素材(附来源)
├── outline.md # 逐页大纲
├── slides.tex # 主文件,\input 各 content/*.tex
└── beamerthemeAcademic.sty # 主题文件(从 assets/ 复制)3.2 生成 slides.tex
主文件只包含导言和 \input 命令——不包含任何页面内容。
阅读 references/tex-header.md 获取导言模板。
% slides.tex — 主文件,负责导言和 \input
\documentclass[aspectratio=169, 12pt]{beamer}
\usepackage{beamerthemeAcademic}
\useblue
% ... 导言(详见 references/tex-header.md)...
\begin{document}
\input{content/01-cover}
% \input{content/00-author} % 可选:作者介绍页(封面与目录之间)
\begin{frame}\frametitle{汇报提纲}\tableofcontents\end{frame}
\input{content/02-background}
\input{content/03-method}
\input{content/04-results}
\input{content/05-insights}
\input{content/06-thanks}
% \input{content/07-appendix} % 可选
\end{document}3.3 生成 content/*.tex
每章对应 content/ 中的一个文件。命名规范:
01-cover.tex—\begin{frame}[plain]\titlepage\end{frame}00-author.tex— 作者介绍页(可选,使用author-intro布局,见references/layouts.md)02-background.tex— 研究问题与贡献03-method.tex— 系统架构、工作流、关键组件04-results.tex— 实验(每页一个,左文右图)05-insights.tex— 个人收获06-thanks.tex—\thanksframe{...}{...}(无需外层\begin{frame},命令已内置)07-appendix.tex— 补充细节(可选)
每页从 references/layouts.md 加载对应的布局骨架。
3.4 排版规则
以下规则适用于每一页。这是承载性约束——必须精确遵循。
字号层级——每页只选一个正文字号,不要混用:
\small— 低密度页面的正文\footnotesize— 中密度页面的正文\scriptsize— 高密度页面正文、表格、列表\tiny— 图注、附录、极紧凑内容
分栏布局——两栏总宽度不得超过 0.95\textwidth:
- 常用比例:
0.40 + 0.55(左文右图),0.48 + 0.47(对称)
图片放置——统一格式,图片和图注用 \begin{center} 包裹以保证水平居中:
\begin{center}
\includegraphics[width=\linewidth, height=0.55\textheight, keepaspectratio]{figure.pdf}
\vskip0.05cm
{\tiny\color{textgray}图 X: 图注说明}
\end{center}- 图文混排页:图片高度
0.45--0.55\textheight - 满版图片页:
0.55\paperheight,图注放在同一个\begin{center}内 - 全文顺序编号(图 1, 图 2, ...)
- 在
columns环境中,beamer 为每栏设置\raggedright——必须将图片+图注一起用\begin{center}包裹,不要单独使用{\centering...\par}
实验页——所有实验使用统一布局以保证视觉一致性:
左栏 0.40\textwidth (\scriptsize) 右栏 0.55\textwidth
实验设计 \begin{center}
↓ 图片 (0.55\textheight)
结果(表格或文字) \vskip0.05cm
↓ 图注 (\tiny)
分析(1-3 行) \end{center}每个实验:设计 → 结果 → 分析,一页完成。
表格——紧凑风格,使用 booktabs:
\begin{tabular}{@{}ll@{}}配合\toprule/\midrule/\bottomrule\scriptsize或\tiny,最多 8 行- 宽表格使用显式列宽:
p{2.0cm}
公式——每页最多 2 个:
- 使用
\scriptstyle缩小行内公式:$\scriptstyle\mathcal{M}_1 = \{...\}$ - 配合解释性文字,面向非数学听众
间距——保持紧凑:
\vskip取值 0.02--0.15cm- 大段落分隔:
\vspace{0.1cm} - 每帧不超过 3 个
\vskip(超过说明内容过多)
常用布局模式:
% 左文右图
\begin{columns}[T, onlytextwidth]
\column{0.40\textwidth} % 文字
\column{0.55\textwidth} % 图片
\end{columns}
% 上方图片,下方两栏
\begin{center}\includegraphics[...]{...}\end{center}
\begin{columns}[T, onlytextwidth]
\column{0.48\textwidth} \column{0.48\textwidth}
\end{columns}
% TikZ 高亮框
\begin{tikzpicture}
\node[draw=accentcolor, rounded corners=5pt, fill=black!4,
inner sep=6pt, text width=3.6cm, align=left] {...};
\end{tikzpicture}
% 分隔线
{\centering\color{lightline}\rule{0.6\linewidth}{0.3pt}\par}阶段 4:编译与验证
4.1 编译
mkdir -p output
xelatex -output-directory=output -interaction=nonstopmode slides.tex
xelatex -output-directory=output -interaction=nonstopmode slides.tex两遍编译以生成目录。也可使用 scripts/compile.sh。
4.2 版面问题检测
检查 output/slides.log 中的 overfull 警告:
grep "Overfull" output/slides.log| 症状 | 修复方法 |
Overfull \vbox | 减少文字、拆为 2 页或缩小字号 |
Overfull \hbox(含图片) | 添加 keepaspectratio、减小 width |
| 分栏溢出 | 确保栏宽之和 ≤ 0.95\textwidth |
| 图片与文字重叠 | 减小图片高度或文字长度 |
容忍度:overfull ≤ 10pt 可接受,超过须修复。
4.3 交付
输出文件位于 output/slides.pdf。向用户展示页数,并提供针对特定页的迭代修改。
参考文件
references/tex-header.md— Comic Sans MS + HarmonyOS Sans 导言模板references/layouts.md— 布局骨架(含 LaTeX 代码)references/writing-style.md— 面向非专家听众的写作指南
资源文件
assets/beamerthemeAcademic.sty— Beamer 主题(复制到用户项目根目录)assets/config.yaml— 配置模板
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

