summaryrefslogtreecommitdiff
path: root/Master/texmf-doc/doc/english/FAQ-en/html/FAQ-dvi-bmp.html
blob: 11ea878604c37cb52b595ce685b3f6765fc30b2c (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
<head>
<title>UK TeX FAQ -- question label dvi-bmp</title>
</head><body>
<h3>Generating bitmaps from DVI</h3>
<p/>In the last analysis, any DVI driver or previewer is generating
bitmaps: bitmaps for placing tiny dots on paper via a laser- or
inkjet-printer, or bitmaps for filling some portion of your screen.
However, it&rsquo;s usually difficult to extract any of those bitmaps any
way other than by screen capture, and the resolution of <em>that</em> is
commonly lamentable.
<p/>Why would one want separate bitmaps?  Most often, the requirement is for
something that can be included in HTML generated from (La)TeX
source &mdash; not everything that you can write in (La)TeX can be
translated to HTML (at least, portable HTML that may be
viewed in &lsquo;most&rsquo; browsers), so the commonest avoiding action is to
generate a bitmap of the missing bit.  Examples are maths (a maths
extension to the <code>*</code>ML family is available but not widely
used), and &lsquo;exotic&rsquo; typescripts (ones that you cannot guarantee your
readers will have available).  Other common examples are generation of
sample bitmaps, and generation for insertion into some other
application&rsquo;s display &mdash; to insert equations into Microsoft
PowerPoint, or to support the enhanced-<i>emacs</i> setup called
<a href="FAQ-WYGexpts.html"><i>preview</i>-<i>latex</i></a>.
<p/>In the past, the commonest way of generating bitmaps was to generate a
PostScript file of the DVI and then use <i>ghostscript</i> to
produce the required bitmap format (possibly by way of PNM
format or something similar).  This is an undesirable procedure (it is
very slow, and requires two or three steps) but it has served for a
long time.
<p/>(La)TeX users may now take advantage of two bitmap &lsquo;drivers&rsquo;.  The
longer-established, <i>dvi2bitmap</i>, will generate XBM and
XPM formats, the long-deprecated GIF format (which is
now obsolescent, but has finally been relieved of the patent
protection of the LZW compression it uses), and also
the modern (ISO-standardised) PNG format.
<p/>Dvipng started out as a PNG renderer; from version 1.2 it can also
render to the GIF format. It is designed for speed, in environments that
generate large numbers of PNG files: the <i>README</i> mentions
<i>preview</i>-<i>latex</i>, <i>LyX</i>, and a few
web-oriented environments. Note that <i>dvipng</i> gives
high-quality output even though its internal operations are optimised
for speed.
<dl>
<dt><tt><i>dvi2bitmap</i></tt><dd><a href="ftp://cam.ctan.org/tex-archive/dviware/dvi2bitmap.zip">dviware/dvi2bitmap</a> (<a href="ftp://cam.ctan.org/tex-archive/dviware/dvi2bitmap.tar.gz">gzipped tar</a>, <a href="http://www.tex.ac.uk/tex-archive/dviware/dvi2bitmap/">browse</a>)
<dt><tt><i>dvipng</i></tt><dd><a href="ftp://cam.ctan.org/tex-archive/dviware/dvipng.zip">dviware/dvipng</a> (<a href="ftp://cam.ctan.org/tex-archive/dviware/dvipng.tar.gz">gzipped tar</a>, <a href="http://www.tex.ac.uk/tex-archive/dviware/dvipng/">browse</a>)
</dl>
<p/>
<p/><p/><p/><p>This question on the Web: <a href="http://www.tex.ac.uk/cgi-bin/texfaq2html?label=dvi-bmp">http://www.tex.ac.uk/cgi-bin/texfaq2html?label=dvi-bmp</a>
</body>