mathout {mathml} | R Documentation |
MathML or MathJax output, depending on the knitr context
Description
MathML or MathJax output, depending on the knitr context
Usage
mathout(term, flags = NULL, env = parent.frame())
inline(term, flags = NULL, env = parent.frame())
Arguments
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"). |
Details
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.
Value
A string with the MathML or MathJax representation of term.
See Also
Examples
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))
[Package mathml version 1.2 Index]