This function adds MathJax to the page and typeset the math expressions (if
found) in the content ...
. It only needs to be called once in an app
unless the content is rendered after the page is loaded, e.g. via
renderUI()
, in which case we have to call it explicitly every
time we write math expressions to the output.
withMathJax(...)
... | any HTML elements to apply MathJax to |
---|
#> <span class="help-block">Some math here $$\alpha+\beta$$</span> #> <script>if (window.MathJax) MathJax.Hub.Queue(["Typeset", MathJax.Hub]);</script>#> <div>more math here $$\sqrt{2}$$</div>