7

I have lost my tex file but I still have my pdf, .aux, .bak, .bbl, performance monitor file, and my text document.

Can anyone tell me if I can restore my .tex file from this? In any form?

Addition by Jake: Note that this question is not a direct duplicate of How to convert PDF to (La)TeX?, since that question is concerned only with converting PDF to .tex without any of the additional files that are available in this case.

12
  • 4
    What tool/editor are you using? If the .bak file is from the .tex file than it should contain the last version of it. Not sure what you mean with "text document" because that's usually the .tex file. Sep 21, 2012 at 16:42
  • "text document" probably is the .log file; that's what Windows usually calls this file type.
    – doncherry
    Sep 21, 2012 at 16:47
  • 3
    @Thorsten I'd say no, since even if the answers are the same the question is very different.
    – Canageek
    Sep 21, 2012 at 16:56
  • 1
    @Canageek We closed a similar question tex.stackexchange.com/questions/72772/…
    – Thorsten
    Sep 21, 2012 at 16:59
  • 3
    @Jake The availability of the auxiliary files probably makes little difference to the ease of recover. They are really dependent on the .tex file (we have no mention of a .bib file, which would have more value as it's a source file). As such, the problem here does seem to boil down to getting the text back out of a PDF.
    – Joseph Wright
    Sep 23, 2012 at 9:55

2 Answers 2

9

Broadly, the problem outlined here is the same as How to convert PDF to (La)TeX?. The reason is that at best the various additional files contain only a small subset of the information needed to understand the structure of the .tex source file. I don't want to repeat all of the info in File extensions related to LaTeX, etc, but as a summary:

  • The .log and .blg files are logs: they tell us what happened in the LaTeX and BibTeX runs, respectively. That will be useful in working out which packages were used in the .tex file, but that alone does not get us very far (no custom settings or actual input).
  • The .bbl file may help with the bibliography part of the document. If you did not using biblatex then the .bbl file is a formatted bibliography, but if you used biblatex then it's not. Moreover, it does not help with the citations that link to the bibliography, and most of the time the bibliography will be a relatively small part of the entire document.
  • The .aux file tells us about information transferred between LaTeX runs, so for example labels used in the .tex file, but not where they might have been cross-referenced, etc.

As you'll see, the amount of information in the various additional files is at best quite limited, and in most real documents will form only a small part of what's needed to reconstruct the .tex source. Thus there will still be a lot of work to do extracting data from the .pdf, and it may well be easier to ignore the other files and 'start from scratch', reconstruction-wise.

4

i was using texmaker and I had similar accident. Go to File > Session > restore previous session

1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .