It seems that arXiv does not compile enough times my document (at some points it stops, saying that it reached the maximum number of tries). As a consequence, some parts of my document does not look nice (while if I compile with latexmk on my side, it works as expected).
I tried to add a main.aux file, but arXiv automatically removes my file. I also tried to create a file main_backup.aux containing a copy of main.aux (this one is not removed), and instead I added right before \begin{document}:
\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
}{}
However this has two issues:
- locally, it compiles without errors, and my documents looks better… except for the table of content that is empty now!
- on the arxiv, it fails with an error right after loading the aux file:
We saw a default backup.aux file, let's use it instead of the main aux file.
No auxiliary output files.
(./main_backup.aux
! LaTeX Error: Missing \begin{document}.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.23 \abx@aux@cite{0}{K
il88_FoundingCrytpographyOblivious}
?
! Emergency stop.
...
l.23 \abx@aux@cite{0}{K
il88_FoundingCrytpographyOblivious}
No pages of output.
Transcript written on main.log.
[verbose]: latex 'main.tex' failed.
[verbose]: TEXMFCNF is unset.
Note that this errors seems to arrive on this line of my aux file:
\@writefile{toc}{\authcount {1}}
\abx@aux@cite{0}{Kil88_FoundingCrytpographyOblivious}
which mentions again table of content… so both of my issues might be related.
EDIT I also tried:
\IfFileExists{main_backup.aux}{
\message{We saw a default backup.aux file, let's use it instead of the main aux file.}
\makeatletter
\usepackage{etoolbox}
%% Try to patch the command given in
%% https://tex.stackexchange.com/questions/285798/how-and-when-is-the-aux-file-read-and-processed
% \regexpatchcmd{\enddocument}{\@@input\jobname.aux}{\@@input{main_backup.aux}}
\patchcmd{\enddocument}{\@@input\jobname.aux}{\@@input{main_backup.aux}}{}{}
%\input{main_backup.aux}
\makeatother
}{}
but seems like the patch is not working.
EDIT
I also tried:
%%%% Really dirty trick because arxiv does not compile enough the document, so we need our own aux file:
\IfFileExists{main_backup.aux}{
\IfFileExists{main.aux}{}{
\message{We saw a default backup.aux file, let's use it instead of the main aux file.}
\makeatletter
\input{main_backup.aux}
\makeatother
}
}{}
\begin{document}
...
This work locally indeed, but not on the arxiv server, it fails again with this annoying, same error…
xxx.texand\inputit before\begin{document}– David Carlisle Mar 02 '23 at 20:41\IfFileExists{main_backup.aux}{is the wrong test, the file will always be there, you should test formain.auxand just input the saved file if the aux is not there – David Carlisle Mar 02 '23 at 20:46\nofilesthat stops all file writing not just.aux– David Carlisle Mar 02 '23 at 21:10biblatexor more widespread? – Dai Bowen Mar 02 '23 at 22:27.texextension could bring anything new compared to.aux, as I'm already doing the exact same thing you propose with just a different extension. Also, I guess in any case this would not bring the toc back, any idea how to disable\nofilesonly for the main.auxfile? But no I have no line break, the content of the file at the line is the one I copy/pasted. – tobiasBora Mar 02 '23 at 23:14\IfFileExists{main_backup.aux}is because I don't want to locally use this later as this is meant only for the arxiv (I have a makefile that adds themain_backup.auxfile only in the arxiv .zip file). But for my tests I also tried to disable the it and the issue is the same. – tobiasBora Mar 02 '23 at 23:14biblatexto see if other packages also produce this error? – tobiasBora Mar 02 '23 at 23:15\nofilesjust use your backup file if there is no aux file so the first run picks up saved data and acts like a final run, after that you can use the aux file as normal. the error you show withil88_FoundingCrytpographyOblivious}flush left is really odd, I would have expected it indented past theK– David Carlisle Mar 02 '23 at 23:26\enddocument, but the patch seems ineffective). However, the error on the arxiv is still, again, the same… – tobiasBora Mar 02 '23 at 23:57bblgenerated from a certain TeX Live version is not easily transferred to a different TeX Live edition. As arXiv requires you to upload the.bblit has been quite difficult to match local and arXiv versions to get a suitable.bblin the past. It may be worth checking if using thebblfrom Overleaf's 2020 TL without trying to supply any aux files resolves your original issue. – Dai Bowen Mar 03 '23 at 00:50