agentleFS
kongtou20070406kongtou20070406/research-direction-selector/skills/latex-typeset/SKILL.md

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).

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
  1. Very specific:

    Mandatory skill-contract dispatch: Run scripts/dispatch_gpt.py --skill latex-typeset on the target .tex paths.

    line 12
  2. Distinctive:

    Never use or accept any of these shortcuts:

    line 18
  3. Very specific:

    Tables & floats: Use booktabs (\toprule/\midrule/\bottomrule), tabularx (X columns) or \setlength{\tabcolsep}{4pt} + \small, place table …

    line 28
  4. Very specific:

    Single-source multi-wrapper: Keep ONE latex/sections_en/ + latex/sections_zh/ tree.

    line 30

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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)

  1. Mandatory skill-contract dispatch: Run scripts/dispatch_gpt.py --skill latex-typeset on the target .tex paths. It automatically inlines this skill contract + references into the layout worker, snapshots prose tokens (--snapshot-prose), and runs --verify-prose on return so zero words or numbers can drift.
  2. Mechanical loop in background: The worker runs edit → compile → layout_audit.py until errors == 0, writing logs to disk and returning a concise gist (<=15 lines).
  3. 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 (\small preferred).
  • Vertical table rules (|c|c|) or raw \hline instead of booktabs; [H] float spam causing mid-page white voids.

3. Clean Surgical Fix Order

  1. Log & PDF diagnosis first: Locate exact .tex line numbers from Overfull \hbox/\vbox and check PDF box collisions, margin breaches, orphan headings, and whitespace voids.
  2. Equations & URLs: Break long two-column displays cleanly with aligned / multline, \allowbreak, and xurl + \emergencystretch=1em.
  3. Tables & floats: Use booktabs (\toprule/\midrule/\bottomrule), tabularx (X columns) or \setlength{\tabcolsep}{4pt} + \small, place table captions above tables, use [t] / [tp] (never [H]), and place figure* / table* 1–2 paragraphs before their first mention.
  4. Clean page tightening: Tighten \looseness=-1 on paragraphs with 1–3 trailing words on a new line, trim oversized table padding, or ask the Lead to tighten prose.
  5. Single-source multi-wrapper: Keep ONE latex/sections_en/ + latex/sections_zh/ tree; put every venue/arXiv wrapper (main_*.tex) and paper_gate*.json in latex/ so all PDFs stay synchronized automatically.

Read on Demand

  • Venue recipes & XeLaTeX CJK · Surgical fix cookbook

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.