summaryrefslogtreecommitdiff
path: root/Master/texmf-doc/doc/english/FAQ-en/html/FAQ-recovertex.html
blob: 9d9ae11ad33e49afa870c75d818734108246c2f1 (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
<head>
<title>UK TeX FAQ -- question label recovertex</title>
</head><body>
<h3>Retrieving (La)TeX from DVI, etc.</h3>
<p/>The job just can&rsquo;t be done automatically: DVI, PostScript and
PDF are &ldquo;final&rdquo; formats, supposedly not susceptible to
further editing &mdash; information about where things came from has been
discarded.  So if you&rsquo;ve lost your (La)TeX source (or never
had the source of a document you need to work on) you&rsquo;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&rsquo;
skills.
<p/>If automatic assistance is necessary, it&rsquo;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&rsquo;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

&ldquo;<a href="FAQ-fmtconv.html">converting to and from (La)TeX</a>&rdquo;.
<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&rsquo;t know how
to map to its standard Unicode representation.
<dl>
<dt><tt><i>catdvi</i></tt><dd><a href="ftp://cam.ctan.org/tex-archive/dviware/catdvi.zip">dviware/catdvi</a> (<a href="ftp://cam.ctan.org/tex-archive/dviware/catdvi.tar.gz">gzipped tar</a>, <a href="http://www.tex.ac.uk/tex-archive/dviware/catdvi/">browse</a>)
<dt><tt><i>crudetype</i></tt><dd><a href="ftp://cam.ctan.org/tex-archive/dviware/crudetype.zip">dviware/crudetype</a> (<a href="ftp://cam.ctan.org/tex-archive/dviware/crudetype.tar.gz">gzipped tar</a>, <a href="http://www.tex.ac.uk/tex-archive/dviware/crudetype/">browse</a>)
<dt><tt><i>dvi2tty</i></tt><dd><a href="ftp://cam.ctan.org/tex-archive/dviware/dvi2tty.zip">dviware/dvi2tty</a> (<a href="ftp://cam.ctan.org/tex-archive/dviware/dvi2tty.tar.gz">gzipped tar</a>, <a href="http://www.tex.ac.uk/tex-archive/dviware/dvi2tty/">browse</a>)
<dt><tt><i>ghostscript</i></tt><dd>Browse <a href="http://www.tex.ac.uk/tex-archive/support/ghostscript/">support/ghostscript/</a>
<dt><tt><i>xpdf</i></tt><dd>Browse <a href="http://www.tex.ac.uk/tex-archive/support/xpdf/">support/xpdf/</a>
</dl>
<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>