title: LaTeX formula in Shiny panel
body: <p>I want to display a -LaTeX formated- formula in a Shiny panel, but I can't find a way to combine <code>textOutput</code> with <code>withMathJax</code>. I tried the following but it didn't work. Any help would be gratefully appreciated. </p>
  
  <p>--ui.r</p>
  
  <pre><code>...
      tabPanel("Diagnostics", h4(textOutput("diagTitle")),
  withMathJax(textOutput("formula")),
  ),
  ...
  </code></pre>
  
  <p>--server.r</p>
  
  <pre><code>...
  output$formula &lt;- renderText({
      print(paste0("Use this formula: $$\\hat{A}_{\\small{\\textrm{M€}}} =", my_calculated_value,"$$"))
  })
  ...
  </code></pre>