[R] roxygen2 & markdown & math

Hadley Wickham h@w|ckh@m @end|ng |rom gm@||@com
Thu Jan 14 15:37:17 CET 2021

On Tuesday, January 12, 2021, Duncan Murdoch <murdoch.duncan using gmail.com>

> On 12/01/2021 1:12 p.m., Sigbert Klinke wrote:
>> Hi,
>> thanks a lot, but maybe I was to vague.
>> I do not want to replace \eqn{...} and \deqn{...} by \mjseqn{...} and
>> \mjsdeqn{...}. I would like to use $...$ and $$...$$ as in Rmarkdown to
>> get something better readable.
> I think that's a question/suggestion that would have to go to the roxygen2
> team.  They're the ones who convert Markdown into the Rd input format.
> Presumably they could convert $...$ into the appropriate macro using
> Mathjax or not, but I have no idea how difficult that would be.

If I remember correctly, I think it would be relatively hard since roxygen2
uses commonmark, which doesn’t include math in its parse tree. It might be
possible to hack something together with regular expressions, but of course
that brings with it the risk of introducing new edge cases that don’t
behave as expected.



	[[alternative HTML version deleted]]

More information about the R-help mailing list