latex-paper-conversion
它能做什么
这个工具可以帮助你把用 LaTeX 编写的科研论文从一种格式转换为另一种格式。它会自动复制内容、调整排版,并修复错误,使论文能够在新模板中正常使用。
适用场景
- ✓需要让现有论文符合新期刊要求时。
- ✓你有一个 .tex 文件,并且拿到了其他期刊的模板时。
- ✓想把论文从一种发表格式(如 IPOL)转换为另一种(如 MDPI)时。
技能链接
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/latex-paper-conversion/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请帮我把论文 my_paper.tex 转换为 XYZ 期刊的格式,模板位于 XYZ_template 文件夹中。”
每周 5 个新技能,1 分钟读完。
工作原理
工具会先识别你的原始文件和新模板。然后,它会提取文本和图片,将所有内容插入新模板,进行自动排版调整,并尝试编译文档,以确保一切正确。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
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 Regular Expressions to extract core text blocks. 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. - Convert
\begin{tabular}to\begin{tabularx}{\textwidth}or use\resizeboxif moving to a double-column layout.
Step 4: Compilation & Debugging
Run a build cycle (pdflatex -> bibtex -> pdflatex). 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
- Analyzes source
.texand targettemplate.tex. - Creates Python script to extract Introduction through Conclusion.
- Injects content into MDPI template.
- Updates image paths and table float parameters
[h!]to[H]. - 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.
- ✅ Always run
pdflatexand verify the.logto ensure the final output compiles. - ✅ 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.logand include the missing\usepackage{}in the converted template.
Additional Resources
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.
常见问题
什么是 LaTeX?
LaTeX 是一种文本排版系统,主要用于撰写论文、学位论文等科研和学术文档。它与常见的文字处理软件不同,你需要使用命令来设置格式。
为什么各期刊的格式不一样?
每个科研期刊都有自己的论文呈现规则,包括页边距、字号、引用格式和章节组织方式等。这些模板能确保已发表的论文在视觉上保持一致。
这个工具会修复所有错误吗?
工具会尝试修复转换过程中出现的常见错误,例如表格格式问题或缺失的宏包。不过,较复杂或与内容相关的错误可能仍需要你自己处理。
详情
作者的原始描述
This skill should be used when the user asks to convert an academic paper in LaTeX from one format (e.g., Springer, IPOL) to another format (e.g., MDPI, IEEE, Nature). It automates extraction, injection, fixing formatting, and compiling.
热度
- GitHub 星标
- 48k
- 排名
- #5031
- 许可证
- MIT
- 更新时间
- 2026/10/15
评论
- …
同一仓库的更多技能
00-andruia-consultant
48k帮你的智能体启动或改进 AI 项目。它可以分析代码、推荐工具,并用西班牙语制定行动计划。
007
48k让你的智能体执行安全审计和威胁建模。它有助于保护项目免受攻击和漏洞的威胁。
10-andruia-skill-smith
48k帮你的智能体创建或改进 AI 工具。它可以定义工具的工作方式、编写文档,并验证其结构。
20-andruia-niche-intelligence
48k让你的智能体创建某个特定行业的摘要。它有助于借助可靠的信息来源,了解项目的背景、规则、使用模式和风险。