Yihui

, I think Graham's question has pointed out a very useful
> direction -- we may consider leaving some sort of API's or hooks in
> the R script in LyX which is used to process the Rnw document.


> A few months ago I also recommended the qpdf program to R developers
> to compress PDF plots and it has been included in R now (the option
> --compact-vignettes in R CMD build). Graham, is your script portable
> to Windows and Mac? Could you share it with us? Maybe we can propose
> this feature to LyX developers. It will be definitely helpful.
>

Although I do normally use  SWeave, these particular files were simply
exported from R, and then imported into Lyx, there  just big PDFs. ECDFs
based on 120,000 data points, which is why I suspect they are large without
some form of flattening.

But compressing imported PDFs goes beyond R and maybe qpdf could become a
Lyx  feature to optimise PDFs the same way that MSWord allows you to
optimise graphics before saving/printing.

The Nautilus script in Linux uses Ghostscript and maybe this could be
another option to consider along with qpdf.
http://www.webupd8.org/2010/11/download-compress-pdf-12-nautilus.html

But I will have a look at qpdf, thanks,

Graham

Reply via email to