【发布时间】:2020-06-23 14:51:45
【问题描述】:
我有一个使用 MathJax 的闪亮应用程序。在我的普通文本中,MathJax 会自动将括号中的文本转换为数学模式。哪个设置允许我为简单的括号转义数学模式?
在MWE,第一个Hello!应该打印为 (Hello!) 而不是数学模式。如何做到这一点?
MWE:
library(shiny)
server <- shinyServer(function(input, output) {
})
ui <- shinyUI(fluidPage(
withMathJax(),
tags$div(HTML("<script type='text/x-mathjax-config'>
MathJax.Hub.Config({
tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}
});
</script>
")),
titlePanel("Minimal application"),
sidebarLayout(
sidebarPanel(
fluidRow(h4("(Hello!)"))),
mainPanel(
fluidRow(h4("Hello!")))
)
))
shinyApp(ui=ui, server=server)
【问题讨论】: