【问题标题】:Mathjax error in Rmarkdown+Shiny, even if Mathjax is set to 'null'Rmarkdown+Shiny 中的 Mathjax 错误,即使 Mathjax 设置为“null”
【发布时间】:2014-11-26 07:31:18
【问题描述】:

我无法在 RStudio 0.98.1049 中编译我的 .Rmd 文件,虽然它以前可以工作(我猜是几周前)。

这是一个例子:

---
title: 'Test'
runtime: shiny
output: html_document 
---

# Context

Test

即使我将选项 mathjax: null 添加到前面的代码中,我也会收到以下消息:

Error in pandoc_mathjax_local_path() : 
  For mathjax = "local", please set the RMARKDOWN_MATHJAX_PATH 
environment variable to the location of MathJax. 
On Linux systems you can also install MathJax using your system package manager.

如果我删除提及runtime: shiny,它会完美运行,但我想保留它以获得交互式 HTML 文档。 你知道它来自哪里和/或我应该做什么吗? 非常感谢。


这是我的 sessionInfo():

R version 3.1.1 (2014-07-10)
Platform: i386-w64-mingw32/i386 (32-bit)

locale:
[1] LC_COLLATE=French_France.1252  LC_CTYPE=French_France.1252    LC_MONETARY=French_France.1252
[4] LC_NUMERIC=C                   LC_TIME=French_France.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] digest_0.6.4    htmltools_0.2.6 rmarkdown_0.3.3 tools_3.1.1     yaml_2.1.13

【问题讨论】:

  • 有人能重现我的(仍在进行中的)问题吗?谢谢。
  • 我已按照here 给出的建议:我运行 RStudio 0.98.1079,现在它又可以工作了。

标签: r shiny mathjax r-markdown


【解决方案1】:

最新版本的 rmarkdown 包不再捆绑 MathJax,因为这使得该包太大而无法在 CRAN 上使用。

但是,如果您安装最新的 RStudio(最低版本:0.98.1058),它会包含 MathJax,并且会向 rmarkdown 发布广告,它可以在其中找到它,因此应该可以解决此问题。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2018-07-05
    • 2014-03-02
    • 2019-02-09
    • 2018-11-10
    • 2020-12-09
    • 2021-01-17
    • 2016-03-05
    • 2017-12-06
    相关资源
    最近更新 更多