Jean-Pierre Chretien wrote:
Date: Sat, 24 Jun 2006 08:48:51 -0700
To: LyX User <lyx-users@lists.lyx.org>
CC: Ares <[EMAIL PROTECTED]>
Subject: htlatex html conversion best methods
From: Steve Harris <[EMAIL PROTECTED]>

I recently became curious about the best way to produce a web page
>from LyX->export as Latex (.tex) and conversion to html and .png
code for a web page with "htlatex example.tex"->example.htm + .pngs.
I asked Ekkehart about this issue arising from a recent post of his:

[...]
SH: So I tried substituting/converting newfile0x.png with ImageMagick
to newfile0x.jpg and viewing it, and the result looked pretty good.
Next I made a simple .htm (which is text) file to see how it looked
in a browser. It looked good in both Firefox and IE. I've included
the files used in case anyone want to test it. The .htm files point
to C:\uploads, so the files should be saved there; or with Linux
save to the directory of choice, but edit the .htm file to show it.

I can see no difference here between newfile0x.png and newfile0x.jpg, so I would rather use the png file to be able to make it transparent.
intop.png seems to have been resized: usually the bimapped image is OK
if you avoid resizing.

A thesis might have 175+ equations in it, which are all converted
to .png files by htlatex. Supposing all these .png files are found
in ~/thesis, or C:\thesis, they need to be converted automatically
to the new .jpg format. Assuming ImageMagick is in the Path, then
>from the ~/thesis command line, "convert *.png *.jpg" should work
in both Linux and Windows/Dos to change the extension of every
.png file to its .jpg counterpart.

Then all the occurrences of *.png need to be changed to *.jpg in
the thesis.htm (text file). I think most quality text editors can
perform such a Search/Replace, input *.png, output *.jpg through
the entire document, which should then display as well as the
sample newfilejpg.htm which is attached.

If you prefer jpg, it would be better to hack the tex4ht configuration file,
where conversions are described; this should take care of everything: image format and file name in html files.

HTH



Well, both Ares and me use default configurations and my htlatex
process produces good quality images but his doesn't and they
display differently to me than the ones I produce.

Thanks for the idea about hacking the configuration file
to produce .jpg output instead of .png images. I read that
it is "trivial" but didn't find out how to do it yet.

Thanks for your review,
Stephen

Reply via email to