PaperFit  by OpenRaiser

Automated LaTeX typesetting agent with visual feedback loop

Created 2 months ago
276 stars

Top 93.8% on SourcePulse

GitHubView on GitHub
Project Summary

<2-3 sentences summarising what the project addresses and solves, the target audience, and the benefit.> PaperFit is a Vision-in-the-Loop (VTO) LaTeX typesetting agent system designed to automate the diagnosis and repair of visual layout defects in academic papers. It targets authors and researchers using AI coding assistants like Claude Code, Codex, and Cursor, offering a benefit of reducing repetitive manual effort in achieving polished, publication-ready layouts beyond mere compilation success.

How It Works

PaperFit treats typesetting as a visual closed-loop task. It renders PDF pages into images, analyzes these alongside LaTeX logs, cross-references, and template rules to systematically diagnose visual defects such as floating body congestion, empty columns, or overflows. The system then plans and executes source-level repairs, recompiles, re-renders, and validates the output, offering a significant advantage over traditional methods by addressing subtle layout issues that are difficult to detect manually.

Quick Start & Requirements

  • Installation: Requires Node.js 18+ and Python 3.8+. Install via npm install -g paperfit-cli and pip3 install -r requirements.txt (after cloning or via paperfit-install).
  • Prerequisites: A LaTeX compilation environment (e.g., tectonic, pdflatex) and Poppler for PDF processing are necessary.
  • Integration: Designed for seamless integration with Claude Code, Codex, and Cursor, often via plugin or provider setup.
  • Resources: paperfit doctor command is available for environment checks.
  • Documentation: Further details are available in docs/COMMANDS_SETUP.md and related documentation.

Highlighted Details

  • Visual Layout Diagnosis: Identifies and addresses issues like orphan/widow lines, large empty page areas, stacked floats, inconsistent table styles, overflows, and alignment problems.
  • Full VTO Repair Loop: Orchestrates compilation, log parsing, PDF rendering, visual defect diagnosis, source code repair, and re-validation.
  • Template Migration: Supports migrating and reorganizing layouts between common academic templates (e.g., CVPR, ICLR, ACL, ACM).
  • Page Count Control: Optimizes layout to meet target page budgets, performing minimal, auditable semantic adjustments when required.
  • Local Object Repair: Enables focused repair of specific issues within individual tables, figures, formulas, or pages.
  • Cross-Host Distribution: Core capabilities are deployable across Claude Code, Codex, and Cursor environments.

Maintenance & Community

No specific details regarding maintainers, community channels (e.g., Discord, Slack), or active sponsorships are provided in the README.

Licensing & Compatibility

  • License: MIT License.
  • Compatibility: The MIT license is permissive, generally allowing for commercial use and integration into closed-source projects without significant restrictions.

Limitations & Caveats

Setup requires specific development environments (Node.js, Python, Poppler, LaTeX). The system may prompt for additional information if project structure is unclear or dependencies are missing. PaperFit enforces strict content integrity protocols, preventing silent deletion of critical academic content or overuse of simple scaling for table compression. The primary interaction model relies on integration with supported AI agent hosts.

Health Check
Last Commit

2 weeks ago

Responsiveness

Inactive

Pull Requests (30d)
1
Issues (30d)
1
Star History
276 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.