Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Possible Duplicate:
How to convert PDF to (La)TeX?
Recover TeX file back from compiled PDF

I wrote a long book in LaTeX - but my pc broke down and now it is all lost, only a pdf copy of the book is still on my pc. Can anybody help me how to get my LaTeX-Version back?

share|improve this question

marked as duplicate by Paul Gaborit, Marco, diabonas, Martin Schröder, lockstep Sep 17 '12 at 11:04

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

2  
@Marco This is not a duplicate, the OP ask for advise to get his LaTex-file back. –  Sveinung Sep 16 '12 at 13:39
    
This is answered at the uk tex faq: tex.ac.uk/cgi-bin/texfaq2html?label=recovertex The short version is that there is not much you can do, especially for mathematics. –  Lev Bishop Sep 16 '12 at 14:19
2  
@Sveinung I don't see the difference. Restoring the LaTeX file from the file system back is off-topic here. What remains is the question how to transform a PDF into a TeX file; and that's exactly the question I linked to. –  Marco Sep 16 '12 at 14:36
    
@Marco If you compare my answers to the two questions, they are not the same, which they would have been, had the questions been duplicates (and it is not artificial editing). If you go through the more that 25000 questions, you will find lot of questions that are more duplicate that this two. –  Sveinung Sep 16 '12 at 15:37
1  
For the next time, use this tex.stackexchange.com/a/34204/1871 to store your source with the PDF. –  alfC Sep 16 '12 at 22:54
show 2 more comments

1 Answer

LibreOffice and writer2latex
It is no other possibility than to convert the PDF to an editable format, and start the LaTeX-coding once more. If your book is mainly text, not lot of pictures, tables and formulas, a starting point is the following procedure:

  1. It may be wise to split you book, for example in chapters, to speed up the converting. Use PDFTK Builder or a similar tool to split and combine the PDF.
  2. Go to the Internet-page http://pdftoword.com/
  3. Upload your PDF(s) and wait until the Word-file(s) arrive(s).
  4. In the mean time, when you are waiting for the word files, install LibreOffice on your computer
  5. Install the latest writer2latex-plugin in LibreOffice
  6. Open the Word-files in LibreOffice and start structuring the text title, in headings, subheadings, etc.
  7. Export the final document to Latex, after setting up the writer2latex-plugin properly. Use as few options as possible to have a clean .tex-file.
  8. Start the LaTeX-recoding, use the PDF as a manuscript.

Lot of work, but at least this procedure may help you to get the base structure back.

InftyReader and InftyEditor
Based on the information that your book is mathematics, not pure text, the options seem limited. In the answer Recover TeX file back from compiled PDF, Aditya references the program InftyReader. I looked at the samples provided on the programs internet site, at it seems that the program is capable to convert mathematics to LaTeX source code.

I assume that your PDF-file is not binary (i.e. not a scanned print out). Then the procedure will be:

  1. Download the InftyEditor, the trial version of the InftyReader and IrfanView. Install all programs (it is Window$ programs)
  2. Use PDFTK Builder or a similar tool to split and combine the PDF in suitable chunks.
  3. Use Irfanview Batch Converter to convert your book/chapter to multipage TIFF(s).
  4. Load the files one by one into the InftyReader and take a look at the output. May be it is satisfying.

NB! I have never user InftyReader or InftyEditor, so I cannot tell you if this procedure will work, but an hour or two work may tell you.

Afterthoughts: If you are a consultant or otherwise is paid by hour, may be it is better to send the hard drive to a computer firm specialised on restructuring corrupted hard drives. Perhaps they can reconstruct the file system and save your file. You may be even can claim a tax deduction for the cost.

share|improve this answer
    
okay sounds good, but my problem is - it is a mathematical book, so there are a lot of formulas and stuff.... what can I do? –  Gerhard Steinbach Sep 16 '12 at 13:37
6  
@GerhardSteinbach Then I would send the hard drive to a specialist, trying to recover the .TEX-file. –  Sveinung Sep 16 '12 at 13:43
5  
If you want to send the hard drive to a specialist, don't use it. The more you use it the lower the probability that the specialist can recover your data! –  student Sep 16 '12 at 14:56
    
@GerhardSteinbach Have a look at my updated answer. –  Sveinung Sep 17 '12 at 10:57
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.