jchazalon / arxiv-cleaner

Clean LaTeX project for submitting to arXiv

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

arXiv Cleaner

Clean LaTeX project for submitting to arXiv.

Features

  • Produce only the files needed for the TEX files you choose
  • Expand all the files which are included by \input or \include directives
  • Remove all comments from the code (which are visible on arXiv because the uploaded LaTeX project is downloadable)
  • Remove unnecessary blank lines
  • Support UTF-8 encoding files

See the difference between example_elsa/ and example_elsa_cleaned/.

Prerequisites

  1. Linux-based terminals (For Windows, I recommend using git-sdk)
  2. Python 3.5 or higher
  3. LaTeX programs (Can be installed altogether by TeX Live)
    1. pdflatex
    2. bibtex
    3. latexpand 1.5

Usage

  1. Clone this Git project to your computer
  2. Open a terminal window to the Git project directory
  3. Run the main program arxiv_cleaner.main with arguments described as follows

Specify the input directory containing the LaTeX project, the output directory and the TEX files you want to keep (relative paths in the input directory)

python -m arxiv_cleaner.main --input=<Input directory> --output=<Output directory> --tex=<TEX files to keep>

Text files (.tex, .cls, .clo, .sty, .bst) required by the TEX files to keep will be cleaned and copied to the output directory. Other files (e.g., images) required by the TEX files to keep will be copied to the output directory.

Examples

Try cleaning the example project as follows

python -m arxiv_cleaner.main --input=example_elsa --output=example_elsa_cleaned --tex=main.tex,sup.tex

See other directories (example_aaai, example_ieee, ...) for more examples.

References

Resources

About

Clean LaTeX project for submitting to arXiv

License:MIT License


Languages

Language:TeX 96.0%Language:Python 4.0%