Arxiv Figures logo

Arxiv Figures

Community
Mathews-Tom
arxiv-figures

Optimize and prepare figures for arXiv submission: format conversion (EPS/PDF/PNG/JPG), size reduction, metadata stripping, processor compatibility (DVI vs PDFLaTeX). Triggers on: "optimize figures for arXiv", "reduce figure size", "convert figures for arXiv", "fix arXiv figures", "figure too large", "arxiv image compression". Companion to arxiv-preflight and arxiv-package.

Overview

PublisherMathews-Tom
Repositoryarmory
Skill namearxiv-figures
Stars
318
Forks
47
Bundled files
1
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by Mathews-Tom on GitHub. Read the source before you install it.

Installation

Install the Arxiv Figures AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Mathews-Tom/armory.git /tmp/armory
mkdir -p .claude/skills
cp -r /tmp/armory/skills/arxiv-figures .claude/skills/arxiv-figures
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Arxiv Figures in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Arxiv Figures on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Arxiv Figures is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

arXiv Figure Optimizer

Purpose

Analyze, optimize, and convert figures in a TeX/LaTeX project to meet arXiv requirements and size constraints. Produces correctly formatted, efficiently compressed figures that compile without errors.

Companion skills:

  • arxiv-preflight — full submission validation
  • arxiv-package — tarball packaging

Format Rules

By Processor

ProcessorAcceptedRejected
LaTeX (DVI mode).ps, .eps.pdf, .png, .jpg
PDFLaTeX.pdf, .png, .jpg.ps, .eps

By Content Type

ContentOptimal FormatRationale
PhotographsJPEGLossy compression suits continuous tone
Line drawings / diagramsPDF (vector)Scalable, sharp at any resolution
Plots with text labelsPDF (vector)Text remains crisp and searchable
Screenshots / raster artPNGLossless compression for sharp edges
Mixed photo + textPNG or PDFDepends on dominant content

Workflow

1. Inventory

Scan the project for all figures:

  • Parse \includegraphics calls from all .tex files
  • Identify the TeX processor (DVI vs PDFLaTeX) from document preamble or build config
  • For each figure: record path, format, file size, dimensions (pixels or vector bounds)
  • Flag missing figures, wrong-format figures, oversized figures

2. Analyze

For each figure, determine:

  1. Format compliance — does the format match the processor?
  2. File size — flag individual figures >2MB, total >15MB
  3. Resolution — PNG/JPEG: flag >34 Megapixels (arXiv warning threshold since Feb 2026)
  4. Content type — photograph vs diagram vs plot (determines optimal format)
  5. Redundant metadata — PNG: ICC profiles, alpha channels, EXIF, interlacing
  6. EPS efficiency — verbose PostScript from plotting programs (common with matplotlib, R, MATLAB)

3. Optimize

Apply transformations in order of impact:

Format Conversion (when format violates processor requirements)

bash
# EPS → PDF (for PDFLaTeX)
epstopdf figure.eps
# or
ps2pdf -dEPSCrop figure.eps figure.pdf

# PDF/PNG/JPG → EPS (for DVI mode)
convert figure.png figure.eps

Size Reduction — Vector Figures

bash
# Distill verbose EPS
eps2eps input.eps output.eps
# or convert to PDF
ps2pdf -dEPSCrop input.eps output.pdf

Size Reduction — Raster Figures

bash
# Strip PNG metadata, remove alpha, optimize compression
convert input.png -strip -alpha remove -define png:compression-level=9 output.png

# Reduce oversized PNG resolution (keep ≤300 DPI at print size)
convert input.png -resize 3000x3000\> -strip output.png

# JPEG quality optimization (80-90 is visually lossless for most content)
convert input.jpg -quality 85 -strip output.jpg

# Downsample oversized JPEG
convert input.jpg -resize 3000x3000\> -quality 85 -strip output.jpg

PNG Optimization (avoid arXiv warnings)

  • Remove palette indexing if unnecessary
  • Remove alpha channel if background is solid
  • Strip ICC color profiles
  • Remove metadata chunks
  • Disable interlacing

EPS BoundingBox Fix (prevents Missing number, treated as zero)

  • Verify %%BoundingBox appears near top of file, not only at end
  • If only %%BoundingBox: (atend), extract actual values and place at top

4. Update TeX Source

If figures were renamed or reformatted:

  1. Update \includegraphics paths
  2. Remove explicit extensions where possible (allows processor flexibility)
  3. Verify \graphicspath settings if used

5. Verify

After optimization:

  1. Attempt local compilation to verify all figures render
  2. Compare visual output of optimized vs original figures
  3. Report size reduction per figure and total

6. Report

markdown
# Figure Optimization Report

**Processor:** [detected]
**Total figures:** [count]
**Size before:** [total MB]
**Size after:** [total MB]
**Reduction:** [percentage]

## Changes Made

| Figure | Original | Optimized | Size Before | Size After | Action |
|--------|----------|-----------|-------------|------------|--------|
| fig1 | fig1.eps | fig1.pdf | 12.3 MB | 0.4 MB | EPS→PDF conversion |
| fig2 | fig2.png | fig2.png | 8.1 MB | 1.2 MB | Strip metadata, downsample |

## Warnings

[Any remaining issues — e.g., figures still above thresholds]

Tools Reference

ToolInstallUse Case
ImageMagick (convert)System packageFormat conversion, resizing, stripping
Ghostscript (ps2pdf, eps2eps)System packageEPS/PS optimization and conversion
epstopdfTeX LiveEPS → PDF conversion
pdfcropTeX LiveTrim PDF whitespace
optipngSystem packagePNG lossless optimization
pngquantSystem packagePNG lossy size reduction
jpegoptimSystem packageJPEG lossless optimization

Core Principles

  • Never degrade visual quality below print-readable. Optimization means removing waste (metadata, unnecessary resolution, verbose encoding), not destroying information.
  • Match format to processor. A figure in the wrong format blocks compilation. This is the highest priority fix.
  • Preserve vector where possible. Converting vector to raster is a one-way quality loss. Only do this when the vector version is pathologically large (>10MB) and cannot be distilled.
  • Report everything. The user decides which optimizations to accept. Show before/after sizes and explain each transformation.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Arxiv Figures AI skill do?

Optimize and prepare figures for arXiv submission: format conversion (EPS/PDF/PNG/JPG), size reduction, metadata stripping, processor compatibility (DVI vs PDFLaTeX). Triggers on: "optimize figures for arXiv", "reduce figure size", "convert figures for arXiv", "fix arXiv figures", "figure too large", "arxiv image compression". Companion to arxiv-preflight and arxiv-package.

Why use Arxiv Figures on TypingMind?

Because you install it once and use it with any model. Arxiv Figures is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Arxiv Figures in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/Mathews-Tom/armory/tree/main/skills/arxiv-figures. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Arxiv Figures?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Arxiv Figures?

As many as you like. As long as a model supports skills, you can use Arxiv Figures with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Arxiv Figures AI skill free?

Yes. It is published on GitHub by Mathews-Tom under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇