SUMMARY : Converting TeX to HTML

SUMMARY : Converting TeX to HTML

Post by John Augu » Mon, 30 Jun 1997 04:00:00



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
system.

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
buzzwords.

Two "automatic" methods mentioned involved were based on latex2html
and hyperlatex.

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 :
Hyperlatex      ftp://iphthf.physik.uni-mainz.de/pub/gv/unix
latex2html      http://www.veryComputer.com/

They sound interesting, but necessitate loading in extra packages.

A system using translated .tex is :

    http://www.veryComputer.com/~gurari/TeX4ht/mn.html

More information is obtainable in :

  ftp://ftp.cis.ohio-state.edu/pub/tex/osu/gurari/TeX4ht/dos/port/readm...

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
interesting.

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:
        http://www.veryComputer.com/

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.

--
John August

Fate may be arbitrary; but it is not biased.

 
 
 

SUMMARY : Converting TeX to HTML

Post by Michael D. Sof » Tue, 01 Jul 1997 04:00:00


Good summary.

Onther method of displaying DVI in HTML is IDVI, which is a DVI reader
plugin.  The URL is http://www.geom.umn.edu/java/idvi/.  It's main
drawbacks are: the need to download the bitmapped fonts, and a tendency
to crash earlier versions of netscape.

Mike

--

CIS Sr. Systems Programmer        AFS/DFS, email, usenet, epistemology.
Rensselaer Polytechnic Institute, Troy, NY.  http://www.rpi.edu/~sofkam/

 
 
 

SUMMARY : Converting TeX to HTML

Post by Volker Kuhlma » Thu, 03 Jul 1997 04:00:00




Quote:> Previously, I asked about how to convert the images from .dvi
> files into gif/jpeg for inclusion in web pages.
> 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.

Yes there is, very easy it is too. Programs like xv can save the current
screen/window to file. So does xwd, which is part of XFree86 (on my Red
Hat Linux 4.1 system it is in pacakge XFree86. If you want to trim the
size later, use xpaint or xv or display or any other bitmap editor. The
netpbm utlityu mentioned in the graphics companion has the advantage of
being a cmd line tool - with a UNIX system you can do some smart typing
of a line or 2, then have a coffee and the job done when you get back
(none of this point'n'click waste of time).

Volker

--

(remove .nospam from my email)

 
 
 

SUMMARY : Converting TeX to HTML

Post by Ian Hutchinso » Fri, 04 Jul 1997 04:00:00



> 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
> ... 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

 ... [ghastly multiple steps process deleted]

May I recommend a look at
http://venus.pfc.mit.edu/tth/tth.html

It describes a (La)TeX to HTML translator, capable of math, that is free
for non-commercial use. Its single executable is <400kB. Let's try to do
Math on the net in a sensible way, please. Spread the word!

Ian Hutchinson.

 
 
 

1. ps->tex html->tex?

Hello

        Do You know any program which could convert:
1. ps to html
2. html to tex (latex)
3. pdf to tex (latex)

Do You know any others interesting converting operations (and progs
which could do that) ?

Thanx
Michal

2. Slackware 3.0.0 &Qlogic SCSI How?

3. HTML Proxy which can convert html on the fly

4. device names

5. SUMMARY: AIX3.2 and TeX 3.14

6. serial port driver for Sun Solaris UNIX

7. AIX TeX summary (rather long!)

8. Write through cache for sis 85C461 chipset, program anyone?

9. Plain TeX to HTML translator, tth, available.

10. TeX to HTML application

11. (tex)info -> HTML ??

12. How to convert .tex or .dvi to ASCII?

13. How to convert tex files to lyx