Re: [R-pkg-devel] Rmarkdown package vignette that reference online images: how to fail gracefully?

2023-10-06 Thread Vinh Nguyen
>
>
> The parameter responsible for this base64 encoding is called
> self_contained, which defaults to TRUE in the rmarkdown::html_document
> format, which prettydoc::html_pretty inherits from. Set it to FALSE in
> the YAML header of the vignette.
>
> Note that some other scripts and CSS files may be loaded from external
> sources if you do that. As a user, I would prefer this not to be the
> case, but I don't know enough about rmarkdown to set your vignette up
> to bundle everything except the images
>


Thanks for the detailed investigation and analysis, Ivan. For now, I've
followed your suggestion and added the option `self_contained: false`. The
revised package is now on CRAN, and you are correct that css files are no
longer contained for the version sitting on CRAN, so the vignette is less
pretty looking. I'll investigate if there are any other workarounds.

Your assistance is much appreciated.

>

[[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


[R-pkg-devel] Problem compressing vignettes for CRAN

2023-10-06 Thread Michael Dewey
I am trying to update my CRAN package metap. When I ran a final check on 
winbuilder I got the warning


* checking sizes of PDF files under 'inst/doc' ... WARNING
  'gs+qpdf' made some significant size reductions:
 compacted 'compare.pdf' from 498Kb to 243Kb
 compacted 'plotmetap.pdf' from 349Kb to 91Kb
  consider running tools::compactPDF(gs_quality = "ebook") on these files,
  or build the source package with --compact-vignettes=both

But I did use the option --compact-vignettes=both when I built the tarball.

I do have gs installed but not qpdf. I built the package under Windows 
if that is relevant.


Any suggestions?

--
Michael

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] Problem compressing vignettes for CRAN

2023-10-06 Thread Ivan Krylov
В Fri, 6 Oct 2023 15:36:45 +0100
Michael Dewey  пишет:

> But I did use the option --compact-vignettes=both when I built the
> tarball.

> I do have gs installed but not qpdf. I built the package under
> Windows if that is relevant.

Is the Ghostscript executable on the %PATH%? It might help to install a
newer version. It may also be informative to extract the vignette *.pdf
files from the source package tarball and run tools::compactPDF(pdfs,
gs_quality='ebook', verbose = TRUE) to see whether it breaks at any
point.

-- 
Best regards,
Ivan

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] Problem compressing vignettes for CRAN

2023-10-06 Thread Michael Dewey

Dear Ivan

You must have psychic powers. After some digging I find that the copy 
installed by TexLive is hidden from other software so I need to install 
it again. I suppose while I am at it I should try installing qpdf.


Michael

On 06/10/2023 15:48, Ivan Krylov wrote:

В Fri, 6 Oct 2023 15:36:45 +0100
Michael Dewey  пишет:


But I did use the option --compact-vignettes=both when I built the
tarball.



I do have gs installed but not qpdf. I built the package under
Windows if that is relevant.


Is the Ghostscript executable on the %PATH%? It might help to install a
newer version. It may also be informative to extract the vignette *.pdf
files from the source package tarball and run tools::compactPDF(pdfs,
gs_quality='ebook', verbose = TRUE) to see whether it breaks at any
point.



--
Michael

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel