test-tex
Skill127 starsChanged 3 months agoApache-2.0View on GitHub
通过回归测试框架编译并查看 TeX 文件的渲染效果,避免在工作目录生成多余 PDF
In this repository17 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- clocSkill
- compare-layoutsSkill
- convert-to-digitalSkill
- fix-github-issueSkill
- prepare-next-versionSkill
- refactorSkill
- regression-testSkill
- release_processSkill
- save_conversationSkill
- startupSkill
- summarize-experienceSkill
- track-workSkill
- update_changelogSkill
- update_wikiSkill
- 数字化一致性检查Skill
The file
Files
测试 TeX 文件
当需要编译并查看某个 TeX 文件的渲染效果时,必须通过回归测试框架来执行,避免在工作目录中生成多余的 PDF 文件。
参数
$ARGUMENTS:要测试的 tex 文件路径或名称(可选,如果不提供则根据上下文判断)
工作流程
1. 确定测试文件
- 已有文件:如果
test/regression_test/tex/下已存在该文件,直接使用 - 临时测试:如果需要创建临时 tex 文件,将其写入
test/regression_test/tex/目录下,文件名以_tmp_前缀标记(如_tmp_test.tex)
2. 编译并生成 PNG
python3 test/regression_test.py check test/regression_test/tex/<文件名>.tex这会:
- 编译 TeX 文件生成 PDF
- 将 PDF 所有页面转换为 PNG(300dpi)
- PNG 保存在
test/regression_test/current/目录下 - 如果有基线则进行对比,没有基线也会生成 PNG
3. 查看渲染结果
使用 Read 工具读取生成的 PNG 文件来查看效果:
test/regression_test/current/<文件名>-1.png # 第1页
test/regression_test/current/<文件名>-2.png # 第2页
...4. 清理临时文件
测试完成后,必须删除临时生成的 tex 文件(以 _tmp_ 前缀标记的文件):
rm test/regression_test/tex/_tmp_*.textest/regression_test/tex/ 目录下只保留需要长期持续回归验证的测试文件。
注意事项
- 禁止在其他目录中直接运行
lualatex编译生成 PDF - 禁止使用
pdftoppm等工具手动转换,统一由回归测试框架处理 - 临时文件用
_tmp_前缀,便于识别和清理 - 如果测试结果正确且需要长期保留,去掉
_tmp_前缀并用save保存基线
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

