Skip to main content

Robust arXiv LaTeX cleaner with DPI-based image rescaling.

Project description

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'

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.

Related Projects

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

arxivit-0.7.0.tar.gz (21.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

arxivit-0.7.0-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

Details for the file arxivit-0.7.0.tar.gz.

File metadata

  • Download URL: arxivit-0.7.0.tar.gz
  • Upload date:
  • Size: 21.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for arxivit-0.7.0.tar.gz
Algorithm Hash digest
SHA256 34a7c944d750c6decb3bc788428bc7f078dca0933152e73e6c62552fb8bc0255
MD5 e6b35453a654b933e5c2af0617868d77
BLAKE2b-256 bbbad8bc5f2f43334c47cbd9a62bc7cb24bba53c377e78eff9d38459b2720fca

See more details on using hashes here.

Provenance

The following attestation bundles were made for arxivit-0.7.0.tar.gz:

Publisher: python-publish.yml on kabouzeid/arxivit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file arxivit-0.7.0-py3-none-any.whl.

File metadata

  • Download URL: arxivit-0.7.0-py3-none-any.whl
  • Upload date:
  • Size: 8.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for arxivit-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d5b1301906359d87696686f89a5bcb40b2459690923638b9150b2b74ce49f910
MD5 334176c80dca932d236cc9e8378cc0e8
BLAKE2b-256 67b5d51ec50ffa5f54cf277da1e52568b7e35e1801bdf107439b7507a6daa5bd

See more details on using hashes here.

Provenance

The following attestation bundles were made for arxivit-0.7.0-py3-none-any.whl:

Publisher: python-publish.yml on kabouzeid/arxivit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page