make-latex-model

Original🇨🇳 Chinese
Translated
47 scripts

This skill is used when users explicitly request "LaTeX template optimization", "style parameter alignment", "pixel-level comparison", "make-latex-model" or the old notation "make_latex_model", or when they want to turn a project in ChineseResearchLaTeX into a high-quality template. It supports four product lines: NSFC / paper / thesis / cv; first determine whether to modify the project layer or the public package based on the actual hierarchy of packages/ and projects/, then use the official build entry of each product line for acceptance. If modification to the public packages under packages/ is necessary, a regression plan for affected templates must be generated first and relevant regression completed; the NSFC special tool is only used on demand when it clearly falls into the NSFC parameter alignment scenario.

9installs
Added on

NPX Install

npx skill4agent add huangwb8/chineseresearchlatex make-latex-model

SKILL.md Content (Chinese)

View Translation Comparison →

ChineseResearchLaTeX Template Implementation and High-Fidelity Aligner

Collaboration Agreement with bensz-collect-bugs

  • 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

  • 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

  • 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

  • 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. Determine Acceptance Criteria

  • 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. Determine Modification Layer

  • projects/*
    : Sample content, thin encapsulation, project resources, local differences
  • packages/bensz-*
    : Shared styles, shared fonts, profile, unified build logic

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. Package Layer Security Access Control

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. Official Entry Verification

  • 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
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

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. 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