wviechtb / mathjaxr

R package to make use of Mathjax in Rd files
47 stars 6 forks source link

Formulas in help pages are not rendered on Windows #6

Closed roundnose closed 3 years ago

roundnose commented 3 years ago

I have met the same trouble as described at stackoverflow-66106745.

In implementation of matjhaxr, the formulas in help documentation are not rendered on win 10 platform. What causes this behavior?

wviechtb commented 3 years ago

Indeed, that seems to be some kind of Windows issue (confirmed under Windows 7 and 10). In the recent update to mathjaxr, the MathJax library is included in a slightly different way and that seems to cause this problem.

As a workaround for the moment, you can use Sys.setenv(MATHJAXR_USECDN=TRUE) to force use of the CDN instead of using the locally installed MathJax library.

Also, if you install mathjaxr from the source package (with install.packages("https://cran.r-project.org/src/contrib/mathjaxr_1.2-0.tar.gz")), then it also should work.

Could you confirm that these workarounds work for you?

I will try to fix the underlying issue as soon as I can figure out where the problem is coming from.

roundnose commented 3 years ago

Yep! Both of the two treatments work well while the use of CND is slightly slow.

wviechtb commented 3 years ago

Thanks for confirming. And that's to be expected with the CDN. Ok, for now at least you have a workaround. Will try to fix the actual issue asap.

wviechtb commented 3 years ago

Thanks again for raising this issue. This should be fixed now in 730b342. Will submit a new version to CRAN soon.

roundnose commented 3 years ago

It is available on CRAN and it is workable on Win-platform. Thank u.

wviechtb commented 3 years ago

Reopening until I am 100% sure it is working. As far as I can tell, at the moment, CRAN only has the 1.4-0 version as source; the zip binary for Windows is being built. Once https://cran.r-project.org/package=mathjaxr shows that mathjaxr_1.4-0.zip is available, please try again (as will I). Then we can be certain that it is working properly.

wviechtb commented 3 years ago

Ok, confirmed to work now under Windows when installing the binary from CRAN, so closing this for good.