4

I have downloaded the source file from this arxiv article: https://arxiv.org/abs/2002.12693 which has name 2002.12693 without any extension. I added extention tar.gz and ran "tar -xvzf 2002.12693.tar.gz" I get "tar: Error opening archive: Unrecognized archive format".

Neither unzip nor gunzip works. Any suggestion? I see this question Compiling ArXiv source code of articles with images suggesting what I already did, but it doesn't work for me.

  • 1
    Welcome to TeX.SE! That's no compressed file, it's simply the tex file. Just add the .tex extension. However, this is no TeX question by itself so this question is actually off-topic here. – campa May 04 '20 at 12:00
  • 1
    Welcome to TeX.SX! It is a text file. Simply add the extension .tex and open it with your favourite TeX editor. – Bernard May 04 '20 at 12:05
  • 3
    The download format on the arXiv is a bit special. According to the download page they serve you with a gzipped tar archive (.tar.gz) if the submission consisted of more than one file and a gzipped version of the submitted file (.tex, .dvi or .pdf) otherwise. So you can never quite know what you get when you press download. For most papers I have ever downloaded it was a .tar.gz, but a few days ago I downloaded a single-file paper that was just a .tex (not .tex.gz as I expected from the explanation on the page). So if .tar.gz does not succeed, try just .tex. – moewe May 04 '20 at 15:24
  • 1
    To find the actual format of your file, you can use the following command: file 2002.12693 – Paul Gaborit Jul 01 '20 at 22:24

4 Answers4

3

The specific file that's downloaded is a simple tarball.

> file 2002.12693
2002.12693: POSIX tar archive (GNU)

> tar tvf 2002.12693 -rw-rw-r-- 0 root root 58287 Jun 15 18:49 arxiv2-casc.tex -rw-rw-r-- 0 root root 42776 Jun 15 18:49 llncs.cls

egreg
  • 1,121,712
2

Many browsers will automatically unpack gzip files and not tell you. Try dropping the .gz part of the file extension, so using your example:

tar -xvvf 2002.12693.tar

will likely yield what you're looking for...unless it's a single file (in which case it's already been unpacked, and you should just rename it to .tex). This particular article is not a single file, so the above suggestion should work.

Jake
  • 1,159
2

I had a similar problem on a windows computer. Apparently tar package is added to Windows 10 version 17063.

The source file that I downloaded had the same format: 2011.xxxxx. I added tar extension, navigated to the folder containing the tar file and run the following command:

tar -zxvf 2011xxxxx.tar -C "D:\"

It unpacked not only the Tex file also all the auxiliary files used in submission to the folder "D:\".

ck1987pd
  • 145
  • 5
-2

The new arXiv version has provided TeX Source option which you can download xxx.tar.gz.


(old answer) You may download an xxx.xxx (without any suffix) file first, then you can rename it to xxx.xxx.zip. You will get a folder named xxx.xxx after you unzip.

  • 2
    No files in arXiv are .zip files. – Jake Oct 30 '23 at 13:19
  • Please see my answer carefully! You get a xxx.xxx (without any suffix) file, then you need to rename it to xxx.xxx.zip. – crazyang Nov 01 '23 at 06:37
  • 2
    You misunderstand my point. arXiv does not use .zip within its infrastructure (I am an SME as an arXiv employee). arXiv's announced source is provided either as .tar.gz or tex.gz files (when the source is a singular file). There are no .zip files in arXiv. It is never the case that the downloaded file would be a .zip file from the "download source" option. – Jake Nov 01 '23 at 18:33
  • Sorry about that and thanks for your full information. I just hope to provide a solution to obtain the source file easily from arXiv. – crazyang Nov 03 '23 at 01:40