arxiv_latex_cleaner is a Python command-line tool that prepares LaTeX papers for arXiv submission by automatically cleaning and optimizing the source code.
The tool solves the practical problem of preparing a LaTeX project for arXiv upload, which has strict requirements around file size, privacy, and format. It works by reading your complete LaTeX directory and generating a cleaned output folder ready to ZIP and submit. The cleaning process removes auxiliary files, comments, and unused assets while optionally applying image resizing, PDF compression, and custom text replacements through regex rules defined in a configuration file.
The tool is well-suited for researchers submitting papers to arXiv who want to ensure their code is privacy-safe (removing comments and auxiliary files that are visible on arXiv), size-optimized (fitting within the 50MB submission limit through image resizing and PDF compression), and free of development artifacts. It includes specialized support for TikZ pictures, allowing you to replace inline tikzpicture environments with pre-compiled external PDFs to conceal source code. The tool can be installed via Homebrew on macOS or directly from source, and requires Python 3.9 or later.
Development activity shows a focus on bug fixes and feature enhancements, with issue discussions centered on reproducing and resolving reported problems.