make_latex_model_skill

This skill aligns LaTeX templates to Word styles with pixel-perfect comparisons, offering HTML reports, auto fix suggestions, and LaTeX repair guidance.
  • Python

1.3k

GitHub Stars

3

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill huangwb8/chineseresearchlatex --skill make_latex_model

  • config.yaml7.8 KB
  • README.md2.5 KB
  • SKILL.md8.9 KB

Overview

This skill provides high-fidelity LaTeX template optimization focused on matching an official Word template at pixel level. It aligns style parameters, title text/numbering/punctuation, and per-line line-breaks, and produces validation reports and automatic repair suggestions. It is designed for Chinese academic templates but works with any LaTeX template requiring strict parity with a Word baseline.

How this skill works

The skill combines deterministic scripts and AI-driven heuristic decisions: scripts extract styles, generate Word-based baseline PDFs, run LaTeX builds, and perform pixel-level PDF comparisons. The AI suggests which style parameters to adjust (font sizes, spacing, kerning, color, numbering formats) and iterates until convergence or a configured stop condition. Outputs include an HTML visual report, suggested edits to @config.tex and safe title-text updates in main.tex, plus optional dry-run previews.

When to use it

  • A new annual Word template for NSFC or similar is released
  • Existing LaTeX template visibly differs from the Word template
  • You must guarantee title texts and numbering exactly match Word
  • You require pixel-level verification between Word PDF and LaTeX PDF
  • You need automated, traceable optimization with rollback/dry-run support

Best practices

  • Start with the recommended pre-check and validation scripts before making changes
  • Use moderate optimization by default; escalate to thorough only when necessary
  • Keep changes confined to projects/{project}/extraTex/@config.tex and allowed title text in main.tex
  • Preserve original comments, conditionals (e.g., \ifwindows) and macro structure when editing
  • Run iterative optimization with max iterations and convergence checks; use dry_run for previews

Example use cases

  • Align NSFC_Young LaTeX template to the 2025 Word template including title punctuation and numbering
  • Automatically tune font sizes, line spacing and margins so each line breaks identically to the Word PDF
  • Generate an HTML visual diff report and pixel-change metrics for submission evidence
  • Run an AI-assisted iteration loop to converge to changed_ratio < 0.01 between Word and LaTeX PDFs
  • Produce a hotfix that only updates section title texts to match a revised Word template

FAQ

It edits projects/{project}/extraTex/@config.tex and may adjust title text within main.tex (only the brace-enclosed title strings). It never changes body content files referenced by \input{}.

How does pixel-level verification work?

The scripts produce a Word-derived baseline PDF, compile the LaTeX PDF, then run pixel diffs and compute a changed_ratio. Convergence is controlled by thresholds and iteration limits.

Can I preview changes without applying them?

Yes. Use dry_run to simulate edits and produce reports without writing permanent changes to template files.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational