This PR moves the Mathjax source to the javascript directory, and uses the js package to minify it from there. This reduces the installed size from 3,855,792 to 2,675,507 bytes on my system.
There are still some issues:
It generates a NOTE during R CMD check because it is using LinkingTo in an unconventional way.
To avoid the NOTE, it could move js to Suggests, and only minify when js is present.
If you want that, another possible change is to leave the Mathjax source where it is, and do nothing when js is not available.
I haven't done much testing that all of MathJax still works. Do you know of a package that makes a lot of use of it?
This PR moves the Mathjax source to the javascript directory, and uses the
js
package to minify it from there. This reduces the installed size from 3,855,792 to 2,675,507 bytes on my system.There are still some issues:
It generates a NOTE during R CMD check because it is using
LinkingTo
in an unconventional way.To avoid the NOTE, it could move
js
toSuggests
, and only minify whenjs
is present.If you want that, another possible change is to leave the Mathjax source where it is, and do nothing when
js
is not available.I haven't done much testing that all of MathJax still works. Do you know of a package that makes a lot of use of it?