Communitygithub.com

Peytontalismanic424/paper-share-skills

修复在从标准模板编译 SUSTech Beamer 幻灯片时, \setsource、\setdomains、\setpresenter、\setvenue 命令未定义的问题。从 sustech-slides-template 仓库复制扩展后的 beamerthemesustech.sty。

paper-share-skills 是什么?

该 Skill 专门解决 SUSTech Beamer 幻灯片模板中因缺少扩展宏定义导致的编译失败问题。当用户使用标准 slides-template 填充 main.tex 并执行 latexmk -xelatex 时,会报错 "Undefined control sequence",提示 \setsource、\setdomains、\setpresenter、\setvenue 等命令未定义。根本原因是标准模板附带的 beamerthemesustech.sty 只有约 60 行,缺少这些宏的实现;而 sustech-slides-template 仓库中的扩展版本包含 100+ 行,定义了 \paperfrom、\setsource、\setdomains、\setpresenter、\setvenue 以及 \titlemetaline 等命令。该 Skill 支持通过复制或 Git 克隆方式获取扩展文件,并指导用户替换旧文件,推荐在首次编译前完成替换,同时指出其他主题文件(如 beamerthemesustech-elements.sty 和 beamercolorthemesustech.sty)与模板一致,可一并复制以确保完整性。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/Peytontalismanic424/paper-share-skills/tree/HEAD/sustech-beamer-theme-fix

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

SUSTech Beamer 主题 \setsource 修复

问题

当使用标准 slides-template 填写 main.tex 时,latexmk -xelatex 会失败并显示:

! Undefined control sequence.
l.23 \setsource{...}{...}

此外还有:\setdomains、\setpresenter、\setvenue。这些命令用于较新的演示文稿,但在 beamerthemesustech.sty 的普通模板版本中并未定义。

根本原因

基础的 beamerthemesustech.sty 约 60 行,以 \mode<all> 结尾。扩展版本(包含在 sustech-slides-template 仓库中)延续至 100+ 行,包含:

  • \paperfrom{venue}{year} — 格式化来源行
  • \setsource{venue}{year} — 调用 \paperfrom
  • \setdomains{...} — 设置领域标签
  • \setpresenter{name} — 设置演示者姓名
  • \setvenue{location} — 设置地点
  • \titlemetaline — 格式化标题页底部行

修复

扩展宏位于 sustech-slides-template 仓库中的 sustech-theme/beamerthemesustech.sty。将模板复制到您的演示文稿后,用扩展版本替换 beamerthemesustech.sty。

如果您已经克隆了该仓库:

cp "<TEMPLATE_DIR>/sustech-theme/beamerthemesustech.sty" \
  "<TARGET>/slides-beamer/sustech-theme/beamerthemesustech.sty"

否则,先克隆再复制:

git clone --depth 1 https://github.com/yhbcode000/sustech-slides-template.git <TEMPLATE_DIR>
cp "<TEMPLATE_DIR>/sustech-theme/beamerthemesustech.sty" \
  "<TARGET>/slides-beamer/sustech-theme/beamerthemesustech.sty"

请在首次编译前执行此操作。beamerthemesustech-elements.sty 和 beamercolorthemesustech.sty 文件在仓库模板和参考演示文稿之间是相同的——只有 beamerthemesustech.sty 包含扩展宏;如有疑问,请直接复制整个 sustech-theme/ 目录。

Individual skills in this repo

This repo contains 7 individual skills — each has its own dedicated page.

Peytontalismanic424/paper-share-skills

Validate and upload narrated paper videos to Bilibili with biliup. Handles required landscape-first/portrait-second submissions, series uploads, CST scheduling, diagnostics, dry-run validation, and durable upload receipts. Trigger on: "upload to bilibili", "bilibili upload", "发布到B站", "上传到B站".

Peytontalismanic424/paper-share-skills

Download the TeX source (e-print tar.gz) of an arXiv paper from an arXiv URL or bare ID, and unpack it into paper_src/. Use FIRST whenever a pipeline input is an arXiv link and the TeX source is preferred over the PDF (paper-to-beamer, paper-to-bilibili, paper-venue-discovery). Invoke with an arXiv URL (abs/pdf/e-print, arxiv.org or export.arxiv.org) or a bare ID like 2509.07996v4.

Peytontalismanic424/paper-share-skills

Convert Beamer PDF slides into a fail-closed narrated MP4 with page-aligned narration, TTS audio, cover, and upload metadata. Trigger on narrated slides, slide video, or paper video requests.

Peytontalismanic424/paper-share-skills

Automated pipeline: paper (PDF or TeX source) → SUSTech Beamer slides (11-section 论文分享 structure) → compiled PDF. When TeX source is available, skip MinerU and extract content directly from LaTeX. Use when the user asks to create Beamer slides from an academic paper, or says "论文分享", "paper to slides", "make beamer from paper". Invoke with an absolute or relative path to a PDF, .tar.gz TeX archive, .tex file, or an arXiv URL/ID (source TeX is downloaded first via skill://paper-download-arxiv-paper-source).

Peytontalismanic424/paper-share-skills

Orchestrate a paper PDF through MinerU, SUSTech Beamer slides, complete Chinese narration, landscape and portrait video, metadata gates, and Bilibili upload. Supports single-paper and batch slides, video, or bilibili phases. Trigger on full paper-to-Bilibili requests, PDF-to-video publication, and batch paper publishing.

Peytontalismanic424/paper-share-skills

Generate a deterministic 16:10 video-cover poster from a paper directory. Extracts paper metadata and figures and atomically produces poster.tex, poster.pdf, and poster.png. Use for paper-video covers, not conference posters.

Peytontalismanic424/paper-share-skills

Convert a PDF (especially academic papers) to clean Markdown using MinerU — preserves reading order, LaTeX equations, tables, and figures, and runs on the GPU. Use when the user asks to convert/extract a PDF to markdown/text. Invoke directly — no need for the user to type the skill name.

相关技能