Angus Leeming <[EMAIL PROTECTED]> writes: > > I think that the idea is fine. Questions that I think should be answered:
> * Can the user turn off this image generation or does he have to install > preview-latex? I see no lyxrc option. You need to define the converters lyxpreview->PNG and lyxpreview->EPS. No converter, no conversion. I also thought about adding the code to call PDF and BMP conversion if the converters are present. > * What happens if image generation fails? The intended outcome should be an empty "xyz_math/" directory. See below. ... > > * I don't see why splitting stuff out into a new file means that I'm no > longer the author of the original code, so I added myself back there Sorry about that. I adjusted the header before I did the rest of the copy&paste ;-) > > As far as I'm concerned, I'm happy for this to go in. I haven't tested the > DocBook stuff at all, but the Previews continue to work (as well as > before). > > I'd query this piece of code, however (buffer.C's createBitmaps): > > + snipp->startAndWait(buffer, fore, back, scale); > + runparams.exportdata->addBitmaps(to_1, snipp); > > Surely you should check whether the snippets were generated successfully > before adding them to 'addBitmaps' ? Yes, and since startAndWait() returns the return code of the script call anyway, it's as simple as if (snipp->startAndWait(buffer, fore, back, scale) == 0) { runparams.exportdata->addBitmaps(to_1, snipp); } Maybe also an Alert? Regards /Andreas