Previously, I asked about how to convert the images from .dvi
files into gif/jpeg for inclusion in web pages.
My own system is a minimalist one; it is based on linux, which perhaps
should have been made clear in my initial post.
I have X Free86 operating, and a few other things, but was trying to
aviod loading in too many more packages.
The packages I ended up using were : tex, dvips, ghostscript, xpaint and
perhaps cjpeg. dvips and ghostscript were necessary add-ons, requiring
a decent number of files. Dvips does not work on my system, as I'm
trying to figure out the minimum number of font packages needed to get
it going. But its being used on a remote system.
In any case, here are the steps involved :
1. Use tex to convert the tex file into .dvi
2. Use dvips to convert the .dvi file into .ps (postscript)
3. Use the ghoscript command
gs -sDEVICE=ppm -sOutputFile=file%d.ppm file.ps
To convert the ps file to a ppm file which xpaint can read.
4. Run X and startup xpaint. The successive pages of the document
will have been converted to numbered ppm files. Load each in
sucession into xpaint. Use the region command to mark out a
region encompassing each formula, and save as .gif file.
5. Refer to each formula file generated within the HTML document.
This works. I suspect there may be a way of "grabbing" the raw the
X screen output when using xdvi to look at the document, and process
the contents, but I don't know enough to do this.
An alternate approach, using slightly different packages, which I have
not tried, is described in Chapter 11.6 (p.455) of the*Graphics
Companion (Goossens, Rahts, Mittelbach, 1997, ISBN 0-201-85469-4).
Basically the steps are:
1 put each equation in a separate file/page
2 process with dvips to get a postscript file
3 process with Ghostscript to get a pbm file
4 use the netpbm utility pbmcrop to trim white space (or epsfit)
5 use ppmtogif to get a gif file or cjpeg to get a jpeg file.
Ideally, it would be nice to convert .dvi directly into html files,
automatically generating the graphics files and referencing them. Some
people did suggest there were ways of doing this, but they involved
loading in different extra packages which are not part of my current
In spite of my enthusiasm for such direct conversion, I'll be using the above
method until I can get my brain around all this better, being new to linux,
tex, X and all these different file formats, which are presently just
Two "automatic" methods mentioned involved were based on latex2html
latex2html requires perl and hyperlatex requires emacs. Both will
require the pbmutilities and ghostscript, possibly giftrans.
latex2html will do a full conversion of your document so it will
generate equation in gif format. hyperlatex will require that you
indicate that you want an equation converted to gif, otherwise it will
create a textual approximation.
Web pages containing these are :
They sound interesting, but necessitate loading in extra packages.
A system using translated .tex is :
More information is obtainable in :
This document outlines a dos version of the conversion package. It is quite
enlightening, particularly when you don't know too much of the jargon to do
with tex and variants. It provides some general information about what tools
exist to generate what bitmap files from what other files, and was quite
The particular package outlined apparently uses LaTeX, which I don't have
any familiarity with, and am anxious about needed still more libraries and
"background operation files".
Presumably, the dos version is of a much more stand alone nature, but not
using a dos system its not something I've taken much interest in.
As for more general issues, it was noted that :
There was, in fact, an official version of HTML, namely 3.0, that did
support some math. But although W3 even wrote a browser (Arena) for it,
it didn't catch on. IBM produces a ("free") browser plugin called
Techexplorer which can handle certain TeX and*documents directly.
.... Latest word is that the plugin will be made to work
in Netscape on operating systems other than just Win-95. I believe
it currently works on just Win-95 with Netscape or Microsoft's
Internet Explorer. I am hoping the next release will work in
Netscape on Linux.
The plugin is called "techexplorer."
Downloads and information are available at:
A suggestion was made to use PDF instead of HTML .... I don't know what
PDF is, and I thought HTML was the standard. Apparently there is a version
of TeX called pdftex which outputs PDF directly.
Thanks to Pierre Girard, Eitan Gurari, Ed Russell, Steve Whitlatch,
James Youngman and hymie! for replying/posting by the time I prepared
this summary. Some text has been lifted directly from documents
originated by them.
Fate may be arbitrary; but it is not biased.