summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-dvi-bmp.html
blob: 4db3e69b07424fe7ca5de2aac3b503a93d194b1f (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
<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&#8217;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 &#8212; not everything that you can write in (La)TeX can be
translated to HTML (at least, portable HTML that may be
viewed in &#8216;most&#8217; browsers), so the commonest avoiding action is to
generate a bitmap of the missing bit.  Examples are maths (a maths
extension to the &#8216;<code>*</code>ML&#8217; family is available but not
universally supported by browsers), and &#8216;exotic&#8217; 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&#8217;s display &#8212; 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 &#8216;drivers&#8217;.  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="http://mirror.ctan.org/dviware/dvi2bitmap.zip">dviware/dvi2bitmap</a> (or <a href="http://mirror.ctan.org/dviware/dvi2bitmap/">browse the directory</a>); <a href="http://mirror.ctan.org/help/Catalogue/entries/dvi2bitmap.html">catalogue entry</a>
<dt><tt><i>dvipng</i></tt><dd><a href="http://mirror.ctan.org/dviware/dvipng.zip">dviware/dvipng</a> (or <a href="http://mirror.ctan.org/dviware/dvipng/">browse the directory</a>); <a href="http://mirror.ctan.org/help/Catalogue/entries/dvipng.html">catalogue entry</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>