Submitting a latex document on arxiv can be a pain in the neck, especially submitting from Overleaf. The Culprit → The minted package? well not exactly. minted and similar packages use “hidden” cache directories that’s prohibited by arxiv for security reasons. Let’s see how we can get around this on Overleaf (Assume all final changes are made and the doc is ready to submit on arxiv).
-
Step 1 - Once all final changes are done , compile the overleaf document and freeze the cache. You can do this by replacing
\usepackage{minted}
with\usepackage[finalizecache,cachedir=.]{minted}
. -
Compile your overleaf doc and check all your elements that use minted are present in the compiled pdf as expected.
-
Now we will use the cached files that have already been finalized/created after the compilation process. Now replace
\usepackage[finalizecache,cachedir=.]{minted}
from Step-1 by\usepackage[frozencache,cachedir=.]{minted}
. This will ensure that the frozen cache is used. -
You can compile again to see if everything looks as expected in the doc.
-
Now we need to download the cached files to submit with the arxiv submission. For this you need to click to “Logs and output files” at the top right corner of Overleaf editor.
Scroll down of the logs and you will find “Other logs and file button”, click it.
You will see a bunch of files here, download the files with “pyg” in them, as shown below(exact number of files may vary from project to project, just download everything with “pyg”).
- Now you need to download the project for submission. Overleaf gives an option to directly download “.zip” from the menu (but this may cause issues as it doesn’t contain .bbl files that arxiv needs) So I would suggest to go to submit→”search and select arxiv”→ Download zip. This gives all files needs for arxiv submission.
- Final and the easiest step of them all. “SUBMISSION”. You will have to submit/upload all the downloaded “pyg” cache files along with the “tex” project earlier download from overleaf.
This should resolve the minted package issue. You can check this stackexchange in case you want to check the discussion on this issue.
Users can still face issues related to “Compiler”type, for example Failed: XeTeX/LuaTeX are not supported at current time.
This is because arxiv states “Anything that relies on something other than TeX or (PDF)LaTeX will fail. At this time arXiv does not support processing with: XeTeX and its variants including LuaTeX, LyX, or PDFTeX.”, when this note was written. Check official doc for latest supported compiler lists. You can change to the appropriate compiler and Tex live version from overleaf menu and follow the same process from above. I would recommend clearing the cache first before you recompile with the new compiler.
This doc from overleaf is also an helpful reference for arxiv submission.