latex-typeset
Skill7 starsChanged 2 months agoApache-2.0View on GitHub
Audit and polish LaTeX manuscript layout, tables, multi-line equations, float placement, venue page limits (ICML, NeurIPS, ICLR, arXiv), and XeLaTeX CJK typography via closed-loop PDF diagnosis, worker-delegated mechanical fixes with prose-preservation verification, and Lead visual PNG sign-off. 论文 LaTeX 排版与版面视觉审计(溢出定位、三线表、双栏公式折行、浮动体排布、顶会压页与中文 XeLaTeX 排版)。Do NOT use for drafting or rewriting paper prose (-> paper-write) or designing/drawing standalone figures (-> paper-figure-craft).
In this repository4 other files it gives its agents.
- AGENTS.mdAGENTS.md
- paper-figure-craftSkill
- paper-writeSkill
- research-gateSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 12
Mandatory skill-contract dispatch: Run scripts/dispatch_gpt.py --skill latex-typeset on the target .tex paths.
- Distinctive: line 18
Never use or accept any of these shortcuts:
- Very specific: line 28
Tables & floats: Use booktabs (\toprule/\midrule/\bottomrule), tabularx (X columns) or \setlength{\tabcolsep}{4pt} + \small, place table …
- Very specific: line 30
Single-source multi-wrapper: Keep ONE latex/sections_en/ + latex/sections_zh/ tree.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
LaTeX Typesetting & Visual Layout Loop
Fix layout, overflows, tables, floats, and page budgets cleanly without touching manuscript meaning or numbers.
1. Division of Labor (Offload Mechanical Loop, Keep Prose & Visual Sign-Off)
- Mandatory skill-contract dispatch: Run
scripts/dispatch_gpt.py --skill latex-typeseton the target.texpaths. It automatically inlines this skill contract + references into the layout worker, snapshots prose tokens (--snapshot-prose), and runs--verify-proseon return so zero words or numbers can drift. - Mechanical loop in background: The worker runs edit → compile →
layout_audit.pyuntilerrors == 0, writing logs to disk and returning a concise gist (<=15lines). - Render & Lead sign-off: Inspect
.gate_cache/typeset_preview/page_*.png(--render-annotated) visually. If hitting a venue page limit truly requires cutting sentences or redesigning figures, the worker stops and reports the exact overflow height so the Lead tightens prose (paper-write) or figures (paper-figure-craft).
2. Hard Anti-Hack Baselines (Desk-Reject Prevention)
Never use or accept any of these shortcuts:
- Negative vertical space hacks (
\vspace{-4pt}or larger,\vskip -...) to force page limits. - Spacing/margin tampering (
\baselinestretch,\linespread,\addtolength{\textheight}/\textwidth/\parskip). - Unreadable table shrinking (
\tiny,\scalebox/\resizebox< 0.80); minimum readable table size is\footnotesize(\smallpreferred). - Vertical table rules (
|c|c|) or raw\hlineinstead ofbooktabs;[H]float spam causing mid-page white voids.
3. Clean Surgical Fix Order
- Log & PDF diagnosis first: Locate exact
.texline numbers fromOverfull \hbox/\vboxand check PDF box collisions, margin breaches, orphan headings, and whitespace voids. - Equations & URLs: Break long two-column displays cleanly with
aligned/multline,\allowbreak, andxurl+\emergencystretch=1em. - Tables & floats: Use
booktabs(\toprule/\midrule/\bottomrule),tabularx(Xcolumns) or\setlength{\tabcolsep}{4pt}+\small, place table captions above tables, use[t]/[tp](never[H]), and placefigure*/table*1–2 paragraphs before their first mention. - Clean page tightening: Tighten
\looseness=-1on paragraphs with 1–3 trailing words on a new line, trim oversized table padding, or ask the Lead to tighten prose. - Single-source multi-wrapper: Keep ONE
latex/sections_en/+latex/sections_zh/tree; put every venue/arXiv wrapper (main_*.tex) andpaper_gate*.jsoninlatex/so all PDFs stay synchronized automatically.
Read on Demand
- Venue recipes & XeLaTeX CJK · Surgical fix cookbook
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

