Using a static (prebuilt) PDF vignette in R package

后端 未结 3 961
Happy的楠姐
Happy的楠姐 2020-12-05 14:16

What is the proper way, to include a static PDF file as a \"vignette\" in a CRAN package as of R 3.0?

The trick described in this document of using an empty stub

3条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-05 15:08

    With R.rsp (>= 1.19.0) you can include a static PDF 'vignettes/main.pdf' by adding a tiny 'vignettes/main.pdf.asis' text file that contains:

    %\VignetteIndexEntry{My amazing package}
    %\VignetteEngine{R.rsp::asis}
    

    and make sure to have:

    Suggests: R.rsp
    VignetteBuilder: R.rsp
    

    in your package's DESCRIPTION file. This also works for static HTML vignettes. This is also explained in one of the R.rsp vignettes.

提交回复
热议问题