[Rd] Using MathJax in R's help system

Hadley Wickham hadley at rice.edu
Wed Feb 2 17:38:59 CET 2011

On Wed, Feb 2, 2011 at 10:33 AM, Gong-Yi Liao <gong-yi.liao at uconn.edu> wrote:
> Thank you for comments,
>   1.   About MathJax's sheer size:
>        I think we can consider the following two cases:
>        A.  The user starts nanohttpd on his/her own PC and read the
>            help files in html
>            (i.e.    > options(help_type="html", browser="xdg_open")
>                     > ?svd  )
>              For this case, I think that  the user can just  install a
>              MathJax distribution on his/her own PC (or workstation)
>              and let the local nanohttpd send the MathJax scripts,
>              fonts and image files to user's browser.  Since all the
>              MathJax files are transmitted locally (i.e. at the same
>              IP, on the same machine), I think 130 MB  is not a big
>              issue in this case.

But the user still needs to get it in some way - an additional
installation step means that it's probably not suitable for inclusion
with base R.  It could possibly be bundled inside a package, using
some tricks to keep all the files in a single zip file, which reduces
the bundle size to a manageable 15 meg.

>        B.  The user reads the R help html pages,  which are hosted by
>            a third party httpd server
>             For this case, I think a CDN (Content Delivery Network)
>             hosting server is needed. MathJax's 130 MB size can be a
>             critical issue in this case.  As far as I know, there's
>             a site ( mathjax.connectmv.com ) providing such service,
>             but I can't imagine if all the R users around the world
>             request resources from this site 24-7, the site must
>             be DoSed.


>    2. About the helpr package:
>        I install the helpr package from CRAN, and, maybe due to my
>        problem,  the manual of this package is quite confusing to me.
>        I run the command helpr and my browser shows me the following
>        content:

Could you please provide a reproducible example?

The following steps should get you up and running:


The solr warnings will be removed in the next version - you can ignore
them for now.


Assistant Professor / Dobelman Family Junior Chair
Department of Statistics / Rice University

More information about the R-devel mailing list