I have recently been trying to recompile ArXiV papers (in math and physics) based on the source code ArXiV provided (since I would like to use the geometry package to resize the articles for an ebook reader), but I've been having issues with articles with included figures and images. In most articles I've seen, such as this article, the source code is unusable for my TeX editor (TeXworks), since ArXiV seems to encode the information of the images in a way that's hard to use. Is there any way to get around this and recompile these articles myself, images and all?
1 Answers
tl;dr
The source files downloaded from the arXiv (via Other formats>Download source) have no file extension and are usually either a gzipped tar archive .tar.gz or a single gzipped file.
As a first try add .tar.gz to the extension-less file you downloaded and try to unpack it (using tar on Unixoid systems or 7zip/PeaZip or similar software on Windows).
The article source on the arXiv that can be accessed via Other formats in the sidebar
and then Download source under the Source heading
usually leads to a file without any extension. In the example the downloaded file is just called 0312480.
As the download page explains, this file may have different types depending on the submission
Delivered as a gzipped tar (
.tar.gz) file if there are multiple files, otherwise as a PDF file, or a gzipped TeX, DVI, PostScript or HTML (.gz,.dvi.gz,.ps.gzor.html.gz) file depending on submission format.
In any case it is extremely unlikely that the file can be opened directly. Most submissions nowadays seem to involve several files (especially when images are involved), so adding the extension .tar.gz (in the example we would rename 0312480 to 0312480.tar.gz) and trying to uncompress the file (with tar -vxzf 0312480.tar.gz on Unixoid systems or 7zip/PeaZip or similar software on Windows) usually gives the right result.
Indeed, opening the renamed file 0312480.tar.gz with PeaZip I get
- 175,683



dvips-ps2pdfroute (latex ver6.2,latex ver6.2,latex ver6.2,dvips ver6.2.dvi,ps2pdf ver6.2.ps) because it embeds.epsfiles and otherwise expects DVI output (graphicxis loaded as\usepackage[dvips]{graphicx}), but other than that it compiled for me and produced very sensible output. I presume you tried to compile with pdfLaTeX? Can you tell us more about the errors you got? – moewe Aug 18 '19 at 04:14.tar.gzarchive that had to be unpackaged before it could be used. See for example https://tex.stackexchange.com/q/383592/35864 and https://tex.stackexchange.com/q/452215/35864 – moewe Aug 18 '19 at 05:19.tar.gzis almost always the right guess). – moewe Aug 18 '19 at 05:25.tar.gzas the packaging is useful. Unless you think this should be closed as a duplicate (and even if it is), posting that as an an answer would be helpful to future seekers. – barbara beeton Aug 18 '19 at 14:04