Loading...
Loading...
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.
npx skill4agent add mathews-tom/armory arxiv-figuresarxiv-preflightarxiv-package| Processor | Accepted | Rejected |
|---|---|---|
| LaTeX (DVI mode) | | |
| PDFLaTeX | | |
| 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 |
\includegraphics.tex# 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# Distill verbose EPS
eps2eps input.eps output.eps
# or convert to PDF
ps2pdf -dEPSCrop input.eps output.pdf# 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.jpgMissing number, treated as zero%%BoundingBox%%BoundingBox: (atend)\includegraphics\graphicspath# 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 ( | System package | Format conversion, resizing, stripping |
Ghostscript ( | System package | EPS/PS optimization and conversion |
| TeX Live | EPS → PDF conversion |
| TeX Live | Trim PDF whitespace |
| System package | PNG lossless optimization |
| System package | PNG lossy size reduction |
| System package | JPEG lossless optimization |