On Tuesday, January 12, 2021, Duncan Murdoch <murdoch.dun...@gmail.com> wrote:
> 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. Hadley -- http://hadley.nz [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.