[−][src]Crate latex2mathml
latex2mathml
Provides a functionility to convert LaTeX math equations to MathML representation. This crate is implemented in pure Rust, so it works for all platforms including WebAssembly.
use latex2mathml::{latex_to_mathml, DisplayStyle}; let latex = r#"\erf ( x ) = \frac{ 2 }{ \sqrt{ \pi } } \int_0^x e^{- t^2} \, dt"#; let mathml = latex_to_mathml(latex, DisplayStyle::Block).unwrap(); println!("{}", mathml);
For converting a document including LaTeX equasions, the function replace
may be useful.
For more examples please check examples/equations.rs
and examples/document.rs
.
Modules
ast | |
attribute | |
token |
Enums
DisplayStyle | display style |
LatexError |
Functions
latex_to_mathml | Convert LaTeX text to MathML. |
replace | Find LaTeX equations and replace them to MathML. |