make-latex-model

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

ChineseResearchLaTeX 模板落地与高保真对齐器

ChineseResearchLaTeX Template Implementation and High-Fidelity Aligner

与 bensz-collect-bugs 的协作约定

Collaboration Agreement with bensz-collect-bugs

  • 当用户环境中出现因本 skill 设计缺陷导致的 bug 时,优先使用
    bensz-collect-bugs
    按规范记录到
    ~/.bensz-skills/bugs/
    ,严禁直接修改用户本地 Claude Code / Codex 中已安装的 skill 源码。
  • 若 AI 仍可通过 workaround 继续完成用户任务,应先记录 bug,再继续完成当前任务。
  • 当用户明确要求“report bensz skills bugs”等公开上报动作时,调用本地
    gh
    bensz-collect-bugs
    ,仅上传新增 bug 到
    huangwb8/bensz-bugs
    ;不要 pull / clone 整个 bug 仓库。
  • When bugs caused by the design flaws of this skill occur in the user's environment, prioritize using
    bensz-collect-bugs
    to record them in
    ~/.bensz-skills/bugs/
    according 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.
  • 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
    gh
    and
    bensz-collect-bugs
    , and only upload new bugs to
    huangwb8/bensz-bugs
    ; do not pull / clone the entire bug repository.

先读什么

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
    ChineseResearchLaTeX
    to be implemented as a high-quality template according to the current real architecture.
  • First determine whether to modify
    projects/*
    or
    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/*
    :示例内容、薄封装、项目资源、局部差异
  • packages/bensz-*
    :共享样式、共享字体、profile、统一构建逻辑
  • projects/*
    : Sample content, thin encapsulation, project resources, local differences
  • packages/bensz-*
    : Shared styles, shared fonts, profile, unified build logic

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/
时,额外执行:
  1. 先证明项目层方案不够
  2. 运行
    python3 skills/make-latex-model/scripts/plan_package_regression.py <packages/bensz-*>
  3. 优先把改动收敛到最窄的模板专属
    profile/style/template
  4. 改完先验目标项目,再回归该公共包直接覆盖的全部现有项目
When modification to
packages/
is necessary, additionally perform:
  1. First prove that the project-level solution is insufficient
  2. Run
    python3 skills/make-latex-model/scripts/plan_package_regression.py <packages/bensz-*>
  3. Prioritize converging changes to the narrowest template-specific
    profile/style/template
  4. 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.py
  • compare_headings.py
  • compare_pdf_pixels.py
  • optimize_heading_linebreaks.py
  • plan_package_regression.py
这些脚本是辅助工具箱,不是唯一工作流;NSFC 专项工具不能默认替代 paper / thesis / cv 的官方入口。
  • analyze_pdf.py
  • compare_headings.py
  • compare_pdf_pixels.py
  • optimize_heading_linebreaks.py
  • plan_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

  1. 改动落在正确层级
  2. 通过对应产品线官方入口
  3. warning 需要说明是已有还是新增
  4. 若改了公共包,必须说明回归了哪些模板
  5. 若用户给 baseline,完成必要 compare
  6. paper
    默认兼顾 PDF 与 DOCX;
    cv
    默认兼顾中英文;
    thesis
    默认兼顾 profile/style 与项目入口一致性
  1. Changes fall into the correct layer
  2. Pass the official entry of the corresponding product line
  3. Warnings need to indicate whether they are existing or newly added
  4. If public packages are modified, it must be stated which templates have been regressed
  5. If the user provides a baseline, complete the necessary comparison
  6. paper
    defaults to supporting both PDF and DOCX;
    cv
    defaults to supporting both Chinese and English;
    thesis
    defaults to ensuring consistency between profile/style and project entry