Gabriel Wicke lists@wikidev.net writes:
On Fri, 2004-05-14 at 22:27 +0200, David Kastrup wrote:
I am not forgetting anything. Obviously, the rendered final HTML (which includes the ascender information, as well as the image dimensions, as well as math rendered into HTML instead of PNG) has to get cached somewhere already now. Whether the images can be cached depends on whether you want to go for the image-size-fits-browser-font-size hacks of Jan-Åke, or just render at a fixed size. Since dvipng is rather light on resources and can even be run continuously, it would be quite feasible to cache the .dvi files (which are size independent) and rerender the png dynamically.
Hm, th easiest way to scale images relative to the font size should be to use em's for height & width (and possible offsets via position:relative), but usually browsers don't do a very good job at scaling images- so i'm not sure if this is desirable at all.
We are running in circles here. Jan-Åke already gave the link URL:http://www.mai.liu.se/~jalar/dvipng/test.html where this and other ways of generating the display are not only discussed, but also demonstrated, and he offered the code generating the images if anybody was interested.
When Angus Leeming (who was not previously familiar with preview.sty and dvipng) integrated previews into LyX, he took about three days. And he had no offer of tested scripts that would already generate the complete HTML, and he also had to integrate the output into a display engine instead of just adapting scripts for a different scripting environment.
Anyway, the converters are there, they are available, the various methods of generating HTML are tested for you, you have a page where this technique is demonstrated, you can take a look the respective HTML, you can get the Perl scripts for generating them, and you can get support for using them from the respective authors of the LaTeX styles and the dvipng converter. Everything that is released is available under the GPL.
If you find that is not sufficient for you to feel it worth investing even a comparatively small amount of work into getting rendering as shown on the above web page, tough.
One can lead a horse to water. Maybe it will get thirsty eventually.