[R-pkg-devel] Disable a particular knitr vignette

Iñaki Úcar i@uc@r86 @ending from gm@il@com
Thu Aug 2 12:08:04 CEST 2018


El jue., 2 ago. 2018 a las 11:41, Henrik Bengtsson
(<henrik.bengtsson using gmail.com>) escribió:
>
> As a workaround, until resolved, you could precompile your vignette
> into a PDF and then use the 'R.rsp::asis' vignette engine
> (%\VignetteEngine{R.rsp::asis} etc) to include it as a static PDF.
> This is described in the vignettes
> (https://cran.r-project.org/package=R.rsp).
>
> -Henrik

Thanks for the suggestion, Henrik. I would prefer, though, not to
change the behaviour on other platforms and not to rely on another
dependency just for a workaround.

Iñaki

> On Thu, Aug 2, 2018 at 10:04 AM Iñaki Úcar <i.ucar86 using gmail.com> wrote:
> >
> > Hi everyone,
> >
> > I have a JSS vignette based on the rticles package. It was compiling
> > just fine until rticles v0.5 for some reason started requiring pandoc
> > v2.x for such a document class, and failing otherwise. Due to this
> > requirement, Windows machines on CRAN show a nasty WARN, because they
> > still have pandoc v1.x.
> >
> > It is painful for Uwe to install pandoc v2.x there, so I was wondering
> > whether there's any easy mechanism to just disable a particular
> > vignette based on some condition (in this case, it would be "we are on
> > CRAN, this is Windows and the pandoc version is < 2"; this is easy to
> > test).
> >
> > I tried putting a condition for the output format in the YAML header
> > and it works, i.e.:
> >
> > output: if (cond) rticles::jss_article else rmarkdown::pdf_document
> >
> > But rmarkdown::pdf_document fails to compile, because the JSS class
> > has many custom macros. I tried also putting a NULL or a NA there, and
> > it doesn't work.
> >
> > Does any knitr ninja here know if there's some easy trick to do this
> > and make Uwe's life easier? Some "NULL" document format?
> >
> > Regards,
> > Iñaki
> >
> > ______________________________________________
> > R-package-devel using r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-package-devel



More information about the R-package-devel mailing list