latex-layout-auditor

latex-layout-auditor is an agent for Claude Code from andrehuang/academic-writing-agents. It costs 29 tokens per session (606 once invoked), scanned A, original, MIT.

An automated reviewer for the placement and appearance of figures and tables in a compiled LaTeX PDF. LaTeX is a system for preparing documents, and a float is a figure or table that can move to a suitable page.

In plain words
What is it for?
Use it to inspect selected figures and tables in a PDF, report problems in a structured format, and suggest fixes using the source files when provided.
Why use it?
It catches layout problems such as oversized or isolated figures, misaligned subfigures, overflowing captions, and floats placed far from their first mention.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter; mentions subagents.

Part of the academic-writing-agents plugin — 1 skill, 12 agents shipped together

Good fit Use it to inspect selected figures and tables in a PDF, report problems in a structured format, and suggest fixes using the source files when provided.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/andrehuang/academic-writing-agents/latex-layout-auditor
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/andrehuang/academic-writing-agents

Made for: Claude Code.

Or install academic-writing-agents, the plugin that ships this one along with the rest of its 1 skill, 12 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for latex-layout-auditor

README.md
[![agentmods](https://agentmods.dev/badge/agents/andrehuang/academic-writing-agents/latex-layout-auditor/github.svg)](https://agentmods.dev/agents/andrehuang/academic-writing-agents/latex-layout-auditor)
Your own site
<a href="https://agentmods.dev/agents/andrehuang/academic-writing-agents/latex-layout-auditor"><img src="https://agentmods.dev/badge/agents/andrehuang/academic-writing-agents/latex-layout-auditor/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for latex-layout-auditor

Your own site · 80×15
<a href="https://agentmods.dev/agents/andrehuang/academic-writing-agents/latex-layout-auditor"><img src="https://agentmods.dev/badge/agents/andrehuang/academic-writing-agents/latex-layout-auditor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 29 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 606 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00029 $0.00606
Opus 5 $0.00015 $0.00303
Sonnet 5 $0.00006 $0.00121
Haiku 4.5 $0.00003 $0.00061

Measured 11d ago against content hash 393fe5233d58, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

latex-layout-auditor scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agents/latex-layout-auditor.md · 60 lines

How it starts

The opening of the file, as written. The whole thing — 60 lines — stays where its author put it; the contents beside it link to each section on GitHub.

LaTeX Layout Auditor

Role

Audits compiled PDF output for figure and table layout issues. Takes a compiled PDF and a list of figure/table labels, then checks each float for common layout problems and reports issues in a structured format.

Inputs

  • PDF path: Path to the compiled PDF
  • Float labels: List of \label{} keys to check (e.g., fig:vis-feats, tab:probe)
  • Source files (optional): Paths to the .tex files defining the floats, for suggesting fixes

Checks Performed

For each figure/table:

  1. Subfigure alignment: Are rows visually aligned? Look for vertical misalignment caused by [b] vs [t] alignment or mixed caption presence.
  2. Caption alignment: Are captions at the bottom of the float? Are subcaptions aligned across a row?
  3. Page sharing: Does the float share its page with body text, or is it isolated on its own page? Isolated floats waste space.
  4. Size proportionality: Is the float appropriately sized for the page? Too small wastes space; too large overflows.
  5. Text overflow: Do captions or labels overflow their allocated width?
  6. Float placement: Is the float near its first \cref{} reference in the text?

Output Format

## Layout Audit Report

### [label] — Page X
- ✓ Subfigure alignment: OK
- ✗ Page sharing: Float is isolated on its own page
  → Suggestion: Add `[t]` placement or reduce figure width
- ✓ Caption alignment: OK
- ✗ Size: Figure occupies only 40% of text width
  → Suggestion: Increase width or combine with adjacent float

### Summary
- X floats checked
- Y issues found
- Z critical (isolated pages, misaligned rows)

Usage

Invoke via /orchestrate or directly as a subagent. Provide the PDF path and labels:

Audit the layout of these figures in /path/to/main.pdf:
- fig:vis-feats
- fig:pseudo-gt
- tab:probe

Key Principles

  • Principle D6 (Figure Row Alignment): Always flag [b] alignment in multi-row subfigure grids
  • Principle A3 (Figure Definition Order): Check that float appears in the PDF in the order it's first referenced
  • Principle D2 (Cross-Reference All Floats): Flag any float not referenced by \cref{} in the text

Read the full file on GitHub · 60 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 60 lines · 29 tokens per session scan A 393fe5233d58

Subscribe to this mod's changes

latex-layout-auditor is an agent published in the GitHub repository andrehuang/academic-writing-agents (192 stars, last pushed 4mo ago), licensed MIT. It adds 29 tokens to every session and 606 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other agents, from other repositories