Learn R Programming

R2HTML (version 2.3.4)

HTML.latex: Insert a piece of LaTeX into a HTML file

Description

This makes use of AsciiMathML javascript functions. Standard LaTeX input will be turned into MathML and displayed through any brower extension that can handle MathML (such as MathPlayer)

Usage

as.latex(x, label=NULL,
inline=ifelse(is.null(label), TRUE, FALSE), count=ifelse(is.null(label), FALSE, TRUE))
# S3 method for latex
HTML(x, file = HTMLGetFile(), ...)

Value

no value returned.

Arguments

x

String containing mathematics in a LaTeX notation

file

HTML target output file

label

String - Label to be displayed before the equation

inline

Boolean - Place of the equation within the output flux - see details

count

Boolean - Should the equation be numbered or not?

...

...

Author

Eric Lecoutre

Details

Mathematical notations will be translated in MathML by the AsciiMathML javascript program of Peter Jipsen. Note that his functions allow translating equations with a notation simpler than LaTeX (see his page on AsciiMathML for details). Pieces of LaTeX could be put inline (within text) or on a single line : same opposition that the one between $...$ and $$...$$. In order to work, a reference to the javascipt file has to be present within the HTML file and the HTML body tag has also to include onload="translate()". All the necessary stuff is included in HTMLInitFile.

References

AsciiMathML: http://www1.chapman.edu/~jipsen/mathml/asciimath.xml

See Also

HTMLInitFile,HTML