[R-pkg-devel] MathJax for Rd files

Viechtbauer, Wolfgang (SP) wo||g@ng@v|echtb@uer @end|ng |rom m@@@tr|chtun|ver@|ty@n|
Wed May 13 09:39:51 CEST 2020


Dear Olivoto,

There is a package now for this purpose:

https://cran.r-project.org/package=mathjaxr
https://github.com/wviechtb/mathjaxr

Best,
Wolfgang

>-----Original Message-----
>From: R-package-devel [mailto:r-package-devel-bounces using r-project.org] On
>Behalf Of Tiago Olivoto
>Sent: Wednesday, 13 May, 2020 8:55
>To: r-package-devel using r-project.org
>Subject: [R-pkg-devel] MathJax for Rd files
>
>Dear all,
>
>I'm not sure if this is the correct place to make this question, but here I
>am.
>
>I'm trying to use MathJax for html help files in my package metan
>(https://cran.r-project.org/package=metan)
>
>I have success with the following approach:
>
>Including the following call
>
>#'\if{html}{\out{
>
>#'<script id="MathJax-script" async
>
>#'src="https://cdn.jsdelivr.net/npm/mathjax@3.0.5/es5/tex-chtml-full.js">
>
>#'  </script>
>
>#'}}
>
>And then typing the equations I need. A simple example bellow
>
>#' \ifelse{html}{\out{\[\sqrt{a^2}\]}}{\deqn{\sqrt{a^2}}}
>
>Is there any way to put "tex-chtml-full.js" locally so that everyone that
>has my package installed see the equations rendered properly even offline?
>
>Thanks in advance
>
>Olivoto



More information about the R-package-devel mailing list