latex-compile-qa
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseLaTeX Compile + QA
LaTeX编译 + QA检查
Compile the LaTeX project and produce a PDF (when the toolchain is available), plus a short build report.
This step is deterministic; if compilation fails, record actionable diagnostics rather than guessing.
编译LaTeX项目并生成PDF(当工具链可用时),同时生成一份简短的构建报告。
此步骤是确定性的;如果编译失败,记录可执行的诊断信息而非猜测原因。
Inputs
输入文件
latex/main.texcitations/ref.bib
latex/main.texcitations/ref.bib
Outputs
输出文件
- (if compilation succeeds)
latex/main.pdf - (recommended)
output/LATEX_BUILD_REPORT.md
- (编译成功时生成)
latex/main.pdf - (推荐生成)
output/LATEX_BUILD_REPORT.md
Workflow
工作流程
- Run a LaTeX build (e.g., ) if available.
latexmk - Fix missing packages, missing bib entries, and unresolved references.
- Record remaining issues in a build report.
- 若工具可用,运行LaTeX构建(例如)。
latexmk - 修复缺失的包、缺失的Bib条目以及未解析的引用。
- 将剩余问题记录到构建报告中。
Quality checklist
质量检查清单
- Either exists, or
latex/main.pdfexplains why compilation failed.output/LATEX_BUILD_REPORT.md - For deliverables:
arxiv-survey-latexis >= 8 pages and has no undefined citations/references (strict gate).latex/main.pdf
- 要么存在,要么
latex/main.pdf中说明编译失败的原因。output/LATEX_BUILD_REPORT.md - 对于交付物:
arxiv-survey-latex页数≥8,且无未定义的引用(严格检查项)。latex/main.pdf
Script
脚本使用
Quick Start
快速开始
python .codex/skills/latex-compile-qa/scripts/run.py --helppython .codex/skills/latex-compile-qa/scripts/run.py --workspace <workspace_dir>
python .codex/skills/latex-compile-qa/scripts/run.py --helppython .codex/skills/latex-compile-qa/scripts/run.py --workspace <workspace_dir>
All Options
所有选项
- See (inputs/outputs are taken from the unit runner when used via pipeline)
--help
- 查看(通过流水线使用时,输入/输出由单元运行器获取)
--help
Examples
示例
- Compile + produce report:
python .codex/skills/latex-compile-qa/scripts/run.py --workspace <ws>
- 编译并生成报告:
python .codex/skills/latex-compile-qa/scripts/run.py --workspace <ws>
Notes
注意事项
- Uses when available.
latexmk -xelatex -bibtex - Always writes (success or failure).
output/LATEX_BUILD_REPORT.md - Report includes page count + warning summary when available.
- 若可用,将使用命令。
latexmk -xelatex -bibtex - 无论成功或失败,都会生成。
output/LATEX_BUILD_REPORT.md - 若条件允许,报告将包含页数统计和警告摘要。
Troubleshooting
故障排除
Common Issues
常见问题
Issue: latexmk
not found
latexmk问题:latexmk
未找到
latexmkSymptom:
- Build report says “latexmk not found in PATH”.
Causes:
- LaTeX toolchain is not installed.
Solutions:
- Install a TeX distribution that includes .
latexmk - If you can’t install tools, still use to generate
latex-scaffoldand compile elsewhere.latex/main.tex
症状:
- 构建报告显示“latexmk not found in PATH”。
原因:
- 未安装LaTeX工具链。
解决方案:
- 安装包含的TeX发行版。
latexmk - 若无法安装工具,仍可使用生成
latex-scaffold,并在其他环境编译。latex/main.tex
Issue: Build fails with bib/ref errors
问题:构建因Bib/引用错误失败
Symptom:
- Report shows missing citations/refs or BibTeX errors.
Causes:
- missing/miswired, or draft contains invalid cite keys.
citations/ref.bib
Solutions:
- Ensure points to
latex/main.tex(or the correct relative path).../citations/ref.bib - Ensure all citation keys exist in .
citations/ref.bib
症状:
- 报告显示缺失引用或BibTeX错误。
原因:
- 文件缺失或路径错误,或草稿中包含无效的引用键。
citations/ref.bib
解决方案:
- 确保指向
latex/main.tex(或正确的相对路径)。../citations/ref.bib - 确保所有引用键都存在于中。
citations/ref.bib
Recovery Checklist
恢复检查清单
- Read tail for the first actionable error.
output/LATEX_BUILD_REPORT.md - Confirm exists and bibliography path is correct.
latex/main.tex
- 查看末尾的第一个可执行错误。
output/LATEX_BUILD_REPORT.md - 确认存在且参考文献路径正确。
latex/main.tex