[Rd] Using MathJax in R's help system

Gong-Yi Liao gong-yi.liao at uconn.edu
Thu Feb 3 05:33:56 CET 2011

Thank you for reply, 

  I made some modification, the diff (against helpr 

  is attached. 

  What I did are 

  1. Install helpr by install.packages() 

  2. Download the MathJax distribution and extract it under 


  3. Create a new html snippet file _mathjax_config.html in 
  the $R_HOME/library/view directory and then make index.html, 

  package.html, topic.html, source.html, and whistle.html  

  include the line 

  <%= helpr:::render_snippet("mathjax_config") %>

  4. modify \\deqn part of th parse-rd.R from 
    "<code>... </code>" to "\\[ ... \\]"

    and similarly, for \\eqn part from 

    "<code>... </code>" to "$ ... $".

  The screenshot is also attached. 

  The rest question is, how to make R download the MathJax, 

  while install helpr?

  Any comments are appreciated.


On Wed, 2011-02-02 at 10:38 -0600, Hadley Wickham wrote: 
> 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.

> Agreed.
> >    2. About the helpr package:
> >
> >        
> Could you please provide a reproducible example?
> The following steps should get you up and running:
> install.packages("helpr")
> library(helpr)
> helpr()
> The solr warnings will be removed in the next version - you can ignore
> them for now.
> Hadley

Gong-Yi Liao

Department of Statistics
University of Connecticut
215 Glenbrook Road  U4120
Storrs, CT 06269-4120

-------------- next part --------------
A non-text attachment was scrubbed...
Name: helpr_mathjax.diff
Type: text/x-patch
Size: 1656 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-devel/attachments/20110202/66413063/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: helpr_with_mathjax.png
Type: image/png
Size: 104557 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-devel/attachments/20110202/66413063/attachment.png>

More information about the R-devel mailing list