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 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

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.10.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.10.0
File Size Uploaded
arxivit-0.10.0.tar.gz 27.4 kB Details

Built distribution (wheel)

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

Total release size: 36.4 kB

Release files / arxivit-0.10.0.tar.gz

Download URL arxivit-0.10.0.tar.gz
Size 27.4 kB
Tags Source
SHA-256 checksum
How to use checksums
d85714030d82841328344b5e9f51d44e84218a288e17bbecdb64b572e7ef0108
BLAKE2b-256 checksum
How to use checksums
82c45065dfd8ed00f0f37aaa60cd3aeb1a3c27295107236baf0f88ef6ef67c53
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.10.0-py3-none-any.whl

Download URL arxivit-0.10.0-py3-none-any.whl
Size 9.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c358dffbd559092f3fdf6bf91e6dfa891832337ddab637fb939df3242d1352b7
BLAKE2b-256 checksum
How to use checksums
70318941a17229a18d1cac7027bd2c5909589a5a509f4afb017ea3a6c2cda221
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

0.11.0

2 release files

This release

0.10.0 This release

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