【发布时间】:2015-07-22 01:00:23
【问题描述】:
我想在 Shiny 面板中显示 -LaTeX 格式化公式,但我找不到将 textOutput 与 withMathJax 结合使用的方法。我尝试了以下但没有奏效。任何帮助将不胜感激。
--ui.r
...
tabPanel("Diagnostics", h4(textOutput("diagTitle")),
withMathJax(textOutput("formula")),
),
...
--server.r
...
output$formula <- renderText({
print(paste0("Use this formula: $$\\hat{A}_{\\small{\\textrm{M€}}} =", my_calculated_value,"$$"))
})
...
【问题讨论】:
-
奇怪,它在我的机器上运行良好(我刚刚删除了
print,但应该不会有太大变化)。不过我有shiny_0.11.1。此脚本文件:<script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"...是否已加载到您的页面上?看起来该链接已修复,所以也许这就是问题 -
是的,在页面源代码中我看到它已加载。 src="cdn.mathjax.org/mathjax/latest/…" type="text/javascript"