[R-pkg-devel] How to provide a finalized PDF file in a package?

Dirk Eddelbuettel edd @end|ng |rom deb|@n@org
Tue Jan 21 18:12:06 CET 2020


On 21 January 2020 at 17:58, Ralf Stubner wrote:
| On Tue, Jan 21, 2020 at 5:50 PM Gábor Csárdi <csardi.gabor using gmail.com> wrote:
| >
| > While R.rsp is a great workaround, I wish we had a better solution for
| > including a static PDF file in a package, one that does not require 6
| > additional packages to leave a file exactly as it is....

I second the preference for low-dependency counts.
 
| One can use a Sweave vignette and simply include the real PDF with the
| pdfpages package, c.f.
| https://github.com/RcppCore/Rcpp/blob/master/vignettes/Rcpp-introduction.Rnw

Indeed -- but credit where credit is due. This goes back to a short blog post
by Mark which I referenced here a few times:

 https://www.markvanderloo.eu/yaRb/2019/01/11/add-a-static-pdf-vignette-to-an-r-package/

The underlying trick is a well-known latex feature that you can slurp pdf
content into pdf output and also described in other places.  But Mark's short
and concise write-up should give everything you need to do this with just
base R and nothing else (by relying on well-honed the Sweave workflow).

Best,  Dirk

-- 
http://dirk.eddelbuettel.com | @eddelbuettel | edd using debian.org



More information about the R-package-devel mailing list