Question

I want to display correctly formula in Shiny title, like in Latex:

X_n=X_{n-1}-\varepsilon_n

shinyUI(pageWithSidebar(

    headerPanel("Display formula in heading X_n=X_{n-1}-\varesilon"),

    sidebarPanel( ),

    mainPanel( )
  ))
Was it helpful?

Solution

You can use withMathJax

require(shiny)
runApp(
  list(ui = pageWithSidebar(

  headerPanel(withMathJax("$$\\text{Display formula in heading }X_n=X_{n-1}-\\varepsilon$$")),

  sidebarPanel( ),

  mainPanel( )
),
server= function(input, output, session){

}
)

)

MathJax example

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top