mathout | R Documentation |
MathML or MathJax output, depending on the knitr context
mathout(term, flags = NULL, env = parent.frame())
inline(term, flags = NULL, env = parent.frame())
term |
an R call or symbol/number. This function translates term into a LaTeX/MathJax string. |
flags |
(default NULL) list of flags that control the translation |
env |
(default parent.frame()) The R environment in which r_eval is being executed (see vignette for details, "Ringing back to R"). |
This function checks knitr::is_html_output() and knitr::is_html_output() and invokes the respective function mathml() or mathjax(). Outside of knitr context, MathML is returned, and a warning is given.
A string with the MathML or MathJax representation of term.
mathml()
, mathjax()
, inline()
mathout(term=quote((a + b)^2L == a^2L + 2L*a*b + b^2L))
inline(term=quote((a + b)^2L == a^2L + 2L*a*b + b^2L))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.