Re: [R-pkg-devel] is R CMD build --compact-vignettes working as expected?

2020-10-08 Thread John Fox
Dear all, First, thank you to everyone who responded. Let me be more specific about what I did, focusing on macOS (since I did most of this on Windows too): (1) I observed the problem with the Rcmdr package, including version 2.7-1, which is newly on CRAN. Presumably, it wouldn't be hard to

Re: [R-pkg-devel] is R CMD build --compact-vignettes working as expected?

2020-10-08 Thread Duncan Murdoch
When I tried that on MacOS, it did the gs compression with gs_quality set to "none", which does nothing. I don't know what quality CRAN uses, but for me setting the environment variable GS_QUALITY=screen made a big difference. Duncan Murdoch On 08/10/2020 11:10 a.m., John Fox wrote: Dear

Re: [R-pkg-devel] is R CMD build --compact-vignettes working as expected?

2020-10-08 Thread Henrik Singmann
Hi both, I am not sure if this might be the issue here, but I think on both Linux and Windows I need to use the both option without quotation marks: --compact-vignettes=both Best, Henrik Am Do., 8. Okt. 2020 um 17:21 Uhr schrieb Ben Bolker : > >Huh, weird. "both" worked for me. > >My

Re: [R-pkg-devel] is R CMD build --compact-vignettes working as expected?

2020-10-08 Thread John Fox
Dear Ben, Actually, what I used was --compact-vignettes="both", with qpdf and gs installed on my Windows and Mac machines, and that apparently didn't work for me. Best, John On 2020-10-07 10:06 p.m., Ben Bolker wrote:   OK, I think I see the problem. tl;dr use --compact-vignettes="both"

Re: [R-pkg-devel] is R CMD build --compact-vignettes working as expected?

2020-10-07 Thread Ben Bolker
OK, I think I see the problem. tl;dr use --compact-vignettes="both" when building the vignettes. --compact-vignettes by default only tries qpdf. when the R CMD check --as-cran is run, it tries both qpdf and gs. Since gs (apparently, in this case) compresses more aggressively than

Re: [R-pkg-devel] is R CMD build --compact-vignettes working as expected?

2020-10-07 Thread Ben Bolker
On 10/7/20 8:35 PM, Duncan Murdoch wrote: On 07/10/2020 8:32 p.m., Ben Bolker wrote:     Thanks for the tip, I'll take a look.     Given that three relatively experienced package authors all seem to have experienced similar issues, it seems that maybe this is worth figuring out/maybe I'm

Re: [R-pkg-devel] is R CMD build --compact-vignettes working as expected?

2020-10-07 Thread Duncan Murdoch
On 07/10/2020 8:32 p.m., Ben Bolker wrote: Thanks for the tip, I'll take a look. Given that three relatively experienced package authors all seem to have experienced similar issues, it seems that maybe this is worth figuring out/maybe I'm not just doing something boneheaded. Just to

Re: [R-pkg-devel] is R CMD build --compact-vignettes working as expected?

2020-10-07 Thread Ben Bolker
Thanks for the tip, I'll take a look. Given that three relatively experienced package authors all seem to have experienced similar issues, it seems that maybe this is worth figuring out/maybe I'm not just doing something boneheaded. cheers Ben On 10/7/20 8:31 PM, Duncan Murdoch

Re: [R-pkg-devel] is R CMD build --compact-vignettes working as expected?

2020-10-07 Thread Duncan Murdoch
I don't know the answer to your question, but you can debug the --compact-vignettes option as follows. debug(tools::compactPDF) tools:::.build_packages(c("--compact-vignettes", "pkgdir")) where "pkgdir" is the directory of the source of your package. Add extra options to the build as

Re: [R-pkg-devel] is R CMD build --compact-vignettes working as expected?

2020-10-07 Thread John Fox
Dear Ben, On 2020-10-07 5:26 p.m., Ben Bolker wrote:   I hope so too. The (annoying) workaround is to compact the vignette yourself (using qpdf directly or using tools::compactPDF), then use no-build-vignettes.  The problem there is whatever's supposed to happen with building vignette

Re: [R-pkg-devel] is R CMD build --compact-vignettes working as expected?

2020-10-07 Thread John Fox
Dear Ben, I was hoping that someone would pick up on this problem, because I've experienced the same issue of --compact-vignettes apparently ignored, e.g., with the Rcmdr package under R 4.0.2 on both macOS and Windows. Best, John John Fox, Professor Emeritus McMaster University Hamilton,