transfer-old-latex-to-new

Migrate LaTeX document content into existing ChineseResearchLaTeX template projects.

2.7k|251|Updated Feb 12, 2024
One-click install
npx skills add https://github.com/huangwb8/ChineseResearchLaTeX --skill transfer-old-latex-to-new
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: transfer-old-latex-to-new
Source: https://github.com/huangwb8/ChineseResearchLaTeX/tree/main/skills/transfer-old-latex-to-new
Command: npx skills add https://github.com/huangwb8/ChineseResearchLaTeX --skill transfer-old-latex-to-new

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pyyaml, and includes scripts (resource) and references (resource) components.

What problem does it solve?

Researchers often have old LaTeX projects, Word files, PDFs, or scattered notes that need to be moved into a newer, well-maintained template without breaking the template's styles or structure. This Skill migrates only the body content and bibliography into the content layer of an existing ChineseResearchLaTeX project, leaving all template source code untouched.

Core Features & Use Cases

  • Content-only migration: Moves body text into extraTex/*.tex and references into references/*.bib, while strictly forbidding edits to packages/, main.tex, @config.tex, .cls, or .sty files.
  • Flexible input handling: Accepts old project directories, tex/docx/pdf/md files, screenshots, or mixed materials, and maps them to the right product line (NSFC proposals, SCI papers, theses, or CVs).
  • Legacy CLI with verification: Provides analyze, apply, compile, and restore commands with snapshot backups, structure diff reports, and four-pass xelatex/bibtex compilation checks.
  • Use Case: You have an old NSFC proposal project from 2025 and want its content placed into the current NSFC template. The Skill maps each section to the correct content file, reports anything that cannot be placed, and verifies the result compiles.

Quick Start

Ask the AI to use the transfer-old-latex-to-new skill to migrate your old LaTeX project or documents into a specified ChineseResearchLaTeX project, writing only body content and references without touching template files.

Frequently Asked Questions about transfer-old-latex-to-new

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I migrate an old LaTeX project into a new template?

Point the Skill at your old project directory and the target ChineseResearchLaTeX project. It analyzes both structures, maps sections to existing content slots, writes only extraTex/*.tex and references/*.bib, then compiles the result to verify.

Can I migrate Word or PDF documents into a LaTeX template?

Yes. The Skill accepts mixed inputs including docx, pdf, Markdown, screenshots, and plain text. It extracts the body content and places it into the appropriate content files of the target template project.

Will migrating content modify my template files or styles?

No. A strict write whitelist allows only extraTex/*.tex (excluding @config.tex) and references/*.bib. main.tex, .cls, .sty files, and packages/ source code are read-only, and any attempt to write them is blocked.

What LaTeX environment is required for compile verification?

You need TeX Live or MacTeX with xelatex and bibtex available on PATH, plus Python 3.8 or later. The compile step runs a four-pass sequence of xelatex, bibtex, xelatex, xelatex.

What happens if the new template has no slot for my old content?

Unplaceable content is listed in an unmapped content report instead of being forced into the template. If the gap requires template changes, the Skill reports it and recommends handing off to a template development workflow.

How do I undo a migration if the result is wrong?

The legacy CLI snapshots the target project before applying changes. Run the restore command with the same run_id to roll the new project back to its pre-migration state.