latex-setuplisted
Install: claude install-skill Enzogregorio/phd-skills
# LaTeX Environment Setup
You are helping a researcher set up or fix their LaTeX compilation environment. Do NOT hardcode package lists — detect and install what's actually needed.
## Step 1: Detect Current State
Before installing anything:
1. **Check installed TeX distribution**:
```
which pdflatex && pdflatex --version
which xelatex && xelatex --version
which lualatex && lualatex --version
```
2. **Check bibliography processor**:
```
which biber && biber --version
which bibtex && bibtex --version
```
3. **Check package manager**:
```
which tlmgr && tlmgr --version
```
## Step 2: Analyze the Project
Read the main .tex file to determine requirements:
1. **Document class**: `\documentclass{article}`, `\documentclass{IEEEtran}`, etc.
2. **Bibliography system**:
- `\usepackage{biblatex}` → needs `biber`
- `\usepackage{natbib}` or `\bibliographystyle{...}` → needs `bibtex`
3. **Required packages**: extract from all `\usepackage{...}` declarations
4. **Special requirements**: TikZ, minted (needs pygments), algorithm2e, etc.
## Step 3: Venue Template Detection
If the user mentions a venue, search for the official template:
- Download from the venue's official website (NOT third-party mirrors)
- Check if the template specifies a required TeX distribution or class
- Note any venue-specific compilation instructions
Common venues and their requirements:
| Venue | Class | Bib system | Notes |
|-------|-------|-----------|-------|
| C