Steve Harris wrote:
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:

-----------------------------------------------------------

Re: Lyx 1.4.2svn Windows
SH:
Is there some reason this equation/png looks so feint (pixellated?) as
I've seen something like this in an htlatex generated html conversion
which I would like to fix. Ekkehart supplied the original intop.png.
[SH: intop.png displays with a similar poor quality to newfile0x.png]

Regards,
Stephen

Ekkehart replied:

Yes, the reason is that I took a screen shown from a pdf output and
transformed it into png (to have a small file that can be attached).
The original is the standard Latex output which is slightly pixelated,
but for real things you would use an outline font.

Ekkehart

---------------------------------------------------------

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.

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.



I am sending newfile0x.jpg as an attachment. This is newfilejpg.htm
which can be copied and pasted into a text editor and saved to an
appropriate directory. The original attached files were munged.

<------------------------------------------------------>

<html>
<head>

<title> Example of Jpg-based Webpage</title>
</head>
<body>

This line is part of the internal html code, the .jpg image follows:


<img src="file:///c:/uploads//Newdemoarticle.jpg">



</body>
</html>

<--------------------------------------------------------->


This is newfilepng.htm which can be copied and pasted, inside
the arrowed lines, into a text editor and saved to an appropriate
directory.

<------------------------------------------->

<html>
<head>

<title> Example of Png-based Webpage</title>
</head>
<body>

This line is part of the internal html code, the .png image follows:


<img src="file:///c:/uploads//newfile0x.png">



</body>
</html>

<------------------------------------------------------>

Regards,
Stephen

<<attachment: newfile0x.jpg>>

Reply via email to