A typical example when writing a paper is that you have a main document main.tex
and a document containing supplementary information si.tex
.
Both documents are stand-alone in the sense that they compile into separate documents with separate bibliographies, however one of or both document(s) may explicitly reference sections of the other.
This is often done by including something similar to
\usepackage{xr}
\newcommand*{\myexternaldocument}[1]{%
\externaldocument{#1}%
\addFileDependency{#1.aux}%
}
\myexternaldocument{si}
to main.tex
and/or vice versa.
The problem arises from how arXiv processes your file submissions. All .tex
files are compiled in alphabetical order, and each will have the corresponding .aux
and .pdf
files deleted beforehand. This order can be changed by renaming files or by specifying the toplevel file in 00README.XXX
as described here. But the problem remains that arXiv deletes the .aux
files corresponding to any .tex
files that will be compiled. How is the best way to solve this?