From cbeleites at units.it  Tue Feb 15 17:27:19 2011
From: cbeleites at units.it (Claudia Beleites)
Date: Tue, 15 Feb 2011 17:27:19 +0100
Subject: [Rd] vignette question was: CRAN package sizes
In-Reply-To: <4D5A9145.9050301@units.it>
References: <alpine.OSX.1.00.1102131203050.44163@tystie.local>	<AANLkTin5vM8C+7w-PDzVWdRA67WNbXxH3MqMjbxd1HSs@mail.gmail.com>	<alpine.LFD.2.02.1102141112140.5766@gannet.stats.ox.ac.uk>
	<4D5A9145.9050301@units.it>
Message-ID: <4D5AA967.1010000@units.it>

Please excuse the noise about dummy .Rnw.

On 02/15/2011 03:44 PM, Claudia Beleites wrote:
> 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]?
coffe break was helpful: of course I just need a dummy .Rnw that is processed to 
a .tex but (via Makefile) _not_ to pdf...

> *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.

Sorry, 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



[Rd] vignette question was: CRAN package sizes
Claudia Beleites