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

Henrik Bengtsson henr|k@bengt@@on @end|ng |rom gm@||@com
Tue Jan 21 18:30:36 CET 2020


The R.rsp::asis and R.rsp::tex could easily be pulled out from R.rsp
in a standalone package with zero dependencies.  However, it would be
better if they could be brought into the 'tools' package.  This is why
I never went down the path or making a standalone package (adding yet
another package to CRAN).  These two vignette engines are lightweight,
very simple, and does not add dependencies etc.  What stops me is the
the amount of work it would take to prepare this proposal.  I worry
there might be pushbacks because including a static PDF or static HTML
produced in another tool discourage the developer from including the
actual source document.  The R.rsp::tex engine is less controversial
in this sense; it takes the true LaTeX source and builds a PDF
vignette using R's built-in LaTeX tools.  Sure, Sweave can be hijacked
for pure LaTeX vignettes, but personally I think that's a hack.  If
someone is willing to prepare a proposal, I'm happy to help.  The
essential parts for R.rsp::asis are:

https://github.com/HenrikBengtsson/R.rsp/blob/398d75ccc70a33b75c7cdaecef94a24be0dcbad0/R/xweavetangle.R#L177-L227
https://github.com/HenrikBengtsson/R.rsp/blob/398d75ccc70a33b75c7cdaecef94a24be0dcbad0/R/xweavetangle.R#L367-L372

The R.rsp::tex parts need a bit more work to entangle from the rest of the code.

/Henrik

On Tue, Jan 21, 2020 at 9:01 AM Gábor Csárdi <csardi.gabor using gmail.com> wrote:
>
> Right. Then you _only_ need to install about 5 GBs of software to copy
> a PDF file. :/
>
> I guess if you already have LaTeX and you are sure that it will not
> mess up your PDF, then this is another solution.
>
> Gabor
>
> On Tue, Jan 21, 2020 at 4:58 PM Ralf Stubner <ralf.stubner using gmail.com> wrote:
> [...]
> > 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
> >
> > cheerio
> > ralf



More information about the R-package-devel mailing list