Any idea how to take DVI files and turn them into tex?
This is similar to the problem of turning PDF into XML which is referred to as "trying to turn a hamburger back into a cow". Both TeX->DVI and XML->PDF lose information, both in the structure of the document and its semantics.
It requires a great deal of heuristics and a large corpus to recreate (some of) the original document. It is never usually 100%. The text strings may be possible, the vectors are harder. Bitmaps are almost impossible.
What you are asking is not possible. I think that (same as in PostScript) even recognizing words in a DVI files may require heuristics. A DVI file is a description of where to place individual letters on a piece of paper, and nothing more.
You can get partway there by either dvi2tty
, or by running dvips
followed by ps2ascii
, whichever gives the best results.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With