Submitting to arXiv
After submitting my first paper to arXiv, I realized this is not an easy process, especially if you don’t want to accidentally share all your comments and work-in-progress figures. To help others and my future self, I’m documenting the process to use for the next time. These steps will condense a latex project into a single .tex file, remove all comments, remove unused figures, and prepare a tar file for submission.
- Install
arxiv_latex_cleanerby running the following:pip install arxiv-latex-cleaner - Run
arxiv_latex_cleaner —-keep_bib <directory>where directory is replaced with the path the the latex source code. This removes all unused figures. - Run
latexpand -—empty-comments arxiv.tex > arxiv_main.texto remove all comments and make all latex files into one file. The file “arxiv.tex” should be replaced with the name of the main tex file in the project. - Build the latex code by running the following sequence of commands:
pdflatex arxiv_main biber arxiv_main # alternatively replace biber with bibtex if this doesn't work pdflatex arxiv_main pdflatex arxiv_mainThis will generate a lot of output files. Check that arxiv_main.pdf looks correct and delete all produced files except for the .bbl file.
- Create a tar with
tar czvf arxiv.tar.gz ./* - Submit to arXiv at exactly 1:59pm.