On 23/05/2015 13:14, Duncan Murdoch wrote:
On 23/05/2015 4:05 AM, Kurt Hornik wrote:
Duncan Murdoch writes:

On 22/05/2015 8:49 PM, Imanuel Costigan wrote:
Are there any plans for CRAN to support NEWS files in markdown? Bit of a hassle 
to go the the package’s Github (or other like) site to read NEWS.

Not as far as I know.  There have been discussions about increasing the
support of Markdown, but so far the conclusion has been that it's too
hard to do -- the support is not stable enough on all the platforms
where R runs.

There are actually two issues here.

For CRAN, we could in principle take inst/NEWS.md files, convert these
to HTML using pandoc, and use the HTML for the package web page.  (Would
need the CRAN incoming checks to be taught about inst/NEWS.md.)

However, we cannot use such files for utils::news() because we do not
(yet?) know how to reliably parse such files and extract the news items
(and hence cannot really compute on the news information).

It would be quite easy to modify the news() parser to parse a suitably
described Markdown format.  The main change from the current text parser
would be to expect a prefix on the line introducing each version or
category.

I think the harder problem is display.  CRAN can run pandoc, but can
users who install the package from source?  I would expect some obscure
platforms (like Windows ;-) would not have it available.  I could add it
to Rtools on Windows, but I think platforms that normally install tools
from source will have more trouble, because it has an unusual
prerequisite (Haskell).  We could fall back to displaying the NEWS.md
file without processing, but that makes lots of code more complicated.

pandoc is only viable on platforms with a pre-compiled binary, which does not even cover all the CRAN check platforms. (It is not easy to compile ab initio from source even on a mainstream Linux, but they mostly have pandoc binaries.)

The next problem is that using pandoc as the de facto standard for .md depends on the version of pandoc, and .md seems to have no way to specify the version required. (If it does, people are failing to use it ....)


--
Brian D. Ripley,                  rip...@stats.ox.ac.uk
Emeritus Professor of Applied Statistics, University of Oxford
1 South Parks Road, Oxford OX1 3TG, UK

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

Reply via email to