1

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?

| improve this question | | | | |
  • The file needs to be compiled with the LaTeX-dvips-ps2pdf route (latex ver6.2, latex ver6.2, latex ver6.2, dvips ver6.2.dvi, ps2pdf ver6.2.ps) because it embeds .eps files and otherwise expects DVI output (graphicx is 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 4:14
  • The first error I get is that the text line contains an invalid character, "additivite.ps^^@^^@^^@^^@^^@^^@^^@^^@^^@^^@^^@^^@^^@^^@^^@^^@^^@^^@^^@^^" – Monstrous Moonshine Aug 18 '19 at 4:47
  • 2
    Stupid question: Did you unpack the source code archive you downloaded? Usually when you download the source, arXiv serves you with a file that has no extension. Whenever I downloaded this file it was actually a .tar.gz archive that had to be unpackaged before it could be used. See for example tex.stackexchange.com/q/383592/35864 and tex.stackexchange.com/q/452215/35864 – moewe Aug 18 '19 at 5:19
  • Ohhhh I see now, I assumed since there wasn’t an extension that the file had already been unzipped, but apparently not. – Monstrous Moonshine Aug 18 '19 at 5:23
  • 1
    Yes, the extension thing is very confusing. The fact that the file format might be different depending on the number of files uploaded is also not helping (though most papers probably involve several files so that .tar.gz is almost always the right guess). – moewe Aug 18 '19 at 5:25
2

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

Screenshot of the arXiv landing/abs page for an article. The "Other formats" link in the right sidebar is highlighted.

and then Download source under the Source heading

Screenshot of the "format selector" page of an arXiv article. Download source in the Source section near the end of the page is highlighted.

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.gz or .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

Screenshot of file listing of the archive in PeaZip

| improve this answer | | | | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.