[−][src]Function latex2mathml::latex_to_mathml
pub fn latex_to_mathml(
latex: &str,
display: DisplayStyle
) -> Result<String, LatexError>
Convert LaTeX text to MathML.
The second argument specifies whether it is inline-equation or block-equation.
use latex2mathml::{latex_to_mathml, DisplayStyle}; let latex = r#"(n + 1)! = \Gamma ( n + 1 )"#; let mathml = latex_to_mathml(latex, DisplayStyle::Inline).unwrap(); println!("{}", mathml); let latex = r#"x = \frac{ - b \pm \sqrt{ b^2 - 4 a c } }{ 2 a }"#; let mathml = latex_to_mathml(latex, DisplayStyle::Block).unwrap(); println!("{}", mathml);