From armory
Optimizes figures in LaTeX projects for arXiv submission: inventories from \includegraphics, converts EPS/PDF/PNG/JPG formats, reduces sizes, strips metadata, ensures DVI/PDFLaTeX compatibility.
npx claudepluginhub mathews-tom/armory --plugin armoryThis skill uses the workspace's default tool permissions.
---
Validates arXiv paper submissions for compliance with TeX/LaTeX source, PDF, figures, metadata, bibliography, file organization, and error requirements. Produces pass/fail report with specific fixes.
Converts LaTeX academic papers between publisher formats (e.g., Springer/IPOL to MDPI/IEEE/Nature) by extracting content, injecting into new templates, fixing formatting, and compiling PDFs.
Critiques academic figures for format, colorblind safety, legibility, overplotting, category count, resolution, and vector/raster suitability before paper submission.
Share bugs, ideas, or general feedback.
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 validationarxiv-package — tarball packaging| Processor | Accepted | Rejected |
|---|---|---|
| LaTeX (DVI mode) | .ps, .eps | .pdf, .png, .jpg |
| PDFLaTeX | .pdf, .png, .jpg | .ps, .eps |
| Content | Optimal Format | Rationale |
|---|---|---|
| Photographs | JPEG | Lossy compression suits continuous tone |
| Line drawings / diagrams | PDF (vector) | Scalable, sharp at any resolution |
| Plots with text labels | PDF (vector) | Text remains crisp and searchable |
| Screenshots / raster art | PNG | Lossless compression for sharp edges |
| Mixed photo + text | PNG or PDF | Depends on dominant content |
Scan the project for all figures:
\includegraphics calls from all .tex filesFor each figure, determine:
Apply transformations in order of impact:
Format Conversion (when format violates processor requirements)
# 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
# Distill verbose EPS
eps2eps input.eps output.eps
# or convert to PDF
ps2pdf -dEPSCrop input.eps output.pdf
Size Reduction — Raster Figures
# 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)
EPS BoundingBox Fix (prevents Missing number, treated as zero)
%%BoundingBox appears near top of file, not only at end%%BoundingBox: (atend), extract actual values and place at topIf figures were renamed or reformatted:
\includegraphics paths\graphicspath settings if usedAfter optimization:
# 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]
| Tool | Install | Use Case |
|---|---|---|
ImageMagick (convert) | System package | Format conversion, resizing, stripping |
Ghostscript (ps2pdf, eps2eps) | System package | EPS/PS optimization and conversion |
epstopdf | TeX Live | EPS → PDF conversion |
pdfcrop | TeX Live | Trim PDF whitespace |
optipng | System package | PNG lossless optimization |
pngquant | System package | PNG lossy size reduction |
jpegoptim | System package | JPEG lossless optimization |