Skip to content

kabouzeid/arxivit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Pack and compress LaTeX paper for arXiv upload

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages