ArXiv TLDR

PaperFit: Vision-in-the-Loop Typesetting Optimization for Scientific Documents

🐦 Tweet
2605.10341

Bihui Yu, Xinglong Xu, Junjie Jiang, Jiabei Cheng, Caijun Jia + 4 more

cs.AIcs.SE

TLDR

PaperFit is a vision-in-the-loop agent that optimizes LaTeX document layouts, turning compilable drafts into publication-ready PDFs.

Key contributions

  • Formalizes Visual Typesetting Optimization (VTO) and a 5-category defect taxonomy for scientific documents.
  • Introduces PaperFit, a vision-in-the-loop agent that iteratively diagnoses and repairs LaTeX layout defects.
  • Creates PaperFit-Bench, a benchmark with 200 papers and 13 defect types for VTO evaluation.
  • PaperFit significantly outperforms baselines, proving vision-in-the-loop is crucial for polished PDFs.

Why it matters

LaTeX documents often have visual defects, requiring tedious manual fixes. PaperFit introduces a vision-in-the-loop agent to automate typesetting optimization. This work advances document automation for publication-ready PDFs.

Original Abstract

A LaTeX manuscript that compiles without error is not necessarily publication-ready. The resulting PDFs frequently suffer from misplaced floats, overflowing equations, inconsistent table scaling, widow and orphan lines, and poor page balance, forcing authors into repetitive compile-inspect-edit cycles. Rule-based tools are blind to rendered visuals, operating only on source code and log files. Text-only LLMs perform open-loop text editing, unable to predict or verify the two-dimensional layout consequences of their changes. Reliable typesetting optimization therefore requires a visual closed loop with verification after every edit. We formalize this problem as Visual Typesetting Optimization (VTO), the task of transforming a compilable LaTeX paper into a visually polished, page-budget-compliant PDF through iterative visual verification and source-level revision, and introduce a five-category taxonomy of typesetting defects to guide diagnosis. We present PaperFit, a vision-in-the-loop agent that iteratively renders pages, diagnoses defects, and applies constrained repairs. To benchmark VTO, we construct PaperFit-Bench with 200 papers across 10 venue templates and 13 defect types at different difficulty. Extensive experiments show that PaperFit outperforms all baselines by a large margin, establishing that bridging the gap from compilable source to publication-ready PDF requires vision-in-the-loop optimization and that VTO constitutes a critical missing stage in the document automation pipeline.

📬 Weekly AI Paper Digest

Get the top 10 AI/ML arXiv papers from the week — summarized, scored, and delivered to your inbox every Monday.