I am so sorry, my post sounded quite the opposite of what I intended! I
used the term "monkey patch" as a technical one (see
https://en.m.wikipedia.org/wiki/Monkey_patch) and I said "weird"
meaning
mathjaxr is something fulfilling the concept, but only figuratively.
Actually I gave mathjaxr as a good (the best I know, in fact) example of an
approach how to solve the issue. However, no package can achieve nicely
formatted/rendered math in every single R documentation files. I thought
this could be solved globally, directly in R, as it is the case of PDF
Reference manual. I propose (in line with mathjaxr authors) that mathjax is
pretty good candidate for it.
Once more I am sorry for the ambiguity in my language.
Best,
Jan Netik
Dne ?t 27. 5. 2021 22:15 u?ivatel Duncan Murdoch <murdoch.duncan at
gmail.com>
napsal:
> On 27/05/2021 2:34 p.m., Jan Net?k wrote:
> > Hi all,
> >
> > long I have been thinking about proper rendering of math in the HTML
form
> > of R documentation. As you know, you can write \eqn{} in your .Rd
files
> and
> > this is nicely rendered into the PDF Reference manual of the package
with
> > the aid of TeX. However, that is not the case in the aforementioned
HTML
> > version that is used the most in my experience (using RStudio or help
> > function in your console). I think R is the best language for
> statisticians
> > and other data-driven fields, where formal definitions of key concepts
> are
> > necessary and widely used in the documentation, unfortunately quite
> > unusable for more complicated equations.
> >
> > Recently I have stumbled upon an interesting approach to this issue,
see
> > https://cran.r-project.org/package=mathjaxr, but it seems to me as
some
> > weird kind of monkey patching. All packages should be able to benefit
> from
> > proper math rendering without any dependencies, in my opinion. I think
it
> > should not be much of a problem utilizing mathjax or other similar
> library
> > to enable that. Note we already know what supposed to be math in .Rd
(and
> > we parse and process it in a special way in the PDF routine), the
thing
> is
> > to render it, not typeset in italics, as it is the case nowadays.
> >
> > I would be happy to hear any opinion of yours!
>
> You are being very rude.
>
> The problem has been solved by mathjaxr. If you don't like their
> approach, don't ask someone else (i.e. R Core) to come up with a
> different solution, do it yourself.
>
> I hope my opinion makes you happy!
>
> Duncan Murdoch
>
[[alternative HTML version deleted]]