[Rd] vignette question was: CRAN package sizes
Claudia Beleites
cbeleites at units.it
Tue Feb 15 15:44:21 CET 2011
Also I started doing my homework with regards to package size, and that is
mainly cleaning leftovers from vignette generation and compressing the pdfs.
For most of my vignettes, ghostscript (lossy) compression works very well:
I use the /screen settings and -dDownsampleColorImages=false
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen -dNOPAUSE
-dQUIET -dBATCH -dDownsampleColorImages=false -dAutoRotatePages=/None
(DownsampleColorImages=false is important as I found otherwise that some .png
become completely useless. However, the pngs are saved with carefully determined
size and are pngs because the pdfs were too large: so I know that the bitmap
images are already "size-optimized")
I wrote a inst/doc/makefile to do this and also clean up a few more "leftovers
from the vignette".
BTW: while compressing the final .pdf achieves better total compression, it
already helps a lot to compress the .pdf figures which can be done at the end of
the .Rnw.
qpdf didn't help for my vignettes.
One question remains, though. I have two vignettes, where I cannot put the
original data into the package (the very first thing in the vignette is the link
to a zip file on r-forge that contains everything needed to reproduce the
vignette, though. I think this is accessible enough for FOSS).
I'd like to have these documents accessible via the usual vignette () mechanism
(this question has come up before, but I found only that the 00Index.dcf does
not work any longer).
My second thought was to set up the Makefile so that instead of building the pdf
a message is printed and the available pdf is used.
This does not work, however: buildVignettes (which I guess does the work*) first
Sweaves the .Rnw file and then replaces the texi2dvi () call by make.
Is this intended behaviour? If so, how do I make my vignette accessible
[obviously the "dummy .Rnw that includes the pdf"-technique doesn't look quite
appropriate as it leads to unnecessarily large package size]?
*I did not realise this from the Makefile discussion in the extensions manual
(nor does the help page of buildVignettes mention anything about this). Also,
I'd appreciate very much if the extension manual would mention buildVignettes -
it took me quite a while to find out what code is used and why my Makefile
didn't lead to the desired results.
Thanks a lot for any ideas,
Claudia
--
Claudia Beleites
Dipartimento dei Materiali e delle Risorse Naturali
Università degli Studi di Trieste
Via Alfonso Valerio 6/a
I-34127 Trieste
phone: +39 0 40 5 58-37 68
email: cbeleites at units.it
More information about the R-devel
mailing list