My .tex file, I'm pretty sure has become a binary file. It begins with this:

6 0 obj <<
/Length 1662      
/Filter /FlateDecode

and there's a lot of odd symbols. I'm using TeXstudio to compile my documents and when I click the 'view' button I get the document as it looked previously so I'm assuming all the data is still there, but is there any way to get this back into a latex form so I can continue actually using it, or do I have to begin from scratch?

  • 4
    This is your compiled pdf, you can open it with acrobat reader or something similar. Your texfile is somewhere else in the same folder. – Johannes_B Dec 19 '13 at 17:28
  • The above is what appears within TeXstudio when I open the .tex file. – Charlotte Dec 19 '13 at 17:34
  • 6
    I advice you to make a backup before you go on investigating – Johannes_B Dec 19 '13 at 17:36
  • 1
    Looks like the pdf was somehow renamed as a .tex file. If(!) so, the best thing to do is to revert to a backup version of your .tex file. You cannot travel backwards from .pdf to .tex. But you can use the .pdf to capture the bare text if it helps, so don't delete the .pdf until you're sure you're as close to where you were when things went off the rails. – jon Dec 19 '13 at 18:49
  • 7
    This is just a wild shot in the dark, but do you have extensions set to view or hide on your OS? If you accidentally do pdflatex -jobname your-file.tex your-file you can end up with a file called your-file.tex.pdf but with the extension hidden it looks like your-file.tex. (Although it does seem more likely that the .pdf has been renamed to the .tex but what could have done that without your knowledge is a puzzle.) – Nicola Talbot Dec 19 '13 at 18:55

Browse other questions tagged or ask your own question.