Communitygithub.com

SUSTech Beamer 主題 \setsource 修復

修復編譯 SUSTech Beamer 投影片時,標準範本中未定義 \setsource、\setdomains、\setpresenter、\setvenue 指令的問題。從 sustech-slides-template 儲存庫複製擴展版的 beamerthemesustech.sty。

SUSTech Beamer 主題 \setsource 修復 是什麼?

此技能專門解決使用南方科技大學(SUSTech)Beamer 投影片範本時,因標準範本中的 `beamerthemesustech.sty` 缺少 `\setsource`、`\setdomains`、`\setpresenter` 和 `\setvenue` 等指令而導致的編譯失敗問題。這些指令在較新的投影片中被使用,但舊版範本並未定義它們。根因在於基礎版本的 `.sty` 檔案僅約 60 行,而擴展版本則包含超過 100 行的完整巨集,如 `\paperfrom`、`\setdomains` 和 `\titlemetaline` 等。修復方法很簡單:從 `sustech-slides-template` 儲存庫(網址為 `https://github.com/yhbcode000/sustech-slides-template.git`)下載擴展版 `beamerthemesustech.sty`,並覆蓋到您的投影片專案中對應的目錄。此技能支援任何使用 LaTeX 與 `latexmk -xelatex` 的標準工作流程,並建議在首次編譯前完成檔案替換,以避免錯誤。若有疑慮,可直接複製整個 `sustech-theme/` 資料夾,確保所有相關樣式檔案一致。

相容平台~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.

相關技能