How to open the code file on arxiv

2,210

The file downloaded from the link you posted has extension .03811. Change the extension to .tex, after that I'm able to open it. Note that, in order to compile without errors, you have to delete all the text before \documentclass{...}

Share:
2,210

Related videos on Youtube

Dracule Mihawk
Author by

Dracule Mihawk

Updated on August 01, 2022

Comments

  • Dracule Mihawk
    Dracule Mihawk over 1 year

    I download the code file (tex) of articles on https://arxiv.org/. But I can not open it by texmaker. Do you know how to do this? For example,

    1. Go to this link
    2. See on the right corner
    3. Choose Download: other formats
    4. Choose Download source

    Then how can I open the file I have downloaded?

    • Admin
      Admin over 3 years
      I just tried something that worked for decades, and which worked here, too. Provided you also name the file 1502.03811, use mv 1502.03811 1502.03811.tar.gz and then tar -xzvf 1502.03811.tar.gz. (I am assuming you have either MacOS or Linux.) This yielded x AnosovProper.tex x chambers.eps x CLI.eps x domain.eps x vectors2.eps. I am, however, not sure how this question relates to TeX and friends other than the main extracted file can be compiled with LaTeX.
    • moewe
      moewe over 3 years
      Often these files are actually .tar.gz files, but you can't always tell from the outset. See tex.stackexchange.com/q/504640/35864
    • daleif
      daleif over 3 years
      If you're on mac or Linux you can use the file command on the command line to ask the OS what it thinks this is. It is likely to be either a tar file (might be gzipped first but not always), which is used if the source is several files. It might be a tex file if just a single source file. I agree that it would have been so much easier for everyone if they include extensions on the files. But then again not everyone knows that docx files are actually zip files.
  • Bernard
    Bernard over 3 years
    Beware: one downloads a compressed directory which contains a TeX file (>3000 lines, ansinew-encoded) and 4 .eps files.
  • Luis Turcio
    Luis Turcio over 3 years
    In my computer it only downloads one file. In fact, many other source articles doesn't work for me because there are not enough files, sometimes images, sometimes bibliographies, etc.
  • Bernard
    Bernard over 3 years
    I also download only one file, but this is a compressed series of 5 files. I uncompressed it with 7zip.
  • Luis Turcio
    Luis Turcio over 3 years
    Intersting! How different from what it does in my computer, maybe something that I don't understand with the OS? But then my answer is not good enough :(
  • Dracule Mihawk
    Dracule Mihawk over 3 years
    It does not work. There is too much code that was modified and texmaker can not understand. Hence it can not read even I delete all the text before \documentclass{...} and some part after \end{document}.
  • Luis Turcio
    Luis Turcio over 3 years
    Not even with the file downloaded from the link in your question?
  • Dracule Mihawk
    Dracule Mihawk over 3 years
    yes, in general, for any file I download from arxiv. they always appear the sentence like this: It seems that this file can not be correctly encoded with the default encoding setting UTF-8. Then they have several choices of encoding, but I do not know what encoding I should choose. Then I choose UTF-8, it makes to much wrong codes.
  • Luis Turcio
    Luis Turcio over 3 years
    I’m not sure what’s happening. The original encoding is latin1, I don’t know if texmaker can change the encoding
  • Dracule Mihawk
    Dracule Mihawk over 3 years
    there is no latin1 to choose from. I hope that I can send you an image to explain what happens. You really can read the file from your computer? Could you send me the code by email: [email protected]
  • moewe
    moewe over 3 years
    Indeed my editor (TeXworks) manages to open the file if I just rename it to 1502.03811.tex, but it then contains additional garbage before the \documentclass and after \end{document} (the latter of which is ignored), that is because the file is actually a full .tar.gz archive that contains not only a .tex file but also .eps image files. It is much better to rename the thing to 1502.03811.tar.gz and extract the files before use.
  • Dracule Mihawk
    Dracule Mihawk over 3 years
    thank you @moewe, it works!