Home arXiv with aux file
Post
Cancel

arXiv with aux file

For some unknown reason, LaTeX occasionally fails to find citations even when they are explicitly listed using \bibitem. This issue can often be resolved by compiling the document twice locally: the first compilation generates an .aux file, and the second compilation uses that .aux file to locate all references. However, when submitting to arXiv, it appears that the submitted LaTeX code is only compiled once.

One solution is to upload the .aux files to arXiv as well. However, the .aux file shares the same name as the main .tex file, and arXiv removes files with the same name but different extensions for some unknown reason. To address this, we need to rename the .aux file. The code snippet below helps the .tex file locate the renamed .aux file and ensures correct compilation results. Just insert it between \author and \begin{document}.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
\author{
    Jian Chen,
    \textsuperscript{2}Adobe Research
}

\IfFileExists{main_backup.aux}{
  \message{We saw a default backup.aux file, let's use it instead of the main aux file.}
  \nofiles % Disable default aux file
  \makeatletter
  \input{main_backup.aux}
  \makeatother
}{}


\begin{document}
...
\end{document}
This post is licensed under CC BY 4.0 by the author.