[][src]Trait asciimath_rs::format::mathml::ToMathML

pub trait ToMathML {
    fn to_mathml(&self) -> String;
}

Trait to convert the given object into a MathML representation.

Required methods

fn to_mathml(&self) -> String

Loading content...

Implementors

impl ToMathML for ExpressionAccent[src]

impl ToMathML for Element[src]

impl ToMathML for Group[src]

impl ToMathML for Literal[src]

impl ToMathML for Special[src]

impl ToMathML for Accent[src]

impl ToMathML for Arrow[src]

impl ToMathML for FontCommand[src]

impl ToMathML for Function[src]

impl ToMathML for Greek[src]

impl ToMathML for Logical[src]

impl ToMathML for Misc[src]

impl ToMathML for Operation[src]

impl ToMathML for Relation[src]

impl ToMathML for Color[src]

impl ToMathML for GenericAccent[src]

impl ToMathML for OverSet[src]

impl ToMathML for UnderSet[src]

impl ToMathML for Abs[src]

impl ToMathML for Angles[src]

impl ToMathML for Braces[src]

impl ToMathML for Brackets[src]

impl ToMathML for Ceil[src]

impl ToMathML for Floor[src]

impl ToMathML for Matrix[src]

impl ToMathML for NonEnclosed[src]

impl ToMathML for Norm[src]

impl ToMathML for Parentheses[src]

impl ToMathML for Vector[src]

impl ToMathML for XGroup[src]

impl ToMathML for Number[src]

impl ToMathML for PlainText[src]

impl ToMathML for Symbol[src]

impl ToMathML for Expression[src]

fn to_mathml(&self) -> String[src]

Recursively converts the Expression into a MathML representation.

The result needs to be enclosed in <math></math> elements when used within an html file. Currently MathML is only natively supported by Firefox and Safari.

Example:

 use asciimath_rs::format::mathml::ToMathML;

 fn main() {
     let expression = asciimath_rs::parse("sin(2x - 1) + 2".to_string());
     println!("<math>{}</math>", expression.to_mathml());
 }

impl ToMathML for Frac[src]

impl ToMathML for Integral[src]

impl ToMathML for OIntegral[src]

impl ToMathML for Pow[src]

impl ToMathML for Prod[src]

impl ToMathML for Root[src]

impl ToMathML for Sqrt[src]

impl ToMathML for Sub[src]

impl ToMathML for Sum[src]

Loading content...