Title: | Equations to 'XML' |
---|---|
Description: | Provides function to transform latex math expressions into format 'HTML' or 'Office Open XML Math'. The 'XML' result can then be included in 'HTML', 'Microsoft Word' documents or 'Microsoft PowerPoint' presentations by using a 'Markdown' document or the R package 'officer'. |
Authors: | David Gohel [aut, cre], ArData [cph] |
Maintainer: | David Gohel <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.2.1 |
Built: | 2024-11-20 04:19:41 UTC |
Source: | https://github.com/ardata-fr/equatags |
Get 'HTML' or 'MathML' XML codes corresponding to the rendering of 'MathJax' equations.
transform_mathjax(x, to = "html", display = FALSE)
transform_mathjax(x, to = "html", display = FALSE)
x |
MathJax equations |
to |
output format, one of 'html' or 'mml' |
display |
should the equation be in display ( |
a character vector that contains 'html' or 'mml' codes corresponding to the equations.
x <- c("(ax^2 + bx + c = 0)", "x = {-b \\pm \\sqrt{b^2-4ac} \\over 2a}.") z <- transform_mathjax(x = x, to = "html") cat(z, sep = "\n\n") z <- transform_mathjax(x = x, to = "mml") cat(z, sep = "\n\n")
x <- c("(ax^2 + bx + c = 0)", "x = {-b \\pm \\sqrt{b^2-4ac} \\over 2a}.") z <- transform_mathjax(x = x, to = "html") cat(z, sep = "\n\n") z <- transform_mathjax(x = x, to = "mml") cat(z, sep = "\n\n")