Tuesday, August 20, 2024

LaTeX and arxiv

Posting a LaTeX manuscript on arxiv is straightforward.

  1. Compile your document (say, main.tex). It is okay to leave all your figures in a "figs/" subfolder. Unlike some outlets, you don't have to flatten your directory structure.
  2. Apart from main.tex, main.bbl [bibliography], and figures, you may delete all other files. You need the bbl file because arxiv does not run bibtex.
  3. Zip the folder, and upload on arxiv.
If you have a supplementary information document (say, si.tex) and you use the "xr" package to cross-reference between main.tex and si.tex, then a few extra steps are required.

arxiv compiles all tex files in the zipped folder in alphabetic order. So it is important that "main.tex" appears before "si.tex", in case your tex files have different labels. 
  1. Compile main.tex and si.tex several times on your machine, so that inter-document cross-references work as desired.
  2. Apart from main.tex, si.tex, main.bbl, si.bbl, main.aux, si.aux, and figures, you may delete all other files. [xr uses main.aux and si.aux.]
  3. Relabel main.tex to main_ren.tex, main.bbl to main_ren.bbl, si.tex to si_ren.tex, and si.bbl to si_ren.bbl. Do not relabel *.aux files. Do not compile.
  4. Zip the folder, and upload on arxiv.

No comments: