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.6.2.tar.gz (20.2 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.6.2-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: arxivit-0.6.2.tar.gz
  • Upload date:
  • Size: 20.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.8

File hashes

Hashes for arxivit-0.6.2.tar.gz
Algorithm Hash digest
SHA256 20ce91de9a87d377498b91351b444de71cd31debdec69c4049235e5606e09dd0
MD5 683875d633a9b30e441eea4b7ab427d4
BLAKE2b-256 c22a5080a4b3a0f034256855526cd4b22e59d00a0dd3bc887f96890d76217011

See more details on using hashes here.

File details

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

File metadata

  • Download URL: arxivit-0.6.2-py3-none-any.whl
  • Upload date:
  • Size: 7.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.8

File hashes

Hashes for arxivit-0.6.2-py3-none-any.whl
Algorithm Hash digest
SHA256 df036cc515e2dcfce360bff717441632140973cef624b9163c5f70188b738ee4
MD5 c67f47daf5630db594cce6ce32d45617
BLAKE2b-256 40dfb046c9d7ca081360f849e875735029de49b741457058464196b69d443e8a

See more details on using hashes here.

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