latex-paper-conversion – skill Dữ liệu & Khoa học cho agent AI
Kỹ năng này nên được dùng khi người dùng muốn chuyển đổi bài báo học thuật viết bằng LaTeX từ định dạng này (ví dụ Springer, IPOL) sang định dạng khác (ví dụ MDPI, IEEE, Nature). Tự động hóa việc trích xuất, chèn nội dung, sửa định dạng và biên dịch.
Cài skill latex-paper-conversion bằng một lệnh
Chọn công cụ bạn đang dùng, copy lệnh và dán vào terminal. Skill sẽ nằm trong thư mục skills của công cụ đó và sẵn sàng dùng ở phiên làm việc tiếp theo.
Claude Code
mkdir -p ~/.claude/skills && curl -fsSL https://skill.dn1nguoi.com/z/latex-paper-conversion-15c7a.tgz | tar xz -C ~/.claude/skills
Gọi trong Claude Code: /latex-paper-conversion – rồi mô tả công việc bạn muốn làm.
Codex
mkdir -p ~/.codex/skills && curl -fsSL https://skill.dn1nguoi.com/z/latex-paper-conversion-15c7a.tgz | tar xz -C ~/.codex/skills
Gọi trong Codex: $latex-paper-conversion – rồi mô tả công việc bạn muốn làm.
Hermes Agent
mkdir -p ~/.hermes/skills && curl -fsSL https://skill.dn1nguoi.com/z/latex-paper-conversion-15c7a.tgz | tar xz -C ~/.hermes/skills
Gọi trong Hermes Agent: /latex-paper-conversion – rồi mô tả công việc bạn muốn làm.
DeepSeek
mkdir -p ~/.deepcode/skills && curl -fsSL https://skill.dn1nguoi.com/z/latex-paper-conversion-15c7a.tgz | tar xz -C ~/.deepcode/skills
Gọi trong DeepSeek: /latex-paper-conversion – rồi mô tả công việc bạn muốn làm.
Nội dung SKILL.md
Nội dung SKILL.md gốc bằng tiếng Anh.
LaTeX Paper Conversion
Overview
This skill automates the tedious and recurring process of converting an academic paper written in LaTeX from one publisher's template to another. Different journals (e.g., Springer, MDPI, IEEE) have vastly different structural requirements, document classes, margin settings, and bibliography styles. This skill streamlines these conversions by executing a structured multi-stage workflow, extracting content, mapping it to a new template, and resolving common compilation errors.
When to Use This Skill
- Use when the user requests to port an existing LaTeX paper to a new journal's format.
- Use when the user provides an existing
.texfile and a new template directory. - Use when the user mentions converting from format A (e.g., IPOL/Neural Processing) to format B (e.g., MDPI).
How It Works
Step 1: Pre-requisites & Assessment
Identify the Source LaTeX file and asking the user for the Target Template Directory. Understand the core layout mapping (single-column vs. double-column, bibliography style).
Step 2: Extraction & Injection Script Generation
Create a Python script (e.g., convert_format.py) to parse the source LaTeX file. Use reviewed boundary-aware extraction; regular expressions alone do not safely parse arbitrary nested TeX. Preserve comments, macros, included files, labels, citations and author metadata, then compare the extracted body with the source. Merge the new template's preamble, the extracted body, and the backmatter. Write this to a new file in an output directory.
Step 3: Systematic Fixing
Perform generic fixes on the extracted body text before writing the final file, or in subsequent calls:
- Convert math environment cases (e.g.,
\begin{theorem}to\begin{Theorem}). - Adjust aggressive float placements (e.g.,
[!t]or[h!]) to template-supported options. Avoid forcing[H]unless thefloatpackage is explicitly loaded. - Ensure
\includegraphicspaths are relative to the new.texfile location. - Adapt tables individually to
\columnwidthor\textwidthas appropriate.tabularxneeds its package, a column specification and a matching end environment; do not replace only the begin command.
Step 4: Compilation & Debugging
Use the template-required engine and bibliography backend (BibTeX or Biber), with enough reruns to resolve references. Compile reviewed sources in an isolated output directory without shell escape; untrusted TeX and build scripts can read files or execute commands. Check the .log file using grep or rg to systematically fix any packages conflicts, undefined commands, or compilation halts.
Examples
Example 1: Converting IPOL to MDPI
USER: "I need to convert my paper 'SAHQR_Paper.tex' to the MDPI format located in the 'MDPI_template_ACS' folder."
AGENT: *Triggers latex-paper-conversion skill*
1. Analyzes source `.tex` and target `template.tex`.
2. Creates Python script to extract Introduction through Conclusion.
3. Injects content into MDPI template.
4. Updates image paths and selects supported float options; uses `[H]` only if required and supported.
5. Compiles via pdflatex and bibtex to confirm zero errors.Best Practices
- ✅ Always write a Python extraction script; DO NOT manually copy-paste thousands of lines of LaTeX.
- ✅ Run the template-required compiler when available and verify logs plus visual output; report compilation as unverified when unavailable.
- ✅ Explicitly ask the user for the structural mapping if the source and target differ drastically (e.g., merging abstract and keywords).
- ❌ Don't assume all math packages automatically exist in the new template (e.g., add
\usepackage{amsmath}if missing).
Common Pitfalls
- Problem: Overfull hboxes in tables when moving from single to double column.
Solution: Detect \begin{tabular} and automatically wrap in \resizebox{\columnwidth}{!}{...} or suggest a format change.
- Problem: Undefined control sequence errors during compilation.
Solution: Search the Paper.log and include the missing \usepackage{} in the converted template.
Additional Resources
- [Overleaf LaTeX Documentation](https://www.overleaf.com/learn)
Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
Skill liên quan
- legal-advisor – Soạn chính sách bảo mật, điều khoản dịch vụ, tuyên bố miễn trừ và thông báo pháp lý…
- lex – Công cụ hỗ trợ nghiên cứu có cấu trúc về bối cảnh pháp lý xuyên khu vực (US, EU, CA) và…
- loki-logging – Cấu hình Grafana Loki để tổng hợp và phân tích log.
- longbridge – Hướng dẫn sử dụng tích hợp Longbridge được cài đặt riêng — báo giá thời gian thực, biểu…
- longbridge-fundamentals – Báo cáo tài chính, phân khúc kinh doanh, cổ tức, bội số định giá (PE/PB/PS), so sánh…
- longbridge-market-data – Báo giá thời gian thực, biểu đồ K-line, sổ lệnh, dữ liệu khớp lệnh, dòng vốn trong…
- longbridge-research – Hướng dẫn tuyển chọn từ nguồn gốc cho Longbridge Research; dùng khi quy trình phù hợp…
- looot – Tìm kiếm, định giá và chạy hơn 2.500 endpoint API dữ liệu (email công việc, tìm kiếm…