Thanks. By the way, just for clarity, I do know that the option I wanted was 
--strip-comments, with two hyphens. When I posted this, apparently '--' got 
changed to a dash by auto-incorrect.

RL

-----Original Message-----
From: Duncan Murdoch <murdoch.dun...@gmail.com> 
Sent: Thursday, June 27, 2019 9:07 AM
To: Lenth, Russell V <russell-le...@uiowa.edu>; r-package-devel@r-project.org
Subject: [External] Re: [R-pkg-devel] pandoc version used in winbuilder

On 27/06/2019 9:51 a.m., Duncan Murdoch wrote:
> On 26/06/2019 2:54 p.m., Lenth, Russell V wrote:
>> All,
>>
>> How does one tell what version of pandoc is being used by winbuilder (and 
>> probably other related CRAN-submission processes)?
> 
> The function rmarkdown::pandoc_version() will tell you.
>>
>> I have a package with several HTML vignettes, for which I use a custom 
>> style. I had decided to add the pandoc option '-strip-comments' to my script 
>> (my vignettes have quite a few HTML comments that are used for indexing and 
>> are not needed after the vignettes are built). When I built the package and 
>> submitted it for checking to winbuilder (for the development version of R), 
>> the result was that each vignette failed to rebuild, with a message that 
>> pandoc.exe has no option -strip-comments. However, that option has been 
>> available since pandoc version 2.0; and its latest version is 2.7.3.
>>
>> This is not a big deal for my package, so I just removed that option and 
>> then all was OK. But still, why are we having to rely on a relatively 
>> ancient version of pandoc?
> 
> It takes work to install a new version, and presumably nobody has done 
> that work.  Pandoc is not easy to build, so some CRAN machines don't 
> have it at all.
> 
> Your DESCRIPTION file should list it in SystemRequirements with the 
> required version number.  I'd suggest using a reasonably low number if 
> you want CRAN to accept and build your package.

By the way, I just looked through a fairly recent copy of CRAN, and only
3 packages asked for pandoc >= 2.0.  So that's a reason it's been a low 
priority to install it.

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

Reply via email to