- Home
- Skills
- Huangwb8
- Chineseresearchlatex
- Transfer Old Latex To New
transfer_old_latex_to_new_skill
- 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 transfer_old_latex_to_new- config.yaml19.0 KB
- README.md4.9 KB
- SKILL.md5.4 KB
Overview
This skill automates migrating NSFC LaTeX proposals from older templates to a new template using a five‑stage workflow: analysis → mapping → planning → execution → validation. It isolates runs, produces structured reports and artifacts, and offers a one‑click migration script to streamline large or repeated updates. The tool preserves template files and style assets while safely transforming content and citations.
How this skill works
The skill inspects both old and new project trees, generates a structure diff and section mapping, and builds a migration plan (migration_plan.json). It then executes content moves and transformations into a runs/<run_id>/ workspace, snapshots the new project before applying changes, and compiles the result into isolated logs and deliverables for verification. AI semantic matching plus heuristic fallbacks guide content remapping; an automated restore path and granular logs enable safe rollbacks.
When to use it
- You need to migrate an NSFC proposal from an older LaTeX template to the latest template version.
- Upgrading many proposals or batch processing repositories with consistent, repeatable migration steps.
- When structure or section names changed across template versions and you need an automated mapping and validation workflow.
- When you want isolated runs, safe backups, and one‑command migration plus compile/restore capabilities.
- Before major submission deadlines to ensure consistent formatting and citation updates.
Best practices
- Run analyze first to review structure_diff.json and the generated sections_map before applying changes.
- Always specify a runs root (--runs-root) to keep outputs isolated for testing and batch jobs.
- Keep .cls/.sty and main.tex unchanged; only allow content files and new references/*.bib to be modified.
- Review migration_plan.json and the apply_result.json logs in runs/<run_id>/plan and /logs before finalizing.
- Use the provided migrate.sh for one‑click migrations in controlled environments; use run.py apply for staged operations with snapshots.
Example use cases
- Single proposal migration: analyze the 2025 project, inspect mapping, then apply and compile to confirm PDF output.
- Batch migration: point --runs-root to a dedicated directory and process many old projects with isolated run IDs for auditability.
- Citation update: migrate old references/*.bib entries to the new project, keeping bibliography formatting intact and storing BibTeX outputs in logs/latex_aux.
- Rollback after failed apply: use run.py restore with the run_id to revert the new project to its pre‑apply snapshot.
- Verification: run compile on the run_id to generate compile_summary.json and the final PDF deliverable for submission.
FAQ
The tool never modifies main.tex, extraTex/@config.tex, .cls or .sty files, or other system/compile environment files.
How do I test a migration safely?
Run the analyze command with a --runs-root to create an isolated run; inspect analysis and plan outputs before running apply. Apply creates a backup snapshot automatically.
Where are LaTeX intermediate files stored?
All .aux/.log/.bbl and other intermediate files are isolated under runs/<run_id>/logs/latex_aux/ to avoid polluting the project directory.