[Rd] Feature request – math in HTML help

Simon Urbanek @|mon@urb@nek @end|ng |rom R-project@org
Fri May 28 05:57:00 CEST 2021


Just to clarify the confusion, let me rephrase that. I see this as a request to add support for converting \eqn{} and friends to MathJax in R html documentation (both in core packages as well as all contributed packages). That sounds like a reasonable request to me, but I would not volunteer to implement it so I don't know how difficult that would be. Obviously, that has to happen in core R since it is part of the package building process.

The other part of the e-mail was unfortunately just conflating different things such as alternative ways of creating MathJax output in packages which is already possible and a solved problem as Duncan pointed out. You can write R documentation which uses MathJax in your package, but you cannot render existing R documentation with MathJax (currently, if I understand that correctly). I hope this clarifies things a bit.

Cheers,
Simon



> On 28/05/2021, at 6:34 AM, Jan Netík <netikja using gmail.com> 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!
> 
> Best,
> 
> Jan Netik
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-devel using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
> 



More information about the R-devel mailing list