From murdoch.duncan at gmail.com  Wed Aug 24 21:23:06 2016
From: murdoch.duncan at gmail.com (Duncan Murdoch)
Date: Wed, 24 Aug 2016 15:23:06 -0400
Subject: [Rd] feature request for non-sweave vignettes
In-Reply-To: <CA+j2mtUy8966Mt9ZRKzAzYATFxuk4bk7mjJJidmem0=B=5rc5A@mail.gmail.com>
References: <CA+j2mtUy8966Mt9ZRKzAzYATFxuk4bk7mjJJidmem0=B=5rc5A@mail.gmail.com>
Message-ID: <9cf10ad5-df38-f272-afaf-fed122218972@gmail.com>

On 24/08/2016 8:09 AM, Patrick Brown wrote:
> Currently Makefiles for vignettes are only supported for .tex files.  Could
> the tools package be modified to allow file extensions to be specified for
> a vignette engine?  Having the pandoc pdf conversion in a Makefile rather
> than through R would be tidier in some cases.
>
> If I specify my vignette engine as
>
> ```
> tools::vignetteEngine(
>   'myengine',
>   pattern = '\\.[Rr](md|nw)$',
>   output = c('md', 'tex'),
>   ...
> )
> ```
>
> the `tools:::find_vignette_product` function could have
>
> `if (final) c("pdf", "html") else unique(c("pdf", "html", "tex",
> engine$output))`
>
> that's probably the only line that would need changing.

Sounds reasonable.  Try it out in R-devel, and submit a patch.

Note that there is at least one other request for vignette improvements, 
i.e.
https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=16333, with a 
promise to submit a patch.  It hasn't arrived in 16 months.  So please 
don't promise a patch unless you intend to deliver.

Duncan Murdoch



[Rd] feature request for non-sweave vignettes
Duncan Murdoch