Function push_mathml
Source pub fn push_mathml<'a, I, E>(
string: &mut String,
parser: I,
config: RenderConfig<'a>,
) -> Result<()>
Expand description
Takes a Parser
, or any Iterator<Item = Result<Event<'_>, E>>
as input, and renders
the MathML into the given string.
examples/write_to_string.rs (
line 14)
8fn main() {
9 let storage = Storage::new();
10 let parser = Parser::new(INPUT_LATEX, &storage);
11 let mut mathml = String::new();
12 let config = Default::default();
13
14 match push_mathml(&mut mathml, parser, config) {
15 Ok(()) => println!("{}", mathml),
16 Err(e) => eprintln!("Error while rendering: {}", e),
17 }
18}