[Rd] Feature request – math in HTML help

Jan Netík net|kj@ @end|ng |rom gm@||@com
Thu May 27 20:34:52 CEST 2021


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!

Best,

Jan Netik

	[[alternative HTML version deleted]]



More information about the R-devel mailing list