SuperAPI AI Directory

PaperFit

PaperFit is a LaTeX paper typesetting Agent System for Claude Code, Codex, and Cursor. A paper passing LaTeX compilation does not mean the layout is acceptable. Common visual-level problems such as stacked floats, large gaps in two-column layouts, inconsistent table styles, overflowing equations or tables, and objects losing control of their positions after template migration are difficult to find from the .log file alone. PaperFit treats typesetting as a visual closed-loop task: first render the PDF into page images, then judge problems by combining LaTeX logs, cross-references, and template rules, and finally write back to the source and re-render for acceptance. Its goal is not to replace the author in writing the paper, but to hand over the repetitive work of "looking at the layout, fixing the source, and checking again" to the Agent. It is suitable for pre-submission checks, template migration, page-count compression, and fixing wide tables and floats. Users only need to describe the goal in natural language in the project root directory, and it will automatically complete compilation, page-image rendering, visual diagnosis, source repair, and final acceptance.

Open website

About this tool

PaperFit is a LaTeX paper typesetting Agent System for Claude Code, Codex, and Cursor. You only need to describe the goal in the paper project root directory, and PaperFit will automatically complete compilation, page-image rendering, visual diagnosis, source repair, and final acceptance.

  1. Purpose A paper passing LaTeX compilation does not mean the layout is already acceptable. Problems commonly encountered before actual submission often occur at the visual level: floats piled together, large blank areas in two-column pages, inconsistent table styles, overflowing equations or tables, and objects losing control of their positions after template migration. These problems are difficult to find from the .log file alone, and difficult to solve reliably with one-off text rewriting. PaperFit treats paper typesetting as a visual closed-loop task: first render the PDF into page images, then judge problems by combining LaTeX logs, cross-references, and template rules, and finally write back to the source and re-render for acceptance. Its goal is not to replace the author in writing the paper, but to hand over the repetitive work of "looking at the layout, fixing the source, and checking again" to the Agent.

  2. Main capabilities

  • Check before submission whether the paper has obvious visual typesetting defects.
  • Migrate an existing paper to a new conference template while keeping content and objects as stable as possible.
  • Compress the main text to a target page count while changing the academic meaning as little as possible.
  • Fix problems such as wide tables, stacked floats, two-column gaps, overfull boxes, and inconsistent captions.
  • Initiate typesetting tasks in natural language within the Agent host, rather than manually chaining scripts.
  1. How to use After installation is complete, simply state the goal to the host directly in the paper project root directory. PaperFit will automatically infer the main .tex file, the current template, the page budget, and the repair path to enter. It only needs you to supply additional information when the project structure is unclear, the environment is missing, or the goal itself is ambiguous.

Dependencies: Poppler (for reading PDF information and rendering page images); a LaTeX compilation environment (such as tectonic, pdflatex, or the toolchain required by the template). On macOS, Poppler can be installed. After installation, it is recommended to run a health check once and install the Python dependencies. Claude Code plugin marketplace installation. For Codex provider-related instructions, see docs/CODEX_PROVIDER_SETUP.md.

PaperFit's recommended entry point is natural language, not memorizing internal commands. Source file modifications are controlled by default: analysis, rendering, diagnosis, and repair planningCan be executed automatically; source-changing tasks default to dry-run, and bounded source mutation is only executed when an explicit --apply or host-equivalent authorization is present. By default max_rounds=1; only when --apply --max-rounds N are both explicitly provided will the runtime continue to the next round after approval carry-forward, artifact freshness, the candidate approval gate, and gatekeeper CONTINUE all pass.

IV. Workflow and Architecture The closed loop can be summarized as: compilation, page image rendering, visual diagnosis, source repair, re-render acceptance. Visual inspection is a necessary step before delivery. PaperFit will not claim that typesetting is complete merely because compilation passes, nor will it silently delete figures, tables, captions, labels, or cross-references in order to compress the page count.

PaperFit uses the Visual Typesetting Optimization (VTO) taxonomy to unify the language of diagnosis and repair; the complete definition is in config/vto_taxonomy.yaml. PaperFit consists of Agent roles, skill packages, configuration, and the execution layer. The Agent is responsible for judging tasks and organizing the closed loop; the CLI and scripts are responsible for rendering, state recording, log parsing, and repeatable repair actions.

paperfit monitor starts the read-only PaperFit Observatory local monitoring console, displaying runtime status, visual evidence, repair decisions, safety boundaries, and benchmark evidence in a Chinese interface. It reads the current project's data/ artifacts and does not trigger source code modifications. Related documentation includes docs/COMMANDS_SETUP.md, docs/RELEASE_AND_LOCAL_UPDATE.md, .claude-plugin/README.md.

V. Content Protection Restrictions PaperFit's automatic repair must protect academic content and key objects: do not silently delete figures, tables, captions, labels, references, or experimental results; do not use \resizebox, \scalebox as the default means of table compression; prioritize layout-level solutions such as table*, tabularx, column width restructuring, and float rearrangement; semantic edits must be minimal, auditable, and retain the basis for the repair. See protocols/content-integrity-protection.md for the related protocol.

VI. License MIT License, see LICENSE.