[Rd] Bundling MathJax

Jan Netík net|kj@ @end|ng |rom gm@||@com
Tue Mar 15 12:41:14 CET 2022

Hello everyone,

glad to see the progress on this! It would be a major advancement in the
user experience of using our beloved _statistical_ language and
environment. I have brought the topic a year ago or so here and Simon
Urbanek offered a "hack" which I have implemented in the package many use
today (https://github.com/netique/documath). However, it is a customized
Rd2HTML injection, which is generally a really bad idea... (OT: check out
the {mvbutils} package, which I think does a bunch of "illegal" things,
such as rewriting base functions on the fly.)

As far as I know, I would certainly vote for KaTeX, as it is _perceivably_
faster and, as many of you mentioned, is capable of server-side rendering
which I deem promising.

Keep up the good work!


út 15. 3. 2022 v 11:44 odesílatel Viechtbauer, Wolfgang (SP) <
wolfgang.viechtbauer using maastrichtuniversity.nl> napsal:

> Hi Ivan,
> I would say the biggest impact is in terms of the size of the installed
> package (~4MB versus ~2.9MB). Of course, these days this is a trivial
> difference in terms of storage. The decrease in load and execution time is
> probably negligible (esp. when MathJax is served locally), but I haven't
> done any proper benchmarks on this.
> Note that mathjaxr only minifies when the (suggested) 'js' package is
> installed, so this step is completely optional.
> Best,
> Wolfgang
> >-----Original Message-----
> >From: R-devel [mailto:r-devel-bounces using r-project.org] On Behalf Of Ivan
> Krylov
> >Sent: Monday, 14 March, 2022 22:03
> >To: Duncan Murdoch
> >Cc: r-devel using r-project.org
> >Subject: Re: [Rd] Bundling MathJax
> >
> >On Sun, 13 Mar 2022 10:05:18 -0400
> >Duncan Murdoch <murdoch.duncan using gmail.com> wrote:
> >
> >> The file used for display is usually a minified version of the
> >> MathJax source, and Debian didn't consider it close enough to source
> >> code to want to distribute it as FOSS.  So if the minified file is
> >> included with R, the original source should also be included.
> >
> >Pardon my ignorance, but how much does it matter whether the file is
> >minified when the documentation is served over a local network? Does
> >JavaScript minification speed up parsing or involve other
> >transformations without which it would be hard or impossible to run the
> >code in the browser?
> >
> >--
> >Best regards,
> >Ivan
> ______________________________________________
> R-devel using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel

	[[alternative HTML version deleted]]

More information about the R-devel mailing list