SuperAPI AI 工具集

paper-compilation

写作与研究

查看项目

更新于 10-16 00:00

技能介绍

用途:把 LaTeX 论文编译成 PDF,并在编译前后做错误检测、样式检查与引用校验。

主要能力:compile_paper.py 执行 pdflatex → bibtex → pdflatex → pdflatex 完整流程,输出编译状态、页数、警告、引用与参考文献统计、样式问题;支持 --check-style、--output、--auto-fix(结合 fix_latex_errors.py 最多重试 3 轮)。validate_citations.py 校验每个 \cite{key} 有对应 .bib 条目、每个 \includegraphics 文件存在、无重复标签或章节。fix_latex_errors.py 可修复 LaTeX 中的 HTML 标签、环境不匹配、缺失图片,关键参数 --dry-run、--auto-detect。

使用方式:例如 python ~/.claude/skills/paper-compilation/scripts/compile_paper.py paper/main.tex;校验引用时传入 --tex、--bib、--check-figures 与 --figures-dir;修复错误时传入 --tex、--log、--output。工作流为编译前校验、编译、错误修正循环(最多 5 轮)、编译后报告。

适用场景:需要频繁编译的 LaTeX 论文写作与投稿准备,尤其适合处理未定义控制序列、缺 $、括号不匹配、未定义引用等常见错误。

限制:依赖本地已安装 pdflatex/bibtex,环境缺失时给出 macOS 的 brew install --cask mactex-no-gui 与 Ubuntu 的 sudo apt install texlive-full 安装命令,也可用 latexmk -pdf -interaction=nonstopmode main.tex;自动修复仅针对资料中列出的错误类型,不保证解决全部编译问题;具体平台支持与收费情况暂未提供。