Correct Mathjax source in RStudio and RMarkdown

寵の児 提交于 2019-12-06 07:11:21

This was changed in the rmarkdown package just about a month ago (see this commit). You just need to install the latest version of the rmarkdown package:

> devtools::install_github("rstudio/rmarkdown")

(of course, you'll also need to install.packages("devtools") if you don't have devtools.)

Incidentally, even without this step, you can tell rmarkdown where you want to get MathJax from. This is useful if you want to point to a different CDN.

output:
  html_document:
    mathjax: https://d3eoax9i5htok0.cloudfront.net/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML

Finally, you can eliminate your MathJax CDN dependency entirely by using mathjax: local to use a built-in copy of MathJax in rmarkdown (note that you'll also need to set self_contained: no to do this).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!