whatisgithub

What is arxiv-latex-cleaner?

google-research/arxiv-latex-cleaner — explained in plain English

Analysis updated 2026-06-24

6,838PythonAudience · researcherComplexity · 2/5Setup · easy

In one sentence

A command-line tool from Google Research that prepares a LaTeX paper for arXiv by stripping comments, removing todo notes, cutting unused files, and shrinking images to fit under the 50 MB upload limit.

Mindmap

mindmap
  root((arxiv-latex-cleaner))
    Privacy
      Strip all comments
      Remove todo notes
      Hide TikZ source
    File Size
      Remove unused files
      Resize images
      PNG to JPG
    Custom Rules
      Config file
      Find and replace
    Setup
      pip or Homebrew
      Python 3.9 plus
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Clean a LaTeX paper folder before uploading to arXiv to automatically remove comments and unused files

USE CASE 2

Strip all todo and author shorthand commands from a LaTeX paper before making the source public

USE CASE 3

Resize and convert images in a LaTeX project to fit within arXiv's 50 MB size limit

USE CASE 4

Replace TikZ diagram source code with compiled image files to keep your diagram code private on arXiv

What is it built with?

PythonLaTeX

How does it compare?

google-research/arxiv-latex-cleanerxfangfang/macastyihong0618/xiaogpt
Stars6,8386,8376,837
LanguagePythonPythonPython
Setup difficultyeasyeasymoderate
Complexity2/52/53/5
Audienceresearchergeneralgeneral

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

So what is it?

This is a command-line tool for researchers who write academic papers in LaTeX and need to submit them to arXiv, the popular preprint server. The tool takes your paper's source folder and produces a cleaned-up copy that is ready to zip and upload. The cleaning process handles several practical concerns. On the privacy side, it strips all comments from your LaTeX code, which would otherwise be visible to anyone who downloads the source from arXiv. It can also remove helper commands like todo notes that you defined during writing but do not want in the final submission. On the file size side, arXiv has a 50MB limit, so the tool removes unused image files and unused tex files, and can optionally resize images, compress PDFs, or convert PNG files to JPG to shrink the package. For diagrams drawn with TikZ (a common way to create figures directly in LaTeX), the tool can replace the raw source code with pre-compiled image files, which hides your diagram code from public view. There is also support for custom find-and-replace rules written in a config file, which lets you swap out your own shorthand commands for standard LaTeX before submitting. Installation is straightforward via pip or Homebrew on Mac. You point it at your input folder, optionally pass flags or a config file, and it produces a new cleaned folder alongside the original. The project is from Google Research and is written in Python, requiring version 3.9 or higher.

Copy-paste prompts

Prompt 1
Show me the arxiv-latex-cleaner command to process my paper folder, remove all LaTeX comments, and output a clean copy ready for arXiv upload.
Prompt 2
Write an arxiv-latex-cleaner config file that replaces my custom shorthand commands like \todo{} and \note{} with empty strings before submission.
Prompt 3
How do I use arxiv-latex-cleaner to resize all images to max 1000px width and convert PNG files to JPG to shrink my arXiv submission?
Prompt 4
Using arxiv-latex-cleaner, how do I replace my TikZ diagrams with pre-compiled PDF images to hide the diagram source code in my arXiv upload?

Frequently asked questions

What is arxiv-latex-cleaner?

A command-line tool from Google Research that prepares a LaTeX paper for arXiv by stripping comments, removing todo notes, cutting unused files, and shrinking images to fit under the 50 MB upload limit.

What language is arxiv-latex-cleaner written in?

Mainly Python. The stack also includes Python, LaTeX.

How hard is arxiv-latex-cleaner to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is arxiv-latex-cleaner for?

Mainly researcher.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.