Skip to content
Back to skills

Latex Compilation

ASecurity

Use when LaTeX documents fail to compile, have undefined references, duplicate labels, or citation errors

  • 666 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added February 9, 2026
toolsbash

Security analysis

A100/100

Scanned February 12, 2026

npx -y skills add majiayu000/claude-skill-registry --skill latex-compilation --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Latex Compilation?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Latex Compilation
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majiayu000-latex-compilation/badge)](https://www.skillsdirectory.com/skills/majiayu000-latex-compilation)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: latex-compilation
description: Use when LaTeX documents fail to compile, have undefined references, duplicate labels, or citation errors
---

# LaTeX Compilation

## Overview

Fix common LaTeX compilation errors systematically by running the full build sequence and addressing errors in order of dependency.

## When to Use

- Document won't compile (pdflatex errors)
- "Undefined reference" or "multiply-defined labels" warnings
- Citations showing as `[?]` or undefined
- Cross-references not resolving

## Quick Reference

| Problem | Solution |
|---------|----------|
| Undefined citations | Run: `pdflatex → bibtex → pdflatex → pdflatex` |
| Duplicate labels | Each `\label{name}` must be unique across document |
| Empty `\cite{}` | Remove or fill in citation key |
| Citation key mismatch | Ensure `.tex` keys match `.bib` entry names exactly |
| Cross-refs not updating | Run pdflatex twice after changes |

## Full Compilation Sequence

```bash
pdflatex -interaction=nonstopmode paper.tex
bibtex paper
pdflatex -interaction=nonstopmode paper.tex
pdflatex -interaction=nonstopmode paper.tex
```

## Common Mistakes

**Duplicate `\label{}` tags** - Copy-pasting figures often duplicates labels. Search with:
```bash
grep -n 'label{' paper.tex | sort -t'{' -k2 | uniq -d -f1
```

**Citation key typos** - `altabaa2025co` vs `altabaa2025cot` causes undefined citation. Always verify keys match the .bib file exactly.

**Running pdflatex only once** - Cross-references and citations need multiple passes to resolve.

**Empty citations** - `\cite{}` causes warnings. Remove or add proper key.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.