跳到正文
Skillpedia
写作48k · #5031

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。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/latex-paper-conversion/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 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 .tex file 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 the float package is explicitly loaded.
  • Ensure \includegraphics paths are relative to the new .tex file location.
  • Convert \begin{tabular} to \begin{tabularx}{\textwidth} or use \resizebox if 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

  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 table float parameters [h!] to [H].
  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.
  • ✅ Always run pdflatex and verify the .log to 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.log and 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.

repo: sickn33/agentic-awesome-skills

热度

GitHub 星标
48k
排名
#5031
许可证
MIT
更新时间
2026/10/15

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能