Skip to main content

arxivit 🧹

image

Robust arXiv LaTeX cleaner with DPI-based image rescaling.

Installation

pip install arxivit

Usage

# Create an uploadable archive: /path/to/paper.arxiv.tar.gz
arxivit /path/to/paper/main.tex

# Convert images to JPEG at max 300 DPI in the final PDF and save to dir /path/to/output
arxivit /path/to/paper/main.tex --image-options 'jpeg,300dpi' --output /path/to/output

# Convert transparent images to JPEG by compositing them onto white
arxivit /path/to/paper/main.tex --image-options 'jpeg,background@white,300dpi'

# Convert images to max 300 DPI in the final PDF, images in figures/pca/ to max 1000px
arxivit /path/to/paper/main.tex --image-options '300dpi' --image-options 'figures/pca/*:1000px'

# Losslessly optimize all output PNGs with oxipng
arxivit /path/to/paper/main.tex --oxipng

The background@COLOR option alpha-blends transparent raster images onto the given color and removes transparency, independently of JPEG conversion. Use a Pillow color name or hex color, e.g. background@white, background@black, or background@#204060. Use it with jpeg to convert transparent PNGs to JPEG, or alone to keep PNG output.

Use --oxipng for a good default, or --oxipng=LEVEL to select 0–6 or max. All levels are lossless; max takes much longer. Requires oxipng on PATH.

For more options, run:

arxivit --help

Q&A

Why Not arxiv-latex-cleaner?

arxiv-latex-cleaner statically analyzes LaTeX source code, which has some limitations:

  1. It does not reliably track dependencies in all scenarios—e.g., when images are included via complex macros that obscure their filenames in the source code.
  2. It only supports fixed-size image rescaling, without considering how large an image appears in the final compiled PDF.

How Does arxivit Work?

arxivit takes a different approach:

  • It uses latexmk to compile the LaTeX source code.
  • It analyzes the compilation log to determine which .tex files and images are included, as well as their sizes in the final PDF.
  • It rescales images to the desired DPI based on their actual dimensions in the final document, ensuring uniform sharpness while minimizing file size.
  • It uses latexpand to strip comments from .tex files.

Metadata

Release files for arxivit 0.11.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for arxivit 0.11.0
File Size Uploaded
arxivit-0.11.0.tar.gz 28.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for arxivit 0.11.0
File Interpreter ABI Platform
arxivit-0.11.0-py3-none-any.whl Python 3 none any Details

Total release size: 38.4 kB

Release files / arxivit-0.11.0.tar.gz

Download URL arxivit-0.11.0.tar.gz
Size 28.9 kB
Tags Source
SHA-256 checksum
How to use checksums
602cfba97eb6c3be51908572316c6e3fa353700fd2a5b6a50e3483faeef6b5fc
BLAKE2b-256 checksum
How to use checksums
9e4f30b591ace669dfb79761bb32a8d575e477a1b8ca2bab555d17ea3e756579
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 30, 2026.

Transparency log

Release files / arxivit-0.11.0-py3-none-any.whl

Download URL arxivit-0.11.0-py3-none-any.whl
Size 9.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4f0c2a47bd2826b90383a652e4ba1b4144bd6423888e7d87e0fcc178626e66b8
BLAKE2b-256 checksum
How to use checksums
773bfb50bca7fd9d42ed762b0bf6c4a24ee6a5b5a0fa32287e31b3524f945813
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 30, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.11.0 This release

2 release files

0.10.0

2 release files

0.9.0

2 release files

0.8.0

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.3

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page