[texhax] recovering source from dvi?

pierre.mackay pierre.mackay at comcast.net
Wed Aug 31 19:06:28 CEST 2005

element rayden wrote:

>I do not know if you are the correct source to turn
>to, but i have a little problem with my TeX and i
>would be greatfull for any information possible. I was
>compelled to format my HDD and consequently lost a lot
>of my TeX files. Fortunately the only ones i have left
>are some DVI files of my LaTeX documents. I do not
>know how to get from these DVI files the TeX code in
>order to continue  
I am dreadfully sorry to tell you that you can't.  DVI is what I once 
heard called a "laydown" language, which knows only about the position 
of glyphs on a page.  All the record of manipulation of macros that got 
the glyphs into that position is gone.

What I have done in a similar fix is either run dvitype with the right 
options and then use emacs or sed to strip out the stuff I don't want, 
or to go through dvips to a ps file and then use the right options of 
ps2ascii to get the image of the page.  It helps, but it still isn't 
easy.  You will still have to reconstruct the LaTeX framework around all 
that raw text.

Pierre MacKay

More information about the texhax mailing list