init-latex-project
Initialize LaTeX Academic Project
Set up a complete LaTeX academic paper project from the standard template.
Default local workflow assumption: on macOS, do not assume TeX Live or MacTeX is installed. The common workflow is to edit the repo locally, push to GitHub, and compile in Overleaf through its GitHub sync. Skills should not require local latexmk, pdflatex, xelatex, or lualatex for normal writing or submission checks unless the user explicitly wants local compilation and a compiler is actually installed.
Skill Directory Layout
<installed-skill-dir>/
├── SKILL.md
├── sources.yaml # Authoritative download sources per venue (verified)
├── templates/
│ ├── macros.tex # Full math macro library
│ ├── main.tex # Generic arXiv/whitepaper template
│ ├── gitignore # Paper-source hygiene defaults
│ ├── AGENTS.md # Universal/Codex writing rules
│ ├── CLAUDE.md # Writing rules for AI agents
│ └── venues/
│ ├── icml/main.tex # ICML two-column template
│ ├── acl/main.tex # ACL/*ACL single-column template
│ ├── emnlp/main.tex # EMNLP (same acl.sty as ACL)
│ ├── naacl/main.tex # NAACL (same acl.sty as ACL)
│ ├── iccv/main.tex # ICCV two-column template
│ ├── eccv/main.tex # ECCV single-column (Springer LNCS)
│ ├── neurips/main.tex # NeurIPS single-column template
│ ├── iclr/main.tex # ICLR single-column template
│ ├── cvpr/main.tex # CVPR two-column template
│ └── acm/main.tex # ACM SIGCONF template
└── scripts/
└── init.sh # Builds project + downloads official style files
How venue_preamble.tex works
Every venue template uses \input{venue_preamble} instead of a hardcoded
\usepackage{neurips_<year>}. init.sh downloads the official .sty/.bst files
from the venue's authoritative source (see sources.yaml), detects the actual
filename, and writes venue_preamble.tex automatically.
project/
├── main.tex ← \input{venue_preamble} (stable, never changes)
├── venue_preamble.tex ← generated by init.sh (edit here to change mode)
├── neurips_<year>.sty ← downloaded from neurips.cc
└── ...
To switch submission mode (e.g., anonymous → camera-ready), only edit
venue_preamble.tex — main.tex never needs to change.
Steps to Follow
1. Parse $ARGUMENTS
| Position/Flag | Meaning | Required |
|---|---|---|
| First word | Project name | Yes |
| Second word | Target directory (default: current dir) | No |
--venue <name> |
Conference venue | No |
--git |
Initialize git repo | No |
--offline |
Skip style-file download (creates placeholder venue_preamble.tex) | No |
Supported venues (by deadline month):
| Venue | Month | Style | Source |
|---|---|---|---|
icml |
Jan | two-column | icml.cc |
acl |
Feb | single-column | github.com/acl-org/acl-style-files |
iccv |
Mar (biennial, odd) | two-column | CVF / iccv.thecvf.com |
eccv |
Mar (biennial, even) | single-column (LNCS) | github.com/paolo-favaro/paper-template |
neurips |
May | single-column | neurips.cc |
emnlp |
May | single-column | github.com/acl-org/acl-style-files |
iclr |
Sep | single-column | github.com/ICLR/Master-Template |
cvpr |
Nov | two-column | github.com/cvpr-org/author-kit |
naacl |
Dec | single-column | github.com/acl-org/acl-style-files |
acm |
varies | single-column | CTAN (pre-installed) |
2. Run the init script
bash <init-latex-project-skill-dir>/scripts/init.sh <project-name> [target-dir] [--venue <venue>] [--git]
Important: Resolve <init-latex-project-skill-dir> as the installed directory for this skill and use the absolute path to init.sh. Do not assume a Claude-specific install path.
3. Offer to immediately customize
After the script runs, ask the user if they want to:
- Update
sections/title.texwith their actual title - Fill in authors and affiliations in
main.tex - Any other immediate adjustments
4. Record the compile workflow
Ask whether the paper will compile locally or in Overleaf through GitHub. If the user is on macOS and has not said otherwise, assume Overleaf/GitHub.
For Overleaf/GitHub projects:
- ensure the paper repo can have a GitHub remote
- do not ask the user to install TeX Live, MacTeX, or missing TeX packages just to validate edits
- do not run local compile commands as a reflex after paper edits
- use local static checks, optional
tex-fmtsource-format checks, Git diff review, commit, and push - treat Overleaf's compile log and PDF preview as the compile source of truth
- when compile errors appear in Overleaf, fix source locally and push again
If tex-fmt is installed, record it as the default source-format checker:
tex-fmt --check --nowrap --recursive .
Do not format generated paper source silently. When the user wants formatting, run tex-fmt --nowrap --recursive . and review the diff before committing or pushing. If a project-local tex-fmt config exists, use it.
5. Record agent guidance policy
The generated paper repo should include both:
AGENTS.md: universal/Codex entrypoint for paper-local writing, compile, figure, table, and source hygiene rulesCLAUDE.md: Claude Code entrypoint with the same effective policy.gitignore: paper-specific source visibility defaults that keep.agent/,AGENTS.md,CLAUDE.md, raw CSVs, internal result docs, provenance ledgers, notebooks, and plotting scripts out of visible paper source unless intentionally force-added
Keep the two agent guidance files semantically aligned, including the same tex-fmt check/format policy. Treat them as local/agent-private guidance by default; if the paper branch is linked to Overleaf or otherwise visible to coauthors, do not push them unless the user explicitly chooses to expose agent guidance.
6. Record paper version policy when inside a project root
If this paper repo is part of a project-init layout, note that target-specific paper versions should usually be isolated as paper worktrees under sibling paper-worktrees/, not as copied folders inside paper/.
Use paper worktrees for:
- retargeting the same project to another conference template
- preparing an arXiv/preprint release where LaTeX source may be public
- finalizing a camera-ready version after acceptance
- making paper-only rebuttal edits with a clear exit condition
For arXiv or any public-source release, keep internal figure/table descriptions, experimental provenance notes, reviewer notes, TODOs, author-comment macros, private paths, and hidden comments out of the released .tex source. Store that descriptive/provenance material in .agent/, root memory/, or private project docs instead.
If the main paper branch is linked to Overleaf/GitHub, treat it as author-visible: paper source and paper-facing assets are allowed, but .agent/, AGENTS.md, CLAUDE.md, raw CSVs, internal result docs, plotting scripts, notebooks, reviewer strategy, and private paths should stay in root/private memory or an agent-private paper worktree.
For anonymous conference submissions, enforce venue anonymity and formatting mode. Do not assume source comments are safe if the venue requires source upload.
7. Print the script's output to the user
The script prints a file tree and venue-specific setup notes. Make sure the user sees these.
Venue Details
All sources are verified in sources.yaml. init.sh downloads style files automatically.
Edit venue_preamble.tex to switch submission mode.
ICML — Jan deadline
- Layout: Two-column
- Doc class:
article+\usepackage{icml{YEAR}}(year-specific) - Bibliography:
icml{YEAR}.bst - MANDATORY:
sections/impact.tex(Broader Impact, no page limit) - Note: Uses ICML-specific author macros (
\icmltitle,\icmlauthor, etc.)
ACL / EMNLP / NAACL — *ACL family
- Layout: Single-column
- Doc class:
\documentclass[11pt]{article}+\usepackage[review]{acl}(stable name) - Bibliography:
acl_natbib.bst - Citations:
\citet{}in-text;\cite{}/\citep{}parenthetical - MANDATORY:
sections/limitations.tex(no page limit) - Required if applicable:
sections/ethics.tex
ICCV — Mar deadline (biennial, odd years: 2025, 2027, …)
- Layout: Two-column (same CVF format as CVPR)
- Doc class:
\documentclass[times,10pt,twocolumn,letterpaper]{article}+\usepackage[review]{iccv} - Bibliography:
ieeenat_fullname.bst - Note: Use
figure*/table*for full-width floats
ECCV — Mar deadline (biennial, even years: 2024, 2026, …)
- Layout: Single-column (Springer LNCS)
- Doc class:
\documentclass[runningheads]{llncs}— NOT article - Style:
eccv.sty+eccvabbrv.sty - Bibliography:
splncs04.bst - Page limit: 14 pages including figures; references uncapped
- Author format: LNCS
\author{}\inst{}\institute{}macros
NeurIPS — May deadline
- Layout: Single-column
- Doc class:
article+\usepackage{neurips_{YEAR}}(year-specific) - Bibliography:
unsrtnat(numeric, sorted by appearance) - Acknowledgments: Use
{ack}environment (auto-hides in anonymous mode) - MANDATORY:
sections/impact.tex(Broader Impact, no page limit) - MANDATORY:
sections/checklist.tex(Author Checklist, no page limit)
ICLR — Sep deadline
- Layout: Single-column
- Doc class:
article+\usepackage[submitted]{iclr{YEAR}_conference}(year-specific) - Bibliography:
iclr{YEAR}_conference.bst - Extra:
sections/impact.tex(optional Ethics Statement)
CVPR — Nov deadline
- Layout: Two-column
- Doc class:
\documentclass[times,10pt,twocolumn,letterpaper]{article}+\usepackage[review]{cvpr}(stable name) - Bibliography:
ieeenat_fullname.bst - Note: Use
figure*/table*for full-width floats
ACM — varies
- Layout: Single-column (sigconf)
- Doc class:
\documentclass[sigconf,review,anonymous]{acmart}(pre-installed via CTAN) - Bibliography:
ACM-Reference-Format.bst - Camera-ready extras:
\acmConference,\acmDOI,\setcopyright, CCS concepts
What Is Always Included (Every Venue)
macros.tex — complete math macro library:
- Calligraphic
\calA…\calZ, bold\bA…\bZ/\ba…\bz - Blackboard bold
\R\E\P\B - Greek shortcuts
\sG\lG\tG\pa\half - Operators
\argmin\argmax\Softmax\Sigmoid\Var - Sum shortcuts
\sumN\sumK\sumM\sumT - Theorem environments (grey tcolorbox):
theoremlemmadefinitionremarkassumption - Author comment macros
\jerry{}\wwm{}\jieke{}etc.
Standard section files (all placeholder):
title.tex, abstract.tex, intro.tex, related.tex, method.tex, exp.tex, conclusion.tex, appendix.tex, acknowledgement.tex
bib/refs.bib — empty with usage example
Example Invocations
/init-latex-project my-new-paper # generic arXiv
/init-latex-project my-icml-paper ~/Papers --venue icml --git
/init-latex-project my-acl-paper ~/Papers --venue acl --git
/init-latex-project my-iccv-paper . --venue iccv
/init-latex-project my-eccv-paper . --venue eccv
/init-latex-project my-neurips-paper . --venue neurips --git
/init-latex-project my-emnlp-paper . --venue emnlp
/init-latex-project my-iclr-paper ~/Papers --venue iclr --git
/init-latex-project my-cvpr-paper . --venue cvpr
/init-latex-project my-naacl-paper . --venue naacl
/init-latex-project my-acm-paper . --venue acm
/init-latex-project my-paper-offline . --venue neurips --offline # skip download
If the Auto-Download Fails
If init.sh cannot reach the venue server, venue_preamble.tex is created as a
placeholder. Fix it:
- Visit the venue's author instructions page (URL is in
sources.yaml). - Download the style zip manually and unpack
.sty/.bstfiles into the project root. - Edit
venue_preamble.texto add the correct\usepackage{...}line.
As a last resort, use WebSearch to find the current year's download URL and fetch it:
# Example for NeurIPS <year>:
curl -fsSL https://media.nips.cc/Conferences/<year>/Styles/neurips_<year>.zip -o /tmp/n.zip
unzip -j /tmp/n.zip "*.sty" -d /path/to/project/
Package Conflict Notes
The macros.tex library is loaded last in all venue templates (after venue packages), so our definitions take precedence. Known conflicts:
| Venue | Potential Conflict | Resolution |
|---|---|---|
| ACM | acmart redefines \P |
Our \P = \mathbb{P} overrides it — intentional |
| ACM | acmart has its own \cite |
\let\cite\citep in macros.tex may interfere — comment it out if needed |
| CVPR | Two-column layout | tcolorbox theorem envs may span columns — switch to plain amsthm if needed |
| ICML | Uses its own hyperref setup |
Load macros.tex after icml<year> to avoid double-load errors |
| NeurIPS | algorithmic vs algpseudocode |
Always use algpseudocode (lowercase \State, \Require, etc.). The older algorithmic package uses ALL-CAPS commands and is incompatible with modern algorithm code. |
| NeurIPS | cleveref Option Clash |
cleveref must be loaded ONCE, in main.tex, AFTER hyperref. The macros.tex template also contains \usepackage[capitalize,noabbrev]{cleveref} — this causes an Option Clash (capitalise vs capitalize) when both files are compiled together. Fix: remove or comment out the cleveref line from macros.tex in NeurIPS projects. The NeurIPS venue template already does this correctly. |
| ALL | \def\(, \def\), \def\[, \def\] in macros.tex |
PERMANENTLY DISABLED. These four lines redefined LaTeX's built-in math-mode delimiters (\( \) = inline math; \[ \] = display math), which broke ALL math environments ($...$, \begin{equation}, algorithmic states, etc.) with cascading "Missing $" and "Extra )" errors. Never re-enable. Use \left( ... \right) explicitly instead. |
| ALL | \usepackage{algorithm} + \usepackage{algorithmic} in macros.tex |
PERMANENTLY DISABLED. Loading both algorithm/algorithmic alongside algpseudocode (required by NeurIPS, ICML, ICLR) causes "Command \algorithmicindent already defined" and similar errors. The algorithm float wrapper should be loaded once in main.tex together with exactly one of algpseudocode (modern, recommended) or algorithmic (legacy). |
More from a-green-hand-jack/ml-research-skills
project-init
Initialize an ML research project control root. Use for paper/code/slides repos, shared memory, GitHub Project alignment, agent guidance, worktree policy, and lifecycle handoffs.
37project-sync
Sync verified code-side experiment results into paper memory. Use when logs, reports, run docs, or user-confirmed metrics should become paper-facing evidence.
36add-git-tag
Create annotated Git milestone tags. Use when completing a phase, releasing a version, or marking a research checkpoint.
36update-docs
Refresh project documentation after code changes. Use after implementing features, changing behavior, or preparing a milestone commit.
36new-workspace
Create Git branches or worktrees for research code and paper versions. Use for experiments, baselines, rebuttal fixes, arXiv/camera-ready branches, and worktree memory.
36init-python-project
Initialize or enhance a Python/ML project. Use for new repos or forks needing production structure, uv environment setup, and research evidence docs.
35