数字化一致性检查
Skill135 starsChanged 2 days agoApache-2.0View on GitHub
检查数字化 TeX 文件与原始文件的一致性
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
- test-texSkill
- track-workSkill
- update_changelogSkill
- update_wikiSkill
The file
Files
数字化一致性检查
检查 ltc-guji-digital.cls (数字化布局模式) 与 ltc-guji.cls (原始语义模式) 两个 TeX 文件的排版一致性。
使用场景
当用户询问类似问题时使用此 skill:
- "比较 xxx 下数字化 tex 的一致性"
- "比较 xxx 下数字化 tex 的区别"
- "检查数字化文件和原文件的差异"
- "验证数字化版本是否正确"
自动操作
使用 Bash 工具运行 Python 脚本:
python3 scripts/compare_guji_layouts.py <original_tex> <digital_tex>参数:
original_tex: 原始 .tex 文件路径 (使用 ltc-guji.cls)digital_tex: 数字化 .tex 文件路径 (使用 ltc-guji-digital.cls, 通常是原文件名 + "-digital")--force: 强制重新编译(仅在用户明确要求时添加)--no-compile: 跳过编译,只比较已有 JSON-o <path>: 指定输出报告路径
脚本功能
脚本会自动:
- 检查是否需要编译 (基于时间戳)
- 必要时自动编译两个文件 (
ENABLE_EXPORT=1 lualatex) - 比较 layout JSON(优先使用
page_summary字段) - 生成详细的 Markdown 报告
报告包含:
- 总页数和总字数统计
- 匹配/差异页数
- 差异总结表格
- 第一处差异的详细位置和逐列对比
- PDF 页面截图对比
示例
用户问: "比较 全书复刻/欽定四庫全書簡明目錄 下数字化 tex 的一致性"
Claude 自动执行:
python3 scripts/compare_guji_layouts.py \
"全书复刻/欽定四庫全書簡明目錄/tex/欽定四庫全書簡明目錄冊一.tex" \
"全书复刻/欽定四庫全書簡明目錄/tex/欽定四庫全書簡明目錄冊一-digital.tex"执行完成后,读取生成的报告(默认在 TeX 文件同目录下的 排版一致性比较报告.md),向用户展示关键信息。
注意事项
- 如果用户只提供目录路径,需要推断完整的 .tex 文件名
- 通常 digital 文件名 = 原文件名 + "-digital"
- 报告会保存在与 TeX 文件相同的目录下
- 脚本路径:
scripts/compare_guji_layouts.py
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.

