summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-recovertex.html
blob: 91d907c44a35a6e4dafa588db5d87a47bad2cfed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<head>
<title>UK TeX FAQ -- question label recovertex</title>
</head><body>
<h3>Retrieving (La)TeX from DVI, etc.</h3>
<p/>The job just can&#8217;t be done automatically: DVI, PostScript and
PDF are &#8220;final&#8221; formats, supposedly not susceptible to
further editing &#8212; information about where things came from has been
discarded.  So if you&#8217;ve lost your (La)TeX source (or never
had the source of a document you need to work on) you&#8217;ve a serious job
on your hands.  In many circumstances, the best strategy is to retype
the whole document, but this strategy is to be tempered by
consideration of the size of the document and the potential typists&#8217;
skills.
<p/>If automatic assistance is necessary, it&#8217;s unlikely that any more than
text retrieval is going to be possible; the (La)TeX markup that
creates the typographic effects of the document needs to be recreated
by editing.
<p/>If the file you have is in DVI format, many of the techniques
for <a href="FAQ-toascii.html">converting (La)TeX to ASCII</a> are
applicable.  Consider <i>dvi2tty</i>, <i>crudetype</i> and
<i>catdvi</i>.  Remember that there are likely to be problems
finding included material (such as included PostScript figures, that
don&#8217;t appear in the DVI file itself), and mathematics is
unlikely to convert easily.
<p/>To retrieve text from PostScript files, the
<i>ps2ascii</i> tool (part of the  <i>ghostscript</i>
distribution) is available.  One could try applying this tool to
PostScript derived from an PDF file using <i>pdf2ps</i> (also
from the <i>ghostscript</i> distribution), or <i>Acrobat</i>
<i>Reader</i> itself; an alternative is <i>pdftotext</i>,
which is distributed with <i>xpdf</i>.
<p/>Another avenue available to those with a PDF file they want to
process is offered by Adobe <i>Acrobat</i> (version 5 or later):
you can tag the PDF file into an estructured document, output
thence to well-formed XHTML, and import the results into
Microsoft <i>Word</i> (2000 or later).  From there, one may
convert to (La)TeX using one of the techniques discussed in

&#8220;<a href="FAQ-fmtconv.html">converting to and from (La)TeX</a>&#8221;.
<p/>The result will typically (at best) be poorly marked-up.  Problems may
also arise from the oddity of typical TeX font encodings (notably
those of the maths fonts), which <i>Acrobat</i> doesn&#8217;t know how
to map to its standard Unicode representation.
<dl>
<dt><tt><i>catdvi</i></tt><dd><a href="http://mirror.ctan.org/dviware/catdvi.zip">dviware/catdvi</a> (or <a href="http://mirror.ctan.org/dviware/catdvi/">browse the directory</a>); <a href="http://mirror.ctan.org/help/Catalogue/entries/catdvi.html">catalogue entry</a>
<dt><tt><i>crudetype</i></tt><dd><a href="http://mirror.ctan.org/dviware/crudetype.zip">dviware/crudetype</a> (or <a href="http://mirror.ctan.org/dviware/crudetype/">browse the directory</a>); <a href="http://mirror.ctan.org/help/Catalogue/entries/crudetype.html">catalogue entry</a>
<dt><tt><i>dvi2tty</i></tt><dd><a href="http://mirror.ctan.org/dviware/dvi2tty.zip">dviware/dvi2tty</a> (or <a href="http://mirror.ctan.org/dviware/dvi2tty/">browse the directory</a>); <a href="http://mirror.ctan.org/help/Catalogue/entries/dvi2tty.html">catalogue entry</a>
<dt><tt><i>ghostscript</i></tt><dd>Browse <a href="http://mirror.ctan.org/support/ghostscript/GPL">support/ghostscript/GPL</a>; <a href="http://mirror.ctan.org//help/Catalogue/entries/ghostscript-GPL.html">catalogue entry</a>
<dt><tt><i>xpdf</i></tt><dd>Browse <a href="http://mirror.ctan.org/support/xpdf">support/xpdf</a>; <a href="http://mirror.ctan.org//help/Catalogue/entries/xpdf.html">catalogue entry</a>
</dl>
<p><em>This answer last edited: 2009-05-29</em></p>
<p/><p>This question on the Web: <a href="http://www.tex.ac.uk/cgi-bin/texfaq2html?label=recovertex">http://www.tex.ac.uk/cgi-bin/texfaq2html?label=recovertex</a>
</body>