latex-safe-build

仓库创建 2026年7月28日最近提交 1 天前SkillHot 收录 1 天前
▸ 精选理由

防止编译过程修改源树,适合学术排版与多人协作场景。

这个 Skill 做什么

在隔离目录编译 LaTeX,避免污染源码并报告未解析引用与页数。

把 LaTeX 编译放到隔离的临时副本里跑,避免编译产生的 .aux/.bcf 等中间文件污染源码或被并发修改导致构建坏掉。会报告未解析的引用和真正有意义的页数(文字页),支持 latexmk、pdflatex、xelatex、lualatex、biber 等工具。每次想“编译我的论文/重建 PDF”或遇到奇怪的未定义引用时就用它。

▸ 展开 SKILL.md 英文原文

Compile LaTeX documents in an isolated scratch copy so a build can never corrupt the source tree, then report unresolved references and the page counts that actually matter (text pages, not just PDF pages). Use this skill whenever compiling or building any LaTeX document (latexmk, pdflatex, xelatex, lualatex, biber), whenever a build fails with corrupted .aux/.bcf files, "File ended while scanning", or phantom undefined-reference storms, whenever more than one session, agent, or person might touch the same LaTeX tree, or when asked how long a thesis, report, or paper is in pages. Even a plain "compile my thesis" or "rebuild the PDF" should go through this skill. Not for writing or editing LaTeX content itself (equations, wording, structure); it governs builds and build diagnostics only.

开发编程LaTeX构建隔离引用检查页数统计通用
0
Stars
0
Forks
1
仓库内 Skill
+0
7 日增星
安装 / 使用
给你的 Agent 一句话(通用)
帮我安装这个 skill:https://raw.githubusercontent.com/molanocortes/latex-safe-build/main/SKILL.md
或 curl 直取 SKILL.md
curl -fsSL "https://raw.githubusercontent.com/molanocortes/latex-safe-build/main/SKILL.md"
SKILL.MD 节选查看完整文件 ↗
# latex-safe-build

Build LaTeX documents without ever running the compiler inside the working tree.

## Why builds are isolated

`latexmk` writes dozens of intermediates (`.aux`, `.bcf`, `.toc`, `.fls`, ...) into
the directory it runs in. If anything touches that directory during the build (an
editor saving a chapter, another agent session, a file sync tool, a second build),
the intermediates end up half-written, and the failures look like source bugs:
`File ended while scanning use of ...`, biber crashing on a malformed `.bcf`,
sudden storms of undefined references, a PDF assembled from a stale table of
contents. So: **snapshot the tree to a scratch location, build there, copy only
the fin
via SKILL·HOT · 数据来自 GitHub 公开信息 · 原文版权归作者所有