Partial success:
I haven't been able to convert the images to jpg proper, but I've been at least been able to enable jpeg compression, thus making the resulting pdfs much smaller:
% enable compression for tiffs
\startluacode
local function compress(oldname, newname, compression)
if not compression or compression == "" then
compression = "jpeg"
end
os.execute(string.format(
'gm convert -compress %s "%s" "%s"',
compression, oldname, newname)
)
end
-- Set the PDF and default TIFF converters to the above function.
figures.converters.tif.pdf = compress
figures.converters.tif.default = compress
\stopluacode
Best,
Denis
Von: denis.maier@unibe.ch