make-latex-model
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseChineseResearchLaTeX 模板落地与高保真对齐器
ChineseResearchLaTeX Template Implementation and High-Fidelity Aligner
与 bensz-collect-bugs 的协作约定
Collaboration Agreement with bensz-collect-bugs
- 当用户环境中出现因本 skill 设计缺陷导致的 bug 时,优先使用 按规范记录到
bensz-collect-bugs,严禁直接修改用户本地 Claude Code / Codex 中已安装的 skill 源码。~/.bensz-skills/bugs/ - 若 AI 仍可通过 workaround 继续完成用户任务,应先记录 bug,再继续完成当前任务。
- 当用户明确要求“report bensz skills bugs”等公开上报动作时,调用本地 与
gh,仅上传新增 bug 到bensz-collect-bugs;不要 pull / clone 整个 bug 仓库。huangwb8/bensz-bugs
- When bugs caused by the design flaws of this skill occur in the user's environment, prioritize using to record them in
bensz-collect-bugsaccording to specifications. It is strictly forbidden to directly modify the source code of the skill already installed in the user's local Claude Code / Codex.~/.bensz-skills/bugs/ - If the AI can still complete the user's task through a workaround, record the bug first, then continue to complete the current task.
- When the user explicitly requests actions such as "report bensz skills bugs" for public submission, call the local and
gh, and only upload new bugs tobensz-collect-bugs; do not pull / clone the entire bug repository.huangwb8/bensz-bugs
先读什么
What to Read First
- 产品线标准:
docs/for-developers/*-template-standard.md - 本 skill 工作流:
docs/WORKFLOW.md - 产品线识别:
references/PRODUCT_LINE_RULES.md - 脚本职责:
references/SCRIPT_SCOPE.md - 工具说明:
scripts/README.md - 基线准备:
docs/BASELINE_GUIDE.md
- Product line standards:
docs/for-developers/*-template-standard.md - Workflow of this skill:
docs/WORKFLOW.md - Product line identification:
references/PRODUCT_LINE_RULES.md - Script responsibilities:
references/SCRIPT_SCOPE.md - Tool descriptions:
scripts/README.md - Baseline preparation:
docs/BASELINE_GUIDE.md
定位
Positioning
- 让 中的目标项目按当前真实架构落成高质量模板。
ChineseResearchLaTeX - 先判断该改 还是
projects/*。packages/bensz-* - 若必须改公共包,先做回归计划,再跑受影响模板的官方验证。
- 验收始终以各产品线官方构建入口为准。
- Enable the target project in to be implemented as a high-quality template according to the current real architecture.
ChineseResearchLaTeX - First determine whether to modify or
projects/*.packages/bensz-* - If modification to the public package is necessary, create a regression plan first, then run the official verification of the affected templates.
- Acceptance always takes the official build entry of each product line as the standard.
适用任务
Applicable Tasks
- 把某个项目对齐到官方 PDF、Word 导出 PDF 或既有 baseline
- 判断问题属于项目层差异还是共享样式/共享脚本
- 做像素级 PDF 比对、标题对齐、参数抽取
- 新增或重构 NSFC / paper / thesis / cv 模板
- Align a project with the official PDF, PDF exported from Word or existing baseline
- Determine whether the problem belongs to project-level differences or shared styles/shared scripts
- Perform pixel-level PDF comparison, title alignment, parameter extraction
- Add or refactor NSFC / paper / thesis / cv templates
工作流
Workflow
1. 判断验收口径
1. Determine Acceptance Criteria
- 用户要“像某份 PDF/Word 一样”
- 还是“按当前仓库标准做成好模板”
- 还是“新增一套模板能力”
- Does the user want it "to look like a certain PDF/Word"?
- Or "to make a good template according to the current warehouse standards"?
- Or "to add a set of template capabilities"?
2. 判断修改层级
2. Determine Modification Layer
- :示例内容、薄封装、项目资源、局部差异
projects/* - :共享样式、共享字体、profile、统一构建逻辑
packages/bensz-*
- : Sample content, thin encapsulation, project resources, local differences
projects/* - : Shared styles, shared fonts, profile, unified build logic
packages/bensz-*
3. 最小范围实现
3. Minimal Scope Implementation
- 只改与当前任务直接相关的文件
- 除非用户明确要求,否则默认不改正文语义内容
- Only modify files directly related to the current task
- Unless explicitly requested by the user, do not modify the semantic content of the main text by default
4. 包层安全门禁
4. Package Layer Security Access Control
当必须改 时,额外执行:
packages/- 先证明项目层方案不够
- 运行
python3 skills/make-latex-model/scripts/plan_package_regression.py <packages/bensz-*> - 优先把改动收敛到最窄的模板专属
profile/style/template - 改完先验目标项目,再回归该公共包直接覆盖的全部现有项目
When modification to is necessary, additionally perform:
packages/- First prove that the project-level solution is insufficient
- Run
python3 skills/make-latex-model/scripts/plan_package_regression.py <packages/bensz-*> - Prioritize converging changes to the narrowest template-specific
profile/style/template - After modification, first verify the target project, then regress all existing projects directly covered by this public package
5. 官方入口验证
5. Official Entry Verification
- NSFC:
nsfc_project_tool.py - Paper:
paper_project_tool.py - Thesis:
thesis_project_tool.py - CV:
cv_project_tool.py
- NSFC:
nsfc_project_tool.py - Paper:
paper_project_tool.py - Thesis:
thesis_project_tool.py - CV:
cv_project_tool.py
辅助脚本
Auxiliary Scripts
analyze_pdf.pycompare_headings.pycompare_pdf_pixels.pyoptimize_heading_linebreaks.pyplan_package_regression.py
这些脚本是辅助工具箱,不是唯一工作流;NSFC 专项工具不能默认替代 paper / thesis / cv 的官方入口。
analyze_pdf.pycompare_headings.pycompare_pdf_pixels.pyoptimize_heading_linebreaks.pyplan_package_regression.py
These scripts are auxiliary toolboxes, not the only workflow; the NSFC special tool cannot replace the official entries of paper / thesis / cv by default.
边界
Boundaries
允许:
- 调整项目层版式参数、标题体系、入口装配
- 把共享实现沉淀到
packages/bensz-* - 修改 profile、style、wrapper、官方 compare 验收链
避免:
- 把共享实现复制回单个项目
- 绕过官方构建入口只跑裸
xelatex - 为了像素对齐破坏仓库真实分层
- 默认改写用户正文语义
Allowed:
- Adjust project-level layout parameters, title systems, entry assembly
- Precipitate shared implementations into
packages/bensz-* - Modify profile, style, wrapper, official compare acceptance chain
Avoid:
- Copy shared implementations back to individual projects
- Bypass the official build entry and only run bare
xelatex - Destroy the real hierarchy of the warehouse for pixel alignment
- Rewrite the semantic content of the user's main text by default
验收标准
Acceptance Standards
- 改动落在正确层级
- 通过对应产品线官方入口
- warning 需要说明是已有还是新增
- 若改了公共包,必须说明回归了哪些模板
- 若用户给 baseline,完成必要 compare
- 默认兼顾 PDF 与 DOCX;
paper默认兼顾中英文;cv默认兼顾 profile/style 与项目入口一致性thesis
- Changes fall into the correct layer
- Pass the official entry of the corresponding product line
- Warnings need to indicate whether they are existing or newly added
- If public packages are modified, it must be stated which templates have been regressed
- If the user provides a baseline, complete the necessary comparison
- defaults to supporting both PDF and DOCX;
paperdefaults to supporting both Chinese and English;cvdefaults to ensuring consistency between profile/style and project entrythesis