# latex-formatting

Sets up conference LaTeX templates, fixes formatting, and runs a pre-submission check. Handy when the deadline is close.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 2200 installs · ★ 433
- Author: lingzhi227
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/lingzhi227/agent-research-skills/tree/HEAD/skills/latex-formatting/SKILL.md
- Updated: 2026-02-27
- HTML: https://affpapa.org/en/nevibecode/skills/latex-formatting

## What it does

The skill handles three actions: `setup`, `fix` and `check`. `setup` builds the project directory structure and `main.tex` for a given venue — ICML, ICLR, NeurIPS, AAAI or ACL. `fix` deals with unescaped special characters, math mode errors, float placement and cross-reference problems. `check` runs `latex_checker.py` and looks at page count, anonymization, required sections and leftover TODO markers.

Two Python scripts do the work: `latex_checker.py` for validation and `clean_latex.py` for swapping non-UTF8 and special characters for LaTeX equivalents. Math environments are skipped by the cleaner. `clean_latex.py` takes `--dry-run` and `--tables-only`; the checker takes `--check-anon` and `--fix`. With `--fix` the checks run first, then the cleanups are applied and written to `main_fixed.tex`, so your original file stays as it was.

Make sure Python is available and that the script paths match where the skill actually landed. Citation validation lives in the separate `citation-management` skill, so checking a `.bib` file needs that one too. Venue specs, packages and commands sit in `references/venue-templates.md`.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add lingzhi227/agent-research-skills --skill latex-formatting -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/latex-formatting/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/latex-formatting/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add lingzhi227/agent-research-skills --skill latex-formatting -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/latex-formatting/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add lingzhi227/agent-research-skills --skill latex-formatting -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/latex-formatting/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install lingzhi227/agent-research-skills latex-formatting
```

2. **Manually: put the files in place**
- File: `.github/skills/latex-formatting/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add lingzhi227/agent-research-skills --skill latex-formatting -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/lingzhi227/agent-research-skills --path skills/latex-formatting
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/latex-formatting/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add lingzhi227/agent-research-skills --skill latex-formatting -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/lingzhi227/agent-research-skills/tree/HEAD/skills/latex-formatting/SKILL.md

## When to use it
- scaffold a project and `main.tex` for NeurIPS or ACL
- catch unescaped special characters before compiling
- verify anonymization and page count before submission
- strip non-UTF8 characters without touching formulas
- find leftover TODO markers in the paper text

## Example prompts
- set up a NeurIPS template in this project
- check `paper/main.tex` for ICML with anonymization checking
- fix formatting in `paper/main.tex` and write the result to a new file

## Similar
- [ccf-project-scaffolder](https://affpapa.org/en/nevibecode/skills/ccf-project-scaffolder.md) — skill · 1900 installs
- [mcore-linting-and-formatting](https://affpapa.org/en/nevibecode/skills/mcore-linting-and-formatting.md) — skill · 1800 installs
- [verifying-markdown-formatting](https://affpapa.org/en/nevibecode/skills/verifying-markdown-formatting.md) — skill · 404 installs
- [latex-paper-en](https://affpapa.org/en/nevibecode/skills/latex-paper-en.md) — skill · 5900 installs
- [latex-posters](https://affpapa.org/en/nevibecode/skills/k-dense-ai-latex-posters.md) — skill · 2000 installs
- [latex-document-skill](https://affpapa.org/en/nevibecode/skills/latex-document-skill.md) — skill · 561 installs

From the same set: [lingzhi227/agent-research-skills](https://affpapa.org/en/nevibecode/by/lingzhi227/agent-research-skills.md) — 30 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
