[R-pkg-devel] MathJax for Rd files

Georgi Boshnakov georg|@bo@hn@kov @end|ng |rom m@nche@ter@@c@uk
Thu May 14 13:37:07 CEST 2020

I don't know if this helps but I have the following note in  viewRd() (from 2017!) at https://github.com/GeoBosh/Rdpack/blob/81af94d0e690b9f02275e89d474ce184d63fb044/R/bib.R

    ## TODO: (BUG) e is NULL under RStudio
    e <- tools::loadPkgRdMacros(system.file(package = "Rdpack"))
## Rdo <- parse_Rd(infile, macros = e)

Maybe I have forgotten to delete the note after fixing that since it works  (I just checked in Rstudio) but maybe that's the reason I restricted it to just macros in Rdpack.

Georgi Boshnakov

-----Original Message-----
From: Duncan Murdoch <murdoch.duncan using gmail.com> 
Sent: 14 May 2020 12:29
To: Gábor Csárdi <csardi.gabor using gmail.com>
Cc: Georgi Boshnakov <georgi.boshnakov using manchester.ac.uk>; Viechtbauer, Wolfgang (SP) <wolfgang.viechtbauer using maastrichtuniversity.nl>; Helmut Schütz <helmut.schuetz using bebac.at>; tiagoolivoto using gmail.com; r-package-devel using r-project.org
Subject: Re: [R-pkg-devel] MathJax for Rd files

On 14/05/2020 5:46 a.m., Gábor Csárdi wrote:
> On Thu, May 14, 2020 at 10:27 AM Duncan Murdoch 
> <murdoch.duncan using gmail.com> wrote:
>> On 14/05/2020 3:30 a.m., Georgi Boshnakov wrote:
>>> The issue is not with Rstudio per se but that in devtools' development mode  help() is modified to show the Rd files in the source directory, as one would expect, but doesn't load the RdMacros. So, the issue appears when one is development mode.
>> Yes, the error appears to be in the pkgload::load_rd_macros() 
>> function
>> here:
>> https://github.com/r-lib/pkgload/blob/1b1adc39628671f2ea4256f0bebcdb76e1f89f45/R/dev-help.r#L47.
>> It doesn't look at the DESCRIPTION file to see if there's an RdMacros entry.
> Isn't that what tools::loadPkgRdMacros() does there? I believe so.

Yes, you're right.  So it's not clear why the preview isn't working.

Duncan Murdoch

More information about the R-package-devel mailing list