Float Optimizer Skill

Optimize LaTeX figure and table floats to resolve B1–B4 placement defects.

334|18|Updated Mar 9, 2026
One-click install
npx skills add https://github.com/OpenRaiser/PaperFit --skill float-optimizer-skill
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Float Optimizer Skill
Source: https://github.com/OpenRaiser/PaperFit/tree/main/skills/float-optimizer
Command: npx skills add https://github.com/OpenRaiser/PaperFit --skill float-optimizer-skill

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill solves LaTeX float defects where figures and tables land too far from their first reference, are sized incorrectly for the column width, cluster with little surrounding text, or split across pages in a way that breaks readability and formatting quality.

Core Features & Use Cases

  • B1 Float-Reference Distance Repair: Moves or re-parameterizes floats to ensure the visual placement is near the citation/first mention rather than forcing readers to hunt across pages.
  • B2 Column Width Fit: Normalizes image/table widths to \linewidth/\textwidth and uses appropriate environments (e.g., tabularx, longtable, rotated tables) to prevent underutilized space or overflow.
  • B3 Float Clustering Control: Distributes floats across pages and reduces “stacked floats” with minimal text in-between using placement parameters and strategic barriers.
  • B4 Cross-Page Orphaning Fix: Prevents long tables from losing repeated headers and avoids awkward page splits via longtable or controlled placement, then re-validates with page images.
  • Use Case: When your layout-detective report flags defects B1–B4, route the task to this Skill so it edits the relevant .tex sources and validates the result by rendering updated page images.

Quick Start

Ask your agent system to run the Float Optimizer Skill for the main .tex file using the layout detective report, cross-reference distances from data/crossrefs.json, and the latest visual page renders, then apply the minimal safe float edits and confirm the fixes on the updated page images.

Frequently Asked Questions about Float Optimizer Skill

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix LaTeX figures and tables that appear too far from their first reference?

To fix LaTeX float placement and reference distance, you can apply minimal-intrusion source edits that re-parameterize or move floats closer to their first citation, then validate the updated visual layout against rendered page images.

What's the best way to stop LaTeX floats from clustering together with no surrounding text?

To stop float clustering in LaTeX, apply placement parameters and strategic barriers to distribute figures and tables across pages, preventing stacked floats with minimal text in-between and improving overall formatting quality.

How do I prevent long tables from splitting awkwardly across pages in LaTeX?

To prevent cross-page orphaning in LaTeX long tables, use longtable environments or controlled placement to maintain repeated headers, then re-validate the page splits using rendered page images.

How do I normalize LaTeX table and figure widths to fit the column correctly?

To normalize LaTeX float widths for proper column fit, adjust image and table dimensions to match \linewidth or \ extwidth, and use appropriate environments like tabularx or rotated tables to prevent underutilized space or overflow.

Why do my LaTeX floats keep drifting into the bibliography or references section?

LaTeX floats drift into endmatter regions like bibliographies when placement parameters lack constraints; applying endmatter barriers in the source code prevents figures and tables from entering references regions.

Do I need a layout detective report and crossrefs.json to optimize LaTeX float placement?

Yes, optimizing LaTeX float placement requires a layout detective report flagging defects B1–B4, cross-reference distances from crossrefs.json, and latest visual page renders to apply minimal safe edits and confirm fixes.