TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
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. – Martin Scharrer Sep 21 '12 at 16:42
    
"text document" probably is the .log file; that's what Windows usually calls this file type. – doncherry Sep 21 '12 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 '12 at 16:56
1  
@Canageek We closed a similar question tex.stackexchange.com/questions/72772/… – Thorsten Sep 21 '12 at 16:59
2  
@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 '12 at 9:55

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 of LaTeX-related files, 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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.
http://tex.stackexchange.com/questions/73538/can-i-recover-my-tex-file
tex.stackexchange.com
crawl=CC-MAIN-2016-30
80566
application/http; msgtype=response
sha1:XM5U4XFFDS62C63AM6UH7RWDRYLW52WN
<urn:uuid:e01c1665-3292-4953-9992-66c6eb478df6>
2016-07-26T12:18:59Z
151.101.65.69
sha1:LZ4GFW6DI5JPOMUTDPC6ECEDHLVDRXB3
<urn:uuid:ac9c8597-a60e-42e9-93f4-3b45f1c7149d>
http://tex.stackexchange.com/questions/73538/can-i-recover-my-tex-file
response
<urn:uuid:fdfe77d2-d66a-47a2-b8a5-0f8869b74f85>
robots: classic
hostname: ip-10-185-27-174.ec2.internal
software: Nutch 1.6 (CC)/CC WarcExport 1.0
isPartOf: CC-MAIN-2016-30
operator: CommonCrawl Admin
description: Wide crawl of the web for July 2016
publisher: CommonCrawl
format: WARC File Format 1.0
conformsTo: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf