LaTeX - Waigo01/math_utils_lib GitHub Wiki

The library provides the functionality to convert pretty much any result, be it a parsed expression (AST) or the actual results of an evaluation to a latex string. It will use the appropriate latex symbols for all operations.

The library also provides a convenient struct in which all information of an evaluation or function definition is saved. By iterating over a vector of this enum you can build entire latex documents containing all your mathematical steps with minimal code.

let parsed_expr = parse("3*3+6^5")?;
let res = eval(&parsed_expr, &mut Context::empty())?;
let step: Step<f64> = Step::new(parsed_expr, res);

If you also want to render the latex string into a PNG, SVG or a PDF you can enable the output feature in Cargo.toml. This will add some external libraries and helper functions, which are used to render a latex string.

⚠️ **GitHub.com Fallback** ⚠️