This file documents the steps for submitting a manuscript to arxiv. In this process, all your tex and bib sources will be made public, so you want to delete all comments, unused references, etc. Fortunately, this is automatized by two command line tools, see below.
We assume that:
- You work in
Overleaf(optional) - You have a
main.texwith areferences.bib, and possibly ansi.texpossibly with its separatesi_references.bib - You have
bib_optimizerandarxiv_latex_cleanerinstalled. - You work on a mac.
- Label the Overleaf project just before the arxiv submission, for example "arxiv submission": go to
[your overleaf project] > History > All history > [latest documented change] > More actions (3 dots) > Label this version > [choose your label] - Download and unzip the project
- In the downloaded project folder, run:
bibopt main.tex references.bib references_cleaned.bib - If you have an SI that uses the same
references.biband has additional entries that are not used inmain.tex, manually copy all those entries intoreferences_cleaned.bib. (If your SI has its own separate bib filesi_references.bibthough, you need to re-run all steps forsi_references.bibthat you run forreferences.bib) - Delete
references.bib - run:
sed -i '' 's/\bibliography{references}/\bibliography{references_cleaned}/' main.tex - if you have an SI, run:
sed -i '' 's/\bibliography{references}/\bibliography{references_cleaned}/' si.tex - run:
arxiv_latex_cleaner /folder --compress_pdf --keep_bib, where folder is your folder. This will create a new folderfolder_arXiv - On arXiv, start a new submission and select the arXiv.org perpetual, non-exclusive license (or change this if you know what you are doing)
- Zip the contents of
folder_arXivand upload the zip file to arxiv - If you have an SI, add the
si.texas a second "Top-Level TeX" in the "Review Files" section - Metadata Comments:
Main text: X pages, X figures. SI: X pages, X figures - Continue the process and submit