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
- Analyzes source
.tex and target template.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
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.
1---
2name: latex-paper-conversion
3description: "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."
4version: 1.0.0
5author:
6 name: "sickn33 / Antigravity Community"
7 github: sickn33
8tags: [latex, paper, conversion]
9category: uncategorized
10platforms: [macos, linux, windows]
11license: MIT
12metadata:
13 hermes:
14 source: https://skillmd.com/skills/nous-hermeshub/latex-paper-conversion
15 upstream: "antigravity-awesome-skills"
16 risk: "safe"
17 date_added: "2026-03-14"
18 original_author: "Antigravity Community"
19---
20
21# LaTeX Paper Conversion
22
23## Overview
24
25This 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.
26
27## When to Use This Skill
28
29- Use when the user requests to port an existing LaTeX paper to a new journal's format.
30- Use when the user provides an existing `.tex` file and a new template directory.
31- Use when the user mentions converting from format A (e.g., IPOL/Neural Processing) to format B (e.g., MDPI).
32
33## How It Works
34
35### Step 1: Pre-requisites & Assessment
36Identify 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).
37
38### Step 2: Extraction & Injection Script Generation
39Create 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.
40
41### Step 3: Systematic Fixing
42Perform generic fixes on the extracted body text before writing the final file, or in subsequent calls:
43- Convert math environment cases (e.g., `\begin{theorem}` to `\begin{Theorem}`).
44- Adjust aggressive float placements (e.g., `[!t]` or `[h!]`) to template-supported options. Avoid forcing `[H]` unless the `float` package is explicitly loaded.
45- Ensure `\includegraphics` paths are relative to the new `.tex` file location.
46- Convert `\begin{tabular}` to `\begin{tabularx}{\textwidth}` or use `\resizebox` if moving to a double-column layout.
47
48### Step 4: Compilation & Debugging
49Run 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.
50
51## Examples
52
53### Example 1: Converting IPOL to MDPI
54\```
55USER: "I need to convert my paper 'SAHQR_Paper.tex' to the MDPI format located in the 'MDPI_template_ACS' folder."
56AGENT: *Triggers latex-paper-conversion skill*
571. Analyzes source `.tex` and target `template.tex`.
582. Creates Python script to extract Introduction through Conclusion.
593. Injects content into MDPI template.
604. Updates image paths and table float parameters `[h!]` to `[H]`.
615. Compiles via pdflatex and bibtex to confirm zero errors.
62\```
63
64## Best Practices
65
66- ✅ Always write a Python extraction script; DO NOT manually copy-paste thousands of lines of LaTeX.
67- ✅ Always run `pdflatex` and verify the `.log` to ensure the final output compiles.
68- ✅ Explicitly ask the user for the structural mapping if the source and target differ drastically (e.g., merging abstract and keywords).
69- ❌ Don't assume all math packages automatically exist in the new template (e.g., add `\usepackage{amsmath}` if missing).
70
71## Common Pitfalls
72
73- **Problem:** Overfull hboxes in tables when moving from single to double column.
74 **Solution:** Detect `\begin{tabular}` and automatically wrap in `\resizebox{\columnwidth}{!}{...}` or suggest a format change.
75- **Problem:** Undefined control sequence errors during compilation.
76 **Solution:** Search the `Paper.log` and include the missing `\usepackage{}` in the converted template.
77
78## Additional Resources
79
80- [Overleaf LaTeX Documentation](https://www.overleaf.com/learn)
81
82## Limitations
83- Use this skill only when the task clearly matches the scope described above.
84- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
85- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.