Angus Leeming wrote: > When I was writing this stuff to interat with preview latex, dvipng > was still very young. Do you think that it is now mature enough to > use?
I'd think so. It is used in WeBWorK, a tool to distribute homework problems on the web, and has been reported to "produce thousands of images a day". > If you look at lyxpreview2bitmap.sh, you'll see that one reason we > generate ppm files rather than png ones is because we want to strip > left/right borders from the previews of math insets. We use pnmcrop > to > do this. Does dvipng have the ability to do such a thing and if not > can I file a feature request with you? A tight bounding box can be produced with dvipng -T tight foo.dvi But I think the effect is similar to pnmcrop rather than pnmcrop -left | pnmcrop -right I'd planned a switch that would output the baseline coordinate in the text output, I can up that request a notch if you like. >> What about the following? >> >> 1/ generate your tex file >> 2/ run the normal latex->dvi converter >> 3/ have a converter dvipreview->png that does all lyxpreview2bitmap >> does, except latex >> >> Would that work? It seems to me that running latex is the first >> (useful) thing the script does, anyway. > > Well, I don't think that lyx should fork one script, wait for it to > finish generating a dvi file and then fork off another to generate > the bitmaps from it. However we could perhaps generate a temporary > file and use this to control the conversion? Using dvipng it would be possible to fork one script to generate a dvi file and then _immediately_ fork off "dvipng -follow". dvipng would then wait on its own for the dvi file generation to end. /JÅ -- Organization: Homo Linuxoidus: carbon/silicon-based life form